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.
2018-07-16 08:28:45 +00:00
## Demo
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
Please use GNS3 WebUI bundled in `gns3server` and `gns3` .
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
## Development
2017-09-25 11:07:52 +00:00
2018-12-10 11:37:17 +00:00
### Branches policy
On branch `master` you can find the latest codebase including under development features. If you are looking for stable version with features promoted to be included in the current/next release please switch to `stable` branch.
2018-07-16 08:28:45 +00:00
### Installation
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
We're using [yarn ](https://yarnpkg.com/lang/en/ ) for packages installation:
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
```
yarn install
```
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
#### Run GNS3 server
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
Visit [gns3-server ](https://github.com/GNS3/gns3-server ) for guide how to run GNS3 server.
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
#### Run WebUI
2017-09-25 11:07:52 +00:00
```
2018-07-16 08:28:45 +00:00
yarn ng serve
2017-09-25 11:07:52 +00:00
```
2018-07-16 08:28:45 +00:00
Application is accessible on `http://127.0.0.1:4200/` . The app will automatically reload if you change any of the source files.
2017-09-25 11:07:52 +00:00
2018-02-21 12:21:32 +00:00
### Docker container
2018-07-16 08:28:45 +00:00
For development you can also run the GNS3 Web UI in a container
2018-02-21 12:21:32 +00:00
2018-07-16 08:28:45 +00:00
```
bash scripts/docker_dev_webui.sh
```
2018-02-21 12:21:32 +00:00
2018-07-16 08:28:45 +00:00
### How to upgrade package.json?
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
```
yarn upgrade --latest
```
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
### gns3server bundled in WebUI - electron based
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
In special cases it's possible to build `gns3server` for GNS3 WebUI. This version is included in `electronjs` dist application.
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
```
python3 scripts/build.py build -b dist
```
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +00:00
### Code scaffolding
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +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
2018-07-16 08:28:45 +00:00
### Build
2017-09-25 11:07:52 +00:00
2018-07-16 08:28:45 +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
2018-07-16 08:28:45 +00:00
### Running unit tests
Run `yarn ng test` to execute the unit tests via [Karma ](https://karma-runner.github.io ).
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
2018-07-16 08:28:45 +00:00
## Releasing
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
2018-07-16 08:28:45 +00:00
### Bumping releases
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
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
2018-07-16 08:28:45 +00:00
### Distribute release
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
2018-07-16 08:28:45 +00:00
We have got configured CircleCI, TravisCI and AppVeyor for distributing application for particular platform. In order to release you need to tag& push your changes.
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
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
2018-07-16 08:28:45 +00:00
### Staging release
2018-01-18 09:18:59 +00:00
2018-07-16 08:28:45 +00:00
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 artifacts there.
2018-01-18 09:18:59 +00:00
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` .