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