This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
The following commit(s) were added to refs/heads/master by this push:
new 39ddf3cc better ui info for error handlers and substeps
39ddf3cc is described below
commit 39ddf3cc84fa77b3882eadf5f9e89a3a45af310d
Author: Alex Heneveld <[email protected]>
AuthorDate: Mon Aug 7 13:34:12 2023 +0100
better ui info for error handlers and substeps
---
.../workflow/workflow-step.template.html | 2 +-
.../inspect/activities/detail/detail.template.html | 53 ++++++++++++++++++----
2 files changed, 44 insertions(+), 11 deletions(-)
diff --git
a/ui-modules/app-inspector/app/components/workflow/workflow-step.template.html
b/ui-modules/app-inspector/app/components/workflow/workflow-step.template.html
index 6a542b17..73fb42c3 100644
---
a/ui-modules/app-inspector/app/components/workflow/workflow-step.template.html
+++
b/ui-modules/app-inspector/app/components/workflow/workflow-step.template.html
@@ -134,7 +134,7 @@
<div ng-if="stepContext.errorHandlerTaskId && !isErrorHandler"
class="space-above">
The error here triggered a handler in
<button type="button" class="btn inline-button-small"
- ui-sref="main.inspect.activities.detail({entityId:
vm.model.entityId, activityId: stepContext.errorHandlerTaskId, workflowId})"
+
ui-sref="main.inspect.activities.detail({applicationId: workflow.applicationId,
entityId: workflow.entityId, activityId: stepContext.errorHandlerTaskId,
workflowId})"
><span class="monospace">task
{{stepContext.errorHandlerTaskId}}</span></button
><span ng-if="stepCurrentWarning"> which successfully
completed.</span
><span ng-if="stepCurrentError"> which threw an
error.</span
diff --git
a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.template.html
b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.template.html
index 20f8e3d8..7ab4a91f 100644
---
a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.template.html
+++
b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.template.html
@@ -218,8 +218,34 @@
</div>
<div class="workflow-preface-para">
This task is
- <span
ng-if="!vm.isNullish(vm.model.workflow.tag.stepIndex)">for step <b>{{
vm.model.workflow.tag.stepIndex+1 }}</b>
- in
+ <span
ng-if="!vm.isNullish(vm.model.workflow.tag.stepIndex)">
+ <span
ng-if="vm.model.workflow.tag.stepIndex >= 0">
+ <span
ng-if="vm.model.workflow.tag.errorHandlerForTask">
+ <span
ng-if="vm.model.workflow.tag.subStepIndex"> step {{
vm.model.workflow.tag.subStepIndex + 1}} of </span>
+ <span
ng-if="vm.isNullish(vm.model.workflow.tag.subStepIndex)"> for </span>
+ the error handler for
+ <button type="button"
class="btn inline-button-small"
+
ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId,
activityId: vm.model.workflow.tag.errorHandlerForTask, workflowId})">
+ step <b>{{
vm.model.workflow.tag.stepIndex+1 }}</b>
+ </button>
+ </span>
+ <span
ng-if="!vm.model.workflow.tag.errorHandlerForTask">
+ <span
ng-if="vm.model.workflow.tag.subStepIndex">
+ sub-step <b>{{
vm.model.workflow.tag.subStepIndex + 1}}</b> of
+ <button type="button"
class="btn inline-button-small"
+
ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId,
activityId: vm.model.activity.submittedByTask.metadata.id, workflowId})">
+ step <b>{{
vm.model.workflow.tag.stepIndex+1 }}</b>
+ </button>
+ </span>
+ <span
ng-if="vm.isNullish(vm.model.workflow.tag.subStepIndex)">
+ for step {{
vm.model.workflow.tag.stepIndex+1 }}
+ </span>
+ </span>
+ in
+ </span>
+ <span
ng-if="vm.model.workflow.tag.stepIndex == -3">
+ part of an error handler in
+ </span>
<span
ng-if="vm.model.workflow.runMultipleTimes">
<span
ng-if="vm.model.workflow.runIsOld">a previous run of </span>
<span
ng-if="vm.model.workflow.runIsLatest">the most recent run of </span>
@@ -248,13 +274,6 @@
workflow <span
class="monospace">{{vm.model.workflow.data.workflowId}}</span>:
<b>{{vm.model.workflow.data.name}}</b>.
</span>
- <div ng-if="vm.model.workflow.isError
&& vm.model.workflow.data.currentStepInstance &&
vm.model.workflow.data.currentStepInstance.taskId"
- style="margin-top: 6px;">
- Details of the failure can be
found by opening
- <button type="button" class="btn
inline-button-small"
-
ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId,
activityId: vm.model.workflow.data.currentStepInstance.taskId, workflowId})">
- the failed task</button>.
- </div>
</span>
</div>
@@ -270,13 +289,27 @@
The workflow did not run any steps; if
this is unexpected, check the conditions on the steps.
</div>
+ <div
ng-if="vm.isNullish(vm.model.workflow.tag.stepIndex) && vm.model.activity.id &&
vm.model.workflow.isError && vm.model.workflow.data.currentStepInstance &&
vm.model.workflow.data.currentStepInstance.taskId"
+ style="margin-top: 6px;">
+ The workflow had an error in
+ <button type="button" class="btn
inline-button-small"
+
ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId,
activityId: vm.model.workflow.data.currentStepInstance.taskId, workflowId})">
+ step
{{vm.model.workflow.data.currentStepInstance.stepIndex + 1}}
+ </button>.
+ </div>
+
<div
ng-if="vm.model.workflow.data.errorHandlerTaskId" class="workflow-preface-para">
<span
ng-if="vm.model.activityId==vm.model.workflow.data.errorHandlerTaskId">
This is the page for the error handler
for this workflow.
More details of how the error was
handled can be found in other sections on this page.
</span>
<span
ng-if="vm.model.activityId!=vm.model.workflow.data.errorHandlerTaskId">
- This workflow had an error which ran
error handler
+ <span
ng-if="vm.model.workflow.tag.stepIndex == -3">
+ The workflow error handler is
+ </span>
+ <span ng-if="!vm.model.workflow.tag ||
!vm.model.workflow.tag.stepIndex || vm.model.workflow.tag.stepIndex != -3">
+ This workflow <span
ng-if="vm.model.workflow.tag.errorHandlerForTask">also </span> ran an error
handler in
+ </span>
<button type="button" class="btn
inline-button-small"
ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId,
activityId: vm.model.workflow.data.errorHandlerTaskId, workflowId})">
<span class="monospace">task
{{vm.model.workflow.data.errorHandlerTaskId}}</span