diff --git a/src/commons/component/host-detail.component.html b/src/commons/component/host-detail.component.html
index 2881776..9920fef 100644
--- a/src/commons/component/host-detail.component.html
+++ b/src/commons/component/host-detail.component.html
@@ -18,8 +18,8 @@
{{host.name}} {{host.address}}
-
-
+
+
-
- -
- {{port.portNumber}} ({{port.metaPortType.key}})
-
-
+
+
+
+ -
+ {{port.portNumber}} ({{port.metaPortType.key}})
+
+
+
+
diff --git a/src/commons/component/host-detail.component.ts b/src/commons/component/host-detail.component.ts
index f848842..b126b56 100644
--- a/src/commons/component/host-detail.component.ts
+++ b/src/commons/component/host-detail.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
+import { Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
import { of } from 'rxjs';
import { map, catchError, take } from 'rxjs/operators';
@@ -7,6 +7,7 @@ import { Host } from '@overflow/model/discovery';
import { PingResult } from '@overflow/model/ping';
import { ProbeService } from '../service/probe.service';
+import { AutoHeightDirective } from '@overflow/commons/ui/directive/auto-height.directive';
@Component({
@@ -16,6 +17,8 @@ import { ProbeService } from '../service/probe.service';
})
export class HostDetailComponent implements OnChanges {
@Input() host: Host;
+ @ViewChild(AutoHeightDirective) autoHeightDirective;
+
pingWaiting: boolean;
@@ -26,6 +29,7 @@ export class HostDetailComponent implements OnChanges {
pingResult: PingResult;
pingResultRaw: string;
+
constructor(
private probeService: ProbeService,
) {
@@ -70,4 +74,8 @@ export class HostDetailComponent implements OnChanges {
.subscribe();
}
+ onTabViewChange($event) {
+ this.autoHeightDirective.forceCalculate();
+ }
+
}
diff --git a/src/commons/component/service-detail.component.html b/src/commons/component/service-detail.component.html
index f2633c4..3350f57 100644
--- a/src/commons/component/service-detail.component.html
+++ b/src/commons/component/service-detail.component.html
@@ -21,7 +21,7 @@
-
+
-
- -
- {{key | stringPrettify}}
+
+
+
+ -
+ {{key | stringPrettify}}
-
- -
- {{skey | stringPrettify}}
- {{service.meta[key][skey]}}
+
+ -
+ {{skey | stringPrettify}}
+ {{service.meta[key][skey]}}
+
+
-
-
+
+
diff --git a/src/commons/component/service-detail.component.ts b/src/commons/component/service-detail.component.ts
index 6c6fbfe..7d32095 100644
--- a/src/commons/component/service-detail.component.ts
+++ b/src/commons/component/service-detail.component.ts
@@ -1,18 +1,23 @@
-import { Component, Input, Output, EventEmitter } from '@angular/core';
+import { Component, Input, Output, EventEmitter, ViewChild, OnChanges, SimpleChanges } from '@angular/core';
import { Service } from '@overflow/model/discovery';
import { PingResult } from '@overflow/model/ping';
import { ProbeService } from '../service/probe.service';
import { map, catchError, take } from 'rxjs/operators';
import { of } from 'rxjs';
+import { AutoHeightDirective } from '@overflow/commons/ui/directive/auto-height.directive';
@Component({
selector: 'app-service-detail',
templateUrl: './service-detail.component.html',
styleUrls: ['./service-detail.component.scss'],
})
-export class ServiceDetailComponent {
+export class ServiceDetailComponent implements OnChanges {
@Input() service: Service;
+
+ @ViewChild(AutoHeightDirective) autoHeightDirective;
+
+
pingWaiting: boolean;
pingResult: PingResult;
pingResultStr: string;
@@ -31,6 +36,15 @@ export class ServiceDetailComponent {
this.deadline = 1;
}
+ onTabViewChange($event) {
+ this.autoHeightDirective.forceCalculate();
+ }
+
+ ngOnChanges(simpleChanges: SimpleChanges): void {
+ this.pingResult = null;
+ }
+
+
doPing() {
this.pingWaiting = true;
@@ -60,4 +74,5 @@ export class ServiceDetailComponent {
)
.subscribe();
}
+
}