mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-19 04:57:51 +00:00
Merge branch 'master' into Rewriting-custom-adapters-component
This commit is contained in:
commit
ebde71eba5
@ -4,8 +4,8 @@ version: 1.0.{build}
|
||||
skip_branch_with_pr: true
|
||||
|
||||
cache:
|
||||
- node_modules
|
||||
- '%LOCALAPPDATA%/Yarn'
|
||||
- node_modules -> .appveyor.yml,package.json,yarn.lock
|
||||
- '%LOCALAPPDATA%\Yarn -> .appveyor.yml,package.json,yarn.lock'
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
@ -14,6 +14,7 @@ files:
|
||||
- renderer.js
|
||||
- sentry.js
|
||||
- installed-software.js
|
||||
- local-server.js
|
||||
- package.json
|
||||
|
||||
mac:
|
||||
|
@ -191,7 +191,7 @@ async function run(server, options) {
|
||||
notifyStatus({
|
||||
serverName: server.name,
|
||||
status: 'errored',
|
||||
message: `Server errored: '${errorMessage}`
|
||||
message: `Server errored: '${err}`
|
||||
});
|
||||
});
|
||||
|
||||
|
74
package.json
74
package.json
@ -38,71 +38,71 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@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/animations": "^7.2.7",
|
||||
"@angular/cdk": "^7.3.3",
|
||||
"@angular/common": "^7.2.7",
|
||||
"@angular/compiler": "^7.2.7",
|
||||
"@angular/core": "^7.2.7",
|
||||
"@angular/forms": "^7.2.7",
|
||||
"@angular/http": "^7.2.7",
|
||||
"@angular/material": "^7.3.3",
|
||||
"@angular/platform-browser": "^7.2.7",
|
||||
"@angular/platform-browser-dynamic": "^7.2.7",
|
||||
"@angular/router": "^7.2.7",
|
||||
"angular-persistence": "^1.0.1",
|
||||
"angular2-hotkeys": "^2.1.4",
|
||||
"angular2-indexeddb": "^1.2.3",
|
||||
"bootstrap": "4.2.1",
|
||||
"bootstrap": "4.3.1",
|
||||
"command-exists": "^1.2.8",
|
||||
"core-js": "^2.6.1",
|
||||
"core-js": "^2.6.5",
|
||||
"css-tree": "^1.0.0-alpha.29",
|
||||
"d3-ng2-service": "^2.1.0",
|
||||
"hammerjs": "^2.0.8",
|
||||
"material-design-icons": "^3.0.1",
|
||||
"ng2-file-upload": "^1.3.0",
|
||||
"ngx-electron": "^2.0.0",
|
||||
"ngx-electron": "^2.1.1",
|
||||
"node-fetch": "^2.3.0",
|
||||
"notosans-fontface": "^1.1.0",
|
||||
"raven-js": "^3.27.0",
|
||||
"rxjs": "^6.3.3",
|
||||
"rxjs-compat": "^6.3.3",
|
||||
"rxjs": "^6.4.0",
|
||||
"rxjs-compat": "^6.4.0",
|
||||
"typeface-roboto": "^0.0.54",
|
||||
"yargs": "^12.0.5",
|
||||
"zone.js": "^0.8.26"
|
||||
"yargs": "^13.2.1",
|
||||
"tree-kill": "^1.2.1",
|
||||
"zone.js": "^0.8.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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.5",
|
||||
"@angular-devkit/build-angular": "~0.13.3",
|
||||
"@angular/cli": "^7.3.3",
|
||||
"@angular/compiler-cli": "^7.2.7",
|
||||
"@angular/language-service": "^7.2.7",
|
||||
"@sentry/electron": "^0.16.0",
|
||||
"@types/jasmine": "~3.3.9",
|
||||
"@types/jasminewd2": "~2.0.6",
|
||||
"@types/node": "~10.12.18",
|
||||
"@types/node": "~11.9.5",
|
||||
"codelyzer": "~4.5.0",
|
||||
"electron": "4.0.0",
|
||||
"electron-builder": "^20.38.4",
|
||||
"electron": "4.0.6",
|
||||
"electron-builder": "20.38.2",
|
||||
"jasmine-core": "~3.3.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"jquery": "^3.3.1",
|
||||
"karma": "~3.1.4",
|
||||
"karma": "~4.0.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-cli": "~2.0.0",
|
||||
"karma-coverage-istanbul-reporter": "^2.0.4",
|
||||
"karma-coverage-istanbul-reporter": "^2.0.5",
|
||||
"karma-jasmine": "~2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"license-checker": "^24.1.0",
|
||||
"license-checker": "^25.0.1",
|
||||
"node-sass": "^4.11.0",
|
||||
"popper.js": "^1.14.6",
|
||||
"prettier": "^1.15.2",
|
||||
"popper.js": "^1.14.7",
|
||||
"prettier": "^1.16.4",
|
||||
"protractor": "~5.4.2",
|
||||
"replace": "^1.0.1",
|
||||
"tree-kill": "^1.2.1",
|
||||
"ts-mockito": "^2.3.1",
|
||||
"ts-node": "~7.0.1",
|
||||
"tslint": "~5.12.0",
|
||||
"tslint-config-prettier": "^1.16.0",
|
||||
"typescript": "<3.2.0"
|
||||
"ts-node": "~8.0.2",
|
||||
"tslint": "~5.13.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "<3.3.0"
|
||||
},
|
||||
"greenkeeper": {
|
||||
"ignore": [
|
||||
|
@ -1,6 +1,7 @@
|
||||
setuptools==38.4
|
||||
setuptools==40.8.0
|
||||
cx_Freeze==5.1.1
|
||||
requests==2.20.0
|
||||
packaging==16.8
|
||||
requests==2.21.0
|
||||
packaging==19.0
|
||||
appdirs==1.4.3
|
||||
psutil==5.4.0
|
||||
psutil==5.5.1
|
||||
jsonschema==2.6.0 # lock down jsonschema, 3.0 makes problems
|
@ -25,8 +25,8 @@ export class DrawingAddingComponent implements OnInit, OnDestroy {
|
||||
|
||||
activate() {
|
||||
let listener = (event: MouseEvent) => {
|
||||
let x = event.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
let y = event.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
let x = event.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
let y = event.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
|
||||
this.drawingsEventSource.pointToAddSelected.emit(new AddedDataEvent(x, y));
|
||||
this.deactivate();
|
||||
|
@ -54,8 +54,8 @@ export class TextEditorComponent implements OnInit, OnDestroy {
|
||||
this.drawingsEventSource.textAdded.emit(
|
||||
new TextAddedDataEvent(
|
||||
this.temporaryTextElement.nativeElement.innerText.replace(/\n$/, ''),
|
||||
event.pageX,
|
||||
event.pageY
|
||||
event.pageX - this.context.transformation.x,
|
||||
event.pageY - this.context.transformation.y
|
||||
)
|
||||
);
|
||||
this.deactivateTextAdding();
|
||||
@ -92,8 +92,8 @@ export class TextEditorComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.editingDrawingId = textElements[index].parentElement.parentElement.getAttribute('drawing_id');
|
||||
var transformData = textElements[index].parentElement.getAttribute('transform').split(/\(|\)/);
|
||||
var x = Number(transformData[1].split(/,/)[0]) + this.context.getZeroZeroTransformationPoint().x;
|
||||
var y = Number(transformData[1].split(/,/)[1]) + this.context.getZeroZeroTransformationPoint().y;
|
||||
var x = Number(transformData[1].split(/,/)[0]) + this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x;
|
||||
var y = Number(transformData[1].split(/,/)[1]) + this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y;
|
||||
this.leftPosition = x.toString() + 'px';
|
||||
this.topPosition = y.toString() + 'px';
|
||||
this.temporaryTextElement.nativeElement.innerText = elem.text;
|
||||
|
@ -111,15 +111,15 @@ export class DrawingsWidget implements Widget {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dy = y - (evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y);
|
||||
y = evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
dy = y - (evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y));
|
||||
y = evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
|
||||
if (datum.element.height + dy < 0) {
|
||||
isReflectedVertical = false;
|
||||
y = topEdge;
|
||||
datum.element.height = Math.abs(datum.element.height + evt.dy);
|
||||
} else {
|
||||
datum.y = evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
datum.y = evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
datum.element.height += dy;
|
||||
if (datum.element instanceof EllipseElement) {
|
||||
(datum.element as EllipseElement).cy =
|
||||
@ -143,7 +143,7 @@ export class DrawingsWidget implements Widget {
|
||||
|
||||
let top = drag()
|
||||
.on('start', (datum: MapDrawing) => {
|
||||
y = event.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
y = event.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
bottomEdge = y + datum.element.height;
|
||||
document.body.style.cursor = 'ns-resize';
|
||||
})
|
||||
@ -151,15 +151,15 @@ export class DrawingsWidget implements Widget {
|
||||
const evt = event;
|
||||
|
||||
if (!isReflectedVertical) {
|
||||
dy = y - (evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y);
|
||||
y = evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
dy = y - (evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y));
|
||||
y = evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
|
||||
if (datum.element.height + dy < 0) {
|
||||
y = bottomEdge;
|
||||
isReflectedVertical = true;
|
||||
datum.element.height = Math.abs(datum.element.height + evt.dy);
|
||||
} else {
|
||||
datum.y = evt.sourceEvent.pageY - this.context.getZeroZeroTransformationPoint().y;
|
||||
datum.y = evt.sourceEvent.pageY - (this.context.getZeroZeroTransformationPoint().y + this.context.transformation.y);
|
||||
datum.element.height += dy;
|
||||
if (datum.element instanceof EllipseElement) {
|
||||
(datum.element as EllipseElement).cy =
|
||||
@ -207,7 +207,7 @@ export class DrawingsWidget implements Widget {
|
||||
let isReflectedHorizontal: boolean = false;
|
||||
let right = drag()
|
||||
.on('start', (datum: MapDrawing) => {
|
||||
x = event.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
x = event.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
leftEdge = x + datum.element.width;
|
||||
document.body.style.cursor = 'ew-resize';
|
||||
})
|
||||
@ -215,15 +215,15 @@ export class DrawingsWidget implements Widget {
|
||||
const evt = event;
|
||||
|
||||
if (!isReflectedHorizontal) {
|
||||
dx = x - (evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x);
|
||||
x = evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
dx = x - (evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x));
|
||||
x = evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
|
||||
if (datum.element.width + dx < 0) {
|
||||
x = leftEdge;
|
||||
isReflectedHorizontal = true;
|
||||
datum.element.width = Math.abs(datum.element.width + evt.dx);
|
||||
} else {
|
||||
datum.x = evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
datum.x = evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
datum.element.width += dx;
|
||||
if (datum.element instanceof EllipseElement) {
|
||||
(datum.element as EllipseElement).cx =
|
||||
@ -290,15 +290,15 @@ export class DrawingsWidget implements Widget {
|
||||
datum.element.width = datum.element.width + evt.dx < 0 ? 1 : (datum.element.width += evt.dx);
|
||||
}
|
||||
} else {
|
||||
dx = x - (evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x);
|
||||
x = evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
dx = x - (evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x));
|
||||
x = evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
|
||||
if (datum.element.width + dx < 0) {
|
||||
x = rightEdge;
|
||||
isReflectedHorizontal = false;
|
||||
datum.element.width = Math.abs(datum.element.width + evt.dx);
|
||||
} else {
|
||||
datum.x = evt.sourceEvent.pageX - this.context.getZeroZeroTransformationPoint().x;
|
||||
datum.x = evt.sourceEvent.pageX - (this.context.getZeroZeroTransformationPoint().x + this.context.transformation.x);
|
||||
datum.element.width += dx;
|
||||
if (datum.element instanceof EllipseElement) {
|
||||
(datum.element as EllipseElement).cx =
|
||||
|
@ -37,15 +37,15 @@
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> Actions </mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" style="text-align: right">
|
||||
<button mat-icon-button matTooltip="Delete project" (click)="delete(row)" *ngIf="row.status == 'closed'">
|
||||
<mat-icon aria-label="Delete project">delete</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button matTooltip="Open project" (click)="open(row)" *ngIf="row.status == 'closed'">
|
||||
<mat-icon aria-label="Open project">play_arrow</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button matTooltip="Close project" (click)="close(row)" *ngIf="row.status == 'opened'">
|
||||
<mat-icon aria-label="Close project">pause</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button matTooltip="Delete project" (click)="delete(row)" *ngIf="row.status == 'closed'">
|
||||
<mat-icon aria-label="Open project">delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
|
@ -86,7 +86,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer<JsonOptions>(server, url, options);
|
||||
return this.http
|
||||
.get<T>(intercepted.url, intercepted.options as JsonOptions)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
getText(server: Server, url: string, options?: TextOptions): Observable<string> {
|
||||
@ -102,7 +102,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.post<T>(intercepted.url, body, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
put<T>(server: Server, url: string, body: any, options?: JsonOptions): Observable<T> {
|
||||
@ -110,7 +110,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.put<T>(intercepted.url, body, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
delete<T>(server: Server, url: string, options?: JsonOptions): Observable<T> {
|
||||
@ -118,7 +118,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.delete<T>(intercepted.url, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
patch<T>(server: Server, url: string, body: any, options?: JsonOptions): Observable<T> {
|
||||
@ -126,7 +126,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.patch<T>(intercepted.url, body, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
head<T>(server: Server, url: string, options?: JsonOptions): Observable<T> {
|
||||
@ -134,7 +134,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.head<T>(intercepted.url, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
options<T>(server: Server, url: string, options?: JsonOptions): Observable<T> {
|
||||
@ -142,7 +142,7 @@ export class HttpServer {
|
||||
const intercepted = this.getOptionsForServer(server, url, options);
|
||||
return this.http
|
||||
.options<T>(intercepted.url, intercepted.options)
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError));
|
||||
.pipe(catchError<T, any>(this.errorHandler.handleError)) as Observable<T>;
|
||||
}
|
||||
|
||||
private getJsonOptions(options: JsonOptions): JsonOptions {
|
||||
|
Loading…
Reference in New Issue
Block a user