- NIC: {{rowData.descriptions.network.name}}
+ NIC: {{getInfraNetworkInfo(rowData.infraHostMeta, 'name')}}
- Network Address: {{rowData.descriptions.network.address}}
+ Network Address: {{getInfraNetworkInfo(rowData.infraHostMeta, 'address')}}
- Gateway: {{rowData.descriptions.network.gateway}}
+ Gateway: {{getInfraNetworkInfo(rowData.infraHostMeta, 'gateway')}}
- Mac Address: {{rowData.descriptions.network.macAddress}}
+ Mac Address: {{getInfraNetworkInfo(rowData.infraHostMeta, 'macAddress')}}
diff --git a/@overflow/noauth-probe/component/noauth-probe-list.component.ts b/@overflow/noauth-probe/component/noauth-probe-list.component.ts
index 270ca8c..be2d265 100644
--- a/@overflow/noauth-probe/component/noauth-probe-list.component.ts
+++ b/@overflow/noauth-probe/component/noauth-probe-list.component.ts
@@ -139,10 +139,6 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
if (null === noauthProbes) {
return;
}
- noauthProbes.forEach(noauthProbe => {
- // FIXME
- // noauthProbe.descriptions = JSON.parse(noauthProbe.description);
- });
this.noauthProbes = noauthProbes;
}
@@ -150,5 +146,42 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
this.error$ = of(error);
}
+ getInfraHostInfo(infraHostMeta: string, type: string): string {
+ const infraHost = JSON.parse(infraHostMeta);
+
+ switch (type) {
+ case 'name':
+ return infraHost.host.name;
+ case 'os':
+ let os = infraHost.host.os;
+ return os;
+ case 'platform':
+ return infraHost.host.platform;
+ case 'platformFamily':
+ return infraHost.host.platformFamily;
+ case 'kernelVersion':
+ return infraHost.host.kernelVersion;
+ case 'hostID':
+ return infraHost.host.hostID;
+ default:
+ return '';
+ }
+ }
+
+ getInfraNetworkInfo(infraHostMeta: string, type: string): string {
+ const infraHost = JSON.parse(infraHostMeta);
+ switch (type) {
+ case 'name':
+ return infraHost.network.name;
+ case 'address':
+ return infraHost.network.address;
+ case 'gateway':
+ return infraHost.network.gateway;
+ case 'macAddress':
+ return infraHost.network.macAddress;
+ default:
+ return '';
+ }
+ }
}
diff --git a/package-lock.json b/package-lock.json
index c4a3f79..696682d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -453,9 +453,9 @@
}
},
"@overflow/commons-typescript": {
- "version": "0.0.10",
- "resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.10.tgz",
- "integrity": "sha512-caZTr0lFFrJ5PF4G9pWYciOK7FGsxvpXBfhhECKrxdX5RqRS3cnai98aUiYsH6hB1mrQl+WaA5Twjp6miNt3NQ=="
+ "version": "0.0.11",
+ "resolved": "https://nexus.loafle.net/repository/npm-all/@overflow/commons-typescript/-/commons-typescript-0.0.11.tgz",
+ "integrity": "sha512-Gft8tJ9oSsGFWOnaqq3wd4liqmRZAzgdduQqy6xR4JRc2E6b30p/+RLy3o1VUhVO+KMsu2tYcpx/qpZfBgMj5Q=="
},
"@schematics/angular": {
"version": "0.6.5",
@@ -6729,11 +6729,6 @@
"lower-case": "1.1.4"
}
},
- "node-cidr": {
- "version": "1.0.0",
- "resolved": "https://nexus.loafle.net/repository/npm-all/node-cidr/-/node-cidr-1.0.0.tgz",
- "integrity": "sha512-F7KXTvJ1fyVVldfjO/MrZS7ux9nyE6GiMS2q3yNFZWrU6IHjHEOuQ7jQEArJf7/qvZO3k8RGu38GSxInz8TE1g=="
- },
"node-fetch": {
"version": "1.7.3",
"resolved": "https://nexus.loafle.net/repository/npm-all/node-fetch/-/node-fetch-1.7.3.tgz",
diff --git a/package.json b/package.json
index ab43ce0..25345ea 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"@ngrx/router-store": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
- "@overflow/commons-typescript": "^0.0.10",
+ "@overflow/commons-typescript": "^0.0.11",
"angular-google-recaptcha": "^1.0.3",
"angular-l10n": "^5.0.0",
"angularx-qrcode": "^1.1.7",
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index a586811..1d32219 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -5,9 +5,9 @@
export const environment = {
production: false,
- restBaseURL: 'http://192.168.1.50:19080/webapp',
+ restBaseURL: 'http://192.168.1.101:19080/webapp',
webappRPCConfig: {
- url: 'ws://192.168.1.50:19090/webapp',
+ url: 'ws://192.168.1.101:19090/webapp',
reconnectInterval: 5000,
reconnectRetry: 10,
},