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