Fix Job page error when semaphores is not empty

Web UI was broken when semaphores is not empty. Fixed by showing it
as json structure.

Change-Id: Ib9a8d3cdc0efc843f17e406167542817e89a3931
This commit is contained in:
Dong Zhang
2022-02-11 16:24:53 +08:00
parent ad1351c225
commit 76cb8e2b54

View File

@@ -151,6 +151,18 @@ class JobVariant extends React.Component {
if (label === 'semaphores') {
if (value.length === 0) {
value = (<i>none</i>)
} else {
value = (
<span style={{whiteSpace: 'pre-wrap'}}>
<ReactJson
src={value}
name={null}
collapsed={true}
sortKeys={true}
enableClipboard={false}
displayDataTypes={false}/>
</span>
)
}
nice_label = (<span><LockIcon /> Semaphores</span>)
}