Skip to content

Commit

Permalink
Add the manager UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Senyoret1 committed Mar 9, 2020
1 parent c49c613 commit 02906b1
Show file tree
Hide file tree
Showing 411 changed files with 34,579 additions and 0 deletions.
13 changes: 13 additions & 0 deletions static/skywire-manager-src/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
39 changes: 39 additions & 0 deletions static/skywire-manager-src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
!/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
49 changes: 49 additions & 0 deletions static/skywire-manager-src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Skywire Manager

Frontend application that allows to manage a group of Skywire nodes through a Hypervisor instance.

Note: The software is still under heavy development and the current version is intended for public testing purposes only.

## Prerequisites

The Skywire Manager requires Node 10.9.0 or higher, together with NPM 6.0.0 or higher.

## Initial configuration

Dependencies needed for this app are managed with NPM and are not included in the repository, so you must run the `npm install`
command on this folder before being able to tun the app.

Also, as the app needs a HTTPS connection to work, you may want to create a SSL certificate for the dev server. This step is
optional, as the dev server can create its own certificate, but there are 2 reasons for manually creating one: to avoid a bug
in the dev server that sometimes makes it to reload the app when it shouild not
(https://github.com/angular/angular-cli/issues/5826) and to have more freedom managing the trusted certificates. For creating
a custom certificate, follow the steps in the [ssl folder](./ssl/README.md)

## Hypervisor configuration

For the app to work, the Hypervisor instance must be running with authentication disabled or with a password set for the
"admin" account. For running the hypervisor instance without authentication, start it with the `enable_auth` configuration
value set to `false` in the Hypervisor configuration file or using the `-m` flag. For setting a password for the "admin"
account, use the `/create-account` API endpoint.

Also, the Hypervisor instance must be running in `http://localhost:8080`. If it is running in another URL, you can change it in
[proxy.config.json](proxy.config.json) before running the app.

## Running the app

Run `npm run start` to start a dev server. If you followed the steps indicated in the [ssl folder](./ssl/README.md), the server
will use your custom SSL certificate. If not, the server will use an automatically created one. Alternatively, if you don't
want to use a https connection you can start the dev server by running `npm run start-no-ssl`, but the manager will not work
unless the hypervisor instance has the autentication options deactivated.

After the server is started, you can access the app by navigating to `http://localhost:4200` with a web browser (note
that you could get a security warning if the SSL certificate is not in the trusted certificates list). The app will
automatically reload if you change any of the source files.

## Build

Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Translations

You can find information about how to work with translation files in the [Translations README](/static/skywire-manager-src/src/assets/i18n/README.md).
138 changes: 138 additions & 0 deletions static/skywire-manager-src/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"skywire-manager": {
"root": "",
"sourceRoot": "./src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets/img"
],
"styles": [
"src/styles.scss",
"src/theme.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"src/assets/scss"
]
},
"scripts": ["src/assets/scripts/terminal.js"]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "skywire-manager:build"
},
"configurations": {
"production": {
"browserTarget": "skywire-manager:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "skywire-manager:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss",
"src/theme.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets/img"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"skywire-manager-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "skywire-manager:serve"
},
"configurations": {
"production": {
"devServerTarget": "skywire-manager:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "skywire-manager"
}
1 change: 1 addition & 0 deletions static/skywire-manager-src/dist/0.e360798a1bfa392cf814.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"ZF/7":function(n){n.exports={}}}]);
1 change: 1 addition & 0 deletions static/skywire-manager-src/dist/1.fbef269f1cdd8be2fee5.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 02906b1

Please sign in to comment.