This commit is contained in:
geek 2018-05-24 12:16:10 +09:00
parent ccb9492e81
commit b69539d368
9 changed files with 148 additions and 32 deletions

View File

@ -6,7 +6,7 @@
<div class="ui-g-12 ui-md-3"> <div class="ui-g-12 ui-md-3">
<p-accordion (onClose)="onTabClose($event)" (onOpen)="OnTabOpen($event)"> <p-accordion (onClose)="onTabClose($event)" (onOpen)="OnTabOpen($event)">
<p-accordionTab header="Discovery Search Config Area" [selected]="true"> <p-accordionTab header="Discovery Search Config Area" [selected]="true">
<of-discovery-search-config (discoverySearchStartClick)="onDiscoveryStart()" [isiii]="tabIdx"></of-discovery-search-config> <of-discovery-search-config (discoverySearchStartClick)="onDiscoveryStart()" ></of-discovery-search-config>
</p-accordionTab> </p-accordionTab>
<p-accordionTab header="Result Filter Area"> <p-accordionTab header="Result Filter Area">
<of-discovery-search-filter></of-discovery-search-filter> <of-discovery-search-filter></of-discovery-search-filter>

View File

@ -1,20 +1,50 @@
<div class="ui-g-nopad"> <div class="ui-g-nopad">
<of-probe-selector [hidden]="requestStart" [preProbe]="probe" (probeSelected)="onProbeSelect($event)"></of-probe-selector>
<!--<form [formGroup]="discoveryFormGroup" (ngSubmit)="discoveryStartClick()" >-->
<of-probe-selector [hidden]="requestStart" [preProbe]="probe" (probeSelected)="onProbeSelect($event)"></of-probe-selector>
<div class="ui-g ui-fluid" style="width:250px;margin-bottom:10px"> <div class="ui-g ui-fluid" style="width:250px;margin-bottom:10px">
<div class="ui-g-12"><p-radioButton name="group1" value="0" label="IPv4" [(ngModel)]="ipVesion" inputId="opt1"></p-radioButton></div> <div class="ui-g-12"><p-radioButton name="group1" value="0" label="IPv4" [(ngModel)]="ipVesion" inputId="opt1"></p-radioButton></div>
<div class="ui-g-12"><p-radioButton name="group1" value="1" label="IPv6" [(ngModel)]="ipVesion" inputId="opt2"></p-radioButton></div> <div class="ui-g-12"><p-radioButton name="group1" value="1" label="IPv6" [(ngModel)]="ipVesion" inputId="opt2"></p-radioButton></div>
</div> </div>
<div class="ui-g ui-fluid"> <div class="ui-g ui-fluid">
<span>Start IP Address : </span> <span>Start IP Adress </span>
<p-inputMask slotChar=" " mask="9?9?9.9?9?9.9?9?9.9?9?9" [(ngModel)]="startIP" placeholder="254.254.254.254" [autoClear]="false"></p-inputMask> - <input type="hidden" >
<span>End IP Address : </span> <div class="ui-inputgroup">
<p-inputMask mask="9?9?9.9?9?9.9?9?9.9?9?9" [(ngModel)]="endIP" placeholder="254.254.254.254" [autoClear]="false"></p-inputMask> <input type="text" pInputText placeholder="127" maxlength="3">
<span>Exclude IP Address : </span> <span class="ui-inputgroup-addon">.</span>
<p-inputMask mask="9?9?9.9?9?9.9?9?9.9?9?9" [(ngModel)]="excludeIP" placeholder="254.254.254.254" [autoClear]="false"></p-inputMask> <input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="1" maxlength="3">
</div>
</div>
<div class="ui-g ui-fluid">
<span>End IP Adress </span>
<div class="ui-inputgroup">
<input type="text" pInputText placeholder="127" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="1" maxlength="3">
</div>
</div>
<div class="ui-g ui-fluid">
<span>Exclud IP Adress </span>
<div class="ui-inputgroup">
<input type="text" pInputText placeholder="127" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="0" maxlength="3">
<span class="ui-inputgroup-addon">.</span>
<input type="text" pInputText placeholder="1" maxlength="3">
</div>
</div> </div>
<div class="ui-g ui-fluid"> <div class="ui-g ui-fluid">
<span>Start Port : </span> <span>Start Port : </span>
<p-inputMask slotChar=" " mask="9999" [(ngModel)]="startPort" placeholder="1024" [autoClear]="false"></p-inputMask> - <p-inputMask slotChar=" " mask="9999" [(ngModel)]="startPort" placeholder="1024" [autoClear]="false"></p-inputMask> -
@ -25,5 +55,6 @@
</div> </div>
<of-service-selector [disabled]="!serviceChecked" [(includeServices)]="includeServices"></of-service-selector> <of-service-selector [disabled]="!serviceChecked" [(includeServices)]="includeServices"></of-service-selector>
<button type="button" label="Discovery Start" pButton class="ui-button-width-fit" (click)="discoveryStartClick($event)"></button> <button type="submit" label="Discovery Start" pButton class="ui-button-width-fit" ></button>
<!--</form>-->
</div> </div>

View File

@ -2,6 +2,10 @@ import {
AfterContentInit, Component, EventEmitter, Input, AfterContentInit, Component, EventEmitter, Input,
OnInit, Output OnInit, Output
} from '@angular/core'; } from '@angular/core';
import {
FormBuilder,
FormGroup
} from '@angular/forms';
@Component({ @Component({
selector: 'of-discovery-search-config', selector: 'of-discovery-search-config',
@ -10,7 +14,8 @@ import {
export class SearchConfigComponent implements OnInit, AfterContentInit { export class SearchConfigComponent implements OnInit, AfterContentInit {
@Output() discoverySearchStartClick = new EventEmitter(); @Output() discoverySearchStartClick = new EventEmitter();
@Input() isiii;
discoveryFormGroup: FormGroup;
private ipVesion: string; private ipVesion: string;
private startIP: string; private startIP: string;
@ -21,16 +26,24 @@ export class SearchConfigComponent implements OnInit, AfterContentInit {
private excludePort: string; private excludePort: string;
constructor( constructor(
private formBuilder: FormBuilder,
) { ) {
} }
ngOnInit() { ngOnInit() {
this.ipVesion = '0'; this.ipVesion = '0';
this.initForm();
} }
ngAfterContentInit() { ngAfterContentInit() {
} }
initForm() {
// this.discoveryFormGroup = this.formBuilder.group({
//
// });
}
discoveryStartClick() { discoveryStartClick() {
this.discoverySearchStartClick.emit(); this.discoverySearchStartClick.emit();
} }

View File

@ -1,3 +1,21 @@
<div class="ui-g-nopad"> <div class="ui-g-nopad">
Filter <div class="ui-g ui-fluid">
<span>Start IP Address : </span>
<p-inputMask mask="9?9?9.9?9?9.9?9?9.9?9?9" [(ngModel)]="startIP" placeholder="254.254.254.254" [autoClear]="false"></p-inputMask> -
<span>End IP Address : </span>
<p-inputMask mask="9?9?9.9?9?9.9?9?9.9?9?9" [(ngModel)]="endIP" placeholder="254.254.254.254" [autoClear]="false"></p-inputMask>
</div>
<div class="ui-g ui-fluid">
<span>Start Port : </span>
<p-inputMask slotChar=" " mask="9999" [(ngModel)]="startPort" placeholder="1024" [autoClear]="false"></p-inputMask> -
<span>End Port : </span>
<p-inputMask mask="9999" [(ngModel)]="endPort" placeholder="1024" [autoClear]="false"></p-inputMask>
</div>
<div class="ui-g ui-fluid">
<p-toggleButton offLabel="Oracle" onLabel="Oracle" [(ngModel)]="Oracle" [style]="{'width':'150px'}" ></p-toggleButton>
<p-toggleButton offLabel="MYSQL" onLabel="MYSQL" [(ngModel)]="MYSQL" [style]="{'width':'150px'}"></p-toggleButton>
<p-toggleButton offLabel="Tomcat" onLabel="Tomcat" [(ngModel)]="Tomcat" [style]="{'width':'150px'}"></p-toggleButton>
<p-toggleButton offLabel="WMI" onLabel="WMI" [(ngModel)]="WMI" [style]="{'width':'150px'}"></p-toggleButton>
</div>
</div> </div>

View File

@ -1,6 +1,18 @@
<div class="ui-g-12"> <div class="ui-g-12">
<p-pickList [disabled]="disabled" [source]="crawlers" [target]="includeServices" sourceHeader="Available" targetHeader="Selected" [responsive]="true" <p-pickList
filterBy="description" dragdrop="true" dragdropScope="services" [sourceStyle]="{'height':'200px'}" [targetStyle]="{'height':'200px'}" [showTargetControls]="false" [showSourceControls]="false"> [disabled]="disabled"
[source]="crawlers"
[target]="includeServices"
sourceHeader="Available"
targetHeader="Selected"
[responsive]="true"
filterBy="description"
dragdrop="true"
dragdropScope="services"
[sourceStyle]="{'height':'200px'}"
[targetStyle]="{'height':'200px'}"
[showTargetControls]="false"
[showSourceControls]="false" >
<ng-template let-crawler pTemplate="item"> <ng-template let-crawler pTemplate="item">
<div class="ui-helper-clearfix"> <div class="ui-helper-clearfix">
<div style="font-size:14px;margin:0;padding: 0;">{{crawler.description}}</div> <div style="font-size:14px;margin:0;padding: 0;">{{crawler.description}}</div>

View File

@ -0,0 +1,35 @@
import {
AfterContentInit, Component,
OnInit
} from '@angular/core';
import { select, StateObservable } from '@ngrx/store';
import { ListSelector } from '../../../probe/store';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'of-discovery-container',
templateUrl: './discovery-container.component.html',
})
export class DiscoveryContainerComponent implements OnInit, AfterContentInit {
// probe select ?
// get probe list for server
// discovery start
// discovery stop
// get service list
probes$: StateObservable;
constructor(
private activatedRoute: ActivatedRoute,
) {
// this.returnURL = this.activatedRoute.snapshot.queryParams['probe'] || null;
// this.probes$ = listStore.pipe(select(ListSelector.select('probes')));
}
ngOnInit() {
}
ngAfterContentInit() {
}
}

View File

@ -0,0 +1,5 @@
import {DiscoveryContainerComponent} from './discovery/discovery-container.component';
export const CONTAINER_COMPONENTS = [
DiscoveryContainerComponent,
];

View File

@ -1,6 +1,6 @@
import { NgModule, Inject } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DiscoveryStoreModule } from './discovery-store.module'; import { DiscoveryStoreModule } from './discovery-store.module';
import { DiscoveryRPCModule } from './discovery-rpc.module'; import { DiscoveryRPCModule } from './discovery-rpc.module';
@ -10,11 +10,13 @@ import { COMPONENTS } from './component';
import { SERVICES } from './service'; import { SERVICES } from './service';
import { PrimeNGModules } from 'packages/commons/prime-ng/prime-ng.module'; import { PrimeNGModules } from 'packages/commons/prime-ng/prime-ng.module';
import { KeyValueModule } from 'app/commons/component/key-value/key-value.module'; import { KeyValueModule } from 'app/commons/component/key-value/key-value.module';
import { BrowserModule } from '@angular/platform-browser';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
ReactiveFormsModule,
PrimeNGModules, PrimeNGModules,
DiscoveryStoreModule, DiscoveryStoreModule,
DiscoveryRPCModule, DiscoveryRPCModule,
@ -31,5 +33,4 @@ import { KeyValueModule } from 'app/commons/component/key-value/key-value.module
SERVICES, SERVICES,
], ],
}) })
export class DiscoveryModule { export class DiscoveryModule { }
}