This commit is contained in:
geek 2018-05-18 15:57:43 +09:00
parent 471a3a6ccc
commit b1c9676547
18 changed files with 257 additions and 29 deletions

View File

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

View File

@ -0,0 +1,9 @@
<div class="ui-fluid">
<div class="ui-g">
<div class="ui-g-12">
<div class="card no-margin">
<of-discovery></of-discovery>
</div>
</div>
</div>
</div>

View File

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

View File

@ -0,0 +1,14 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-discovery-page',
templateUrl: './discovery-page.component.html',
})
export class DiscoveryPageComponent implements OnInit {
constructor(
) { }
ngOnInit() {
}
}

View File

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DiscoveryPageRoutingModule } from './discovery-page-routing.module';
import { DiscoveryModule } from 'packages/discovery/discovery.module';
import { DiscoveryPageComponent } from './discovery-page.component';
@NgModule({
imports: [
CommonModule,
DiscoveryPageRoutingModule,
DiscoveryModule,
],
declarations: [
DiscoveryPageComponent,
],
})
export class DiscoveryPageModule { }

View File

@ -23,6 +23,7 @@ const routes: Routes = [
{ path: 'report', loadChildren: './report/report-page.module#ReportPageModule' },
{ path: 'log', loadChildren: './log/log-page.module#LogPageModule' },
{ path: 'account', loadChildren: './account/account-page.module#AccountPageModule' },
{ path: 'discovery', loadChildren: './discovery/discovery-page.module#DiscoveryPageModule' },
// { path: 'settings/member', loadChildren: './settings/member/member-page.module#MemberPageModule' },
]
}

View File

@ -0,0 +1,22 @@
<div class="ui-g">
<div class="ui-g-12">
<p-panel [showHeader]="false" >Temp Area</p-panel>
</div>
<div class="ui-g-12 ui-md-3">
<p-accordion (onClose)="onTabClose($event)" (onOpen)="OnTabOpen($event)">
<p-accordionTab header="Discovery Search Config Area" [selected]="true">
<of-discovery-search-config (discoverySearchStartClick)="onDiscoveryStart()"></of-discovery-search-config>
</p-accordionTab>
<p-accordionTab header="Result Filter Area">
<of-discovery-search-filter></of-discovery-search-filter>
</p-accordionTab>
</p-accordion>
</div>
<div class="ui-g-12 ui-md-9">
<p-panel>
<of-discovery-search-result></of-discovery-search-result>
</p-panel>
</div>
</div>

View File

@ -0,0 +1,43 @@
import {
AfterContentInit, Component,
OnInit
} from '@angular/core';
@Component({
selector: 'of-discovery',
templateUrl: './discovery.component.html',
})
export class DiscoveryComponent implements OnInit, AfterContentInit {
private isSelectResult = true;
constructor(
) {
}
ngOnInit() {
}
ngAfterContentInit() {
}
onTabClose(event) {
}
OnTabOpen(event) {
if (event.index === 0) {
this.isSelectResult = true;
} else {
this.isSelectResult = false;
}
}
onFilterResultOpen() {
}
onDiscoveryStart() {
console.log('dddddddddddddd');
}
}

View File

@ -0,0 +1,8 @@
<div class="ui-g-nopad">
<div class="ui-g ui-fluid">
<span>Basic</span>
<p-inputMask mask="254.254.254.254" [(ngModel)]="val1" placeholder="254.254.254.254"></p-inputMask>
</div>
<button type="button" label="Discovery Start" pButton class="ui-button-width-fit" (click)="discoveryStartClick($event)"></button>
</div>

View File

@ -0,0 +1,27 @@
import {
AfterContentInit, Component, EventEmitter,
OnInit, Output
} from '@angular/core';
@Component({
selector: 'of-discovery-search-config',
templateUrl: './search-config.component.html',
})
export class SearchConfigComponent implements OnInit, AfterContentInit {
@Output() discoverySearchStartClick = new EventEmitter();
constructor(
) {
}
ngOnInit() {
}
ngAfterContentInit() {
}
discoveryStartClick() {
this.discoverySearchStartClick.emit();
}
}

View File

@ -0,0 +1,3 @@
<div class="ui-g-nopad">
Filter
</div>

View File

@ -0,0 +1,22 @@
import {
AfterContentInit, Component,
OnInit
} from '@angular/core';
@Component({
selector: 'of-discovery-search-filter',
templateUrl: './search-filter.component.html',
})
export class SearchFilterComponent implements OnInit, AfterContentInit {
constructor(
) {
}
ngOnInit() {
}
ngAfterContentInit() {
}
}

View File

@ -0,0 +1,4 @@
<div class="ui-g">
discovery Search Filter List Print
</div>

View File

@ -0,0 +1,22 @@
import {
AfterContentInit, Component,
OnInit
} from '@angular/core';
@Component({
selector: 'of-discovery-search-result',
templateUrl: './search-result.component.html',
})
export class SearchResultComponent implements OnInit, AfterContentInit {
constructor(
) {
}
ngOnInit() {
}
ngAfterContentInit() {
}
}

View File

@ -4,6 +4,10 @@ import { ServiceSelectorComponent } from './setting/filter/service-selector/serv
import { FilterComponent } from './setting/filter/filter.component';
import { ResultComponent } from './setting/result/result.component';
import { FilterSummaryComponent } from './setting/filter-summary/filter-summary.component';
import { DiscoveryComponent } from './discovery/discovery.component';
import { SearchConfigComponent } from './discovery/search-config/search-config.component';
import { SearchFilterComponent } from './discovery/search-filter/search-filter.component';
import { SearchResultComponent } from './discovery/search-result/search-result.component';
export const COMPONENTS = [
SettingComponent,
@ -11,5 +15,9 @@ export const COMPONENTS = [
ServiceSelectorComponent,
ProbeSelectorComponent,
ResultComponent,
FilterSummaryComponent
FilterSummaryComponent,
DiscoveryComponent,
SearchConfigComponent,
SearchFilterComponent,
SearchResultComponent
];

View File

@ -2,31 +2,13 @@ import {
Component, OnInit, AfterContentInit, Output, EventEmitter,
Input, OnDestroy, OnChanges, SimpleChanges, ViewChild
} from '@angular/core';
import { Store, select, StateObservable } from '@ngrx/store';
import { RPCClientError } from '@loafer/ng-rpc/protocol';
import { Store } from '@ngrx/store';
import {
DiscoveryStartInfo,
DiscoverZone,
Zone,
DiscoverPort,
DiscoverService
} from '@overflow/commons-typescript/model/discovery';
import * as CIDR from 'ip-cidr';
import * as DiscoveredStore from '../../store/setting';
import { SettingSelector, DiscoverSelector } from '../../store';
import * as DiscoverStore from '../../store/discover';
import * as RegistStore from '../../store/regist';
import { Host } from '@overflow/commons-typescript/model/discovery';
import { Port } from '@overflow/commons-typescript/model/discovery';
import { Service } from '@overflow/commons-typescript/model/discovery';
import * as ProbeDetailStore from 'packages/probe/store';
import { Probe } from '@overflow/commons-typescript/model/probe';
import { TreeNode } from 'primeng/primeng';
import { ListSelector as ProbeListSelector } from 'packages/probe/store';
import * as ProbeListStore from 'packages/probe/store/list';
import { AuthSelector } from 'packages/member/store';
import { Domain } from '@overflow/commons-typescript/model/domain';
import { Subscription } from 'rxjs/Subscription';
import { ResultComponent } from './result/result.component';
import { ProbeSelectorComponent } from './probe-selector/probe-selector.component';
import { FilterComponent } from './filter/filter.component';

View File

@ -1,6 +1,6 @@
<p-dialog [showHeader]="false" [closeOnEscape]="false" [modal]="true" header="Discovery" [width]="800" [(visible)]="display" >
<of-discovery-setting [visible]="display" (close)="closeDialog()"></of-discovery-setting>
</p-dialog>
<!--<p-dialog [showHeader]="false" [closeOnEscape]="false" [modal]="true" header="Discovery" [width]="800" [(visible)]="display" >-->
<!--<of-discovery-setting [visible]="display" (close)="closeDialog()"></of-discovery-setting>-->
<!--</p-dialog>-->
<div class="ui-g">
<h1>Map</h1>
@ -173,4 +173,4 @@
</mat-grid-list>
</mat-card-content>
</div>
</div> -->
</div> -->

View File

@ -390,12 +390,13 @@ export class MapComponent implements OnInit, AfterContentInit {
}
showDialog() {
this.display = true;
// this.display = true;
this.router.navigateByUrl('/discovery');
}
closeDialog() {
this.display = false;
}
// closeDialog() {
// this.display = false;
// }
expandAll() {
this.infraTree.forEach(node => {