This commit is contained in:
insanity 2018-05-03 21:23:53 +09:00
parent 377547f7ac
commit e91c0efc7e
7 changed files with 19 additions and 13 deletions

View File

@ -2,12 +2,17 @@
<div *ngIf="inProgress"> <div *ngIf="inProgress">
<p-progressBar mode="indeterminate" [style]="{'height': '16px'}"></p-progressBar> <p-progressBar mode="indeterminate" [style]="{'height': '16px'}"></p-progressBar>
</div> </div>
<p-blockUI [target]="result" [blocked]="inProgress"></p-blockUI>
<p-panel #result [showHeader]="false">
<p-tree [value]="treeNodes" selectionMode="checkbox" [(selection)]="selectedNodes"></p-tree> <p-tree [value]="treeNodes" selectionMode="checkbox" [(selection)]="selectedNodes"></p-tree>
</p-panel>
</div> </div>
<div> <div>
<div dir="rtl"> <div dir="rtl">
<button pButton type="button" label="Cancel" icon="fa-close" class="ui-button-secondary ui-button-width-fit" (click)="onCancel()"></button>
<button pButton type="button" label="Save" icon="fa-check" class="ui-button-width-fit" (click)="discoveryResultSave()"></button> <button pButton type="button" label="Save" icon="fa-check" class="ui-button-width-fit" (click)="discoveryResultSave()"></button>
<button pButton type="button" label="Cancel" icon="fa-close" class="ui-button-secondary ui-button-width-fit" (click)="onCancel()"></button>
</div> </div>
</div> </div>

View File

@ -36,6 +36,7 @@ export class ResultComponent implements OnInit, AfterContentInit, OnDestroy {
inProgress = false; inProgress = false;
selectedDiscoveryResult: TreeNode[]; selectedDiscoveryResult: TreeNode[];
constructor( constructor(
@ -49,6 +50,7 @@ export class ResultComponent implements OnInit, AfterContentInit, OnDestroy {
} }
ngOnInit() { ngOnInit() {
this.resultSubscription$ = this.result$.subscribe( this.resultSubscription$ = this.result$.subscribe(
(zones: Map<string, Zone>) => { (zones: Map<string, Zone>) => {
if (zones !== undefined && zones !== null) { if (zones !== undefined && zones !== null) {

View File

@ -3,7 +3,7 @@
<of-probe-selector [preProbe]="probe" (probeSelected)="onProbeSelect($event)"></of-probe-selector> <of-probe-selector [preProbe]="probe" (probeSelected)="onProbeSelect($event)"></of-probe-selector>
<p-blockUI [target]="df" [blocked]="!selectedProbe"></p-blockUI> <p-blockUI [target]="df" [blocked]="!selectedProbe"></p-blockUI>
<p-panel #df header="{{getHeaderTitle()}}"> <p-panel #df [showHeader]="false">
<of-discovery-filter [probe]="selectedProbe" [requestStart]="requestStart" (discoveryRequested)="onDiscoveryStart($event)"></of-discovery-filter> <of-discovery-filter [probe]="selectedProbe" [requestStart]="requestStart" (discoveryRequested)="onDiscoveryStart($event)"></of-discovery-filter>
</p-panel> </p-panel>

View File

@ -63,8 +63,8 @@ export class SettingComponent implements OnInit, AfterContentInit, OnDestroy, On
} }
onDiscoveryStart(discoverZone: DiscoverZone) { onDiscoveryStart(discoverZone: DiscoverZone) {
this.discoverStore.dispatch(new DiscoverStore.DiscoverZone( // this.discoverStore.dispatch(new DiscoverStore.DiscoverZone(
{ probeID: this.selectedProbe.probeKey, discoverZone: discoverZone })); // { probeID: this.selectedProbe.probeKey, discoverZone: discoverZone }));
setTimeout(() => { setTimeout(() => {
this.started = true; this.started = true;
@ -77,7 +77,4 @@ export class SettingComponent implements OnInit, AfterContentInit, OnDestroy, On
this.started = false; this.started = false;
} }
getHeaderTitle() {
return this.selectedProbe ? this.selectedProbe.cidr : 'Discoverying Network.';
}
} }

View File

@ -1,8 +1,9 @@
<p-dialog [showHeader]="false" [closeOnEscape]="false" [modal]="true" header="Discovery" [width]="800" [(visible)]="display" [dismissableMask]="true">
<of-discovery-setting (close)="closeDialog()"></of-discovery-setting>
</p-dialog>
<div class="ui-g"> <div class="ui-g">
<h1>Map</h1> <h1>Map</h1>
<p-dialog header="Discovery" [width]="800" [(visible)]="display" [dismissableMask]="true">
<of-discovery-setting (close)="closeDialog()"></of-discovery-setting>
</p-dialog>
<div class="ui-g-12 ui-g-nopad"> <div class="ui-g-12 ui-g-nopad">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-12 ui-md-5 ui-g-nopad ui-bottom-space-10"> <div class="ui-g-12 ui-md-5 ui-g-nopad ui-bottom-space-10">

View File

@ -1,6 +1,7 @@
<h1>Info</h1> <h1>Info</h1>
<p-dialog header="Discovery" [width]="800" [(visible)]="display" [dismissableMask]="true"> <p-dialog [showHeader]="false" [closeOnEscape]="false" [modal]="true" header="Discovery" [width]="800" [(visible)]="display"
[dismissableMask]="true">
<of-discovery-setting [probe]="probe" (close)="onDiscoveryClose()"></of-discovery-setting> <of-discovery-setting [probe]="probe" (close)="onDiscoveryClose()"></of-discovery-setting>
</p-dialog> </p-dialog>
<div class="ui-g ui-bottom-space-10"> <div class="ui-g ui-bottom-space-10">