+
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/commons/component/host-detail.component.ts b/src/commons/component/host-detail.component.ts
index 9fae351..1e64938 100644
--- a/src/commons/component/host-detail.component.ts
+++ b/src/commons/component/host-detail.component.ts
@@ -2,9 +2,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Host } from '@overflow/model/discovery';
import { ProbeService } from '../service/probe.service';
import { map, catchError, take } from 'rxjs/operators';
-import { PingResult, PingResponse } from '@overflow/model/ping';
+import { PingResult } from '@overflow/model/ping';
import { of } from 'rxjs';
-import { Message } from 'primeng/primeng';
@Component({
@@ -15,16 +14,26 @@ import { Message } from 'primeng/primeng';
export class HostDetailComponent {
@Input() host: Host;
+
+ healthResponse: string;
+
+ pingWaiting: boolean;
pingResult: PingResult;
+ retries: number;
constructor(
- private probeService: ProbeService
+ private probeService: ProbeService,
) {
+ this.pingWaiting = false;
+ this.retries = 5;
}
doPing() {
+ this.pingWaiting = true;
+ this.pingWaiting = true;
+
const option = {
- Retry: 3,
+ Retry: this.retries,
Interval: 1,
Deadline: 1,
};
@@ -33,13 +42,16 @@ export class HostDetailComponent {
.call('PingService.PingHost', this.host, option)
.pipe(
map((pingResult: PingResult) => {
+ this.healthResponse = 'aslkdfjas\nasdflskjdf';
if (pingResult) {
this.pingResult = pingResult;
}
+ this.pingWaiting = false;
}),
catchError(error => {
console.log(error);
alert('An error has occurred.');
+ this.pingWaiting = false;
return of();
}),
take(1)
diff --git a/src/commons/component/node-detail.component.html b/src/commons/component/node-detail.component.html
index 98d8490..87f95b9 100644
--- a/src/commons/component/node-detail.component.html
+++ b/src/commons/component/node-detail.component.html
@@ -1,5 +1,8 @@
+
+
+
@@ -18,5 +21,6 @@
+
\ No newline at end of file
diff --git a/src/commons/component/service-detail.component.html b/src/commons/component/service-detail.component.html
index 57a38a8..b39c56c 100644
--- a/src/commons/component/service-detail.component.html
+++ b/src/commons/component/service-detail.component.html
@@ -21,7 +21,6 @@
-