Merge branch 'master' into add-text

This commit is contained in:
ziajka 2019-01-10 07:53:52 +01:00
commit 39778f9513
9 changed files with 448 additions and 412 deletions

View File

@ -116,6 +116,9 @@ You may use `bump` to achieve that:
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.
### Updating signing certificate for Windows
Please follow this guide: [code-signing](https://www.electron.build/code-signing), use `certmgr.msc` exporting tool to limit the size of certificate.
## Further help

View File

@ -1,7 +1,6 @@
appId: com.gns3.web-ui
copyright: "Copyright © 2018 GNS3"
productName: "GNS3 Web UI"
#forceCodeSigning: true
artifactName: "${productName}-${os}-${arch}-${version}.${ext}"
asar: true
compression: normal
@ -49,6 +48,10 @@ win:
provider: "github"
owner: "GNS3"
icon: "dist/assets/icons/win/icon.ico"
publisherName: GNS3 Technologies Corporation
nsis:
perMachine: true
oneClick: false
allowToChangeInstallationDirectory: true
license: "LICENSE"

View File

@ -48,6 +48,10 @@ const createServerProc = () => {
}
});
if (serverPath == null) {
console.error('gns3server cannot be found');
}
if (serverPath != null) {
serverProc = require('child_process').execFile(serverPath, []);
@ -72,6 +76,7 @@ function createWindow () {
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
preload: path.join(__dirname, 'sentry.js')
}
});

View File

@ -1,6 +1,11 @@
{
"name": "gns3-web-ui",
"version": "0.0.1-beta.0",
"author": {
"name": "GNS3 Technology Inc.",
"email": "developers@gns3.com"
},
"description": "Graphical Network Simulator-3 is a network software emulator.",
"license": "GPLv3",
"main": "main.js",
"repository": {
@ -31,25 +36,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^7.1.2",
"@angular/cdk": "^7.1.1",
"@angular/common": "^7.1.2",
"@angular/compiler": "^7.1.2",
"@angular/core": "^7.1.2",
"@angular/forms": "^7.1.2",
"@angular/http": "^7.1.2",
"@angular/material": "^7.1.1",
"@angular/platform-browser": "^7.1.2",
"@angular/platform-browser-dynamic": "^7.1.2",
"@angular/router": "^7.1.2",
"@angular/animations": "^7.1.4",
"@angular/cdk": "^7.2.0",
"@angular/common": "^7.1.4",
"@angular/compiler": "^7.1.4",
"@angular/core": "^7.1.4",
"@angular/forms": "^7.1.4",
"@angular/http": "^7.1.4",
"@angular/material": "^7.2.0",
"@angular/platform-browser": "^7.1.4",
"@angular/platform-browser-dynamic": "^7.1.4",
"@angular/router": "^7.1.4",
"angular-persistence": "^1.0.1",
"angular2-hotkeys": "^2.1.4",
"angular2-indexeddb": "^1.2.3",
"bootstrap": "4.1.3",
"core-js": "^2.6.0",
"bootstrap": "4.2.1",
"core-js": "^2.6.1",
"css-tree": "^1.0.0-alpha.29",
"d3-ng2-service": "^2.1.0",
"electron-settings": "^3.2.0",
"hammerjs": "^2.0.8",
"material-design-icons": "^3.0.1",
"ng2-file-upload": "^1.3.0",
@ -63,34 +67,34 @@
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.11.2",
"@angular/cli": "^7.1.2",
"@angular/compiler-cli": "^7.1.2",
"@angular/language-service": "^7.1.2",
"@angular-devkit/build-angular": "~0.11.4",
"@angular/cli": "^7.1.4",
"@angular/compiler-cli": "^7.1.4",
"@angular/language-service": "^7.1.4",
"@sentry/electron": "^0.14.0",
"@types/jasmine": "~3.3.0",
"@types/jasmine": "~3.3.5",
"@types/jasminewd2": "~2.0.6",
"@types/node": "~10.12.12",
"@types/node": "~10.12.18",
"codelyzer": "~4.5.0",
"electron": "3.0.11",
"electron-builder": "^20.38.2",
"electron": "4.0.0",
"electron-builder": "^20.38.4",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"jquery": "^3.3.1",
"karma": "~3.1.3",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"license-checker": "^24.0.1",
"license-checker": "^24.1.0",
"node-sass": "^4.11.0",
"popper.js": "^1.14.6",
"prettier": "^1.15.2",
"protractor": "~5.4.1",
"protractor": "~5.4.2",
"ts-mockito": "^2.3.1",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"tslint": "~5.12.0",
"tslint-config-prettier": "^1.16.0",
"typescript": "<3.2.0"
},

View File

@ -84,7 +84,7 @@ def download_command(arguments):
shutil.rmtree(SOURCE_DESTINATION, ignore_errors=True)
os.makedirs(SOURCE_DESTINATION)
download("https://github.com/GNS3/gns3-server/archive/2.1.zip", SOURCE_ZIP)
download("https://github.com/GNS3/gns3-server/archive/2.2.zip", SOURCE_ZIP)
files = unzip(SOURCE_ZIP, SOURCE_DESTINATION)
source_directory = os.path.join(SOURCE_DESTINATION, files[0].filename)

View File

@ -1,6 +1,7 @@
const { init } = require('@sentry/electron');
const fs = require('fs');
const { ipcMain } = require('electron');
const { ipcMain } = require('electron')
let crashReportsEnabled = true;
const DSN =

View File

@ -39,7 +39,7 @@ export class LabelWidget implements Widget {
const label_enter = label_view.enter()
.append<SVGGElement>('g')
.attr('class', 'label_container')
.attr('label_id', (l: MapLabel) => l.id)
.attr('label_id', (label: MapLabel) => label.id)
const merge = label_view.merge(label_enter);
@ -56,8 +56,6 @@ export class LabelWidget implements Widget {
private drawLabel(view: SVGSelection) {
const self = this;
const label_body = view.selectAll<SVGGElement, MapLabel>("g.label_body")
.data((label) => [label]);
@ -78,17 +76,17 @@ export class LabelWidget implements Widget {
label_body_merge
.select<SVGTextElement>('text.label')
.attr('label_id', (l: MapLabel) => l.id)
.attr('style', (l: MapLabel) => {
let styles = this.cssFixer.fix(l.style);
.attr('label_id', (label: MapLabel) => label.id)
.attr('style', (label: MapLabel) => {
let styles = this.cssFixer.fix(label.style);
styles = this.fontFixer.fixStyles(styles);
return styles;
})
.text((l: MapLabel) => l.text)
.attr('x', (l: MapLabel) => l.x)
.attr('y', (l: MapLabel) => l.y)
.attr('transform', (l: MapLabel) => {
return `rotate(${l.rotation}, ${l.x}, ${l.y})`;
.text((label: MapLabel) => label.text)
.attr('x', (label: MapLabel) => label.x)
.attr('y', (label: MapLabel) => label.y)
.attr('transform', (label: MapLabel) => {
return `rotate(${label.rotation}, ${label.x}, ${label.y})`;
})
label_body_merge
@ -98,9 +96,9 @@ export class LabelWidget implements Widget {
.attr('stroke-dasharray', '3,3')
.attr('stroke-width', '0.5')
.attr('fill', 'none')
.each(function (this: SVGRectElement, l: MapLabel) {
.each(function (this: SVGRectElement, label: MapLabel) {
const current = select(this);
const textLabel = label_body_merge.select<SVGTextElement>(`text[label_id="${l.id}"]`);
const textLabel = label_body_merge.select<SVGTextElement>(`text[label_id="${label.id}"]`);
const bbox = textLabel.node().getBBox();
const border = 2;
@ -108,7 +106,7 @@ export class LabelWidget implements Widget {
current.attr('height', bbox.height + border * 2);
current.attr('x', bbox.x - border);
current.attr('y', bbox.y - border);
current.attr('transform', `rotate(${l.rotation}, ${bbox.x - border}, ${bbox.y - border})`);
current.attr('transform', `rotate(${label.rotation}, ${label.x}, ${label.y})`);
});
}

View File

@ -13,7 +13,7 @@
if (userAgent.indexOf(' electron/') > -1) {
var base = document.getElementsByTagName('base');
if(base.length > 0) {
base.href ='./';
base[0].href ='./';
}
else {
document.write('<base href="./" />');

758
yarn.lock

File diff suppressed because it is too large Load Diff