diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts
index 7e2a1898..217ef4e7 100644
--- a/e2e/app.e2e-spec.ts
+++ b/e2e/app.e2e-spec.ts
@@ -10,7 +10,7 @@ describe('GNS3 Web UI Application', () => {
it('should have correct page title', async () => {
// arrange
await page.navigateTo();
-
+
// act
let text = await page.getTitleText();
diff --git a/e2e/helpers/common.po.ts b/e2e/helpers/common.po.ts
index 3dae8252..5d06c069 100644
--- a/e2e/helpers/common.po.ts
+++ b/e2e/helpers/common.po.ts
@@ -2,21 +2,21 @@ import { browser, by, element } from 'protractor';
import { ServersPage } from './server.po';
export class TestHelper {
- sleep(value: number) {
- browser.sleep(value);
- }
+ sleep(value: number) {
+ browser.sleep(value);
+ }
- waitForLoading() {
- browser.waitForAngular();
- }
+ waitForLoading() {
+ browser.waitForAngular();
+ }
- async asyncForEach(array, callback) {
- for (let index = 0; index < array.length; index++) {
- await callback(array[index], index, array);
- }
+ async asyncForEach(array, callback) {
+ for (let index = 0; index < array.length; index++) {
+ await callback(array[index], index, array);
}
+ }
- getCurrentUrl() {
- return browser.getCurrentUrl();
- }
+ getCurrentUrl() {
+ return browser.getCurrentUrl();
+ }
}
diff --git a/e2e/helpers/project-map.po.ts b/e2e/helpers/project-map.po.ts
index 7ce8c823..d2df6967 100644
--- a/e2e/helpers/project-map.po.ts
+++ b/e2e/helpers/project-map.po.ts
@@ -1,50 +1,50 @@
-import { TestHelper } from "./common.po"
-import { browser, by } from "protractor";
+import { TestHelper } from './common.po';
+import { browser, by } from 'protractor';
export class ProjectMapPage {
- helper = new TestHelper();
+ helper = new TestHelper();
- async openAddProjectDialog() {
- let addButton = await browser.driver.findElement(by.css('button.addNode'));
- await addButton.click();
+ async openAddProjectDialog() {
+ let addButton = await browser.driver.findElement(by.css('button.addNode'));
+ await addButton.click();
+ }
+
+ async addNode() {
+ let inputs = await browser.driver.findElements(by.css('input.mat-input-element'));
+ await inputs[0].sendKeys('VPCS');
+ this.helper.sleep(1000);
+
+ let selects = await browser.driver.findElements(by.css('mat-select.mat-select'));
+ await selects[1].click();
+ this.helper.sleep(1000);
+
+ let options = await browser.driver.findElements(by.css('mat-option.mat-option'));
+ await options[1].click(); //first option should be chosen
+ this.helper.sleep(1000);
+
+ // new select appears after refreshing data
+ selects = await browser.driver.findElements(by.css('mat-select.mat-select'));
+ if (selects[2]) {
+ await selects[2].click();
+ this.helper.sleep(1000);
+
+ options = await browser.driver.findElements(by.css('mat-option.mat-option'));
+ await options[0].click();
+ this.helper.sleep(1000);
}
- async addNode() {
- let inputs = await browser.driver.findElements(by.css('input.mat-input-element'));
- await inputs[0].sendKeys('VPCS');
- this.helper.sleep(1000);
+ let addButton = await browser.driver.findElement(by.css('button.addButton'));
+ await addButton.click();
+ this.helper.sleep(1000);
+ }
- let selects = await browser.driver.findElements(by.css('mat-select.mat-select'));
- await selects[1].click();
- this.helper.sleep(1000);
+ async verifyIfNodeWithLabelExists(labelToFind: string) {
+ this.helper.sleep(5000);
+ let nodeLabel = await browser.driver.findElement(by.css('#map > g > g.layer > g.nodes > g > g > g > g > text'));
+ let selectedNode;
+ let textFromNodeLabel = await nodeLabel.getText();
+ if (textFromNodeLabel == labelToFind) selectedNode = nodeLabel;
- let options = await browser.driver.findElements(by.css('mat-option.mat-option'));
- await options[1].click(); //first option should be chosen
- this.helper.sleep(1000);
-
- // new select appears after refreshing data
- selects = await browser.driver.findElements(by.css('mat-select.mat-select'));
- if (selects[2]) {
- await selects[2].click();
- this.helper.sleep(1000);
-
- options = await browser.driver.findElements(by.css('mat-option.mat-option'));
- await options[0].click();
- this.helper.sleep(1000);
- }
-
- let addButton = await browser.driver.findElement(by.css('button.addButton'));
- await addButton.click();
- this.helper.sleep(1000);
- }
-
- async verifyIfNodeWithLabelExists(labelToFind: string) {
- this.helper.sleep(5000);
- let nodeLabel = await browser.driver.findElement(by.css('#map > g > g.layer > g.nodes > g > g > g > g > text'));
- let selectedNode;
- let textFromNodeLabel = await nodeLabel.getText();
- if (textFromNodeLabel == labelToFind) selectedNode = nodeLabel;
-
- return selectedNode ? true : false;
- }
+ return selectedNode ? true : false;
+ }
}
diff --git a/e2e/helpers/project.po.ts b/e2e/helpers/project.po.ts
index 76b60ec2..0afcc74e 100644
--- a/e2e/helpers/project.po.ts
+++ b/e2e/helpers/project.po.ts
@@ -1,20 +1,20 @@
-import { TestHelper } from "./common.po"
-import { browser, by } from "protractor";
+import { TestHelper } from './common.po';
+import { browser, by } from 'protractor';
export class ProjectsPage {
- helper = new TestHelper();
+ helper = new TestHelper();
- async openAddProjectDialog() {
- let addButton = await browser.driver.findElement(by.css('button.add-button'));
- await addButton.click();
- }
+ async openAddProjectDialog() {
+ let addButton = await browser.driver.findElement(by.css('button.add-button'));
+ await addButton.click();
+ }
- async createProject() {
- let today = new Date();
- let inputs = await browser.driver.findElements(by.css('input.mat-input-element'));
- await inputs[1].sendKeys('test project ' + today.getUTCMilliseconds());
- this.helper.sleep(2000);
- let dialogButton = await browser.driver.findElement(by.css('button.add-project-button'));
- await dialogButton.click();
- }
+ async createProject() {
+ let today = new Date();
+ let inputs = await browser.driver.findElements(by.css('input.mat-input-element'));
+ await inputs[1].sendKeys('test project ' + today.getUTCMilliseconds());
+ this.helper.sleep(2000);
+ let dialogButton = await browser.driver.findElement(by.css('button.add-project-button'));
+ await dialogButton.click();
+ }
}
diff --git a/e2e/helpers/server.po.ts b/e2e/helpers/server.po.ts
index ece2422b..eec3956c 100644
--- a/e2e/helpers/server.po.ts
+++ b/e2e/helpers/server.po.ts
@@ -2,40 +2,40 @@ import { browser, by, element } from 'protractor';
import { TestHelper } from './common.po';
export class ServersPage {
- helper = new TestHelper;
+ helper = new TestHelper();
- maximizeWindow() {
- browser.driver.manage().window().maximize();
- }
+ maximizeWindow() {
+ browser.driver.manage().window().maximize();
+ }
- navigateToServersPage() {
- return browser.get('/servers');
- }
+ navigateToServersPage() {
+ return browser.get('/servers');
+ }
- getAddServerNotificationText() {
- return browser.driver.findElement(by.className('mat-card-content')).getText();
- }
+ getAddServerNotificationText() {
+ return browser.driver.findElement(by.className('mat-card-content')).getText();
+ }
- async clickAddServer() {
- let serversTable = await this.checkServersTable();
- if (serversTable.length === 0) {
- let buttons = await browser.driver.findElements(by.className('mat-button mat-button-base'));
- await buttons[3].click();
- }
+ async clickAddServer() {
+ let serversTable = await this.checkServersTable();
+ if (serversTable.length === 0) {
+ let buttons = await browser.driver.findElements(by.className('mat-button mat-button-base'));
+ await buttons[3].click();
}
+ }
- checkServersTable() {
- return browser.driver.findElements(by.css('mat-cell'));
- }
+ checkServersTable() {
+ return browser.driver.findElements(by.css('mat-cell'));
+ }
- async navigateToServerProjects() {
- this.helper.sleep(2000);
- let hyperlinks = await browser.driver.findElements(by.css('a.table-link'));
- let serverLink;
- await this.helper.asyncForEach(hyperlinks, async element => {
- let text = await element.getText();
- if (text === '127.0.0.1') serverLink = element;
- });
- await serverLink.click();
- }
+ async navigateToServerProjects() {
+ this.helper.sleep(2000);
+ let hyperlinks = await browser.driver.findElements(by.css('a.table-link'));
+ let serverLink;
+ await this.helper.asyncForEach(hyperlinks, async (element) => {
+ let text = await element.getText();
+ if (text === '127.0.0.1') serverLink = element;
+ });
+ await serverLink.click();
+ }
}
diff --git a/e2e/project-map.e2e-spec.ts b/e2e/project-map.e2e-spec.ts
index f5379d9d..d489b1d5 100644
--- a/e2e/project-map.e2e-spec.ts
+++ b/e2e/project-map.e2e-spec.ts
@@ -5,37 +5,37 @@ import { ProjectsPage } from './helpers/project.po';
import { ProjectMapPage } from './helpers/project-map.po';
describe('Project map page', () => {
- let serversPage: ServersPage;
- let projectsPage: ProjectsPage;
- let projectMapPage: ProjectMapPage;
- let helper: TestHelper;
+ let serversPage: ServersPage;
+ let projectsPage: ProjectsPage;
+ let projectMapPage: ProjectMapPage;
+ let helper: TestHelper;
- beforeEach(async () => {
- serversPage = new ServersPage();
- projectsPage = new ProjectsPage();
- projectMapPage = new ProjectMapPage();
- helper = new TestHelper();
+ beforeEach(async () => {
+ serversPage = new ServersPage();
+ projectsPage = new ProjectsPage();
+ projectMapPage = new ProjectMapPage();
+ helper = new TestHelper();
- serversPage.maximizeWindow();
- await serversPage.navigateToServersPage();
- await serversPage.clickAddServer();
- await serversPage.navigateToServerProjects();
- await projectsPage.openAddProjectDialog();
- helper.sleep(2000);
- await projectsPage.createProject();
- helper.sleep(2000);
- });
+ serversPage.maximizeWindow();
+ await serversPage.navigateToServersPage();
+ await serversPage.clickAddServer();
+ await serversPage.navigateToServerProjects();
+ await projectsPage.openAddProjectDialog();
+ helper.sleep(2000);
+ await projectsPage.createProject();
+ helper.sleep(2000);
+ });
- it('user should have possibility to add nodes to map', async () => {
- // arrange
- projectMapPage.openAddProjectDialog();
- helper.sleep(2000);
+ it('user should have possibility to add nodes to map', async () => {
+ // arrange
+ projectMapPage.openAddProjectDialog();
+ helper.sleep(2000);
- //act
- projectMapPage.addNode();
- helper.sleep(2000);
+ //act
+ projectMapPage.addNode();
+ helper.sleep(2000);
- //assert
- expect(await projectMapPage.verifyIfNodeWithLabelExists('PC1')).toBe(true);
- });
+ //assert
+ expect(await projectMapPage.verifyIfNodeWithLabelExists('PC1')).toBe(true);
+ });
});
diff --git a/e2e/projects.e2e-spec.ts b/e2e/projects.e2e-spec.ts
index 977c3656..0333b065 100644
--- a/e2e/projects.e2e-spec.ts
+++ b/e2e/projects.e2e-spec.ts
@@ -4,31 +4,31 @@ import { element } from 'protractor';
import { ProjectsPage } from './helpers/project.po';
describe('Projects page', () => {
- let serversPage: ServersPage;
- let projectsPage: ProjectsPage;
- let helper: TestHelper;
+ let serversPage: ServersPage;
+ let projectsPage: ProjectsPage;
+ let helper: TestHelper;
- beforeEach(() => {
- serversPage = new ServersPage();
- projectsPage = new ProjectsPage();
- helper = new TestHelper();
- });
+ beforeEach(() => {
+ serversPage = new ServersPage();
+ projectsPage = new ProjectsPage();
+ helper = new TestHelper();
+ });
- it('user should have possibility to create new project', async () => {
- // arrange
- serversPage.maximizeWindow();
- await serversPage.navigateToServersPage();
- await serversPage.clickAddServer();
- await serversPage.navigateToServerProjects();
- helper.sleep(2000);
+ it('user should have possibility to create new project', async () => {
+ // arrange
+ serversPage.maximizeWindow();
+ await serversPage.navigateToServersPage();
+ await serversPage.clickAddServer();
+ await serversPage.navigateToServerProjects();
+ helper.sleep(2000);
- //act
- await projectsPage.openAddProjectDialog();
- helper.sleep(2000);
- await projectsPage.createProject();
- helper.sleep(2000);
+ //act
+ await projectsPage.openAddProjectDialog();
+ helper.sleep(2000);
+ await projectsPage.createProject();
+ helper.sleep(2000);
- //assert
- expect(helper.getCurrentUrl()).toMatch('server/1/project/');
- });
+ //assert
+ expect(helper.getCurrentUrl()).toMatch('server/1/project/');
+ });
});
diff --git a/e2e/servers.e2e-spec.ts b/e2e/servers.e2e-spec.ts
index 1d177f4b..be7f65c9 100644
--- a/e2e/servers.e2e-spec.ts
+++ b/e2e/servers.e2e-spec.ts
@@ -3,42 +3,42 @@ import { TestHelper } from './helpers/common.po';
import { element } from 'protractor';
describe('Servers page', () => {
- let page: ServersPage;
- let helper: TestHelper;
+ let page: ServersPage;
+ let helper: TestHelper;
- beforeEach(() => {
- page = new ServersPage();
- helper = new TestHelper();
+ beforeEach(() => {
+ page = new ServersPage();
+ helper = new TestHelper();
+ });
+
+ xit('user should have possibility to add server', async () => {
+ // arrange
+ page.maximizeWindow();
+ await page.navigateToServersPage();
+
+ // act
+ let text = await page.getAddServerNotificationText();
+
+ // assert
+ expect(text).toBe("We've discovered GNS3 server on 127.0.0.1:3080, would you like to add to the list?");
+ });
+
+ it('user should see added server in the list', async () => {
+ // arrange
+ page.maximizeWindow();
+ await page.navigateToServersPage();
+ await page.clickAddServer();
+ helper.sleep(1000);
+
+ // act
+ let firstRowOfServersTable = await page.checkServersTable();
+ let serverData = [];
+ await helper.asyncForEach(firstRowOfServersTable, async (element) => {
+ serverData.push(await element.getText());
});
- xit('user should have possibility to add server', async () => {
- // arrange
- page.maximizeWindow();
- await page.navigateToServersPage();
-
- // act
- let text = await page.getAddServerNotificationText();
-
- // assert
- expect(text).toBe("We've discovered GNS3 server on 127.0.0.1:3080, would you like to add to the list?");
- });
-
- it('user should see added server in the list', async () => {
- // arrange
- page.maximizeWindow();
- await page.navigateToServersPage();
- await page.clickAddServer();
- helper.sleep(1000);
-
- // act
- let firstRowOfServersTable = await page.checkServersTable();
- let serverData = [];
- await helper.asyncForEach(firstRowOfServersTable, async element => {
- serverData.push(await element.getText());
- });
-
- // assert
- expect(serverData).toContain('127.0.0.1');
- expect(serverData).toContain('3080');
- });
+ // assert
+ expect(serverData).toContain('127.0.0.1');
+ expect(serverData).toContain('3080');
+ });
});
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index e1552e7c..46959a94 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -74,10 +74,10 @@ const routes: Routes = [
{ path: '', redirectTo: 'servers', pathMatch: 'full' },
{ path: 'servers', component: ServersComponent },
{ path: 'bundled', component: BundledServerFinderComponent },
- {
- path: 'server/:server_id/projects',
+ {
+ path: 'server/:server_id/projects',
component: ProjectsComponent,
- resolve: { server : ServerResolve }
+ resolve: { server: ServerResolve },
},
{ path: 'help', component: HelpComponent },
{ path: 'help/reportissue', component: ReportIssueComponent },
@@ -86,54 +86,87 @@ const routes: Routes = [
{ path: 'installed-software', component: InstalledSoftwareComponent },
{ path: 'server/:server_id/systemstatus', component: SystemStatusComponent },
- { path: 'server/:server_ip/:server_port/project/:project_id', component: DirectLinkComponent},
- {
- path: 'server/:server_id/project/:project_id/snapshots',
+ { path: 'server/:server_ip/:server_port/project/:project_id', component: DirectLinkComponent },
+ {
+ path: 'server/:server_id/project/:project_id/snapshots',
component: ListOfSnapshotsComponent,
- resolve: { server : ServerResolve }
+ resolve: { server: ServerResolve },
},
{ path: 'server/:server_id/preferences', component: PreferencesComponent },
{ path: 'server/:server_id/preferences/gns3vm', component: Gns3vmComponent },
// { path: 'server/:server_id/preferences/general', component: GeneralPreferencesComponent },
- { path: 'server/:server_id/preferences/builtin', component: BuiltInPreferencesComponent},
+ { path: 'server/:server_id/preferences/builtin', component: BuiltInPreferencesComponent },
{ path: 'server/:server_id/preferences/builtin/ethernet-hubs', component: EthernetHubsTemplatesComponent },
- { path: 'server/:server_id/preferences/builtin/ethernet-hubs/addtemplate', component: EthernetHubsAddTemplateComponent },
- { path: 'server/:server_id/preferences/builtin/ethernet-hubs/:template_id', component: EthernetHubsTemplateDetailsComponent },
+ {
+ path: 'server/:server_id/preferences/builtin/ethernet-hubs/addtemplate',
+ component: EthernetHubsAddTemplateComponent,
+ },
+ {
+ path: 'server/:server_id/preferences/builtin/ethernet-hubs/:template_id',
+ component: EthernetHubsTemplateDetailsComponent,
+ },
- { path: 'server/:server_id/preferences/builtin/ethernet-switches', component: EthernetSwitchesTemplatesComponent },
- { path: 'server/:server_id/preferences/builtin/ethernet-switches/addtemplate', component: EthernetSwitchesAddTemplateComponent },
- { path: 'server/:server_id/preferences/builtin/ethernet-switches/:template_id', component: EthernetSwitchesTemplateDetailsComponent },
+ {
+ path: 'server/:server_id/preferences/builtin/ethernet-switches',
+ component: EthernetSwitchesTemplatesComponent,
+ },
+ {
+ path: 'server/:server_id/preferences/builtin/ethernet-switches/addtemplate',
+ component: EthernetSwitchesAddTemplateComponent,
+ },
+ {
+ path: 'server/:server_id/preferences/builtin/ethernet-switches/:template_id',
+ component: EthernetSwitchesTemplateDetailsComponent,
+ },
{ path: 'server/:server_id/preferences/builtin/cloud-nodes', component: CloudNodesTemplatesComponent },
- { path: 'server/:server_id/preferences/builtin/cloud-nodes/addtemplate', component: CloudNodesAddTemplateComponent },
- { path: 'server/:server_id/preferences/builtin/cloud-nodes/:template_id', component: CloudNodesTemplateDetailsComponent },
+ {
+ path: 'server/:server_id/preferences/builtin/cloud-nodes/addtemplate',
+ component: CloudNodesAddTemplateComponent,
+ },
+ {
+ path: 'server/:server_id/preferences/builtin/cloud-nodes/:template_id',
+ component: CloudNodesTemplateDetailsComponent,
+ },
//{ path: 'server/:server_id/preferences/dynamips', component: DynamipsPreferencesComponent },
{ path: 'server/:server_id/preferences/dynamips/templates', component: IosTemplatesComponent },
{ path: 'server/:server_id/preferences/dynamips/templates/addtemplate', component: AddIosTemplateComponent },
{ path: 'server/:server_id/preferences/dynamips/templates/:template_id', component: IosTemplateDetailsComponent },
- { path: 'server/:server_id/preferences/dynamips/templates/:template_id/copy', component: CopyIosTemplateComponent },
+ {
+ path: 'server/:server_id/preferences/dynamips/templates/:template_id/copy',
+ component: CopyIosTemplateComponent,
+ },
// { path: 'server/:server_id/preferences/qemu', component: QemuPreferencesComponent },
{ path: 'server/:server_id/preferences/qemu/templates', component: QemuVmTemplatesComponent },
- { path: 'server/:server_id/preferences/qemu/templates/:template_id/copy', component: CopyQemuVmTemplateComponent },
+ {
+ path: 'server/:server_id/preferences/qemu/templates/:template_id/copy',
+ component: CopyQemuVmTemplateComponent,
+ },
{ path: 'server/:server_id/preferences/qemu/templates/:template_id', component: QemuVmTemplateDetailsComponent },
{ path: 'server/:server_id/preferences/qemu/addtemplate', component: AddQemuVmTemplateComponent },
// { path: 'server/:server_id/preferences/vpcs', component: VpcsPreferencesComponent },
{ path: 'server/:server_id/preferences/vpcs/templates', component: VpcsTemplatesComponent },
- { path: 'server/:server_id/preferences/vpcs/templates/:template_id', component: VpcsTemplateDetailsComponent},
+ { path: 'server/:server_id/preferences/vpcs/templates/:template_id', component: VpcsTemplateDetailsComponent },
{ path: 'server/:server_id/preferences/vpcs/addtemplate', component: AddVpcsTemplateComponent },
// { path: 'server/:server_id/preferences/virtualbox', component: VirtualBoxPreferencesComponent },
{ path: 'server/:server_id/preferences/virtualbox/templates', component: VirtualBoxTemplatesComponent },
- { path: 'server/:server_id/preferences/virtualbox/templates/:template_id', component: VirtualBoxTemplateDetailsComponent },
+ {
+ path: 'server/:server_id/preferences/virtualbox/templates/:template_id',
+ component: VirtualBoxTemplateDetailsComponent,
+ },
{ path: 'server/:server_id/preferences/virtualbox/addtemplate', component: AddVirtualBoxTemplateComponent },
// { path: 'server/:server_id/preferences/vmware', component: VmwarePreferencesComponent },
{ path: 'server/:server_id/preferences/vmware/templates', component: VmwareTemplatesComponent },
- { path: 'server/:server_id/preferences/vmware/templates/:template_id', component: VmwareTemplateDetailsComponent },
+ {
+ path: 'server/:server_id/preferences/vmware/templates/:template_id',
+ component: VmwareTemplateDetailsComponent,
+ },
{ path: 'server/:server_id/preferences/vmware/addtemplate', component: AddVmwareTemplateComponent },
// { path: 'server/:server_id/preferences/traceng', component: TracengPreferencesComponent },
@@ -142,37 +175,49 @@ const routes: Routes = [
// { path: 'server/:server_id/preferences/traceng/addtemplate', component: AddTracengTemplateComponent },
{ path: 'server/:server_id/preferences/docker/templates', component: DockerTemplatesComponent },
- { path: 'server/:server_id/preferences/docker/templates/:template_id', component: DockerTemplateDetailsComponent },
- { path: 'server/:server_id/preferences/docker/templates/:template_id/copy', component: CopyDockerTemplateComponent },
+ {
+ path: 'server/:server_id/preferences/docker/templates/:template_id',
+ component: DockerTemplateDetailsComponent,
+ },
+ {
+ path: 'server/:server_id/preferences/docker/templates/:template_id/copy',
+ component: CopyDockerTemplateComponent,
+ },
{ path: 'server/:server_id/preferences/docker/addtemplate', component: AddDockerTemplateComponent },
{ path: 'server/:server_id/preferences/iou/templates', component: IouTemplatesComponent },
{ path: 'server/:server_id/preferences/iou/templates/:template_id', component: IouTemplateDetailsComponent },
{ path: 'server/:server_id/preferences/iou/templates/:template_id/copy', component: CopyIouTemplateComponent },
- { path: 'server/:server_id/preferences/iou/addtemplate', component: AddIouTemplateComponent }
- ]
+ { path: 'server/:server_id/preferences/iou/addtemplate', component: AddIouTemplateComponent },
+ ],
},
- {
- path: 'server/:server_id/project/:project_id',
+ {
+ path: 'server/:server_id/project/:project_id',
component: ProjectMapComponent,
- canDeactivate: [ConsoleGuard]
+ canDeactivate: [ConsoleGuard],
},
- {
- path: 'server/:server_id/project/:project_id/nodes/:node_id',
- component: WebConsoleFullWindowComponent
+ {
+ path: 'server/:server_id/project/:project_id/nodes/:node_id',
+ component: WebConsoleFullWindowComponent,
},
- {
- path: 'static/web-ui/server/:server_id/project/:project_id/nodes/:node_id',
- component: WebConsoleFullWindowComponent
+ {
+ path: 'static/web-ui/server/:server_id/project/:project_id/nodes/:node_id',
+ component: WebConsoleFullWindowComponent,
},
{
path: '**',
- component: PageNotFoundComponent
- }
+ component: PageNotFoundComponent,
+ },
];
@NgModule({
- imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled', enableTracing: false, scrollPositionRestoration: 'enabled'})],
- exports: [RouterModule]
+ imports: [
+ RouterModule.forRoot(routes, {
+ anchorScrolling: 'enabled',
+ enableTracing: false,
+ scrollPositionRestoration: 'enabled',
+ }),
+ ],
+ exports: [RouterModule],
})
export class AppRoutingModule {}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 69475d67..db17fd83 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,4 +1,4 @@
-
-
-
+
diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index bad2bc18..193c4c31 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -1,11 +1,11 @@
mat-menu-panel {
- min-height: 0px;
+ min-height: 0px;
}
.dark {
- background: #263238!important;
+ background: #263238 !important;
}
.light {
- background: white!important;
+ background: white !important;
}
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
index 1eb4a588..00903884 100644
--- a/src/app/app.component.spec.ts
+++ b/src/app/app.component.spec.ts
@@ -22,7 +22,7 @@ describe('AppComponent', () => {
declarations: [AppComponent],
imports: [RouterTestingModule, MatIconModule, NgxElectronModule],
providers: [SettingsService, PersistenceService, ProgressService],
- schemas: [NO_ERRORS_SCHEMA]
+ schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();
electronService = TestBed.get(ElectronService);
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index cd6c901f..8d89c006 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -6,12 +6,12 @@ import { SettingsService } from './services/settings.service';
import { ThemeService } from './services/theme.service';
import { Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
import { ProgressService } from './common/progress/progress.service';
-import { OverlayContainer} from '@angular/cdk/overlay';
+import { OverlayContainer } from '@angular/cdk/overlay';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss']
+ styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
public darkThemeEnabled: boolean = false;
@@ -38,7 +38,7 @@ export class AppComponent implements OnInit {
ngOnInit(): void {
if (this.electronService.isElectronApp) {
- this.settingsService.subscribe(settings => {
+ this.settingsService.subscribe((settings) => {
this.electronService.ipcRenderer.send('settings.changed', settings);
});
}
@@ -59,14 +59,14 @@ export class AppComponent implements OnInit {
this.componentCssClass = theme;
}
- checkEvent(routerEvent) : void {
+ checkEvent(routerEvent): void {
if (routerEvent instanceof NavigationStart) {
this.progressService.activate();
- }
-
- else if (routerEvent instanceof NavigationEnd ||
- routerEvent instanceof NavigationCancel ||
- routerEvent instanceof NavigationError) {
+ } else if (
+ routerEvent instanceof NavigationEnd ||
+ routerEvent instanceof NavigationCancel ||
+ routerEvent instanceof NavigationError
+ ) {
this.progressService.deactivate();
}
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 670201b2..a05a1878 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -470,7 +470,7 @@ import { OverlayContainer, OverlayModule } from '@angular/cdk/overlay';
TemplateNameDialogComponent,
ConfigureCustomAdaptersDialogComponent,
EditNetworkConfigurationDialogComponent,
- ReportIssueComponent
+ ReportIssueComponent,
],
imports: [
AngularReactBrowserModule,
@@ -492,7 +492,7 @@ import { OverlayContainer, OverlayModule } from '@angular/cdk/overlay';
NgxChildProcessModule,
MATERIAL_IMPORTS,
NgCircleProgressModule.forRoot(),
- OverlayModule
+ OverlayModule,
],
providers: [
SettingsService,
@@ -567,7 +567,7 @@ import { OverlayContainer, OverlayModule } from '@angular/cdk/overlay';
ConsoleGuard,
Title,
ApplianceService,
- UpdatesService
+ UpdatesService,
],
entryComponents: [
AddServerDialogComponent,
@@ -615,10 +615,10 @@ import { OverlayContainer, OverlayModule } from '@angular/cdk/overlay';
ChangeHostnameDialogComponent,
ApplianceInfoDialogComponent,
ConfigureCustomAdaptersDialogComponent,
- EditNetworkConfigurationDialogComponent
+ EditNetworkConfigurationDialogComponent,
],
- bootstrap: [AppComponent]
+ bootstrap: [AppComponent],
})
export class AppModule {
- constructor(protected _googleAnalyticsService: GoogleAnalyticsService) { }
+ constructor(protected _googleAnalyticsService: GoogleAnalyticsService) {}
}
diff --git a/src/app/cartography/angular-map.imports.ts b/src/app/cartography/angular-map.imports.ts
index e2a53e9f..06856ccf 100644
--- a/src/app/cartography/angular-map.imports.ts
+++ b/src/app/cartography/angular-map.imports.ts
@@ -23,5 +23,5 @@ export const ANGULAR_MAP_DECLARATIONS = [
TextComponent,
DraggableComponent,
SelectionComponent,
- InterfaceLabelComponent
+ InterfaceLabelComponent,
];
diff --git a/src/app/cartography/cartography.module.ts b/src/app/cartography/cartography.module.ts
index 3ebad213..46c44721 100644
--- a/src/app/cartography/cartography.module.ts
+++ b/src/app/cartography/cartography.module.ts
@@ -37,7 +37,7 @@ import {
MapNodesDataSource,
MapLinksDataSource,
MapDrawingsDataSource,
- MapSymbolsDataSource
+ MapSymbolsDataSource,
} from './datasources/map-datasource';
import { LinksEventSource } from './events/links-event-source';
import { D3MapComponent } from './components/d3-map/d3-map.component';
@@ -75,7 +75,7 @@ import { SerialLinkWidget } from './widgets/links/serial-link';
SelectionSelectComponent,
DraggableSelectionComponent,
MovingCanvasDirective,
- ZoomingCanvasDirective
+ ZoomingCanvasDirective,
],
providers: [
CssFixer,
@@ -122,8 +122,8 @@ import { SerialLinkWidget } from './widgets/links/serial-link';
StylesToFontConverter,
EthernetLinkWidget,
SerialLinkWidget,
- ...D3_MAP_IMPORTS
+ ...D3_MAP_IMPORTS,
],
- exports: [D3MapComponent, ExperimentalMapComponent]
+ exports: [D3MapComponent, ExperimentalMapComponent],
})
export class CartographyModule {}
diff --git a/src/app/cartography/components/d3-map/d3-map.component.html b/src/app/cartography/components/d3-map/d3-map.component.html
index b409cd50..e166c697 100644
--- a/src/app/cartography/components/d3-map/d3-map.component.html
+++ b/src/app/cartography/components/d3-map/d3-map.component.html
@@ -1,14 +1,38 @@
diff --git a/src/app/common/progress/progress.component.spec.ts b/src/app/common/progress/progress.component.spec.ts
index b56fe900..7649964c 100644
--- a/src/app/common/progress/progress.component.spec.ts
+++ b/src/app/common/progress/progress.component.spec.ts
@@ -28,7 +28,7 @@ describe('ProgressComponent', () => {
TestBed.configureTestingModule({
imports: [RouterTestingModule, MatProgressSpinnerModule, MatIconModule],
providers: [ProgressService, { provide: Router, useValue: router }],
- declarations: [ProgressComponent]
+ declarations: [ProgressComponent],
}).compileComponents();
progressService = TestBed.get(ProgressService);
@@ -59,7 +59,7 @@ describe('ProgressComponent', () => {
});
it('should set error state when error defined', () => {
- const error = {error: 'test'};
+ const error = { error: 'test' };
progressService.setError(error);
expect(component.error).toEqual(error.error);
});
@@ -75,7 +75,7 @@ describe('ProgressComponent', () => {
expect(progressService.clear).toHaveBeenCalled();
});
- it("should reload page after clicking refresh", () => {
+ it('should reload page after clicking refresh', () => {
spyOn(router, 'navigateByUrl');
component.refresh();
diff --git a/src/app/common/progress/progress.component.ts b/src/app/common/progress/progress.component.ts
index b9ce8f91..d6fada6e 100644
--- a/src/app/common/progress/progress.component.ts
+++ b/src/app/common/progress/progress.component.ts
@@ -6,7 +6,7 @@ import { Subscription } from 'rxjs';
@Component({
selector: 'app-progress',
templateUrl: './progress.component.html',
- styleUrls: ['./progress.component.scss']
+ styleUrls: ['./progress.component.scss'],
})
export class ProgressComponent implements OnInit, OnDestroy {
visible = false;
@@ -16,7 +16,7 @@ export class ProgressComponent implements OnInit, OnDestroy {
constructor(private progressService: ProgressService, private router: Router) {}
ngOnInit() {
- this.progressService.state.subscribe(state => {
+ this.progressService.state.subscribe((state) => {
this.visible = state.visible;
// only set error state once; ignore next "correct" states
diff --git a/src/app/common/progress/progress.service.spec.ts b/src/app/common/progress/progress.service.spec.ts
index 23a76f08..52a714a9 100644
--- a/src/app/common/progress/progress.service.spec.ts
+++ b/src/app/common/progress/progress.service.spec.ts
@@ -7,7 +7,7 @@ describe('ProgressService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
- providers: [ProgressService]
+ providers: [ProgressService],
});
progressService = TestBed.get(ProgressService);
@@ -30,7 +30,7 @@ describe('ProgressService', () => {
});
it('should propagate event on error', () => {
- const error = {error: 'Error'};
+ const error = { error: 'Error' };
progressService.setError(error);
expect(progressService.state.next).toHaveBeenCalledWith(new State(false, error.error));
});
diff --git a/src/app/components/adbutler/adbutler.component.html b/src/app/components/adbutler/adbutler.component.html
index 709874a7..7a714376 100644
--- a/src/app/components/adbutler/adbutler.component.html
+++ b/src/app/components/adbutler/adbutler.component.html
@@ -1,11 +1,11 @@
-