diff --git a/src/commons/component/host-detail.component.html b/src/commons/component/host-detail.component.html index 871458c..ba35231 100644 --- a/src/commons/component/host-detail.component.html +++ b/src/commons/component/host-detail.component.html @@ -80,46 +80,22 @@
Retries : - + +
+
Interval : + +
+
Deadline : +
-
- + -
- Checking.... -
-
- + -
-
Sent: {{pingResult.summary.sendCount}}
-
Received: {{pingResult.summary.receiveCount}}
-
Loss: {{pingResult.summary.lossPercent}} %
-
Avg: {{pingResult.summary.avgTime}} ms
-
Min: {{pingResult.summary.minTime}} ms
-
Min: {{pingResult.summary.maxTime}} ms
-
- -
diff --git a/src/commons/component/host-detail.component.ts b/src/commons/component/host-detail.component.ts index 1e64938..041fe4a 100644 --- a/src/commons/component/host-detail.component.ts +++ b/src/commons/component/host-detail.component.ts @@ -15,34 +15,36 @@ export class HostDetailComponent { @Input() host: Host; - healthResponse: string; - pingWaiting: boolean; - pingResult: PingResult; + retries: number; + interval: number; + deadline: number; + + pingResult: PingResult; constructor( private probeService: ProbeService, ) { this.pingWaiting = false; this.retries = 5; + this.interval = 1; + this.deadline = 1; } doPing() { this.pingWaiting = true; - this.pingWaiting = true; const option = { Retry: this.retries, - Interval: 1, - Deadline: 1, + Interval: this.interval, + Deadline: this.deadline, }; this.probeService .call('PingService.PingHost', this.host, option) .pipe( map((pingResult: PingResult) => { - this.healthResponse = 'aslkdfjas\nasdflskjdf'; if (pingResult) { this.pingResult = pingResult; } diff --git a/src/commons/component/service-detail.component.html b/src/commons/component/service-detail.component.html index b39c56c..5229e1f 100644 --- a/src/commons/component/service-detail.component.html +++ b/src/commons/component/service-detail.component.html @@ -60,18 +60,27 @@ - -
- Checking.... + +
Retries : +
-
+
Interval : + +
+
Deadline : + +
+ + + +
  • {{pingResult.responses[key].error}} - {{pingResult.responses[key].time}}ms + Response time {{key}} : {{pingResult.responses[key].time}}ms
diff --git a/src/commons/component/service-detail.component.ts b/src/commons/component/service-detail.component.ts index f34e8a0..8235b23 100644 --- a/src/commons/component/service-detail.component.ts +++ b/src/commons/component/service-detail.component.ts @@ -16,26 +16,33 @@ export class ServiceDetailComponent { pingWaiting: boolean; pingResult: PingResult; + retries: number; + interval: number; + deadline: number; + constructor( private probeService: ProbeService ) { this.pingWaiting = false; + this.retries = 5; + this.interval = 1; + this.deadline = 1; } doPing() { this.pingWaiting = true; - const option = { - Retry: 3, - Interval: 1, - Deadline: 1, + Retry: this.retries, + Interval: this.interval, + Deadline: this.deadline, }; this.probeService .call('PingService.PingService', this.service, option) .pipe( map((pingResult: PingResult) => { + console.log(pingResult); if (pingResult) { this.pingResult = pingResult; }