mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-09 03:24:13 +00:00
Formatting for Controller
This commit is contained in:
parent
82905ea72f
commit
c7ebc354b9
@ -31,7 +31,7 @@ export class BundledControllerFinderComponent implements OnInit {
|
||||
port = 80;
|
||||
}
|
||||
|
||||
this.controllerService.getLocalController(this.document.location.hostname, port).then((controller:Controller ) => {
|
||||
this.controllerService.getLocalController(this.document.location.hostname, port).then((controller: Controller ) => {
|
||||
this.router.navigate(['/controller', controller.id, 'projects']);
|
||||
this.progressService.deactivate();
|
||||
});
|
||||
|
@ -124,7 +124,7 @@ export class AddControllerDialogComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
const controller:Controller = Object.assign({}, this.controllerForm.value);
|
||||
const controller: Controller = Object.assign({}, this.controllerForm.value);
|
||||
this.controllerService.checkControllerVersion(controller).subscribe(
|
||||
(controllerInfo) => {
|
||||
if (controllerInfo.version.split('.')[0] >= 3) {
|
||||
|
@ -112,7 +112,7 @@ describe('discovery', () => {
|
||||
});
|
||||
|
||||
describe('discoverFirstAvailableController', () => {
|
||||
let controller:Controller ;
|
||||
let controller: Controller;
|
||||
|
||||
beforeEach(function () {
|
||||
controller = new Controller ();
|
||||
@ -142,7 +142,7 @@ describe('discoverFirstAvailableController', () => {
|
||||
});
|
||||
|
||||
describe('accepting and ignoring found controller', () => {
|
||||
let controller:Controller ;
|
||||
let controller: Controller;
|
||||
beforeEach(() => {
|
||||
controller = new Controller ();
|
||||
(controller.host = '199.111.111.1'), (controller.port = 3333);
|
||||
|
@ -7,7 +7,7 @@ import { ChildProcessService } from 'ngx-childprocess';
|
||||
import { ElectronService } from 'ngx-electron';
|
||||
import { merge, Observable, Subscription } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import {Controller , ControllerProtocol } from '../../models/controller';
|
||||
import {Controller, ControllerProtocol } from '../../models/controller';
|
||||
import { ControllerManagementService } from '../../services/controller-management.service';
|
||||
import { ControllerDatabase } from '../../services/controller.database';
|
||||
import { ControllerService } from '../../services/controller.service';
|
||||
@ -41,7 +41,7 @@ export class ControllersComponent implements OnInit, OnDestroy {
|
||||
getControllers() {
|
||||
const runningControllerNames = this.controllerManagement.getRunningControllers();
|
||||
|
||||
this.controllerService.findAll().then((controllers:Controller []) => {
|
||||
this.controllerService.findAll().then((controllers: Controller []) => {
|
||||
controllers.forEach((controller) => {
|
||||
const controllerIndex = runningControllerNames.findIndex((controllerName) => controller.name === controllerName);
|
||||
if (controllerIndex >= 0) {
|
||||
@ -122,14 +122,14 @@ export class ControllersComponent implements OnInit, OnDestroy {
|
||||
|
||||
dialogRef.afterClosed().subscribe((controller) => {
|
||||
if (controller) {
|
||||
this.controllerService.create(controller).then((created:Controller ) => {
|
||||
this.controllerService.create(controller).then((created: Controller ) => {
|
||||
this.controllerDatabase.addController(created);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getControllerStatus(controller:Controller ) {
|
||||
getControllerStatus(controller: Controller ) {
|
||||
if (controller.location === 'local') {
|
||||
if (controller.status === undefined) {
|
||||
return 'stopped';
|
||||
@ -138,7 +138,7 @@ export class ControllersComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
deleteController(controller:Controller ) {
|
||||
deleteController(controller: Controller ) {
|
||||
this.bottomSheet.open(ConfirmationBottomSheetComponent);
|
||||
let bottomSheetRef = this.bottomSheet._openedBottomSheetRef;
|
||||
bottomSheetRef.instance.message = 'Do you want to delete the controller?';
|
||||
@ -151,11 +151,11 @@ export class ControllersComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
async startController(controller:Controller ) {
|
||||
async startController(controller: Controller ) {
|
||||
await this.controllerManagement.start(controller);
|
||||
}
|
||||
|
||||
async stopController(controller:Controller ) {
|
||||
async stopController(controller: Controller ) {
|
||||
await this.controllerManagement.stop(controller);
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ export class DirectLinkComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
let controllerToAdd:Controller = new Controller ();
|
||||
let controllerToAdd: Controller = new Controller ();
|
||||
controllerToAdd.host = this.controllerIp;
|
||||
controllerToAdd.port = this.controllerPort;
|
||||
|
||||
@ -80,7 +80,7 @@ export class DirectLinkComponent implements OnInit {
|
||||
controllerToAdd.location = this.controllerForm.get('location').value;
|
||||
controllerToAdd.protocol = this.controllerForm.get('protocol').value;
|
||||
|
||||
this.controllerService.create(controllerToAdd).then((addedController:Controller ) => {
|
||||
this.controllerService.create(controllerToAdd).then((addedController: Controller ) => {
|
||||
this.router.navigate(['/controller', addedController.id, 'project', this.projectId]);
|
||||
});
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { DrawingService } from '../../../services/drawing.service';
|
||||
styleUrls: ['./drawing-dragged.component.scss'],
|
||||
})
|
||||
export class DrawingDraggedComponent implements OnInit, OnDestroy {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() project: Project;
|
||||
private drawingDragged: Subscription;
|
||||
|
||||
|
@ -15,7 +15,7 @@ import { DrawingService } from '../../../services/drawing.service';
|
||||
styleUrls: ['./drawing-resized.component.scss'],
|
||||
})
|
||||
export class DrawingResizedComponent implements OnInit, OnDestroy {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
private drawingResized: Subscription;
|
||||
|
||||
constructor(
|
||||
|
@ -14,7 +14,7 @@ import { LinkService } from '../../../services/link.service';
|
||||
styleUrls: ['./interface-label-dragged.component.scss'],
|
||||
})
|
||||
export class InterfaceLabelDraggedComponent {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
private interfaceDragged: Subscription;
|
||||
|
||||
constructor(
|
||||
|
@ -17,7 +17,7 @@ import { ProjectService } from '../../../services/project.service';
|
||||
styleUrls: ['./link-created.component.scss'],
|
||||
})
|
||||
export class LinkCreatedComponent implements OnInit, OnDestroy {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() project: Project;
|
||||
private linkCreated: Subscription;
|
||||
|
||||
|
@ -15,7 +15,7 @@ import { NodeService } from '../../../services/node.service';
|
||||
styleUrls: ['./node-dragged.component.scss'],
|
||||
})
|
||||
export class NodeDraggedComponent implements OnInit, OnDestroy {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() project: Project;
|
||||
private nodeDragged: Subscription;
|
||||
|
||||
|
@ -15,7 +15,7 @@ import { NodeService } from '../../../services/node.service';
|
||||
styleUrls: ['./node-label-dragged.component.scss'],
|
||||
})
|
||||
export class NodeLabelDraggedComponent implements OnInit, OnDestroy {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
private nodeLabelDragged: Subscription;
|
||||
|
||||
constructor(
|
||||
|
@ -16,7 +16,7 @@ export class ExportPortableProjectComponent implements OnInit {
|
||||
compression_methods: any = [];
|
||||
compression_level: any = [];
|
||||
compression_filter_value: any = [];
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
project: Project;
|
||||
index: number = 4;
|
||||
fileName: string;
|
||||
|
@ -17,7 +17,7 @@ import { MockedToasterService } from 'app/services/toaster.service.spec';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
|
||||
export class MockedImageManagerService {
|
||||
public getImages(controller:Controller ) {
|
||||
public getImages(controller: Controller ) {
|
||||
return of();
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import { ToasterService } from '../../../services/toaster.service';
|
||||
],
|
||||
})
|
||||
export class AddImageDialogComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
isInstallAppliance: boolean = false;
|
||||
install_appliance: boolean = false;
|
||||
selectFile: any = [];
|
||||
|
@ -23,11 +23,11 @@ import { ToasterService } from 'app/services/toaster.service';
|
||||
import { MockedToasterService } from 'app/services/toaster.service.spec';
|
||||
|
||||
export class MockedImageManagerService {
|
||||
public getImages(controller:Controller ) {
|
||||
public getImages(controller: Controller ) {
|
||||
return of();
|
||||
}
|
||||
|
||||
public deleteFile(controller:Controller , image_path) {
|
||||
public deleteFile(controller: Controller, image_path) {
|
||||
return of();
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import { QuestionDialogComponent } from "@components/dialogs/question-dialog/que
|
||||
styleUrls: ['./image-manager.component.scss']
|
||||
})
|
||||
export class ImageManagerComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
public version: string;
|
||||
dataSource: imageDataSource;
|
||||
imageDatabase = new imageDatabase();
|
||||
@ -41,7 +41,7 @@ export class ImageManagerComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
let controller_id = parseInt(this.route.snapshot.paramMap.get('controller_id'));
|
||||
this.controllerService.get(controller_id).then((controller:Controller ) => {
|
||||
this.controllerService.get(controller_id).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
if (controller.authToken) {
|
||||
this.getImages()
|
||||
|
@ -18,7 +18,7 @@ import { VersionService } from '../../services/version.service';
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class LoginComponent implements OnInit, DoCheck {
|
||||
private controller:Controller ;
|
||||
private controller: Controller;
|
||||
public version: string;
|
||||
public isLightThemeEnabled: boolean = false;
|
||||
public loginError: boolean = false;
|
||||
@ -45,7 +45,7 @@ export class LoginComponent implements OnInit, DoCheck {
|
||||
async ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/';
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
if (controller.authToken) {
|
||||
|
@ -24,7 +24,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { CloudNodesAddTemplateComponent } from './cloud-nodes-add-template.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public addTemplate(controller:Controller , cloudTemplate: CloudTemplate) {
|
||||
public addTemplate(controller: Controller, cloudTemplate: CloudTemplate) {
|
||||
return of(cloudTemplate);
|
||||
}
|
||||
}
|
||||
@ -80,7 +80,7 @@ describe('CloudNodesAddTemplateComponent', () => {
|
||||
it('should call add template', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as CloudTemplate));
|
||||
component.templateName = 'sample name';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
component.formGroup.controls['templateName'].setValue('template name');
|
||||
|
||||
component.addTemplate();
|
||||
@ -92,7 +92,7 @@ describe('CloudNodesAddTemplateComponent', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as CloudTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.templateName = '';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
||||
styleUrls: ['./cloud-nodes-add-template.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class CloudNodesAddTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
formGroup: UntypedFormGroup;
|
||||
isLocalComputerChosen: boolean = true;
|
||||
@ -39,7 +39,7 @@ export class CloudNodesAddTemplateComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { CloudNodesTemplateDetailsComponent } from './cloud-nodes-template-details.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({ ports_mapping: [] } as CloudTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , cloudTemplate: CloudTemplate) {
|
||||
public saveTemplate(controller: Controller, cloudTemplate: CloudTemplate) {
|
||||
return of(cloudTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
||||
styleUrls: ['../../../preferences.component.scss'],
|
||||
})
|
||||
export class CloudNodesTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
cloudNodeTemplate: CloudTemplate;
|
||||
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
@ -49,7 +49,7 @@ export class CloudNodesTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { CloudNodesTemplatesComponent } from './cloud-nodes-templates.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as CloudTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
|
||||
styleUrls: ['./cloud-nodes-templates.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class CloudNodesTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
cloudNodesTemplates: CloudTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -24,7 +24,7 @@ export class CloudNodesTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -24,7 +24,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetHubsAddTemplateComponent } from './ethernet-hubs-add-template.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public addTemplate(controller:Controller , ethernetHubTemplate: EthernetHubTemplate) {
|
||||
public addTemplate(controller: Controller, ethernetHubTemplate: EthernetHubTemplate) {
|
||||
return of(ethernetHubTemplate);
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@ describe('EthernetHubsAddTemplateComponent', () => {
|
||||
it('should call add template', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
||||
component.templateName = 'sample name';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
component.formGroup.controls['templateName'].setValue('template name');
|
||||
component.formGroup.controls['numberOfPorts'].setValue('1');
|
||||
|
||||
@ -96,7 +96,7 @@ describe('EthernetHubsAddTemplateComponent', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.templateName = '';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -108,7 +108,7 @@ describe('EthernetHubsAddTemplateComponent', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.templateName = 'sample name';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
||||
styleUrls: ['./ethernet-hubs-add-template.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class EthernetHubsAddTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
formGroup: UntypedFormGroup;
|
||||
isLocalComputerChosen: boolean = true;
|
||||
@ -40,7 +40,7 @@ export class EthernetHubsAddTemplateComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetHubsTemplateDetailsComponent } from './ethernet-hubs-template-details.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({ ports_mapping: [] } as EthernetHubTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , cloudTemplate: EthernetHubTemplate) {
|
||||
public saveTemplate(controller: Controller, cloudTemplate: EthernetHubTemplate) {
|
||||
return of(cloudTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
||||
styleUrls: ['./ethernet-hubs-template-details.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class EthernetHubsTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
ethernetHubTemplate: EthernetHubTemplate;
|
||||
numberOfPorts: number;
|
||||
inputForm: UntypedFormGroup;
|
||||
@ -41,7 +41,7 @@ export class EthernetHubsTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.categories = this.builtInTemplatesConfigurationService.getCategoriesForEthernetHubs();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetHubsTemplatesComponent } from './ethernet-hubs-templates.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as EthernetHubTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
|
||||
styleUrls: ['./ethernet-hubs-templates.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class EthernetHubsTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
ethernetHubsTemplates: EthernetHubTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -24,7 +24,7 @@ export class EthernetHubsTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -24,7 +24,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetSwitchesAddTemplateComponent } from './ethernet-switches-add-template.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public addTemplate(controller:Controller , ethernetHubTemplate: EthernetSwitchTemplate) {
|
||||
public addTemplate(controller: Controller, ethernetHubTemplate: EthernetSwitchTemplate) {
|
||||
return of(ethernetHubTemplate);
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@ describe('EthernetSwitchesAddTemplateComponent', () => {
|
||||
it('should call add template', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetSwitchTemplate));
|
||||
component.templateName = 'sample name';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
component.formGroup.controls['templateName'].setValue('template name');
|
||||
component.formGroup.controls['numberOfPorts'].setValue('1');
|
||||
|
||||
@ -96,7 +96,7 @@ describe('EthernetSwitchesAddTemplateComponent', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetSwitchTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.formGroup.controls['numberOfPorts'].setValue('1');
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -108,7 +108,7 @@ describe('EthernetSwitchesAddTemplateComponent', () => {
|
||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetSwitchTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.formGroup.controls['templateName'].setValue('template name');
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { ToasterService } from '../../../../../services/toaster.service';
|
||||
styleUrls: ['./ethernet-switches-add-template.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class EthernetSwitchesAddTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
formGroup: UntypedFormGroup;
|
||||
isLocalComputerChosen: boolean = true;
|
||||
@ -40,7 +40,7 @@ export class EthernetSwitchesAddTemplateComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetSwitchesTemplateDetailsComponent } from './ethernet-switches-template-details.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({ ports_mapping: [] } as EthernetSwitchTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , cloudTemplate: EthernetSwitchTemplate) {
|
||||
public saveTemplate(controller: Controller, cloudTemplate: EthernetSwitchTemplate) {
|
||||
return of(cloudTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import { PortsComponent } from '../../../common/ports/ports.component';
|
||||
})
|
||||
export class EthernetSwitchesTemplateDetailsComponent implements OnInit {
|
||||
@ViewChild(PortsComponent) portsComponent: PortsComponent;
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
ethernetSwitchTemplate: EthernetSwitchTemplate;
|
||||
inputForm: UntypedFormGroup;
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
@ -42,7 +42,7 @@ export class EthernetSwitchesTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../../preferences.component.spec';
|
||||
import { EthernetSwitchesTemplatesComponent } from './ethernet-switches-templates.component';
|
||||
|
||||
export class MockedBuiltInTemplatesService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as EthernetSwitchTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../../common/delete-template-compone
|
||||
styleUrls: ['./ethernet-switches-templates.component.scss', '../../../preferences.component.scss'],
|
||||
})
|
||||
export class EthernetSwitchesTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
ethernetSwitchesTemplates: EthernetSwitchTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -24,7 +24,7 @@ export class EthernetSwitchesTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ import { DeleteConfirmationDialogComponent } from '../delete-confirmation-dialog
|
||||
styleUrls: ['./delete-template.component.scss'],
|
||||
})
|
||||
export class DeleteTemplateComponent {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Output() deleteEvent = new EventEmitter<string>();
|
||||
|
||||
constructor(
|
||||
|
@ -7,7 +7,7 @@ import { Controller } from '../../../../models/controller';
|
||||
styleUrls: ['./symbols-menu.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class SymbolsMenuComponent {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() symbol: string;
|
||||
@Output() symbolChangedEmitter = new EventEmitter<string>();
|
||||
|
||||
|
@ -10,7 +10,7 @@ import { SymbolService } from '../../../../services/symbol.service';
|
||||
styleUrls: ['./symbols.component.scss'],
|
||||
})
|
||||
export class SymbolsComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() symbol: string;
|
||||
@Output() symbolChanged = new EventEmitter<string>();
|
||||
|
||||
|
@ -31,7 +31,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddDockerTemplateComponent } from './add-docker-template.component';
|
||||
|
||||
export class MockedDockerService {
|
||||
public addTemplate(controller:Controller , dockerTemplate: DockerTemplate) {
|
||||
public addTemplate(controller: Controller, dockerTemplate: DockerTemplate) {
|
||||
return of(dockerTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./add-docker-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddDockerTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
dockerTemplate: DockerTemplate;
|
||||
consoleTypes: string[] = [];
|
||||
auxConsoleTypes: string[] = [];
|
||||
@ -61,7 +61,7 @@ export class AddDockerTemplateComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.consoleTypes = this.configurationService.getConsoleTypes();
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./copy-docker-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class CopyDockerTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
dockerTemplate: DockerTemplate;
|
||||
templateNameForm: UntypedFormGroup;
|
||||
@ -35,7 +35,7 @@ export class CopyDockerTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.dockerService.getTemplate(this.controller, template_id).subscribe((dockerTemplate: DockerTemplate) => {
|
||||
|
@ -22,11 +22,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { DockerTemplateDetailsComponent } from './docker-template-details.component';
|
||||
|
||||
export class MockedDockerService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as DockerTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , dockerTemplate: DockerTemplate) {
|
||||
public saveTemplate(controller: Controller, dockerTemplate: DockerTemplate) {
|
||||
return of(dockerTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./docker-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class DockerTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
dockerTemplate: DockerTemplate;
|
||||
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
@ -49,7 +49,7 @@ export class DockerTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { DockerTemplatesComponent } from './docker-templates.component';
|
||||
|
||||
export class MockedDockerService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as DockerTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./docker-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class DockerTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
dockerTemplates: DockerTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -25,7 +25,7 @@ export class DockerTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -29,7 +29,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddIosTemplateComponent } from './add-ios-template.component';
|
||||
|
||||
export class MockedIosService {
|
||||
public addTemplate(controller:Controller , iosTemplate: IosTemplate) {
|
||||
public addTemplate(controller: Controller, iosTemplate: IosTemplate) {
|
||||
return of(iosTemplate);
|
||||
}
|
||||
}
|
||||
@ -95,7 +95,7 @@ xdescribe('AddIosTemplateComponent', () => {
|
||||
component.iosNameForm.controls['platform'].setValue('platform');
|
||||
component.iosNameForm.controls['chassis'].setValue('chassis');
|
||||
component.iosMemoryForm.controls['memory'].setValue(0);
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -109,7 +109,7 @@ xdescribe('AddIosTemplateComponent', () => {
|
||||
component.iosNameForm.controls['platform'].setValue('platform');
|
||||
component.iosNameForm.controls['chassis'].setValue('chassis');
|
||||
component.iosMemoryForm.controls['memory'].setValue(0);
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -122,7 +122,7 @@ xdescribe('AddIosTemplateComponent', () => {
|
||||
component.iosNameForm.controls['platform'].setValue('platform');
|
||||
component.iosNameForm.controls['chassis'].setValue('chassis');
|
||||
component.iosMemoryForm.controls['memory'].setValue(0);
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -135,7 +135,7 @@ xdescribe('AddIosTemplateComponent', () => {
|
||||
component.iosNameForm.controls['templateName'].setValue('template name');
|
||||
component.iosNameForm.controls['platform'].setValue('platform');
|
||||
component.iosNameForm.controls['chassis'].setValue('chassis');
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -25,7 +25,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./add-ios-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddIosTemplateComponent implements OnInit, OnDestroy {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
iosTemplate: IosTemplate;
|
||||
isEtherSwitchRouter: boolean = false;
|
||||
|
||||
@ -115,7 +115,7 @@ export class AddIosTemplateComponent implements OnInit, OnDestroy {
|
||||
})
|
||||
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getImages();
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./copy-ios-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class CopyIosTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
iosTemplate: IosTemplate;
|
||||
formGroup: UntypedFormGroup;
|
||||
@ -35,7 +35,7 @@ export class CopyIosTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.iosService.getTemplate(this.controller, template_id).subscribe((iosTemplate: IosTemplate) => {
|
||||
|
@ -10,7 +10,7 @@ import { ControllerService } from '../../../../services/controller.service';
|
||||
styleUrls: ['./dynamips-preferences.component.scss'],
|
||||
})
|
||||
export class DynamipsPreferencesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
dynamipsPath: string;
|
||||
|
||||
constructor(
|
||||
@ -21,7 +21,7 @@ export class DynamipsPreferencesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ import { MockedProgressService } from "@components/project-map/project-map.compo
|
||||
import {ProgressService} from "../../../../common/progress/progress.service";
|
||||
|
||||
export class MockedIosService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as IosTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , iosTemplate: IosTemplate) {
|
||||
public saveTemplate(controller: Controller, iosTemplate: IosTemplate) {
|
||||
return of(iosTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ export class IosTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { IosTemplatesComponent } from './ios-templates.component';
|
||||
|
||||
export class MockedIosService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as IosTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./ios-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class IosTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
iosTemplates: IosTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -26,7 +26,7 @@ export class IosTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -29,7 +29,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddIouTemplateComponent } from './add-iou-template.component';
|
||||
|
||||
export class MockedIouService {
|
||||
public addTemplate(controller:Controller , iouTemplate: IouTemplate) {
|
||||
public addTemplate(controller: Controller, iouTemplate: IouTemplate) {
|
||||
return of(iouTemplate);
|
||||
}
|
||||
}
|
||||
@ -93,7 +93,7 @@ xdescribe('AddIouTemplateComponent', () => {
|
||||
component.templateNameForm.controls['templateName'].setValue('sample name');
|
||||
component.imageForm.controls['imageName'].setValue('sample name');
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -104,7 +104,7 @@ xdescribe('AddIouTemplateComponent', () => {
|
||||
spyOn(mockedIouService, 'addTemplate').and.returnValue(of({} as IouTemplate));
|
||||
component.imageForm.controls['imageName'].setValue('sample name');
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -115,7 +115,7 @@ xdescribe('AddIouTemplateComponent', () => {
|
||||
spyOn(mockedIouService, 'addTemplate').and.returnValue(of({} as IouTemplate));
|
||||
component.templateNameForm.controls['templateName'].setValue('sample name');
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -23,7 +23,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./add-iou-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddIouTemplateComponent implements OnInit, OnDestroy {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
iouTemplate: IouTemplate;
|
||||
isRemoteComputerChosen: boolean = false;
|
||||
newImageSelected: boolean = false;
|
||||
@ -85,7 +85,7 @@ export class AddIouTemplateComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getImages();
|
||||
this.templateMocksService.getIouTemplate().subscribe((iouTemplate: IouTemplate) => {
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./copy-iou-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class CopyIouTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
iouTemplate: IouTemplate;
|
||||
templateNameForm: UntypedFormGroup;
|
||||
@ -35,7 +35,7 @@ export class CopyIouTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.qemuService.getTemplate(this.controller, template_id).subscribe((iouTemplate: IouTemplate) => {
|
||||
|
@ -22,11 +22,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { IouTemplateDetailsComponent } from './iou-template-details.component';
|
||||
|
||||
export class MockedIouService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as IouTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , iouTemplate: IouTemplate) {
|
||||
public saveTemplate(controller: Controller, iouTemplate: IouTemplate) {
|
||||
return of(iouTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./iou-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class IouTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
iouTemplate: IouTemplate;
|
||||
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
@ -53,7 +53,7 @@ export class IouTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { IouTemplatesComponent } from './iou-templates.component';
|
||||
|
||||
export class MockedIouService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as IouTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./iou-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class IouTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
iouTemplates: IouTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -25,7 +25,7 @@ export class IouTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -28,11 +28,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddQemuVmTemplateComponent } from './add-qemu-vm-template.component';
|
||||
|
||||
export class MockedQemuService {
|
||||
public addTemplate(controller:Controller , qemuTemplate: QemuTemplate) {
|
||||
public addTemplate(controller: Controller, qemuTemplate: QemuTemplate) {
|
||||
return of(qemuTemplate);
|
||||
}
|
||||
|
||||
public getImages(controller:Controller ) {
|
||||
public getImages(controller: Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -117,7 +117,7 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -131,7 +131,7 @@ xdescribe('AddQemuVmTemplateComponent', () => {
|
||||
component.diskForm.controls['fileName'].setValue('file name');
|
||||
component.chosenImage = 'path';
|
||||
component.newImageSelected = true;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -24,7 +24,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./add-qemu-vm-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddQemuVmTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
selectPlatform: string[] = [];
|
||||
selectedPlatform: string;
|
||||
ramMemory: number;
|
||||
@ -100,7 +100,7 @@ export class AddQemuVmTemplateComponent implements OnInit {
|
||||
};
|
||||
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.templateMocksService.getQemuTemplate().subscribe((qemuTemplate: QemuTemplate) => {
|
||||
|
@ -15,7 +15,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./copy-qemu-vm-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class CopyQemuVmTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
qemuTemplate: QemuTemplate;
|
||||
nameForm: UntypedFormGroup;
|
||||
@ -36,7 +36,7 @@ export class CopyQemuVmTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.qemuService.getTemplate(this.controller, template_id).subscribe((qemuTemplate: QemuTemplate) => {
|
||||
|
@ -12,7 +12,7 @@ import { ToasterService } from '../../../../services/toaster.service';
|
||||
styleUrls: ['./qemu-preferences.component.scss'],
|
||||
})
|
||||
export class QemuPreferencesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
settings: QemuSettings;
|
||||
|
||||
constructor(
|
||||
@ -24,7 +24,7 @@ export class QemuPreferencesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.controllerSettingsService.getSettingsForQemu(this.controller).subscribe((settings: QemuSettings) => {
|
||||
|
@ -23,16 +23,16 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { QemuVmTemplateDetailsComponent } from './qemu-vm-template-details.component';
|
||||
|
||||
export class MockedQemuService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as QemuTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , qemuTemplate: QemuTemplate) {
|
||||
public saveTemplate(controller: Controller, qemuTemplate: QemuTemplate) {
|
||||
return of(qemuTemplate);
|
||||
}
|
||||
|
||||
|
||||
public getImages(controller:Controller ) {
|
||||
public getImages(controller: Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import { CustomAdaptersComponent } from '../../common/custom-adapters/custom-ada
|
||||
styleUrls: ['./qemu-vm-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class QemuVmTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
qemuTemplate: QemuTemplate;
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
consoleTypes: string[] = [];
|
||||
@ -58,7 +58,7 @@ export class QemuVmTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { QemuVmTemplatesComponent } from './qemu-vm-templates.component';
|
||||
|
||||
export class MockedQemuService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as QemuTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./qemu-vm-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class QemuVmTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
qemuTemplates: QemuTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -25,7 +25,7 @@ export class QemuVmTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -22,11 +22,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddVirtualBoxTemplateComponent } from './add-virtual-box-template.component';
|
||||
|
||||
export class MockedVirtualBoxService {
|
||||
public addTemplate(controller:Controller , virtualBoxTemplate: VirtualBoxTemplate) {
|
||||
public addTemplate(controller: Controller, virtualBoxTemplate: VirtualBoxTemplate) {
|
||||
return of(virtualBoxTemplate);
|
||||
}
|
||||
|
||||
public getVirtualMachines(controller:Controller ) {
|
||||
public getVirtualMachines(controller: Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
}
|
||||
@ -106,7 +106,7 @@ describe('AddVirtualBoxTemplateComponent', () => {
|
||||
};
|
||||
component.virtualBoxTemplate = {} as VirtualBoxTemplate;
|
||||
component.selectedVM = template;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
component.vmForm.controls['vm'].setValue('virtual machine');
|
||||
|
||||
component.addTemplate();
|
||||
@ -116,7 +116,7 @@ describe('AddVirtualBoxTemplateComponent', () => {
|
||||
|
||||
it('should not call save template when virtual machine is not selected', () => {
|
||||
spyOn(mockedVirtualBoxService, 'addTemplate').and.returnValue(of({} as VirtualBoxTemplate));
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -16,7 +16,7 @@ import { VirtualBoxService } from '../../../../services/virtual-box.service';
|
||||
styleUrls: ['./add-virtual-box-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddVirtualBoxTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
virtualMachines: VirtualBoxVm[];
|
||||
selectedVM: VirtualBoxVm;
|
||||
virtualBoxTemplate: VirtualBoxTemplate;
|
||||
@ -39,7 +39,7 @@ export class AddVirtualBoxTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.toasterService.error(`VirtualBox VM support is deprecated and will be removed in a future version, please use Qemu VMs instead`);
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.virtualBoxService.getVirtualMachines(this.controller).subscribe((virtualMachines: VirtualBoxVm[]) => {
|
||||
|
@ -9,14 +9,14 @@ import { ControllerService } from '../../../../services/controller.service';
|
||||
styleUrls: ['./virtual-box-preferences.component.scss'],
|
||||
})
|
||||
export class VirtualBoxPreferencesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vboxManagePath: string;
|
||||
|
||||
constructor(private route: ActivatedRoute, private controllerService: ControllerService) {}
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VirtualBoxTemplateDetailsComponent } from './virtual-box-template-details.component';
|
||||
|
||||
export class MockedVirtualBoxService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as VirtualBoxTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , virtualBoxTemplate: VirtualBoxTemplate) {
|
||||
public saveTemplate(controller: Controller, virtualBoxTemplate: VirtualBoxTemplate) {
|
||||
return of(virtualBoxTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import { CustomAdaptersComponent } from '../../common/custom-adapters/custom-ada
|
||||
styleUrls: ['./virtual-box-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VirtualBoxTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
virtualBoxTemplate: VirtualBoxTemplate;
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
consoleTypes: string[] = [];
|
||||
@ -57,7 +57,7 @@ export class VirtualBoxTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VirtualBoxTemplatesComponent } from './virtual-box-templates.component';
|
||||
|
||||
export class MockedVirtualBoxService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as VirtualBoxTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./virtual-box-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VirtualBoxTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
virtualBoxTemplates: VirtualBoxTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -25,7 +25,7 @@ export class VirtualBoxTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -16,7 +16,7 @@ import { VmwareService } from '../../../../services/vmware.service';
|
||||
styleUrls: ['./add-vmware-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddVmwareTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
virtualMachines: VmwareVm[];
|
||||
selectedVM: VmwareVm;
|
||||
vmwareTemplate: VmwareTemplate;
|
||||
@ -39,7 +39,7 @@ export class AddVmwareTemplateComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.toasterService.error(`VMware VM support is deprecated and will be removed in a future version, please use Qemu VMs instead`);
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.vmwareService.getVirtualMachines(this.controller).subscribe((virtualMachines: VmwareVm[]) => {
|
||||
|
@ -23,11 +23,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddVmwareTemplateComponent } from './add-vmware-template.component';
|
||||
|
||||
export class MockedVmwareService {
|
||||
public addTemplate(controller:Controller , vmwareTemplate: VmwareTemplate) {
|
||||
public addTemplate(controller: Controller, vmwareTemplate: VmwareTemplate) {
|
||||
return of(vmwareTemplate);
|
||||
}
|
||||
|
||||
public getVirtualMachines(controller:Controller ) {
|
||||
public getVirtualMachines(controller: Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
}
|
||||
@ -87,7 +87,7 @@ describe('AddVmwareTemplateComponent', () => {
|
||||
|
||||
component.vmwareTemplate = {} as VmwareTemplate;
|
||||
component.selectedVM = template;
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
component.templateNameForm.controls['templateName'].setValue('template name');
|
||||
|
||||
component.addTemplate();
|
||||
@ -97,7 +97,7 @@ describe('AddVmwareTemplateComponent', () => {
|
||||
|
||||
it('should not call save template when virtual machine is not selected', () => {
|
||||
spyOn(mockedVmwareService, 'addTemplate').and.returnValue(of({} as VmwareTemplate));
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { ControllerService } from '../../../../services/controller.service';
|
||||
styleUrls: ['./vmware-preferences.component.scss'],
|
||||
})
|
||||
export class VmwarePreferencesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vmrunPath: string;
|
||||
|
||||
constructor(private route: ActivatedRoute, private controllerService: ControllerService) {}
|
||||
@ -17,7 +17,7 @@ export class VmwarePreferencesComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VmwareTemplateDetailsComponent } from './vmware-template-details.component';
|
||||
|
||||
export class MockedVmwareService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as VmwareTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , vmwareTemplate: VmwareTemplate) {
|
||||
public saveTemplate(controller: Controller, vmwareTemplate: VmwareTemplate) {
|
||||
return of(vmwareTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ import { CustomAdaptersComponent } from '../../common/custom-adapters/custom-ada
|
||||
styleUrls: ['./vmware-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VmwareTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vmwareTemplate: VmwareTemplate;
|
||||
generalSettingsForm: UntypedFormGroup;
|
||||
displayedColumns: string[] = ['adapter_number', 'port_name', 'adapter_type', 'actions'];
|
||||
@ -49,7 +49,7 @@ export class VmwareTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VmwareTemplatesComponent } from './vmware-templates.component';
|
||||
|
||||
export class MockedVmwareService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as VmwareTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./vmware-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VmwareTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vmwareTemplates: VmwareTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -24,7 +24,7 @@ export class VmwareTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -23,13 +23,13 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { AddVpcsTemplateComponent } from './add-vpcs-template.component';
|
||||
|
||||
export class MockedComputeService {
|
||||
getComputes(controller:Controller ) {
|
||||
getComputes(controller: Controller ) {
|
||||
return of([]);
|
||||
}
|
||||
}
|
||||
|
||||
export class MockedVpcsService {
|
||||
public addTemplate(controller:Controller , vpcsTemplate: VpcsTemplate) {
|
||||
public addTemplate(controller: Controller, vpcsTemplate: VpcsTemplate) {
|
||||
return of(vpcsTemplate);
|
||||
}
|
||||
}
|
||||
@ -86,7 +86,7 @@ describe('AddVpcsTemplateComponent', () => {
|
||||
spyOn(mockedVpcsService, 'addTemplate').and.returnValue(of({} as VpcsTemplate));
|
||||
component.templateName = 'sample name';
|
||||
component.templateNameForm.controls['templateName'].setValue('template name');
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
@ -97,7 +97,7 @@ describe('AddVpcsTemplateComponent', () => {
|
||||
spyOn(mockedVpcsService, 'addTemplate').and.returnValue(of({} as VpcsTemplate));
|
||||
spyOn(mockedToasterService, 'error');
|
||||
component.templateName = ' ';
|
||||
component.controller = { id: 1 } as Controller ;
|
||||
component.controller = { id: 1 } as Controller;
|
||||
|
||||
component.addTemplate();
|
||||
|
||||
|
@ -17,7 +17,7 @@ import { VpcsService } from '../../../../services/vpcs.service';
|
||||
styleUrls: ['./add-vpcs-template.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class AddVpcsTemplateComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
templateName: string = '';
|
||||
templateNameForm: UntypedFormGroup;
|
||||
isLocalComputerChosen: boolean = true;
|
||||
@ -39,7 +39,7 @@ export class AddVpcsTemplateComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import { ControllerService } from '../../../../services/controller.service';
|
||||
styleUrls: ['./vpcs-preferences.component.scss'],
|
||||
})
|
||||
export class VpcsPreferencesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vpcsExecutable: string;
|
||||
|
||||
constructor(private route: ActivatedRoute, private controllerService: ControllerService) {}
|
||||
@ -17,7 +17,7 @@ export class VpcsPreferencesComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
});
|
||||
}
|
||||
|
@ -22,11 +22,11 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VpcsTemplateDetailsComponent } from './vpcs-template-details.component';
|
||||
|
||||
export class MockedVpcsService {
|
||||
public getTemplate(controller:Controller , template_id: string) {
|
||||
public getTemplate(controller: Controller, template_id: string) {
|
||||
return of({} as VpcsTemplate);
|
||||
}
|
||||
|
||||
public saveTemplate(controller:Controller , vpcsTemplate: VpcsTemplate) {
|
||||
public saveTemplate(controller: Controller, vpcsTemplate: VpcsTemplate) {
|
||||
return of(vpcsTemplate);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { VpcsService } from '../../../../services/vpcs.service';
|
||||
styleUrls: ['./vpcs-template-details.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VpcsTemplateDetailsComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vpcsTemplate: VpcsTemplate;
|
||||
inputForm: UntypedFormGroup;
|
||||
isSymbolSelectionOpened: boolean = false;
|
||||
@ -41,7 +41,7 @@ export class VpcsTemplateDetailsComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
const template_id = this.route.snapshot.paramMap.get('template_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
|
||||
this.getConfiguration();
|
||||
|
@ -18,7 +18,7 @@ import { MockedActivatedRoute } from '../../preferences.component.spec';
|
||||
import { VpcsTemplatesComponent } from './vpcs-templates.component';
|
||||
|
||||
export class MockedVpcsService {
|
||||
public getTemplates(controller:Controller ) {
|
||||
public getTemplates(controller: Controller ) {
|
||||
return of([{} as VpcsTemplate]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { DeleteTemplateComponent } from '../../common/delete-template-component/
|
||||
styleUrls: ['./vpcs-templates.component.scss', '../../preferences.component.scss'],
|
||||
})
|
||||
export class VpcsTemplatesComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
vpcsTemplates: VpcsTemplate[] = [];
|
||||
@ViewChild(DeleteTemplateComponent) deleteComponent: DeleteTemplateComponent;
|
||||
|
||||
@ -20,7 +20,7 @@ export class VpcsTemplatesComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
const controller_id = this.route.snapshot.paramMap.get('controller_id');
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller:Controller ) => {
|
||||
this.controllerService.get(parseInt(controller_id, 10)).then((controller: Controller ) => {
|
||||
this.controller = controller;
|
||||
this.getTemplates();
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ import { ToasterService } from '../../../services/toaster.service';
|
||||
styleUrls: ['./change-hostname-dialog.component.scss'],
|
||||
})
|
||||
export class ChangeHostnameDialogComponent implements OnInit {
|
||||
controller:Controller ;
|
||||
controller: Controller;
|
||||
node: Node;
|
||||
inputForm: UntypedFormGroup;
|
||||
name: string;
|
||||
|
@ -10,7 +10,7 @@ import { NodeService } from '../../../services/node.service';
|
||||
styleUrls: ['./change-symbol-dialog.component.scss'],
|
||||
})
|
||||
export class ChangeSymbolDialogComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() node: Node;
|
||||
symbol: string;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import { ThemeService } from '../../../services/theme.service';
|
||||
styleUrls: ['./console-wrapper.component.scss'],
|
||||
})
|
||||
export class ConsoleWrapperComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() project: Project;
|
||||
@Output() closeConsole = new EventEmitter<boolean>();
|
||||
|
||||
|
@ -62,7 +62,7 @@ describe('ContextConsoleMenuComponent', () => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContextConsoleMenuComponent);
|
||||
component = fixture.componentInstance;
|
||||
component.controller = { location: 'local' } as Controller ;
|
||||
component.controller = { location: 'local' } as Controller;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
|
@ -29,7 +29,7 @@ import { ConsoleDeviceActionComponent } from '../context-menu/actions/console-de
|
||||
})
|
||||
export class ContextConsoleMenuComponent implements OnInit {
|
||||
@Input() project: Project;
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@ViewChild(MatMenuTrigger) contextConsoleMenu: MatMenuTrigger;
|
||||
@ViewChild('container', { read: ViewContainerRef }) container;
|
||||
componentRef: ComponentRef<ConsoleDeviceActionComponent>;
|
||||
|
@ -9,7 +9,7 @@ import { NodeService } from '../../../../../services/node.service';
|
||||
templateUrl: './align-horizontally.component.html',
|
||||
})
|
||||
export class AlignHorizontallyActionComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() nodes: Node[];
|
||||
|
||||
constructor(private nodesDataSource: NodesDataSource, private nodeService: NodeService) {}
|
||||
|
@ -9,7 +9,7 @@ import { NodeService } from '../../../../../services/node.service';
|
||||
templateUrl: './align-vertically.component.html',
|
||||
})
|
||||
export class AlignVerticallyActionComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() nodes: Node[];
|
||||
|
||||
constructor(private nodesDataSource: NodesDataSource, private nodeService: NodeService) {}
|
||||
|
@ -10,7 +10,7 @@ import { ProgressService } from "../../../../../common/progress/progress.service
|
||||
templateUrl: './auto-idle-pc-action.component.html',
|
||||
})
|
||||
export class AutoIdlePcActionComponent {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() node: Node;
|
||||
|
||||
constructor(
|
||||
|
@ -12,7 +12,7 @@ import { NodeService } from '../../../../../services/node.service';
|
||||
templateUrl: './bring-to-front-action.component.html',
|
||||
})
|
||||
export class BringToFrontActionComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() nodes: Node[];
|
||||
@Input() drawings: Drawing[];
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { ChangeHostnameDialogComponent } from '../../../change-hostname-dialog/c
|
||||
templateUrl: './change-hostname-action.component.html',
|
||||
})
|
||||
export class ChangeHostnameActionComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() node: Node;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
@ -9,7 +9,7 @@ import { ChangeSymbolDialogComponent } from '../../../change-symbol-dialog/chang
|
||||
templateUrl: './change-symbol-action.component.html',
|
||||
})
|
||||
export class ChangeSymbolActionComponent implements OnInit {
|
||||
@Input() controller:Controller ;
|
||||
@Input() controller: Controller;
|
||||
@Input() node: Node;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user