Skip to content

Commit 79a36b4

Browse files
author
wd400
committedMar 6, 2024·
Refactor experiment config details component to display object values as JSON strings
1 parent bcf0bff commit 79a36b4

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed
 

‎services/base/FrontEndApp/angular_app/src/app/experiment-monitoring/experiment-config-details/experiment-config-details.component.html

+21-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,27 @@ <h2 class="accordion-header" id="headingExplorer">
7272
"
7373
>
7474
<li>
75-
{{ key + " : " + this.experiment.explorers[0].config[key] }}
75+
<span
76+
>{{ key }} :
77+
78+
<!-- if it's a string or number, display it -->
79+
<span *ngIf="this.experiment.explorers[0].config[key].constructor.name != 'Object'">
80+
{{ this.experiment.explorers[0].config[key] }}
81+
</span>
82+
<!-- if it's an object, display it as a JSON string -->
83+
<span *ngIf="this.experiment.explorers[0].config[key].constructor.name == 'Object'">
84+
{{this.experiment.explorers[0].config[key] | json }}
85+
</span>
86+
87+
88+
89+
90+
91+
</span>
92+
93+
94+
95+
7696
</li>
7797
</div>
7898
</div>

0 commit comments

Comments
 (0)