mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-05 18:18:29 +00:00
rename component name servers and server Into a controllers or controller
This commit is contained in:
parent
99e022bed8
commit
37cc3f3731
@ -44,7 +44,7 @@ import { VpcsTemplateDetailsComponent } from './components/preferences/vpcs/vpcs
|
|||||||
import { VpcsTemplatesComponent } from './components/preferences/vpcs/vpcs-templates/vpcs-templates.component';
|
import { VpcsTemplatesComponent } from './components/preferences/vpcs/vpcs-templates/vpcs-templates.component';
|
||||||
import { ProjectMapComponent } from './components/project-map/project-map.component';
|
import { ProjectMapComponent } from './components/project-map/project-map.component';
|
||||||
import { ProjectsComponent } from './components/projects/projects.component';
|
import { ProjectsComponent } from './components/projects/projects.component';
|
||||||
import { ServersComponent } from './components/servers/servers.component';
|
import { ControllersComponent } from './components/controllers/controllers.component';
|
||||||
import { ConsoleComponent } from './components/settings/console/console.component';
|
import { ConsoleComponent } from './components/settings/console/console.component';
|
||||||
import { SettingsComponent } from './components/settings/settings.component';
|
import { SettingsComponent } from './components/settings/settings.component';
|
||||||
import { ListOfSnapshotsComponent } from './components/snapshots/list-of-snapshots/list-of-snapshots.component';
|
import { ListOfSnapshotsComponent } from './components/snapshots/list-of-snapshots/list-of-snapshots.component';
|
||||||
@ -64,7 +64,7 @@ const routes: Routes = [
|
|||||||
component: DefaultLayoutComponent,
|
component: DefaultLayoutComponent,
|
||||||
children: [
|
children: [
|
||||||
{ path: '', redirectTo: 'controllers', pathMatch: 'full' },
|
{ path: '', redirectTo: 'controllers', pathMatch: 'full' },
|
||||||
{ path: 'controllers', component: ServersComponent },
|
{ path: 'controllers', component: ControllersComponent },
|
||||||
{ path: 'bundled', component: BundledServerFinderComponent },
|
{ path: 'bundled', component: BundledServerFinderComponent },
|
||||||
{ path: 'controller/:server_id/login', component: LoginComponent },
|
{ path: 'controller/:server_id/login', component: LoginComponent },
|
||||||
{ path: 'controller/:server_id/loggeduser', component: LoggedUserComponent },
|
{ path: 'controller/:server_id/loggeduser', component: LoggedUserComponent },
|
||||||
|
@ -187,9 +187,9 @@ import { ProjectNameValidator } from './components/projects/models/projectNameVa
|
|||||||
import { NavigationDialogComponent } from './components/projects/navigation-dialog/navigation-dialog.component';
|
import { NavigationDialogComponent } from './components/projects/navigation-dialog/navigation-dialog.component';
|
||||||
import { ProjectsComponent } from './components/projects/projects.component';
|
import { ProjectsComponent } from './components/projects/projects.component';
|
||||||
import { SaveProjectDialogComponent } from './components/projects/save-project-dialog/save-project-dialog.component';
|
import { SaveProjectDialogComponent } from './components/projects/save-project-dialog/save-project-dialog.component';
|
||||||
import { AddServerDialogComponent } from './components/servers/add-server-dialog/add-server-dialog.component';
|
import { AddControllerDialogComponent } from './components/controllers/add-controller-dialog/add-controller-dialog.component';
|
||||||
import { ServerDiscoveryComponent } from './components/servers/server-discovery/server-discovery.component';
|
import { ControllerDiscoveryComponent } from './components/controllers/controller-discovery/controller-discovery.component';
|
||||||
import { ServersComponent } from './components/servers/servers.component';
|
import { ControllersComponent } from './components/controllers/controllers.component';
|
||||||
import { ConsoleComponent } from './components/settings/console/console.component';
|
import { ConsoleComponent } from './components/settings/console/console.component';
|
||||||
import { SettingsComponent } from './components/settings/settings.component';
|
import { SettingsComponent } from './components/settings/settings.component';
|
||||||
import { CreateSnapshotDialogComponent } from './components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component';
|
import { CreateSnapshotDialogComponent } from './components/snapshots/create-snapshot-dialog/create-snapshot-dialog.component';
|
||||||
@ -287,8 +287,8 @@ import { NodesMenuConfirmationDialogComponent } from './components/project-map/n
|
|||||||
LoggedUserComponent,
|
LoggedUserComponent,
|
||||||
ProjectMapComponent,
|
ProjectMapComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
ServersComponent,
|
ControllersComponent,
|
||||||
AddServerDialogComponent,
|
AddControllerDialogComponent,
|
||||||
CreateSnapshotDialogComponent,
|
CreateSnapshotDialogComponent,
|
||||||
SnapshotMenuItemComponent,
|
SnapshotMenuItemComponent,
|
||||||
ProjectsComponent,
|
ProjectsComponent,
|
||||||
@ -321,7 +321,7 @@ import { NodesMenuConfirmationDialogComponent } from './components/project-map/n
|
|||||||
PreferencesComponent,
|
PreferencesComponent,
|
||||||
BundledServerFinderComponent,
|
BundledServerFinderComponent,
|
||||||
ProgressComponent,
|
ProgressComponent,
|
||||||
ServerDiscoveryComponent,
|
ControllerDiscoveryComponent,
|
||||||
NodeSelectInterfaceComponent,
|
NodeSelectInterfaceComponent,
|
||||||
DrawLinkToolComponent,
|
DrawLinkToolComponent,
|
||||||
InstalledSoftwareComponent,
|
InstalledSoftwareComponent,
|
||||||
@ -574,7 +574,7 @@ import { NodesMenuConfirmationDialogComponent } from './components/project-map/n
|
|||||||
UserService
|
UserService
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
AddServerDialogComponent,
|
AddControllerDialogComponent,
|
||||||
CreateSnapshotDialogComponent,
|
CreateSnapshotDialogComponent,
|
||||||
ProgressDialogComponent,
|
ProgressDialogComponent,
|
||||||
TemplateListDialogComponent,
|
TemplateListDialogComponent,
|
||||||
|
@ -7,10 +7,10 @@ import { ServerService } from '../../../services/server.service';
|
|||||||
import { ToasterService } from '../../../services/toaster.service';
|
import { ToasterService } from '../../../services/toaster.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-server-dialog',
|
selector: 'app-add-controller-dialog',
|
||||||
templateUrl: 'add-server-dialog.component.html',
|
templateUrl: 'add-controller-dialog.component.html',
|
||||||
})
|
})
|
||||||
export class AddServerDialogComponent implements OnInit {
|
export class AddControllerDialogComponent implements OnInit {
|
||||||
protocols = [
|
protocols = [
|
||||||
{ key: 'http:', name: 'HTTP' },
|
{ key: 'http:', name: 'HTTP' },
|
||||||
{ key: 'https:', name: 'HTTPS' },
|
{ key: 'https:', name: 'HTTPS' },
|
||||||
@ -28,7 +28,7 @@ export class AddServerDialogComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public dialogRef: MatDialogRef<AddServerDialogComponent>,
|
public dialogRef: MatDialogRef<AddControllerDialogComponent>,
|
||||||
private electronService: ElectronService,
|
private electronService: ElectronService,
|
||||||
private serverService: ServerService,
|
private serverService: ServerService,
|
||||||
private toasterService: ToasterService,
|
private toasterService: ToasterService,
|
@ -9,11 +9,11 @@ import { ServerService } from '../../../services/server.service';
|
|||||||
import { MockedServerService } from '../../../services/server.service.spec';
|
import { MockedServerService } from '../../../services/server.service.spec';
|
||||||
import { VersionService } from '../../../services/version.service';
|
import { VersionService } from '../../../services/version.service';
|
||||||
import { MockedVersionService } from '../../../services/version.service.spec';
|
import { MockedVersionService } from '../../../services/version.service.spec';
|
||||||
import { ServerDiscoveryComponent } from './server-discovery.component';
|
import { ControllerDiscoveryComponent } from './controller-discovery.component';
|
||||||
|
|
||||||
xdescribe('ServerDiscoveryComponent', () => {
|
xdescribe('ControllerDiscoveryComponent', () => {
|
||||||
let component: ServerDiscoveryComponent;
|
let component: ControllerDiscoveryComponent;
|
||||||
let fixture: ComponentFixture<ServerDiscoveryComponent>;
|
let fixture: ComponentFixture<ControllerDiscoveryComponent>;
|
||||||
let mockedVersionService: MockedVersionService;
|
let mockedVersionService: MockedVersionService;
|
||||||
let mockedServerService: MockedServerService;
|
let mockedServerService: MockedServerService;
|
||||||
|
|
||||||
@ -27,12 +27,12 @@ xdescribe('ServerDiscoveryComponent', () => {
|
|||||||
{ provide: ServerService, useFactory: () => mockedServerService },
|
{ provide: ServerService, useFactory: () => mockedServerService },
|
||||||
ServerDatabase,
|
ServerDatabase,
|
||||||
],
|
],
|
||||||
declarations: [ServerDiscoveryComponent],
|
declarations: [ControllerDiscoveryComponent],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ServerDiscoveryComponent);
|
fixture = TestBed.createComponent(ControllerDiscoveryComponent);
|
||||||
|
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|
@ -10,11 +10,11 @@ import { ServerService } from '../../../services/server.service';
|
|||||||
import { VersionService } from '../../../services/version.service';
|
import { VersionService } from '../../../services/version.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-server-discovery',
|
selector: 'app-controller-discovery',
|
||||||
templateUrl: './server-discovery.component.html',
|
templateUrl: './controller-discovery.component.html',
|
||||||
styleUrls: ['./server-discovery.component.scss'],
|
styleUrls: ['./controller-discovery.component.scss'],
|
||||||
})
|
})
|
||||||
export class ServerDiscoveryComponent implements OnInit {
|
export class ControllerDiscoveryComponent implements OnInit {
|
||||||
private defaultServers = [
|
private defaultServers = [
|
||||||
{
|
{
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
@ -1,7 +1,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="default-header"><h1>Controllers</h1></div>
|
<div class="default-header"><h1>Controllers</h1></div>
|
||||||
<div class="default-content">
|
<div class="default-content">
|
||||||
<app-server-discovery></app-server-discovery>
|
<app-controller-discovery></app-controller-discovery>
|
||||||
|
|
||||||
<div class="mat-elevation-z8">
|
<div class="mat-elevation-z8">
|
||||||
<mat-table #table [dataSource]="dataSource">
|
<mat-table #table [dataSource]="dataSource">
|
@ -7,7 +7,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
|
|||||||
import { ServerDatabase } from '../../services/server.database';
|
import { ServerDatabase } from '../../services/server.database';
|
||||||
import { ServerService } from '../../services/server.service';
|
import { ServerService } from '../../services/server.service';
|
||||||
import { MockedServerService } from 'app/services/server.service.spec';
|
import { MockedServerService } from 'app/services/server.service.spec';
|
||||||
import { ServersComponent } from './servers.component';
|
import { ControllersComponent } from './controllers.component';
|
||||||
import { ServerManagementService } from 'app/services/server-management.service';
|
import { ServerManagementService } from 'app/services/server-management.service';
|
||||||
import { ElectronService } from 'ngx-electron';
|
import { ElectronService } from 'ngx-electron';
|
||||||
import { ChildProcessService } from 'ngx-childprocess';
|
import { ChildProcessService } from 'ngx-childprocess';
|
||||||
@ -18,16 +18,16 @@ import { RouterTestingModule } from '@angular/router/testing';
|
|||||||
import { ChangeDetectorRef } from '@angular/core';
|
import { ChangeDetectorRef } from '@angular/core';
|
||||||
import { MockedRouter } from 'app/common/progress/progress.component.spec';
|
import { MockedRouter } from 'app/common/progress/progress.component.spec';
|
||||||
|
|
||||||
describe('ServersComponent', () => {
|
describe('ControllersComponent', () => {
|
||||||
let component: ServersComponent;
|
let component: ControllersComponent;
|
||||||
let fixture: ComponentFixture<ServersComponent>;
|
let fixture: ComponentFixture<ControllersComponent>;
|
||||||
let serverMockedService: MockedServerService
|
let serverMockedService: MockedServerService
|
||||||
let mockedActivatedRoute: MockedActivatedRoute
|
let mockedActivatedRoute: MockedActivatedRoute
|
||||||
let mockedRouter : MockedRouter
|
let mockedRouter : MockedRouter
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ServersComponent],
|
declarations: [ControllersComponent],
|
||||||
imports: [
|
imports: [
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
RouterTestingModule,
|
RouterTestingModule,
|
||||||
@ -49,7 +49,7 @@ describe('ServersComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ServersComponent);
|
fixture = TestBed.createComponent(ControllersComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -12,14 +12,14 @@ import { ServerManagementService } from '../../services/server-management.servic
|
|||||||
import { ServerDatabase } from '../../services/server.database';
|
import { ServerDatabase } from '../../services/server.database';
|
||||||
import { ServerService } from '../../services/server.service';
|
import { ServerService } from '../../services/server.service';
|
||||||
import { ConfirmationBottomSheetComponent } from '../projects/confirmation-bottomsheet/confirmation-bottomsheet.component';
|
import { ConfirmationBottomSheetComponent } from '../projects/confirmation-bottomsheet/confirmation-bottomsheet.component';
|
||||||
import { AddServerDialogComponent } from './add-server-dialog/add-server-dialog.component';
|
import { AddControllerDialogComponent } from './add-controller-dialog/add-controller-dialog.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-server-list',
|
selector: 'app-controller-list',
|
||||||
templateUrl: './servers.component.html',
|
templateUrl: './controllers.component.html',
|
||||||
styleUrls: ['./servers.component.scss'],
|
styleUrls: ['./controllers.component.scss'],
|
||||||
})
|
})
|
||||||
export class ServersComponent implements OnInit, OnDestroy {
|
export class ControllersComponent implements OnInit, OnDestroy {
|
||||||
dataSource: ServerDataSource;
|
dataSource: ServerDataSource;
|
||||||
displayedColumns = ['id', 'name', 'ip', 'port', 'actions'];
|
displayedColumns = ['id', 'name', 'ip', 'port', 'actions'];
|
||||||
serverStatusSubscription: Subscription;
|
serverStatusSubscription: Subscription;
|
||||||
@ -114,7 +114,7 @@ export class ServersComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createModal() {
|
createModal() {
|
||||||
const dialogRef = this.dialog.open(AddServerDialogComponent, {
|
const dialogRef = this.dialog.open(AddControllerDialogComponent, {
|
||||||
width: '350px',
|
width: '350px',
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
disableClose: true,
|
disableClose: true,
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="default-content">
|
<div class="default-content">
|
||||||
<app-server-discovery></app-server-discovery>
|
<app-controller-discovery></app-controller-discovery>
|
||||||
|
|
||||||
<div class="mat-elevation-z8">
|
<div class="mat-elevation-z8">
|
||||||
<mat-table #table [dataSource]="dataSource">
|
<mat-table #table [dataSource]="dataSource">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user