-
+
-
+
\ No newline at end of file
diff --git a/@overflow/discovery/component/search-result.component.ts b/@overflow/discovery/component/search-result.component.ts
index 85cc140..0fa1214 100644
--- a/@overflow/discovery/component/search-result.component.ts
+++ b/@overflow/discovery/component/search-result.component.ts
@@ -6,6 +6,7 @@ import {
SimpleChanges
} from '@angular/core';
import { Anim } from './animation';
+import { TreeNode } from 'primeng/primeng';
@Component({
selector: 'of-discovery-result',
@@ -17,28 +18,40 @@ export class SearchResultComponent implements OnChanges {
@Output() stop = new EventEmitter();
@Input() started: boolean;
- tempData = [];
- tempTimer;
+ zoneNode: TreeNode[] = [];
+ hostNode: TreeNode[] = [];
constructor(
) {
+ this.zoneNode.push({
+ label: 'zone',
+ children: this.hostNode,
+ expanded: true
+ });
}
ngOnChanges(changes: SimpleChanges): void {
- if (changes['started'] && changes['started'].currentValue) {
- this.tempTimer = setInterval(() => { this.tempFunc(); }, 1000);
- }
}
onStop() {
this.stop.emit();
- clearInterval(this.tempTimer);
}
- tempFunc() {
- this.tempData.push({
- name: 'aaa'
+ test() {
+ }
+
+ addHostNode() {
+ const idx = Math.floor(Math.random() * (this.hostNode.length - 1));
+ this.hostNode.splice(idx, 0, {
+ label: 'host',
+ expanded: true,
+ children: []
+ });
+ }
+ addServiceNode() {
+ const idx = Math.floor(Math.random() * (this.hostNode.length - 1));
+ this.hostNode[idx].children.push({
+ label: 'service',
});
}
-
}
diff --git a/@overflow/probe/probe.module.ts b/@overflow/probe/probe.module.ts
index cf91ec6..9939dc7 100644
--- a/@overflow/probe/probe.module.ts
+++ b/@overflow/probe/probe.module.ts
@@ -2,7 +2,6 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { COMPONENTS } from './component';
-import { ProbeStoreModule } from './probe-store.module';
import { SERVICES } from './service';
import { FormsModule } from '@angular/forms';
import { MetaModule } from '@overflow/meta/meta.module';
@@ -11,7 +10,6 @@ import { UIModule } from '@overflow/shared/ui/ui.module';
@NgModule({
imports: [
CommonModule,
- ProbeStoreModule,
FormsModule,
UIModule,
MetaModule,