diff options
author | Eoin Hanan <eoin.hanan@ericsson.com> | 2018-12-07 09:57:04 +0000 |
---|---|---|
committer | Eoin Hanan <eoin.hanan@ericsson.com> | 2018-12-07 09:57:16 +0000 |
commit | b19a518ceecc27255505616eed878abcff260f25 (patch) | |
tree | 2f8b4c0cf4affd34442ae5db603a0887d7b52b96 | |
parent | 5df9c2d914e0b8bd6ade407a799fd6c159e54deb (diff) |
JSON objects now displaying as string
Change-Id: I659f56dd28e8a1f44bf88c7a23c961866d081cca
Issue-ID: SO-1286
Signed-off-by: Eoin Hanan <eoin.hanan@ericsson.com>
-rw-r--r-- | so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts | 15 |
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);
|