-
- 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() {
+ }
}