mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-23 14:52:22 +00:00
Base for server-discovery, Ref: #159
This commit is contained in:
parent
c7d079ed0d
commit
e8e951afa7
@ -82,6 +82,7 @@ import { version } from "./version";
|
||||
import { ToasterErrorHandler } from "./common/error-handlers/toaster-error-handler";
|
||||
import { environment } from "../environments/environment";
|
||||
import { RavenState } from "./common/error-handlers/raven-state-communicator";
|
||||
import { ServerDiscoveryComponent } from "./components/servers/server-discovery/server-discovery.component";
|
||||
|
||||
|
||||
if (environment.production) {
|
||||
@ -118,6 +119,7 @@ if (environment.production) {
|
||||
SettingsComponent,
|
||||
LocalServerComponent,
|
||||
ProgressComponent,
|
||||
ServerDiscoveryComponent,
|
||||
],
|
||||
imports: [
|
||||
NgbModule.forRoot(),
|
||||
|
@ -0,0 +1,9 @@
|
||||
<mat-card class="info">
|
||||
<mat-card-content align="center">
|
||||
We've discovered GNS3 server on <b>127.0.0.1:3080</b>, would you like to add it?
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="right">
|
||||
<button mat-button color="accent">NO</button>
|
||||
<button mat-button>YES</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
@ -0,0 +1,27 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ServerDiscoveryComponent } from './server-discovery.component';
|
||||
import { MatCardModule } from "@angular/material";
|
||||
|
||||
describe('ServerDiscoveryComponent', () => {
|
||||
let component: ServerDiscoveryComponent;
|
||||
let fixture: ComponentFixture<ServerDiscoveryComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ MatCardModule ],
|
||||
declarations: [ ServerDiscoveryComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ServerDiscoveryComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-server-discovery',
|
||||
templateUrl: './server-discovery.component.html',
|
||||
styleUrls: ['./server-discovery.component.scss']
|
||||
})
|
||||
export class ServerDiscoveryComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@ -3,6 +3,9 @@
|
||||
<h1>Servers</h1>
|
||||
</div>
|
||||
<div class="default-content">
|
||||
<app-server-discovery></app-server-discovery>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<div class="example-container mat-elevation-z8">
|
||||
<mat-table #table [dataSource]="dataSource">
|
||||
|
@ -5,13 +5,6 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { Observable, BehaviorSubject, merge } from "rxjs";
|
||||
import { map } from "rxjs/operators";
|
||||
|
||||
// import 'rxjs/add/operator/startWith';
|
||||
// import 'rxjs/add/observable/merge';
|
||||
// import 'rxjs/add/operator/map';
|
||||
// import 'rxjs/add/operator/debounceTime';
|
||||
// import 'rxjs/add/operator/distinctUntilChanged';
|
||||
// import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
import { Server } from "../../models/server";
|
||||
import { ServerService } from "../../services/server.service";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user