diff --git a/docs/modules/ROOT/pages/action_customization/popuponstart.adoc b/docs/modules/ROOT/pages/action_customization/popuponstart.adoc index 0e2623a..d662f22 100644 --- a/docs/modules/ROOT/pages/action_customization/popuponstart.adoc +++ b/docs/modules/ROOT/pages/action_customization/popuponstart.adoc @@ -68,4 +68,16 @@ actions: image::../executionButtons.png[] +== Action execution history + +The `history` option opens the action details page for that binding when the execution starts, so you can see past runs and status for the same action. + +[source,yaml] +.`config.yaml` +---- +actions: + - title: Long-running job + popupOnStart: history +---- + diff --git a/docs/modules/ROOT/pages/advanced_configuration/webui.adoc b/docs/modules/ROOT/pages/advanced_configuration/webui.adoc index 6d3405b..2c35154 100644 --- a/docs/modules/ROOT/pages/advanced_configuration/webui.adoc +++ b/docs/modules/ROOT/pages/advanced_configuration/webui.adoc @@ -44,6 +44,7 @@ image::defaultUiHideNav.png[] When enabled (the default), each action button can show a small icon indicating what happens when the action is started: * **Popup dialog** — the action opens a popup (e.g. `popupOnStart: execution-dialog`) +* **Action history** — the action opens the action details page (e.g. `popupOnStart: history`) * **Argument form** — the action opens an argument form on start * **Run in background** — the action runs without opening a dialog diff --git a/frontend/resources/vue/ActionButton.vue b/frontend/resources/vue/ActionButton.vue index 8f81521..cb448b7 100644 --- a/frontend/resources/vue/ActionButton.vue +++ b/frontend/resources/vue/ActionButton.vue @@ -10,6 +10,9 @@ + @@ -28,7 +31,7 @@ import { buttonResults } from './stores/buttonResults' import { rateLimits } from './stores/rateLimits' import { useRouter } from 'vue-router' import { HugeiconsIcon } from '@hugeicons/vue' -import { WorkoutRunIcon, TypeCursorIcon, ComputerTerminal01Icon } from '@hugeicons/core-free-icons' +import { WorkoutRunIcon, TypeCursorIcon, ComputerTerminal01Icon, WorkHistoryIcon } from '@hugeicons/core-free-icons' import { ref, watch, onMounted, onUnmounted, inject, computed } from 'vue' @@ -108,6 +111,8 @@ function constructFromJson(json) { if (popupOnStart.value.includes('execution-dialog')) { navigateOnStart.value = 'pop' + } else if (popupOnStart.value === 'history') { + navigateOnStart.value = 'hist' } else if (props.actionData.arguments.length > 0) { navigateOnStart.value = 'arg' } @@ -244,6 +249,8 @@ function onLogEntryChanged(logEntry) { function onExecutionStarted(logEntry) { if (popupOnStart.value && popupOnStart.value.includes('execution-dialog')) { router.push(`/logs/${logEntry.executionTrackingId}`) + } else if (popupOnStart.value === 'history') { + router.push(`/action/${bindingId.value}`) } isDisabled.value = true diff --git a/frontend/resources/vue/views/ActionDetailsView.vue b/frontend/resources/vue/views/ActionDetailsView.vue index 9d8b31e..1816fde 100644 --- a/frontend/resources/vue/views/ActionDetailsView.vue +++ b/frontend/resources/vue/views/ActionDetailsView.vue @@ -17,7 +17,7 @@
Timeout
{{ action.timeout }} seconds
-

+

Execution history for this action. You can filter by execution tracking ID.

@@ -47,6 +47,7 @@ Timestamp + Duration Execution ID Metadata Status @@ -55,6 +56,7 @@ {{ formatTimestamp(log.datetimeStarted) }} + {{ formatExecutionDuration(log) }} {{ log.executionTrackingId }} @@ -70,9 +72,7 @@ - - {{ getStatusText(log) }} - + @@ -90,10 +90,11 @@