added discovery setting

This commit is contained in:
snoop 2018-01-30 15:13:34 +09:00
parent 3f7b4a7322
commit 0e595ef8ff
14 changed files with 243 additions and 3 deletions

View File

@ -56,6 +56,10 @@
},
"defaults": {
"styleExt": "scss",
"component": {}
"component": {},
"serve": {
"host":"127.0.0.1",
"port":4200
}
}
}

View File

@ -6,7 +6,8 @@ import {
MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule, MatFormFieldModule, MatChipsModule
MatAutocompleteModule, MatFormFieldModule, MatChipsModule,
MatDialogModule,
} from '@angular/material';
const MATERIAL_MODULES: any[] = [
@ -15,7 +16,8 @@ const MATERIAL_MODULES: any[] = [
MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule, MatFormFieldModule, MatChipsModule
MatAutocompleteModule, MatFormFieldModule, MatChipsModule,
MatDialogModule,
];
@NgModule({

View File

@ -0,0 +1,90 @@
<div>
<h2 mat-dialog-title>Discovery Setting {{ step }}!</h2>
<mat-dialog-content>
<!-- <div *ngIf="step == 1"> -->
<mat-card class="example-card">
<mat-card-header>
<mat-card-title>Zone</mat-card-title>
<mat-card-subtitle>192.168.1.0/24</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<div class="example-container">
<mat-checkbox>Host</mat-checkbox>
<mat-form-field>
<input matInput placeholder="Start Ip" type="string" class="example-right-align">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="End Ip" type="string" class="example-right-align">
</mat-form-field>
</div>
<div class="example-container">
<mat-checkbox>Port</mat-checkbox>
<mat-form-field>
<input matInput placeholder="Start Port" type="number" class="example-right-align">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="End Port" type="number" class="example-right-align">
</mat-form-field>
</div>
<div class="example-container">
<mat-checkbox>Service</mat-checkbox>
Meterial's [Select] + Covalent's [Chilp] Collaboration !
</div>
</mat-card-content>
</mat-card>
<!-- </div> -->
<!-- <div *ngIf="step == 2"> -->
<mat-dialog-content>
<mat-card class="example-card">
<mat-card-header>
<mat-card-title>222222222222222222</mat-card-title>
<mat-card-subtitle>192.168.1.0/24</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<div class="example-container">
<mat-checkbox>Host</mat-checkbox>
<mat-form-field>
<input matInput placeholder="Start Ip" type="string" class="example-right-align">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="End Ip" type="string" class="example-right-align">
</mat-form-field>
</div>
<div class="example-container">
<mat-checkbox>Port</mat-checkbox>
<mat-form-field>
<input matInput placeholder="Start Port" type="number" class="example-right-align">
</mat-form-field>
<mat-form-field>
<input matInput placeholder="End Port" type="number" class="example-right-align">
</mat-form-field>
</div>
<div class="example-container">
<mat-checkbox>Service</mat-checkbox>
Meterial's [Select] + Covalent's [Chilp] Collaboration !
</div>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<!-- </div> -->
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button (click)="onStart()">Start</button>
<button mat-raised-button (click)="onCloseCancel()">Cancel</button>
</mat-dialog-actions>
</div>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SettingComponent } from './setting.component';
describe('SettingComponent', () => {
let component: SettingComponent;
let fixture: ComponentFixture<SettingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SettingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SettingComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-setting',
templateUrl: './setting.component.html',
styleUrls: ['./setting.component.scss']
})
export class SettingComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SettingComponent } from './components/setting/setting.component';
import { MaterialModule } from 'app/commons/ui/material/material.module';
@NgModule({
imports: [
CommonModule,
MaterialModule
],
declarations: [
SettingComponent,
],
exports: [
SettingComponent,
]
})
export class DiscoveryModule { }

View File

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DiscoveryComponent } from './discovery.component';
const routes: Routes = [
{
path: '',
component: DiscoveryComponent,
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class DiscoveryRoutingModule { }

View File

@ -0,0 +1,5 @@
<p>
discovery works!
</p>
<of-setting></of-setting>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DiscoveryComponent } from './discovery.component';
describe('DiscoveryComponent', () => {
let component: DiscoveryComponent;
let fixture: ComponentFixture<DiscoveryComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DiscoveryComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DiscoveryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-discovery',
templateUrl: './discovery.component.html',
styleUrls: ['./discovery.component.scss']
})
export class DiscoveryComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DiscoveryComponent } from './discovery.component';
import { DiscoveryRoutingModule } from './discovery-routing.module';
import { DiscoveryModule as DisModule } from '../../packages/discovery/discovery.module';
// import { MaterialModule } from 'app/commons/ui/material/material.module';
@NgModule({
imports: [
CommonModule,
DiscoveryRoutingModule,
DisModule,
// MaterialModule
],
exports: [
// MaterialModule
],
declarations: [DiscoveryComponent]
})
export class DiscoveryModule { }

View File

@ -9,6 +9,7 @@ const routes: Routes = [
children: [
{ path: '', redirectTo: 'home' },
{ path: 'home', loadChildren: './home/home-page.module#HomePageModule' },
{ path: 'discovery', loadChildren: './discovery/discovery.module#DiscoveryModule' },
]
}
];