diff --git a/src/app/pages/infra/infra-page.component.html b/src/app/pages/infra/infra-page.component.html index 5727206..d6efe28 100644 --- a/src/app/pages/infra/infra-page.component.html +++ b/src/app/pages/infra/infra-page.component.html @@ -1,5 +1,3 @@ - - diff --git a/src/app/pages/infra/infra-page.component.ts b/src/app/pages/infra/infra-page.component.ts index a162522..5efc842 100644 --- a/src/app/pages/infra/infra-page.component.ts +++ b/src/app/pages/infra/infra-page.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material'; -import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; @Component({ selector: 'of-infra-page', @@ -16,17 +15,6 @@ export class InfraPageComponent implements OnInit { ngOnInit() { } - discovery() { - const dialogRef = this.dialog.open(DiscoverySettingComponent, { - width: '80%', - }); - - dialogRef.afterClosed().subscribe(result => { - console.log('The dialog was closed'); - - }); - } - authProbe() { } } diff --git a/src/app/pages/infra/infra-page.module.ts b/src/app/pages/infra/infra-page.module.ts index c6a568d..806a73d 100644 --- a/src/app/pages/infra/infra-page.module.ts +++ b/src/app/pages/infra/infra-page.module.ts @@ -6,7 +6,6 @@ import { InfraPageRoutingModule } from './infra-page-routing.module'; import { MaterialModule } from 'packages/commons/material/material.module'; import { InfraModule } from 'packages/infra/infra.module'; -import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; import { InfraPageComponent } from './infra-page.component'; import { DiscoveryModule } from 'packages/discovery/discovery.module'; @@ -21,8 +20,5 @@ import { DiscoveryModule } from 'packages/discovery/discovery.module'; declarations: [ InfraPageComponent, ], - entryComponents: [ - DiscoverySettingComponent - ] }) export class InfraPageModule { } diff --git a/src/packages/infra/component/map/map.component.html b/src/packages/infra/component/map/map.component.html index c08f0c8..5070657 100644 --- a/src/packages/infra/component/map/map.component.html +++ b/src/packages/infra/component/map/map.component.html @@ -19,6 +19,7 @@ + Status: 기본 센서 데이터에서 저장한 metric으로..
????
diff --git a/src/packages/probe/component/detail/detail.component.html b/src/packages/probe/component/detail/detail.component.html index e77c76d..7188fe0 100644 --- a/src/packages/probe/component/detail/detail.component.html +++ b/src/packages/probe/component/detail/detail.component.html @@ -1,23 +1,35 @@ -

{{probe.displayName}}

- -
- Status: {{probe.status.name}} +
+

{{probe.displayName}}

+
+ +
+ Status: {{probe.status.name}} +
+ +
+
+ +
+ + + + + + + + + +
+ +
- +
-
- - - - - - - - - +
+
\ No newline at end of file diff --git a/src/packages/probe/component/detail/detail.component.ts b/src/packages/probe/component/detail/detail.component.ts index 497c35a..2806174 100644 --- a/src/packages/probe/component/detail/detail.component.ts +++ b/src/packages/probe/component/detail/detail.component.ts @@ -10,6 +10,8 @@ import { ConfirmDialogComponent } from 'packages/commons/component/confirm-dialo import * as DetailStore from '../../store/detail'; import { DetailSelector } from '../../store'; import { Probe } from '../../model'; +import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; +import * as CIDR from 'ip-cidr'; @Component({ selector: 'of-probe-detail', @@ -37,6 +39,7 @@ export class DetailComponent implements OnInit, AfterContentInit { (probe: Probe) => { if (probe != null) { this.probe = probe; + console.log(probe); this.arrangeInfo(); } }, @@ -56,18 +59,29 @@ export class DetailComponent implements OnInit, AfterContentInit { } arrangeInfo() { + + const cidr = new CIDR(this.probe.cidr); + if (!cidr.isValid()) { + } + const startIP = cidr.addressStart.address; + const endIP = cidr.addressEnd.address; + this.networkInfo = [ { - key: 'IP', - value: '192.168.1.1' + key: 'Probe IP Range', + value: startIP + '~' + endIP, + }, + { + key: 'Installed IP', + value: '???', }, { key: 'NIC', - value: 'enps30' + value: '???' }, { key: 'Targets', - value: '12' + value: 'count 반정규화 필요 ' }, ]; this.deviceInfo = [ @@ -91,7 +105,7 @@ export class DetailComponent implements OnInit, AfterContentInit { this.probeInfo = [ { key: 'Authorized at', - value: String(new Date()) + value: String(new Date(this.probe.authorizeDate)) }, { key: 'Authorized by', @@ -99,11 +113,27 @@ export class DetailComponent implements OnInit, AfterContentInit { }, { key: 'Installed at', - value: String(new Date()) + value: String(new Date(this.probe.createDate)) + }, + { + key: 'Probe Key', + value: this.probe.probeKey, }, ]; } + discovery() { + const dialogRef = this.dialog.open(DiscoverySettingComponent, { + width: '80%', + }); + + dialogRef.afterClosed().subscribe(result => { + console.log('The dialog was closed'); + + }); + } + + handleStartStop() { // this.isUpState = !this.isUpState; } diff --git a/src/packages/probe/probe.module.ts b/src/packages/probe/probe.module.ts index 9cae8ad..190986a 100644 --- a/src/packages/probe/probe.module.ts +++ b/src/packages/probe/probe.module.ts @@ -10,6 +10,9 @@ import { ConfirmDialogComponent } from 'packages/commons/component/confirm-dialo import { COMPONENTS } from './component'; import { ProbeStoreModule } from './probe-store.module'; import { SERVICES } from './service'; +import { SettingComponent as DiscoverySettingComponent } from 'packages/discovery/component/setting/setting.component'; +import { DiscoveryModule } from '../discovery/discovery.module'; + @NgModule({ imports: [ @@ -18,6 +21,7 @@ import { SERVICES } from './service'; InfoTableModule, ConfirmDialogModule, ProbeStoreModule, + DiscoveryModule ], declarations: [ COMPONENTS, @@ -30,6 +34,7 @@ import { SERVICES } from './service'; ], entryComponents: [ ConfirmDialogComponent, + DiscoverySettingComponent ] }) export class ProbeModule { }