Skip to content

Commit 39a8be4

Browse files
authored
[OGUI-1795] Check for existing value before attempting to build the DateTime object (#3135)
* checks for existence of value for dates before displaying them in the env-overview page * bumps patch release version
1 parent dc14ff5 commit 39a8be4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Control/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Control/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aliceo2/control",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "ALICE O2 Control GUI",
55
"author": "George Raduta",
66
"contributors": [

Control/public/common/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const parseObject = (item = {}, key) => {
3838
case 'createdWhen':
3939
case 'run_start_time_ms':
4040
case 'run_end_time_ms':
41-
return item
42-
? new Date(Number.parseInt(item)).toLocaleString()
41+
return item[key]
42+
? new Date(Number.parseInt(item[key])).toLocaleString()
4343
: '-';
4444
case 'odc_n_epns':
4545
return (item['epn_enabled'] && item['epn_enabled'] == 'true') ? item['odc_n_epns'] : 'OFF';

Control/public/pages/Environments/Environments.page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ const environmentsTable = (environments, model) => {
189189
: '-'
190190
]),
191191
h('td', {style: 'text-align: center;'}, userVars?.run_type ?? '-'),
192-
h('td', {style: 'text-align: center;'}, userVars && parseObject(item.createdWhen, 'createdWhen')),
192+
h('td', {style: 'text-align: center;'}, userVars && parseObject(item, 'createdWhen')),
193193
h('td', { style: 'text-align: center;' },
194-
userVars && parseObject(userVars['run_start_time_ms'], 'run_start_time_ms')
194+
userVars && parseObject(userVars, 'run_start_time_ms')
195195
),
196196
h('td', { style: 'text-align: center;' },
197-
userVars && parseObject(userVars['run_end_time_ms'], 'run_end_time_ms')
197+
userVars && parseObject(userVars, 'run_end_time_ms')
198198
),
199199
h('td', {style: 'text-align: center;'}, item.numberOfFlps ? item.numberOfFlps : '-'),
200200
h('td', {style: 'text-align: center;'}, userVars && parseObject(userVars, 'odc_n_epns')),

0 commit comments

Comments
 (0)