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
commit 21e2f2eccdb2a67125e1a98c48ff1f3baa1ac2c0 Author: Alex Heneveld <[email protected]> AuthorDate: Thu Oct 20 09:43:03 2022 +0100 tweaks to messages for clarity --- .../app/components/workflow/workflow-step.directive.js | 2 +- .../app/components/workflow/workflow-step.template.html | 9 +++++---- .../app/views/main/inspect/activities/activities.controller.js | 1 + .../views/main/inspect/activities/detail/detail.controller.js | 2 ++ .../views/main/inspect/activities/detail/detail.template.html | 9 +++++++-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ui-modules/app-inspector/app/components/workflow/workflow-step.directive.js b/ui-modules/app-inspector/app/components/workflow/workflow-step.directive.js index 7cc22544..1171d247 100644 --- a/ui-modules/app-inspector/app/components/workflow/workflow-step.directive.js +++ b/ui-modules/app-inspector/app/components/workflow/workflow-step.directive.js @@ -87,7 +87,7 @@ export function workflowStepDirective() { let shorthand = step.userSuppliedShorthand || step.s || step.shorthand; $scope.stepTitle.code = shorthand; if (!shorthand) { - $scope.stepTitle.code = step.type || ''; + $scope.stepTitle.code = step.shorthandTypeName || step.type || ''; if (step.input) $scope.stepTitle.code += ' ...'; } 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 0554213c..97a51d61 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 @@ -38,13 +38,13 @@ <div ng-if="stepTitle.name" class="step-name"> {{ stepTitle.name}} </div> + <div ng-if="isFocusTask" class="workflow-step-pill focus-step label-info" title="This step instance is for the task currently selected in the activity view."> + selected + </div> <div ng-if="stepTitle.id" class="workflow-step-pill step-id"> <i class="fa fa-id-card-o"></i> {{ stepTitle.id }} </div> - <div ng-if="isFocusTask" class="workflow-step-pill focus-step label-info" title="This step instance is for the task currently selected in the activity view."> - selected - </div> <div ng-click="vm.toggleExpandState()" class="expand-toggle"> <i ng-class="expanded ? 'fa fa-chevron-up' : 'fa fa-chevron-down'"></i> </div> @@ -100,7 +100,8 @@ </span> <span ng-if="isFocusTask"> - in the task focused on in this page (<span class="monospace">{{ stepContext.taskId }}</span>). + in the task this page is focused on (<span class="monospace">{{ stepContext.taskId }}</span>). + More details may be found in the other sections on this page. </span> <span ng-if="!isFocusTask"> in <a ui-sref="main.inspect.activities.detail({applicationId: workflow.applicationId, entityId: workflow.entityId, activityId: stepContext.taskId, workflowId })">task <span class="monospace">{{ stepContext.taskId }}</span></a>. diff --git a/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js b/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js index b005142f..dbb487e3 100644 --- a/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js +++ b/ui-modules/app-inspector/app/views/main/inspect/activities/activities.controller.js @@ -176,6 +176,7 @@ function ActivitiesController($scope, $state, $stateParams, $log, $timeout, enti } export function makeTaskStubFromWorkflowRecord(wf, wft) { + console.log("WFT", wft.status, wft); const result = { id: wft.taskId, displayName: wf.name + (wft.reasonForReplay ? " ("+wft.reasonForReplay+")" : ""), diff --git a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.controller.js b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.controller.js index 1e7aedba..c994e19a 100644 --- a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.controller.js +++ b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.controller.js @@ -114,6 +114,8 @@ function DetailController($scope, $state, $stateParams, $location, $log, $uibMod // change the workflow object so widgets get refreshed vm.model.workflow = { ...vm.model.workflow, data: wResponse2.data }; + vm.model.workflow.isError = !!(vm.model.workflow.data.status && vm.model.workflow.data.status.startsWith("ERROR")); + const replays = (vm.model.workflow.data.replays || []); vm.model.workflow.runMultipleTimes = replays.length > 1; 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 3916a9eb..74cdf90b 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 @@ -214,7 +214,7 @@ 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.model.workflow.runReplayId"> + <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> </span> @@ -236,10 +236,15 @@ <b>{{vm.model.workflow.data.name}}</b>.</a> </span> <span ng-if="!vm.model.workflow.runIsOld"> - <span ng-if="vm.model.workflow.runIsLatest">the most recent run of </span> + <span ng-if="vm.model.workflow.runIsLatest && vm.model.workflow.runMultipleTimes">the most recent run of </span> workflow <span class="monospace">{{vm.model.workflow.data.workflowId}}</span>: <b>{{vm.model.workflow.data.name}}</b>. </span> + <span ng-if="vm.model.workflow.isError && vm.model.workflow.data.currentStepInstance && vm.model.workflow.data.currentStepInstance.taskId"> + Details of the failure can be found by opening + <a ui-sref="main.inspect.activities.detail({entityId: vm.model.entityId, activityId: vm.model.workflow.data.currentStepInstance.taskId, workflowId})"> + the failed task</a>. + </span> </span> </div>
