-
-
-
-
-
-
-
-
-
+
+
\ 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 { }