diff --git a/src/app/component/infra/detail/host.component.html b/src/app/component/infra/detail/host.component.html
index 8ab043f..34779c0 100644
--- a/src/app/component/infra/detail/host.component.html
+++ b/src/app/component/infra/detail/host.component.html
@@ -91,8 +91,9 @@
- -
- {{discoveredBy.key}}
+
-
+ {{item.key | stringPrettify}}
+ {{item.value}}
diff --git a/src/app/component/infra/detail/host.component.ts b/src/app/component/infra/detail/host.component.ts
index 33f4549..1abe82e 100644
--- a/src/app/component/infra/detail/host.component.ts
+++ b/src/app/component/infra/detail/host.component.ts
@@ -11,6 +11,7 @@ import { PingService } from '../../../service/ping.service';
import { PingOption } from '@overflow/model/config/ping';
import * as log from '../../../core/util/log';
+import { MetaDiscovererTypeEnum, toMetaDiscovererTypeEnum } from '@overflow/model/meta';
@Component({
selector: 'app-infra-detail-host',
@@ -18,7 +19,7 @@ import * as log from '../../../core/util/log';
styleUrls: ['./host.component.scss'],
})
export class HostComponent implements OnChanges {
- @Input() host: Host;
+ _host: Host;
@ViewChildren(AutoHeightDirective) autoHeightDirectives: QueryList
;
@@ -32,6 +33,28 @@ export class HostComponent implements OnChanges {
pingResult: PingResult;
pingResultRaw: string;
+ securityMap: Map;
+
+ @Input()
+ set host(host: Host) {
+ this._host = host;
+
+ if (undefined !== this._host.discoveredBy) {
+ this._host.discoveredBy.forEach((discovererType) => {
+ const discovererTypeEnum = toMetaDiscovererTypeEnum(discovererType);
+ switch (discovererTypeEnum) {
+ case MetaDiscovererTypeEnum.ICMP:
+ this.securityMap.set(MetaDiscovererTypeEnum.ICMP, 'ICMP(Ping) is not safe.');
+ break;
+ default:
+ break;
+ }
+ });
+ }
+ }
+ get host(): Host {
+ return this._host;
+ }
constructor(
private pingService: PingService,
@@ -40,6 +63,8 @@ export class HostComponent implements OnChanges {
this.count = 5;
this.interval = 1;
this.deadline = 1;
+
+ this.securityMap = new Map();
}
ngOnChanges(simpleChanges: SimpleChanges): void {