result msg

This commit is contained in:
insanity 2018-09-18 15:20:41 +09:00
parent 1349ec2d09
commit 47c618c936
3 changed files with 14 additions and 11 deletions

View File

@ -63,18 +63,21 @@
</g>
</g>
</svg>
<p-card class="ui-map-info">
Content
</p-card>
</div>
<p-card class="ui-map-info" *ngIf="resultMsg">
<b>Total Hosts: </b> {{resultMsg[0]}}<br />
<b>Total Services:</b> {{resultMsg[1]}}<br />
<b>Time Spent: </b>{{resultMsg[2]}}
</p-card>
<p-sidebar [(visible)]="displaySidebar" styleClass="ui-sidebar-md" position="right" (onHide)="onHideDetail()">
<div *ngIf="selectedNode !== null">
<app-node-detail [node]="selectedNode" (otherHostSelect)="otherHostSelected($event)"></app-node-detail>
</div>
</p-sidebar>
<p-growl [(value)]="resultMsg" [sticky]="true"></p-growl>
<!-- <div class="ui-fluid">
<div class="ui-g">

View File

@ -96,9 +96,8 @@
.ui-map-info {
position: absolute;
top: 0;
top: 10px;
left :10px;
margin-top: 80px;
.ui-card-body {
padding: 0.5em !important;
}

View File

@ -53,7 +53,7 @@ export class HomePageComponent implements OnInit, OnDestroy {
hosts: Map<string, Host>;
ports: Map<string, Map<number, Port>>;
resultMsg: Message[] = [];
resultMsg: string[];
@HostListener('window:resize', ['$event'])
onResize(event) {
@ -158,8 +158,8 @@ export class HomePageComponent implements OnInit, OnDestroy {
console.log(this.zone);
console.log(this.discoverHost);
console.log('########################################################');
this.resultMsg = [];
this.resultMsg = null;
this.showIntro = false;
this.changeDetector.detectChanges();
@ -633,10 +633,11 @@ export class HomePageComponent implements OnInit, OnDestroy {
this.simulationRestart(true);
this.zoomToFit(0.95, 500);
const countSum = 'Host: ' + hostCount + ' / ' + 'Service: ' + serviceCount;
const timeSpentSum = hours + ':' + minutes + ':' + seconds;
this.resultMsg = [];
this.resultMsg.push(hostCount + '');
this.resultMsg.push(serviceCount + '');
this.resultMsg.push(hours + ':' + minutes + ':' + seconds);
this.resultMsg.push({ severity: 'success', summary: countSum, detail: timeSpentSum });
// this.simulation.stop();
}