1010 v-if =" showSyncTaskRunning "
1111 :description =" shortInput "
1212 :progress =" progress "
13+ :expected-runtime =" expectedRuntime "
1314 @background-notify =" onBackgroundNotify "
1415 @cancel =" onCancel "
1516 @back =" onBackToAssistant " />
@@ -88,6 +89,11 @@ export default {
8889 }
8990 return ' '
9091 },
92+ expectedRuntime () {
93+ const expected = this .task .completionExpectedAt
94+ const scheduled = this .task .scheduledAt
95+ return (expected && scheduled) ? (expected - scheduled) : null
96+ },
9197 },
9298
9399 mounted () {
@@ -114,13 +120,17 @@ export default {
114120 syncSubmit (inputs , taskTypeId , newTaskIdentifier = ' ' ) {
115121 this .showSyncTaskRunning = true
116122 this .progress = null
123+ this .task .completionExpectedAt = null
124+ this .task .scheduledAt = null
117125 this .task .input = inputs
118126 this .task .type = taskTypeId
119127 scheduleTask (' assistant' , this .task .identifier , taskTypeId, inputs)
120128 .then ((response ) => {
121129 console .debug (' Assistant SYNC result' , response .data ? .ocs ? .data )
122130 const task = response .data ? .ocs ? .data ? .task
123131 this .task .id = task .id
132+ this .task .completionExpectedAt = task .completionExpectedAt
133+ this .task .scheduledAt = task .scheduledAt
124134 pollTask (task .id , this .setProgress ).then (finishedTask => {
125135 if (finishedTask .status === TASK_STATUS_STRING .successful ) {
126136 this .task .output = finishedTask? .output
0 commit comments