|
@@ -273,9 +273,9 @@ function constructFromJson (json) {
|
|
|
if (bindingId.value) {
|
|
if (bindingId.value) {
|
|
|
rateLimits[bindingId.value] = rateLimitExpires.value
|
|
rateLimits[bindingId.value] = rateLimitExpires.value
|
|
|
setBindingExecutionState(
|
|
setBindingExecutionState(
|
|
|
- bindingId.value,
|
|
|
|
|
- !!json.hasRunningInstance,
|
|
|
|
|
- !!json.hasQueuedInstance
|
|
|
|
|
|
|
+ bindingId.value,
|
|
|
|
|
+ !!json.hasRunningInstance,
|
|
|
|
|
+ !!json.hasQueuedInstance
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
updateRateLimitStatus()
|
|
updateRateLimitStatus()
|
|
@@ -310,8 +310,8 @@ function updateRateLimitStatus () {
|
|
|
isRateLimited.value = false
|
|
isRateLimited.value = false
|
|
|
rateLimitMessage.value = ''
|
|
rateLimitMessage.value = ''
|
|
|
if (rateLimitInterval.value) {
|
|
if (rateLimitInterval.value) {
|
|
|
- clearInterval(rateLimitInterval.value)
|
|
|
|
|
- rateLimitInterval.value = null
|
|
|
|
|
|
|
+ clearInterval(rateLimitInterval.value)
|
|
|
|
|
+ rateLimitInterval.value = null
|
|
|
}
|
|
}
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -325,8 +325,8 @@ function updateRateLimitStatus () {
|
|
|
rateLimitMessage.value = ''
|
|
rateLimitMessage.value = ''
|
|
|
rateLimitExpires.value = 0
|
|
rateLimitExpires.value = 0
|
|
|
if (rateLimitInterval.value) {
|
|
if (rateLimitInterval.value) {
|
|
|
- clearInterval(rateLimitInterval.value)
|
|
|
|
|
- rateLimitInterval.value = null
|
|
|
|
|
|
|
+ clearInterval(rateLimitInterval.value)
|
|
|
|
|
+ rateLimitInterval.value = null
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// Still rate limited
|
|
// Still rate limited
|
|
@@ -336,9 +336,9 @@ function updateRateLimitStatus () {
|
|
|
|
|
|
|
|
// Set up interval to update every second
|
|
// Set up interval to update every second
|
|
|
if (!rateLimitInterval.value) {
|
|
if (!rateLimitInterval.value) {
|
|
|
- rateLimitInterval.value = setInterval(() => {
|
|
|
|
|
|
|
+ rateLimitInterval.value = setInterval(() => {
|
|
|
updateRateLimitStatus()
|
|
updateRateLimitStatus()
|
|
|
- }, 1000)
|
|
|
|
|
|
|
+ }, 1000)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -360,12 +360,12 @@ async function handleClick () {
|
|
|
const bindingId = props.actionData.bindingId
|
|
const bindingId = props.actionData.bindingId
|
|
|
const prefilled = props.prefilledArguments || {}
|
|
const prefilled = props.prefilledArguments || {}
|
|
|
if (Object.keys(prefilled).length > 0) {
|
|
if (Object.keys(prefilled).length > 0) {
|
|
|
- router.push({
|
|
|
|
|
|
|
+ router.push({
|
|
|
path: `/actionBinding/${bindingId}/argumentForm`,
|
|
path: `/actionBinding/${bindingId}/argumentForm`,
|
|
|
state: { prefilledArguments: prefilled }
|
|
state: { prefilledArguments: prefilled }
|
|
|
- })
|
|
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
- router.push(`/actionBinding/${bindingId}/argumentForm`)
|
|
|
|
|
|
|
+ router.push(`/actionBinding/${bindingId}/argumentForm`)
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
await startAction()
|
|
await startAction()
|
|
@@ -439,7 +439,7 @@ async function startAction (actionArgs) {
|
|
|
stopButtonResultWatch = watch(
|
|
stopButtonResultWatch = watch(
|
|
|
() => buttonResults[startActionArgs.uniqueTrackingId],
|
|
() => buttonResults[startActionArgs.uniqueTrackingId],
|
|
|
(newResult, oldResult) => {
|
|
(newResult, oldResult) => {
|
|
|
- onLogEntryChanged(newResult)
|
|
|
|
|
|
|
+ onLogEntryChanged(newResult)
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
@@ -450,11 +450,11 @@ async function startAction (actionArgs) {
|
|
|
const trackingId = response.executionTrackingId || startActionArgs.uniqueTrackingId
|
|
const trackingId = response.executionTrackingId || startActionArgs.uniqueTrackingId
|
|
|
|
|
|
|
|
if (popupOnStart.value && popupOnStart.value.includes('execution-dialog')) {
|
|
if (popupOnStart.value && popupOnStart.value.includes('execution-dialog')) {
|
|
|
- router.push(`/logs/${trackingId}`)
|
|
|
|
|
|
|
+ router.push(`/logs/${trackingId}`)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!connectionState.connected) {
|
|
if (!connectionState.connected) {
|
|
|
- await pollExecutionUntilDone(trackingId)
|
|
|
|
|
|
|
+ await pollExecutionUntilDone(trackingId)
|
|
|
}
|
|
}
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
stopWatchingButtonResult()
|
|
stopWatchingButtonResult()
|
|
@@ -554,14 +554,14 @@ onMounted(() => {
|
|
|
watch(
|
|
watch(
|
|
|
rateLimits,
|
|
rateLimits,
|
|
|
() => {
|
|
() => {
|
|
|
- const id = bindingId.value
|
|
|
|
|
- if (id && rateLimits[id] !== undefined) {
|
|
|
|
|
|
|
+ const id = bindingId.value
|
|
|
|
|
+ if (id && rateLimits[id] !== undefined) {
|
|
|
const newExpires = rateLimits[id]
|
|
const newExpires = rateLimits[id]
|
|
|
if (newExpires !== rateLimitExpires.value) {
|
|
if (newExpires !== rateLimitExpires.value) {
|
|
|
- rateLimitExpires.value = newExpires
|
|
|
|
|
- updateRateLimitStatus()
|
|
|
|
|
|
|
+ rateLimitExpires.value = newExpires
|
|
|
|
|
+ updateRateLimitStatus()
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{ deep: true }
|
|
{ deep: true }
|
|
|
)
|
|
)
|
|
@@ -570,9 +570,9 @@ onMounted(() => {
|
|
|
watch(
|
|
watch(
|
|
|
() => pendingBindingFlash[bindingId.value],
|
|
() => pendingBindingFlash[bindingId.value],
|
|
|
(pending) => {
|
|
(pending) => {
|
|
|
- if (pending) {
|
|
|
|
|
|
|
+ if (pending) {
|
|
|
consumeAndFlashPendingResult()
|
|
consumeAndFlashPendingResult()
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
|
)
|
|
)
|
|
@@ -593,7 +593,7 @@ watch(
|
|
|
(newData) => {
|
|
(newData) => {
|
|
|
updateFromJson(newData)
|
|
updateFromJson(newData)
|
|
|
if (newData?.icon !== undefined) {
|
|
if (newData?.icon !== undefined) {
|
|
|
- glyph.value = newData.icon ?? ''
|
|
|
|
|
|
|
+ glyph.value = newData.icon ?? ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{ deep: true }
|
|
{ deep: true }
|