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">
<p-accordion (onClose)="onTabClose($event)" (onOpen)="OnTabOpen($event)">
<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 header="Result Filter Area">
<of-discovery-search-filter></of-discovery-search-filter>

View File

@ -1,20 +1,50 @@
<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-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>
<div class="ui-g ui-fluid">
<span>Start IP Address : </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> -
<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>
<span>Exclude IP Address : </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>
<span>Start IP Adress </span>
<input type="hidden" >
<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>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 class="ui-g ui-fluid">
<span>Start Port : </span>
<p-inputMask slotChar=" " mask="9999" [(ngModel)]="startPort" placeholder="1024" [autoClear]="false"></p-inputMask> -
@ -25,5 +55,6 @@
</div>
<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>

View File

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

View File

@ -1,3 +1,21 @@
<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>

View File

@ -1,6 +1,18 @@
<div class="ui-g-12">
<p-pickList [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">
<p-pickList
[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">
<div class="ui-helper-clearfix">
<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 { FormsModule } from '@angular/forms';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DiscoveryStoreModule } from './discovery-store.module';
import { DiscoveryRPCModule } from './discovery-rpc.module';
@ -10,11 +10,13 @@ import { COMPONENTS } from './component';
import { SERVICES } from './service';
import { PrimeNGModules } from 'packages/commons/prime-ng/prime-ng.module';
import { KeyValueModule } from 'app/commons/component/key-value/key-value.module';
import { BrowserModule } from '@angular/platform-browser';
@NgModule({
imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
PrimeNGModules,
DiscoveryStoreModule,
DiscoveryRPCModule,
@ -31,5 +33,4 @@ import { KeyValueModule } from 'app/commons/component/key-value/key-value.module
SERVICES,
],
})
export class DiscoveryModule {
}
export class DiscoveryModule { }