Merge remote-tracking branch 'tbouron/feature/yarn-build'
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 a7898a6..7a618c8 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
@@ -190,6 +190,21 @@
                 $scope.isFocusTask = false;
                 $scope.isErrorHandler = $scope.workflow.tag && ($scope.workflow.tag.errorHandlerForTask);
 
+                // for switch, possibly others -- the step task wraps a chosen step task;
+                // show details for the wrapped chosen task, without showing weird messages
+                $scope.otherMetadata = Object.assign({}, $scope.stepContext.otherMetadata || {});
+                if ($scope.stepContext.stepState && $scope.stepContext.stepState.selectedStepContext) {
+                    $scope.innerStepContext = $scope.stepContext.stepState.selectedStepContext;
+                    $scope.outerStepContext = $scope.stepContext;
+                    $scope.isWrappingStepTaskOuter = $scope.task && $scope.stepContext.taskId == $scope.task.id;
+                    $scope.stepContext = $scope.stepContext.stepState.selectedStepContext;
+                    $scope.otherMetadata = Object.assign($scope.otherMetadata, $scope.stepContext.otherMetadata || {});
+                    $scope.isWrappingStepTaskInner = $scope.task && $scope.stepContext.taskId == $scope.task.id;
+                    if ($scope.isWrappingStepTaskOuter || $scope.isWrappingStepTaskInner) {
+                        $scope.isFocusTask = true;
+                    }
+                }
+
                 if ($scope.task) {
                     if (!vm.isNullish($scope.stepContext.taskId) && $scope.stepContext.taskId === $scope.task.id) {
                         $scope.isFocusTask = true;
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 c8d226f..6c8c956 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
@@ -117,7 +117,16 @@
                         </span>
 
                         <span ng-if="isFocusTask">
-                            in task <span class="monospace">{{ stepContext.taskId }}</span> which is the one currently loaded on this page.
+                            <span ng-if="isWrappingStepTaskOuter || isWrappingStepTaskInner">
+                                in task <span class="monospace">{{ outerStepContext.taskId }}</span>
+                                selecting <span
+                                    ng-if="otherMetadata['Switch match']"><b> {{ otherMetadata['Switch match'] }}</b> in </span>
+                                task <span class="monospace">{{ innerStepContext.taskId }}</span>,
+                                currently loaded on this page.
+                            </span>
+                            <span ng-if="!(isWrappingStepTaskOuter || isWrappingStepTaskInner)">
+                                in task <span class="monospace">{{ stepContext.taskId }}</span> which is the one currently loaded on this page.
+                            </span>
                             The other sections on this page pertain specifically to this step.
                         </span>
                         <span ng-if="!isFocusTask">
@@ -144,7 +153,7 @@
                     >.
                 </div>
 
-                <div ng-if="isFocusStep && !isFocusTask && !isErrorHandler" class="space-above">
+                <div ng-if="!isWrappingStepTaskOuter && !isWrappingStepTaskInner && isFocusStep && !isFocusTask && !isErrorHandler" class="space-above">
                     <b>The task currently loaded on this page (<span class="monospace">{{ task.id }}</span>) is for a previous run of this step.</b>
                 </div>
 
@@ -195,7 +204,7 @@
                     <div class="data-row" ng-if="showStepDefinitionInBody"><div class="A">Step Definition</div> <div class="B {{ vm.classForCodeMaybeMultiline(step) }}">{{ vm.yamlOrPrimitive(step) }}</div></div>
 
                     <div ng-if="!isFocusStep || isFocusTask">
-                        <div class="data-row" ng-if="stepContext.otherMetadata" ng-repeat="(key,value) in stepContext.otherMetadata" id="$key">
+                        <div class="data-row" ng-if="otherMetadata" ng-repeat="(key,value) in otherMetadata" id="$key">
                             <div class="A">{{ key }}</div> <div class="B {{ vm.classForCodeMaybeMultiline(value) }}">{{ vm.yamlOrPrimitive(value) }}</div>
                         </div>
 
diff --git a/ui-modules/app-inspector/app/views/main/inspect/effectors/effectors.controller.js b/ui-modules/app-inspector/app/views/main/inspect/effectors/effectors.controller.js
index 10f8f2f..61123e8 100644
--- a/ui-modules/app-inspector/app/views/main/inspect/effectors/effectors.controller.js
+++ b/ui-modules/app-inspector/app/views/main/inspect/effectors/effectors.controller.js
@@ -18,6 +18,7 @@
  */
 import {HIDE_INTERSTITIAL_SPINNER_EVENT} from 'brooklyn-ui-utils/interstitial-spinner/interstitial-spinner';
 import template from "./effectors.template.html";
+import jsyaml from 'js-yaml';
 
 function EffectorsController($scope, $stateParams, $location, entityApi) {
     $scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
@@ -49,7 +50,11 @@
             const effectorHint = (entityTags || []).map(t => t['ui-effector-hints']).find(t => t);
             vm.effectors = response.data.map(function (effector) {
                 effector.parameters.map(function (parameter) {
+                    // populate this for invocation
                     parameter.value = parameter.defaultValue;
+                    if (parameter.value!=null && typeof parameter.value === 'object') {
+                        parameter.value = jsyaml.dump(parameter.value).trim();
+                    }
                     return parameter;
                 });
                 return effector;