aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEoin Hanan <eoin.hanan@ericsson.com>2018-12-07 09:57:04 +0000
committerByung-Woo Jun <byung-woo.jun@ericsson.com>2019-01-16 21:55:43 +0000
commit68f24c565eb7ac960e33a67b3674867b3120d97f (patch)
treeb3366df4c6dfa5b4f15e6d9349f501ff5089ee2b
parent0e61beb7943db4e0f915a1a6d30315cb30b91696 (diff)
JSON objects now displaying as string
Change-Id: I659f56dd28e8a1f44bf88c7a23c961866d081cca Issue-ID: SO-1286 Signed-off-by: Eoin Hanan <eoin.hanan@ericsson.com> (cherry picked from commit b19a518ceecc27255505616eed878abcff260f25)
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
index bb464a9e21..97bbbdad02 100644
--- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
+++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts
@@ -138,7 +138,20 @@ export class DetailsComponent implements OnInit {
getVarInst(procInstId) {
this.data.getVariableInstance(procInstId).subscribe(
(data: VarInstance[]) => {
- this.variableInstance = data;
+ this.variableInstance = [];
+ for (let i = 0; i < data.length; i++) {
+ var value = data[i]['value'];
+ var type = data[i]['type'];
+ if ((type == 'Object') && !(value == null)) {
+ try {
+ data[i]['value'] = JSON.stringify(value, null, 2);
+ }
+ catch (error) {
+ console.log("Unable to \nError Code: " + error);
+ }
+ }
+ this.variableInstance[i] = data[i];
+ }
console.log(data);
}, error => {
console.log(error);