You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2022/10/23 16:16:38 UTC
[brooklyn-ui] branch master updated: misc minor workflow ui fixes
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 4ed0dcb2 misc minor workflow ui fixes
4ed0dcb2 is described below
commit 4ed0dcb26837f5f3024ed246744b1747ac982f7d
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Sun Oct 23 17:16:29 2022 +0100
misc minor workflow ui fixes
---
.../components/workflow/workflow-step.directive.js | 47 +---------------------
.../inspect/activities/detail/detail.controller.js | 2 +-
.../main/inspect/activities/detail/detail.less | 6 +++
3 files changed, 8 insertions(+), 47 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 3d9dbc60..ed62a6cd 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
@@ -53,7 +53,6 @@ export function workflowStepDirective() {
let index = $scope.stepIndex;
$scope.workflowId = ($scope.workflow && $scope.workflow.data || {}).workflowId;
- vm.stepDetails = () => stepDetails($sce, $scope.workflow, step, index, $scope.expanded);
vm.toggleExpandState = () => {
$scope.expanded = !$scope.expanded;
if ($scope.onSizeChange) $scope.onSizeChange();
@@ -84,7 +83,7 @@ export function workflowStepDirective() {
$scope.stepTitle.code = step;
} else {
- let shorthand = step.userSuppliedShorthand || step.s || step.shorthand;
+ let shorthand = step.userSuppliedShorthand || step.step || step.s || step.shorthand;
$scope.stepTitle.code = shorthand;
if (!shorthand) {
$scope.stepTitle.code = step.shorthandTypeName || step.type || '';
@@ -148,48 +147,4 @@ export function workflowStepDirective() {
}
-function stepDetails($sce, workflow, step, index, expanded) {
- let v;
- if (typeof step === 'string') {
- v = '<span class="step-index">'+_.escape(index+1)+'</span> ';
- v += ' <span class="step-body">' + _.escape(step) + '</span>';
- } else {
- let shorthand = step.userSuppliedShorthand || step.s || step.shorthand;
- if (step.name) {
- v = '<span class="step-name">' + _.escape(step.name) + '</span>';
- if (shorthand) {
- v += ' <span class="step-body">' + _.escape(shorthand) + '</span>';
- }
- } else {
- if (step.id) {
- v = '<span class="step-id">' + _.escape(step.id) + '</span>';
- if (shorthand) {
- v += ' <span class="step-body">' + _.escape(shorthand) + '</span>';
- }
- } else {
- v = '<span class="step-index">'+_.escape(index+1)+'</span> ';
- if (shorthand) {
- v += '<span class="step-body">' + _.escape(shorthand);
- } else {
- v += _.escape(step.type);
- if (step.input) v += ' ...';
- }
- v += '</span>';
- }
- }
- }
- v = '<div class="step-block-title">'+v+'</div>';
-
- if (expanded) {
- v += '<br/>';
- const oldStepInfo = (workflow.data.oldStepInfo || {})[index]
- if (oldStepInfo) {
- v += '<pre>' + _.escape(stringify(oldStepInfo)) + '</pre>';
- } else {
- v += _.escape("Step has not been run yet.");
- }
- }
- return $sce.trustAsHtml(v);
-}
-
function stringify(data) { return JSON.stringify(data, null, 2); }
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 79476af8..7475be5a 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
@@ -157,7 +157,7 @@ function DetailController($scope, $state, $stateParams, $location, $log, $uibMod
const osi = vm.model.workflow.data.oldStepInfo[stepIndex] || {};
if (osi.replayableFromHere) {
$scope.actions.workflowReplays.push({ targetId: ''+stepIndex, reason: 'Replay workflow from step '+(stepIndex+1)+' from UI',
- label: 'Replay from here (step '+(stepIndex+1) });
+ label: 'Replay from here (step '+(stepIndex+1)+')' });
} else {
$scope.actions.workflowReplays.push({ targetId: ''+stepIndex, reason: 'Force replay from step '+(stepIndex+1)+' from UI',
label: 'Force replay from here (step '+(stepIndex+1), force: true });
diff --git a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.less b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.less
index c26d5989..2011eda9 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.less
+++ b/ui-modules/app-inspector/app/views/main/inspect/activities/detail/detail.less
@@ -236,6 +236,12 @@
margin-top: 12px;
margin-bottom: 12px;
}
+
+ .workflow-preface-para {
+ a {
+ color: @primary-500;
+ }
+ }
}
.dropdown-at-root {