diff --git a/src/app/commons/component/info-table/info-table.component.html b/src/app/commons/component/info-table/info-table.component.html index fba231e..bcc418e 100644 --- a/src/app/commons/component/info-table/info-table.component.html +++ b/src/app/commons/component/info-table/info-table.component.html @@ -1,6 +1,11 @@ - - + + + + + + \ No newline at end of file diff --git a/src/app/packages/target/component/detail/detail.component.html b/src/app/packages/target/component/detail/detail.component.html index 89e0f1f..46a51e7 100644 --- a/src/app/packages/target/component/detail/detail.component.html +++ b/src/app/packages/target/component/detail/detail.component.html @@ -9,35 +9,51 @@
- - + +
-
-
- info +
+
+ +
+
+
-
-
-
+
+
+ +

Sensors

+ -
- - - - - -
{{ detail?.country }}{{ detail?.sales }}{{ detail?.percentage }}
+ + SensorType + {{element.sensorType}} + + + + Items + {{element.itemCnt}} items + + + + Status + {{element.status}} + + + + + + + + - - - - + \ No newline at end of file diff --git a/src/app/packages/target/component/detail/detail.component.scss b/src/app/packages/target/component/detail/detail.component.scss index 3cdd426..6cbe979 100644 --- a/src/app/packages/target/component/detail/detail.component.scss +++ b/src/app/packages/target/component/detail/detail.component.scss @@ -25,3 +25,13 @@ th, td { box-shadow: 0 20px 20px rgba(0, 0, 0, .16) } } +.example-container { + display: flex; + flex-direction: column; + min-width: 300px; + } + + .mat-table { + overflow: auto; + max-height: 500px; + } diff --git a/src/app/packages/target/component/detail/detail.component.ts b/src/app/packages/target/component/detail/detail.component.ts index 849f5f9..fa83ecc 100644 --- a/src/app/packages/target/component/detail/detail.component.ts +++ b/src/app/packages/target/component/detail/detail.component.ts @@ -1,17 +1,87 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, ViewChild, OnInit, Input } from '@angular/core'; +import { MatPaginator, MatTableDataSource } from '@angular/material'; +import { AfterContentInit, AfterViewInit } from '@angular/core/src/metadata/lifecycle_hooks'; @Component({ selector: 'of-target-detail', templateUrl: './detail.component.html', styleUrls: ['./detail.component.scss'] }) -export class DetailComponent implements OnInit { +export class DetailComponent implements OnInit, AfterViewInit, AfterContentInit { - @Input() sensors = []; + displayedColumns = ['sensorType', 'itemCnt', 'status']; + sensors: MatTableDataSource = null; + @ViewChild(MatPaginator) paginator: MatPaginator; + + basicInfo = [ + { + key: 'IP', + value: '192.168.1.105', + }, + { + key: 'Mac', + value: 'aaaaaaaaaaaaa', + }, + { + key: 'OS', + value: 'Ubuntu', + }, + { + key: 'Port', + value: '80', + }, + ]; + metaInfo = [ + { + key: 'Meta1', + value: 'value1', + }, + { + key: 'Meta2', + value: 'value2', + }, + { + key: 'Meta3', + value: 'value3', + }, + { + key: 'Meta4', + value: 'value4', + }, + ]; constructor() { } ngOnInit() { } + ngAfterViewInit() { + this.sensors.paginator = this.paginator; + } + + ngAfterContentInit() { + const sensors = [ + { + sensorType: 'WMI', + itemCnt: '5', + status: 'Up', + }, + { + sensorType: 'SSH', + itemCnt: '5', + status: 'Up', + }, + ]; + this.sensors = new MatTableDataSource(sensors); + } + + handleSensorClick(row: any) { + console.log(row); + } + + handleCheckAlive() { + } + + handleTraceroute() { + } }