2017-09-25 09:27:22 +00:00
# gns3-web-ui
2017-09-25 11:07:52 +00:00
2018-03-12 13:22:02 +00:00
[![Greenkeeper badge ](https://badges.greenkeeper.io/GNS3/gns3-web-ui.svg )](https://greenkeeper.io/)
[![Travis CI ](https://api.travis-ci.org/GNS3/gns3-web-ui.svg?branch=master )](https://travis-ci.org)
[![AppVeyor ](https://ci.appveyor.com/api/projects/status/github/GNS3/gns3-web-ui?branch=master&svg=true )](https://www.appveyor.com/)
[![CircleCI ](https://circleci.com/gh/GNS3/gns3-web-ui/tree/master.png )](https://circleci.com/gh/GNS3/gns3-web-ui/tree/master.png)
[![codecov ](https://codecov.io/gh/GNS3/gns3-web-ui/branch/master/graph/badge.svg )](https://codecov.io/gh/GNS3/gns3-web-ui)
2018-01-23 08:19:04 +00:00
2017-09-25 11:07:52 +00:00
Test WebUI implementation for GNS3.
This is not production ready version. It has been made to evaluate possibility of creation Web User Interface for GNS3 application.
This project was generated with [Angular CLI ](https://github.com/angular/angular-cli ) version 1.2.6.
## Installation for development
2018-03-26 10:04:28 +00:00
Please install `yarn` if not present in your system.
2017-09-25 11:07:52 +00:00
2018-03-26 10:04:28 +00:00
In the root of project please type to install dependencies:
2017-09-25 11:07:52 +00:00
```
2018-03-26 10:04:28 +00:00
yarn
2017-09-25 11:07:52 +00:00
```
## Development server
### Run GNS3 server
Please run locally GNS3 server.
### Using default CORS policy.
GNS3 server contains CORS policies to run Web UI on 8080 at localhost. In order to use it, please run development server with custom port:
```
2018-03-26 10:04:28 +00:00
yarn ng serve --port 8080
2017-09-25 11:07:52 +00:00
```
Application is accessible on `http://localhost:8080/` . The app will automatically reload if you change any of the source files.
2018-02-21 12:21:32 +00:00
### Docker container
For development you can run the GNS3 Web UI in a container
.. code:: bash
bash scripts/docker_dev_webui.sh
2017-09-25 11:07:52 +00:00
## Code scaffolding
2018-03-26 10:04:28 +00:00
Run `yarn ng generate component component-name` to generate a new component. You can also use `yarn ng generate directive|pipe|service|class|module` .
2017-09-25 11:07:52 +00:00
## Build
2018-03-26 10:04:28 +00:00
Run `yarn ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
2017-09-25 11:07:52 +00:00
## Running unit tests
2018-03-26 10:04:28 +00:00
Run `yarn ng test` to execute the unit tests via [Karma ](https://karma-runner.github.io ).
2017-09-25 11:07:52 +00:00
## Running end-to-end tests
2018-03-26 10:04:28 +00:00
Run `yarn ng e2e` to execute the end-to-end tests via [Protractor ](http://www.protractortest.org/ ).
2017-09-25 11:07:52 +00:00
Before running the tests make sure you are serving the app via `ng serve` .
Icons set
Build electron for Linux, Windows and macOS. Ref. #18, #19, #20, #22
Include gns3server in electron app. Ref. #21
Bumping version Ref. #24
CD and Release for AppVeyor, CircleCi and TCI. Ref. #25, #26, #27, #28
Make lighter artifacts #31
Build gns3server for Linux, Windows and macOS. Ref. #33, #34, #35
2018-01-04 11:50:20 +00:00
# How to build gns3server for WebUI?
python3 scripts/build.py build -b dist
# Releasing
## Bumping releases
We're using [version-bump-prompt ](https://www.npmjs.com/package/version-bump-prompt ) for increasing version.
2018-03-26 10:04:28 +00:00
Install `version-bump-prompt` via:
Icons set
Build electron for Linux, Windows and macOS. Ref. #18, #19, #20, #22
Include gns3server in electron app. Ref. #21
Bumping version Ref. #24
CD and Release for AppVeyor, CircleCi and TCI. Ref. #25, #26, #27, #28
Make lighter artifacts #31
Build gns3server for Linux, Windows and macOS. Ref. #33, #34, #35
2018-01-04 11:50:20 +00:00
npm install -g version-bump-prompt
If you would like to bump prepatch just type:
bump --prepatch --tag --push
## Final release
We have got configured CircleCI, TravisCI and AppVeyor for distributing application for particular platform. In order to release you need to tag your code nad push it.
Using `bump` :
bump --patch --tag --push
Or manually:
git tag v0.0.1
git push origin v0.0.1
When artifacts are made you can see draft release here: [gns3-web-ui releases ](https://github.com/GNS3/gns3-web-ui/releases ) which is waiting to be published.
After release please change current version in `package.json` to `X.X.X-beta.0` '. Otherwise artifacts will be overwritten during the next commit.
You may use `bump` to achieve that:
bump --prepatch
## Staging release
In case you would like to create a new staging release. Please create draft release on github, like `0.0.1-dev1` . After successful build you can find there artifacts.
2018-01-18 09:18:59 +00:00
# Development
## How to upgrade package.json?
yarn upgrade --latest
Icons set
Build electron for Linux, Windows and macOS. Ref. #18, #19, #20, #22
Include gns3server in electron app. Ref. #21
Bumping version Ref. #24
CD and Release for AppVeyor, CircleCi and TCI. Ref. #25, #26, #27, #28
Make lighter artifacts #31
Build gns3server for Linux, Windows and macOS. Ref. #33, #34, #35
2018-01-04 11:50:20 +00:00
2017-09-25 11:07:52 +00:00
## Further help
If you want to contribute to GNS3 Web UI feel free to reach us at `developers@gns3.net` .