Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/save/index.js
Show First 20 Lines • Show All 393 Lines • ▼ Show 20 Lines | .then(saveRequestTaskInfo => { | ||||
const taskData = { | const taskData = { | ||||
'Type': ['raw', 'type'], | 'Type': ['raw', 'type'], | ||||
'Visit status': ['raw', 'visit_status'], | 'Visit status': ['raw', 'visit_status'], | ||||
'Arguments': ['json', 'arguments'], | 'Arguments': ['json', 'arguments'], | ||||
'Id': ['raw', 'id'], | 'Id': ['raw', 'id'], | ||||
'Backend id': ['raw', 'backend_id'], | 'Backend id': ['raw', 'backend_id'], | ||||
'Scheduling date': ['date', 'scheduled'], | 'Scheduling date': ['date', 'scheduled'], | ||||
'Start date': ['date', 'started'], | 'Start date': ['date', 'started'], | ||||
'Termination date': ['date', 'ended'], | 'Completion date': ['date', 'ended'], | ||||
'Duration': ['duration', 'duration'], | 'Duration': ['duration', 'duration'], | ||||
'Executor': ['raw', 'worker'], | 'Runner': ['raw', 'worker'], | ||||
'Log': ['raw', 'message'] | 'Log': ['raw', 'message'] | ||||
}; | }; | ||||
for (const [title, [type, property]] of Object.entries(taskData)) { | for (const [title, [type, property]] of Object.entries(taskData)) { | ||||
if (saveRequestTaskInfo.hasOwnProperty(property)) { | if (saveRequestTaskInfo.hasOwnProperty(property)) { | ||||
saveRequestInfo.push({ | saveRequestInfo.push({ | ||||
key: title, | key: title, | ||||
value: formatValuePerType(type, saveRequestTaskInfo[property]) | value: formatValuePerType(type, saveRequestTaskInfo[property]) | ||||
}); | }); | ||||
Show All 39 Lines |