From 86d405866457db72c871ca1e77a57c5be2b3d353 Mon Sep 17 00:00:00 2001 From: insanity Date: Fri, 1 Jun 2018 16:32:16 +0900 Subject: [PATCH] tree --- @overflow/discovery/component/animation.ts | 6 ++-- .../component/discovery.component.html | 6 ++-- .../component/discovery.component.ts | 3 +- .../component/search-result.component.html | 18 ++++++---- .../component/search-result.component.ts | 33 +++++++++++++------ @overflow/probe/probe.module.ts | 2 -- 6 files changed, 43 insertions(+), 25 deletions(-) diff --git a/@overflow/discovery/component/animation.ts b/@overflow/discovery/component/animation.ts index 9c4233d..cbcd834 100644 --- a/@overflow/discovery/component/animation.ts +++ b/@overflow/discovery/component/animation.ts @@ -24,10 +24,10 @@ export const Anim = [ trigger('discoveryResultAnim', [ transition('void => *', [ query('*', style({ opacity: 0 }), { optional: true }), - query('*', stagger('300ms', [ + query('*', stagger('500ms', [ animate('0.08s ease-in', keyframes([ - style({ opacity: 0, transform: 'translateY(-75%)', offset: 0 }), - style({ opacity: .5, transform: 'translateY(35px)', offset: 0.3 }), + style({ opacity: 0, transform: 'translateX(-75%)', offset: 0 }), + style({ opacity: .5, transform: 'translateX(35px)', offset: 0.3 }), style({ opacity: 1, transform: 'translateY(0)', offset: 1.0 }), ]))]), { optional: true }), ]), diff --git a/@overflow/discovery/component/discovery.component.html b/@overflow/discovery/component/discovery.component.html index a0a6da7..369c82b 100644 --- a/@overflow/discovery/component/discovery.component.html +++ b/@overflow/discovery/component/discovery.component.html @@ -6,7 +6,7 @@ Choose a Probe to perform Discovery. - + @@ -22,5 +22,7 @@ - INFO +
+ Network Discovery 설명 페이지 +
\ No newline at end of file diff --git a/@overflow/discovery/component/discovery.component.ts b/@overflow/discovery/component/discovery.component.ts index a0ecf22..2c9e374 100644 --- a/@overflow/discovery/component/discovery.component.ts +++ b/@overflow/discovery/component/discovery.component.ts @@ -13,7 +13,7 @@ import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.su @Component({ selector: 'of-discovery', templateUrl: './discovery.component.html', - animations: Anim + animations: Anim, }) export class DiscoveryComponent { @@ -26,7 +26,6 @@ export class DiscoveryComponent { requested: boolean; discoverZone: DiscoverZone; - constructor( private discoveryService: DiscoveryService, private discoverySubscriber: DiscoverySubscriber, diff --git a/@overflow/discovery/component/search-result.component.html b/@overflow/discovery/component/search-result.component.html index 7903146..2bab881 100644 --- a/@overflow/discovery/component/search-result.component.html +++ b/@overflow/discovery/component/search-result.component.html @@ -1,8 +1,14 @@ -
- + -
- -
+
+ + + + +
+ +
+
+
\ 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,