Update to Angular 10

This commit is contained in:
piotrpekala7 2020-06-30 10:42:31 +02:00
parent 7c4e745075
commit c8104a577f
48 changed files with 153 additions and 105 deletions

View File

@ -11,6 +11,7 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"aot": true,
"outputPath": "dist", "outputPath": "dist",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
@ -27,13 +28,13 @@
"node_modules/notosans-fontface/css/notosans-fontface.min.css", "node_modules/notosans-fontface/css/notosans-fontface.min.css",
"src/styles.css", "src/styles.css",
{ {
"inject": false,
"input": "src/theme.scss", "input": "src/theme.scss",
"lazy": true,
"bundleName": "theme-default-dark" "bundleName": "theme-default-dark"
}, },
{ {
"inject": false,
"input": "src/theme-light.scss", "input": "src/theme-light.scss",
"lazy": true,
"bundleName": "theme-default" "bundleName": "theme-default"
} }
], ],
@ -41,6 +42,12 @@
}, },
"configurations": { "configurations": {
"production": { "production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": { "sourceMap": {
@ -62,6 +69,12 @@
] ]
}, },
"electronProd": { "electronProd": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
@ -79,6 +92,12 @@
] ]
}, },
"electronDev": { "electronDev": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [ "fileReplacements": [
{ {
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
@ -87,6 +106,12 @@
] ]
}, },
"githubProd": { "githubProd": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
@ -198,10 +223,13 @@
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
"prefix": "app", "prefix": "app",
"styleext": "scss" "style": "scss"
}, },
"@schematics/angular:directive": { "@schematics/angular:directive": {
"prefix": "app" "prefix": "app"
} }
},
"cli": {
"analytics": false
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/e2e", "outDir": "../out-tsc/e2e",
"baseUrl": "./", "baseUrl": "./",

View File

@ -38,17 +38,17 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^8.2.11", "@angular/animations": "^10.0.1",
"@angular/cdk": "^8.2.3", "@angular/cdk": "^8.2.3",
"@angular/common": "^8.2.11", "@angular/common": "^10.0.1",
"@angular/compiler": "^8.2.11", "@angular/compiler": "^10.0.1",
"@angular/core": "^8.2.11", "@angular/core": "^10.0.1",
"@angular/forms": "^8.2.11", "@angular/forms": "^10.0.1",
"@angular/http": "^7.2.16", "@angular/http": "^7.2.16",
"@angular/material": "^8.2.3", "@angular/material": "^8.2.3",
"@angular/platform-browser": "^8.2.11", "@angular/platform-browser": "^10.0.1",
"@angular/platform-browser-dynamic": "^8.2.11", "@angular/platform-browser-dynamic": "^10.0.1",
"@angular/router": "^8.2.11", "@angular/router": "^10.0.1",
"angular-draggable-droppable": "^4.5.1", "angular-draggable-droppable": "^4.5.1",
"angular-persistence": "^1.0.1", "angular-persistence": "^1.0.1",
"angular-resizable-element": "^3.3.2", "angular-resizable-element": "^3.3.2",
@ -78,45 +78,46 @@
"save-svg-as-png": "^1.4.14", "save-svg-as-png": "^1.4.14",
"svg-crowbar": "^0.2.4", "svg-crowbar": "^0.2.4",
"tree-kill": "^1.2.1", "tree-kill": "^1.2.1",
"tslib": "^2.0.0",
"typeface-roboto": "^0.0.75", "typeface-roboto": "^0.0.75",
"xterm": "^4.1.0", "xterm": "^4.1.0",
"xterm-addon-attach": "^0.5.0", "xterm-addon-attach": "^0.5.0",
"xterm-addon-fit": "^0.3.0", "xterm-addon-fit": "^0.3.0",
"yargs": "^15.3.1", "yargs": "^15.3.1",
"zone.js": "^0.10.3" "zone.js": "~0.10.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^0.803.28", "@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "^8.3.28", "@angular/cli": "^10.0.0",
"@angular/compiler-cli": "^8.2.11", "@angular/compiler-cli": "^10.0.1",
"@angular/language-service": "^8.2.11", "@angular/language-service": "^10.0.1",
"@sentry/cli": "^1.53.0", "@sentry/cli": "^1.53.0",
"@sentry/electron": "^0.17.4", "@sentry/electron": "^0.17.4",
"@types/jasmine": "^3.5.11", "@types/jasmine": "^3.5.11",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^12.12.47", "@types/node": "^12.11.1",
"codelyzer": "^5.2.2", "codelyzer": "^5.1.2",
"electron": "7.1.2", "electron": "7.1.2",
"electron-builder": "21.2.0", "electron-builder": "21.2.0",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",
"jasmine-core": "~3.5.0", "jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"karma": "~4.4.0", "karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0", "karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.1.0", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~2.0.1", "karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.4", "karma-jasmine-html-reporter": "^1.5.0",
"license-checker": "^25.0.1", "license-checker": "^25.0.1",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"prettier": "^1.18.2", "prettier": "^1.18.2",
"protractor": "^5.4.4", "protractor": "~7.0.0",
"replace": "^1.2.0", "replace": "^1.2.0",
"ts-mockito": "^2.6.1", "ts-mockito": "^2.6.1",
"ts-node": "~8.4.1", "ts-node": "~8.4.1",
"tslint": "~5.20.0", "tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0", "tslint-config-prettier": "^1.18.0",
"typescript": "^3.9.5" "typescript": "^3.9.5"
}, },

View File

@ -51,8 +51,8 @@ export class D3MapComponent implements OnInit, OnChanges, OnDestroy {
@Input() width = 1500; @Input() width = 1500;
@Input() height = 600; @Input() height = 600;
@ViewChild('svg', {static: false}) svgRef: ElementRef; @ViewChild('svg') svgRef: ElementRef;
@ViewChild('textEditor', {static: false}) textEditor: TextEditorComponent; @ViewChild('textEditor') textEditor: TextEditorComponent;
private parentNativeElement: any; private parentNativeElement: any;
private svg: Selection<SVGSVGElement, any, null, undefined>; private svg: Selection<SVGSVGElement, any, null, undefined>;

View File

@ -13,7 +13,7 @@ export class TextComponent implements OnInit, DoCheck {
@Input('app-text') text: TextElement; @Input('app-text') text: TextElement;
@ViewChild('text', {static: false}) textRef: ElementRef; @ViewChild('text') textRef: ElementRef;
lines: string[] = []; lines: string[] = [];

View File

@ -43,7 +43,7 @@ export class ExperimentalMapComponent implements OnInit, OnChanges, OnDestroy {
@Input() width = 1500; @Input() width = 1500;
@Input() height = 600; @Input() height = 600;
@ViewChild('svg', {static: false}) svg: ElementRef; @ViewChild('svg') svg: ElementRef;
private changesDetected: Subscription; private changesDetected: Subscription;

View File

@ -10,7 +10,7 @@ import { CssFixer } from '../../../helpers/css-fixer';
export class InterfaceLabelComponent implements OnInit { export class InterfaceLabelComponent implements OnInit {
@Input('app-interface-label') ignore: any; @Input('app-interface-label') ignore: any;
@ViewChild('textSvg', {static: false}) textRef: ElementRef; @ViewChild('textSvg') textRef: ElementRef;
private label = { private label = {
x: 0, x: 0,

View File

@ -26,7 +26,7 @@ export class LinkComponent implements OnInit, OnDestroy {
@Input('node-changed') nodeChanged: EventEmitter<Node>; @Input('node-changed') nodeChanged: EventEmitter<Node>;
@Input('show-interface-labels') showInterfaceLabels: boolean; @Input('show-interface-labels') showInterfaceLabels: boolean;
@ViewChild('path', {static: false}) path: ElementRef; @ViewChild('path') path: ElementRef;
private ethernetLinkStrategy = new EthernetLinkStrategy(); private ethernetLinkStrategy = new EthernetLinkStrategy();
private serialLinkStrategy = new SerialLinkStrategy(); private serialLinkStrategy = new SerialLinkStrategy();

View File

@ -30,8 +30,8 @@ import { DraggedDataEvent } from '../../../events/event-source';
export class NodeComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit { export class NodeComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
static NODE_LABEL_MARGIN = 3; static NODE_LABEL_MARGIN = 3;
@ViewChild('label', {static: false}) label: ElementRef; @ViewChild('label') label: ElementRef;
@ViewChild('image', {static: false}) imageRef: ElementRef; @ViewChild('image') imageRef: ElementRef;
@Input('app-node') node: MapNode; @Input('app-node') node: MapNode;
@Input('symbols') symbols: Symbol[]; @Input('symbols') symbols: Symbol[];

View File

@ -27,7 +27,7 @@ import { Font } from '../../models/font';
styleUrls: ['./text-editor.component.scss'] styleUrls: ['./text-editor.component.scss']
}) })
export class TextEditorComponent implements OnInit, OnDestroy { export class TextEditorComponent implements OnInit, OnDestroy {
@ViewChild('temporaryTextElement', {static: false}) temporaryTextElement: ElementRef; @ViewChild('temporaryTextElement') temporaryTextElement: ElementRef;
@Input('svg') svg: SVGSVGElement; @Input('svg') svg: SVGSVGElement;
@Input('server') server: Server; @Input('server') server: Server;

View File

@ -1,4 +1,4 @@
import { HostListener, ElementRef, Renderer, Directive, Input, OnInit, OnDestroy } from '@angular/core' import { HostListener, ElementRef, Directive, Input, OnInit, OnDestroy, Renderer2 } from '@angular/core'
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { MovingEventSource } from '../events/moving-event-source'; import { MovingEventSource } from '../events/moving-event-source';
import { Context } from '../models/context'; import { Context } from '../models/context';

View File

@ -1,6 +1,8 @@
import { RavenErrorHandler } from './raven-error-handler'; import { RavenErrorHandler } from './raven-error-handler';
import { ToasterService } from '../../services/toaster.service'; import { ToasterService } from '../../services/toaster.service';
import { Injectable } from "@angular/core";
@Injectable()
export class ToasterErrorHandler extends RavenErrorHandler { export class ToasterErrorHandler extends RavenErrorHandler {
handleError(err: any): void { handleError(err: any): void {
super.handleError(err); super.handleError(err);

View File

@ -10,7 +10,7 @@ import { ToasterService } from '../../services/toaster.service';
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AdbutlerComponent implements OnInit { export class AdbutlerComponent implements OnInit {
@ViewChild('ad', {static: false}) ad: ElementRef; @ViewChild('ad') ad: ElementRef;
theme: string; theme: string;
onLoad = new EventEmitter(); onLoad = new EventEmitter();
htmlCode: string; htmlCode: string;

View File

@ -11,7 +11,7 @@ import { Location } from '@angular/common';
styleUrls: ['./notification-box.component.scss'] styleUrls: ['./notification-box.component.scss']
}) })
export class NotificationBoxComponent implements OnInit, OnDestroy { export class NotificationBoxComponent implements OnInit, OnDestroy {
@ViewChild('dynamicComponentContainer', {read: ViewContainerRef, static: false}) dynamicComponentContainer; @ViewChild('dynamicComponentContainer', { read: ViewContainerRef }) dynamicComponentContainer;
timer: Observable<number>; timer: Observable<number>;
viewTimer: Observable<number>; viewTimer: Observable<number>;

View File

@ -15,7 +15,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
export class CloudNodesTemplatesComponent implements OnInit { export class CloudNodesTemplatesComponent implements OnInit {
server: Server; server: Server;
cloudNodesTemplates: CloudTemplate[] = []; cloudNodesTemplates: CloudTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -15,7 +15,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
export class EthernetHubsTemplatesComponent implements OnInit { export class EthernetHubsTemplatesComponent implements OnInit {
server: Server; server: Server;
ethernetHubsTemplates: EthernetHubTemplate[] = []; ethernetHubsTemplates: EthernetHubTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -16,7 +16,7 @@ import { PortsComponent } from '../../../common/ports/ports.component';
styleUrls: ['./ethernet-switches-template-details.component.scss', '../../../preferences.component.scss'] styleUrls: ['./ethernet-switches-template-details.component.scss', '../../../preferences.component.scss']
}) })
export class EthernetSwitchesTemplateDetailsComponent implements OnInit { export class EthernetSwitchesTemplateDetailsComponent implements OnInit {
@ViewChild(PortsComponent, {static: false}) portsComponent: PortsComponent; @ViewChild(PortsComponent) portsComponent: PortsComponent;
server: Server; server: Server;
ethernetSwitchTemplate: EthernetSwitchTemplate; ethernetSwitchTemplate: EthernetSwitchTemplate;
inputForm: FormGroup; inputForm: FormGroup;

View File

@ -15,7 +15,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
export class EthernetSwitchesTemplatesComponent implements OnInit { export class EthernetSwitchesTemplatesComponent implements OnInit {
server: Server; server: Server;
ethernetSwitchesTemplates: EthernetSwitchTemplate[] = []; ethernetSwitchesTemplates: EthernetSwitchTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -14,7 +14,7 @@ export class CustomAdaptersComponent {
@Output() closeConfiguratorEmitter = new EventEmitter<boolean>(); @Output() closeConfiguratorEmitter = new EventEmitter<boolean>();
@Output() saveConfigurationEmitter = new EventEmitter<CustomAdapter[]>(); @Output() saveConfigurationEmitter = new EventEmitter<CustomAdapter[]>();
@ViewChild("customAdapters", {static: false}) customAdapters: CustomAdaptersTableComponent; @ViewChild("customAdapters") customAdapters: CustomAdaptersTableComponent;
public adapters: CustomAdapter[]; public adapters: CustomAdapter[];
public numberOfAdapters: number; public numberOfAdapters: number;

View File

@ -15,7 +15,7 @@ import { DockerService } from '../../../../services/docker.service';
export class DockerTemplatesComponent implements OnInit { export class DockerTemplatesComponent implements OnInit {
server: Server; server: Server;
dockerTemplates: DockerTemplate[] = []; dockerTemplates: DockerTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -16,7 +16,7 @@ import { VpcsTemplate } from '../../../../models/templates/vpcs-template';
export class IosTemplatesComponent implements OnInit { export class IosTemplatesComponent implements OnInit {
server: Server; server: Server;
iosTemplates: IosTemplate[] = []; iosTemplates: IosTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -15,7 +15,7 @@ import { IouService } from '../../../../services/iou.service';
export class IouTemplatesComponent implements OnInit { export class IouTemplatesComponent implements OnInit {
server: Server; server: Server;
iouTemplates: IouTemplate[] = []; iouTemplates: IouTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -34,7 +34,7 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
generalSettingsForm: FormGroup; generalSettingsForm: FormGroup;
@ViewChild("customAdaptersConfigurator", {static: false}) @ViewChild("customAdaptersConfigurator")
customAdaptersConfigurator: CustomAdaptersComponent; customAdaptersConfigurator: CustomAdaptersComponent;
constructor( constructor(

View File

@ -15,7 +15,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
export class QemuVmTemplatesComponent implements OnInit { export class QemuVmTemplatesComponent implements OnInit {
server: Server; server: Server;
qemuTemplates: QemuTemplate[] = []; qemuTemplates: QemuTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -14,7 +14,7 @@ import { TracengService } from '../../../../services/traceng.service';
export class TracengTemplatesComponent implements OnInit { export class TracengTemplatesComponent implements OnInit {
server: Server; server: Server;
tracengTemplates: TracengTemplate[] = []; tracengTemplates: TracengTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -29,7 +29,7 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
generalSettingsForm: FormGroup; generalSettingsForm: FormGroup;
networkForm: FormGroup networkForm: FormGroup
@ViewChild("customAdaptersConfigurator", {static: false}) @ViewChild("customAdaptersConfigurator")
customAdaptersConfigurator: CustomAdaptersComponent; customAdaptersConfigurator: CustomAdaptersComponent;
constructor( constructor(

View File

@ -16,7 +16,7 @@ import { VpcsTemplate } from '../../../../models/templates/vpcs-template';
export class VirtualBoxTemplatesComponent implements OnInit { export class VirtualBoxTemplatesComponent implements OnInit {
server: Server; server: Server;
virtualBoxTemplates: VirtualBoxTemplate[] = []; virtualBoxTemplates: VirtualBoxTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -28,7 +28,7 @@ export class VmwareTemplateDetailsComponent implements OnInit {
onCloseOptions = []; onCloseOptions = [];
networkTypes = []; networkTypes = [];
@ViewChild("customAdaptersConfigurator", {static: false}) @ViewChild("customAdaptersConfigurator")
customAdaptersConfigurator: CustomAdaptersComponent; customAdaptersConfigurator: CustomAdaptersComponent;
constructor( constructor(

View File

@ -15,7 +15,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
export class VmwareTemplatesComponent implements OnInit { export class VmwareTemplatesComponent implements OnInit {
server: Server; server: Server;
vmwareTemplates: VmwareTemplate[] = []; vmwareTemplates: VmwareTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -14,7 +14,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
export class VpcsTemplatesComponent implements OnInit { export class VpcsTemplatesComponent implements OnInit {
server: Server; server: Server;
vpcsTemplates: VpcsTemplate[] = []; vpcsTemplates: VpcsTemplate[] = [];
@ViewChild(DeleteTemplateComponent, {static: false}) deleteComponent: DeleteTemplateComponent; @ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -14,7 +14,7 @@ import { ConfigDialogComponent } from '../../dialogs/config-dialog/config-dialog
export class ImportConfigActionComponent { export class ImportConfigActionComponent {
@Input() server: Server; @Input() server: Server;
@Input() node: Node; @Input() node: Node;
@ViewChild('fileInput', {static: false}) fileInput: ElementRef; @ViewChild('fileInput') fileInput: ElementRef;
configType: string; configType: string;
constructor( constructor(

View File

@ -22,7 +22,7 @@ export class ContextMenuComponent implements OnInit {
@Input() project: Project; @Input() project: Project;
@Input() server: Server; @Input() server: Server;
@ViewChild(MatMenuTrigger, {static: false}) contextMenu: MatMenuTrigger; @ViewChild(MatMenuTrigger) contextMenu: MatMenuTrigger;
topPosition; topPosition;
leftPosition; leftPosition;

View File

@ -19,7 +19,7 @@ import { NodeToMapNodeConverter } from '../../../cartography/converters/map/node
}) })
export class DrawLinkToolComponent implements OnInit, OnDestroy { export class DrawLinkToolComponent implements OnInit, OnDestroy {
@Input() links: Link[]; @Input() links: Link[];
@ViewChild(NodeSelectInterfaceComponent, {static: false}) nodeSelectInterfaceMenu: NodeSelectInterfaceComponent; @ViewChild(NodeSelectInterfaceComponent) nodeSelectInterfaceMenu: NodeSelectInterfaceComponent;
private nodeClicked$: Subscription; private nodeClicked$: Subscription;

View File

@ -28,7 +28,7 @@ export class LogConsoleComponent implements OnInit, AfterViewInit, OnDestroy {
@Input() server: Server; @Input() server: Server;
@Input() project: Project; @Input() project: Project;
@ViewChild('console', {static: false}) console: ElementRef; @ViewChild('console') console: ElementRef;
private version = version; private version = version;
private nodeSubscription: Subscription; private nodeSubscription: Subscription;

View File

@ -38,7 +38,7 @@ export class ConfiguratorDialogCloudComponent implements OnInit {
ethernetInterface: string = ''; ethernetInterface: string = '';
ethernetInterfaces: string[] = ['Ethernet 2', 'Ethernet 3']; ethernetInterfaces: string[] = ['Ethernet 2', 'Ethernet 3'];
@ViewChild("udpTunnels", {static: false}) udpTunnels: UdpTunnelsComponent; @ViewChild("udpTunnels") udpTunnels: UdpTunnelsComponent;
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogCloudComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogCloudComponent>,

View File

@ -15,7 +15,7 @@ import { PortsComponent } from '../../../../../components/preferences/common/por
styleUrls: ['../configurator.component.scss'] styleUrls: ['../configurator.component.scss']
}) })
export class ConfiguratorDialogEthernetSwitchComponent implements OnInit { export class ConfiguratorDialogEthernetSwitchComponent implements OnInit {
@ViewChild(PortsComponent, {static: false}) portsComponent: PortsComponent; @ViewChild(PortsComponent) portsComponent: PortsComponent;
server: Server; server: Server;
node: Node; node: Node;
name: string; name: string;

View File

@ -40,7 +40,7 @@ export class ConfiguratorDialogQemuComponent implements OnInit {
}; };
dialogRefQemuImageCreator; dialogRefQemuImageCreator;
@ViewChild("customAdapters", {static: false}) customAdapters: CustomAdaptersTableComponent; @ViewChild("customAdapters") customAdapters: CustomAdaptersTableComponent;
constructor( constructor(
private dialog: MatDialog, private dialog: MatDialog,

View File

@ -25,7 +25,7 @@ export class ConfiguratorDialogVirtualBoxComponent implements OnInit {
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
networkTypes = []; networkTypes = [];
@ViewChild("customAdapters", {static: false}) customAdapters: CustomAdaptersTableComponent; @ViewChild("customAdapters") customAdapters: CustomAdaptersTableComponent;
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogVirtualBoxComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogVirtualBoxComponent>,

View File

@ -25,7 +25,7 @@ export class ConfiguratorDialogVmwareComponent implements OnInit {
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions']; displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
networkTypes = []; networkTypes = [];
@ViewChild("customAdapters", {static: false}) customAdapters: CustomAdaptersTableComponent; @ViewChild("customAdapters") customAdapters: CustomAdaptersTableComponent;
constructor( constructor(
public dialogRef: MatDialogRef<ConfiguratorDialogVmwareComponent>, public dialogRef: MatDialogRef<ConfiguratorDialogVmwareComponent>,

View File

@ -15,7 +15,7 @@ export class NodeSelectInterfaceComponent implements OnInit {
@Input() links: Link[]; @Input() links: Link[];
@Output() onChooseInterface = new EventEmitter<any>(); @Output() onChooseInterface = new EventEmitter<any>();
@ViewChild(MatMenuTrigger, {static: false}) contextMenu: MatMenuTrigger; @ViewChild(MatMenuTrigger) contextMenu: MatMenuTrigger;
protected topPosition; protected topPosition;
protected leftPosition; protected leftPosition;

View File

@ -109,9 +109,9 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
private scrollEnabled: boolean = false; private scrollEnabled: boolean = false;
public isLightThemeEnabled: boolean = false; public isLightThemeEnabled: boolean = false;
@ViewChild(ContextMenuComponent, {static: false}) contextMenu: ContextMenuComponent; @ViewChild(ContextMenuComponent) contextMenu: ContextMenuComponent;
@ViewChild(D3MapComponent, {static: false}) mapChild: D3MapComponent; @ViewChild(D3MapComponent) mapChild: D3MapComponent;
@ViewChild(ProjectMapMenuComponent, {static: false}) projectMapMenuComponent: ProjectMapMenuComponent; @ViewChild(ProjectMapMenuComponent) projectMapMenuComponent: ProjectMapMenuComponent;
private projectMapSubscription: Subscription = new Subscription(); private projectMapSubscription: Subscription = new Subscription();

View File

@ -23,7 +23,7 @@ export class WebConsoleComponent implements OnInit, AfterViewInit {
public fitAddon: FitAddon = new FitAddon(); public fitAddon: FitAddon = new FitAddon();
private copiedText: string = ''; private copiedText: string = '';
@ViewChild('terminal', {static: false}) terminal: ElementRef; @ViewChild('terminal') terminal: ElementRef;
constructor( constructor(
private consoleService: NodeConsoleService private consoleService: NodeConsoleService

View File

@ -30,7 +30,7 @@ export class WebConsoleFullWindowComponent implements OnInit {
public term: Terminal = new Terminal(); public term: Terminal = new Terminal();
public fitAddon: FitAddon = new FitAddon(); public fitAddon: FitAddon = new FitAddon();
@ViewChild('terminal', {static: false}) terminal: ElementRef; @ViewChild('terminal') terminal: ElementRef;
constructor( constructor(
private consoleService: NodeConsoleService, private consoleService: NodeConsoleService,

View File

@ -1,14 +1,13 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"baseUrl": "./", "baseUrl": "./",
"module": "es2015",
"types": [] "types": []
}, },
"exclude": [ "files": [
"test.ts", "main.ts",
"**/*.spec.ts" "polyfills.ts"
], ],
"include": [ "include": [
"../src/**/*", "../src/**/*",

View File

@ -1,9 +1,8 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/spec", "outDir": "../out-tsc/spec",
"baseUrl": "./", "baseUrl": "./",
"module": "commonjs",
"target": "es5", "target": "es5",
"types": [ "types": [
"jasmine", "jasmine",

30
tsconfig.base.json Normal file
View File

@ -0,0 +1,30 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
// below is fix for angular-cli to support core-js >= 3.0
"paths": {
"core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"],
"core-js/es6/*": ["../node_modules/core-js/es/*"]
},
"lib": [
"es2018",
"dom"
],
},
"include": [
"./src/**/*",
]
}

View File

@ -1,30 +1,17 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScripts language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{ {
"compileOnSave": false, "files": [],
"compilerOptions": { "references": [
"baseUrl": "./", {
"outDir": "./dist/out-tsc", "path": "./src/tsconfig.app.json"
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
// below is fix for angular-cli to support core-js >= 3.0
"paths": {
"core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"],
"core-js/es6/*": ["../node_modules/core-js/es/*"]
}, },
"lib": [ {
"es2018", "path": "./src/tsconfig.spec.json"
"dom" }
],
},
"include": [
"./src/**/*",
] ]
} }

View File

@ -11,6 +11,9 @@
"check-space" "check-space"
], ],
"curly": true, "curly": true,
"deprecation": {
"severity": "warning"
},
"eofline": true, "eofline": true,
"forin": true, "forin": true,
"import-blacklist": [ "import-blacklist": [
@ -68,7 +71,6 @@
"no-trailing-whitespace": false, "no-trailing-whitespace": false,
"no-unnecessary-initializer": true, "no-unnecessary-initializer": true,
"no-unused-expression": true, "no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true, "no-var-keyword": true,
"object-literal-sort-keys": false, "object-literal-sort-keys": false,
"one-line": [ "one-line": [