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 44fa162860b33140cb0ebc08259c4f63f5335be7 Author: Alex Heneveld <[email protected]> AuthorDate: Tue Apr 27 22:40:41 2021 +0100 show the internal ID where useful to disambiguate --- .../blueprint-composer/app/components/quick-fix/quick-fix.js | 1 - .../app/components/spec-editor/spec-editor.template.html | 4 ++-- .../app/views/main/graphical/graphical.state.html | 6 ++---- .../blueprint-composer/app/views/main/graphical/graphical.state.js | 7 +++++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ui-modules/blueprint-composer/app/components/quick-fix/quick-fix.js b/ui-modules/blueprint-composer/app/components/quick-fix/quick-fix.js index 12c09af..1ee28cb 100644 --- a/ui-modules/blueprint-composer/app/components/quick-fix/quick-fix.js +++ b/ui-modules/blueprint-composer/app/components/quick-fix/quick-fix.js @@ -166,7 +166,6 @@ function proposeSetFrom() { if (r.test(c.name)) contenders[c.name] = true; }); } - console.log("result of regex at", ckey_regex, sourceNode, contenders); if (!Object.keys(contenders).length) { // no proposal available (cannot create) diff --git a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html index bfe3616..36a2ccb 100644 --- a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html +++ b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html @@ -34,7 +34,7 @@ </div> </div> - <p ng-if="!model.hasParent()"><input class="form-control editable spec-id" ng-model="model.id" placeholder="No reference ID" blur-on-enter /></p> + <p ng-if="!model.hasParent()"><input class="form-control editable spec-id" ng-model="model.id" placeholder="{{ model._id }} (reference ID not set)" blur-on-enter /></p> <div class="media" ng-if="model.hasParent()"> <div class="media-left"> @@ -52,7 +52,7 @@ </div> <div ng-if="['POLICY', 'ENRICHER'].indexOf(model.family.id) === -1" class="identifier"> <i class="fa fa-id-card-o panel-header-icon"></i> - <input class="form-control editable" ng-model="model.id" placeholder="(no reference ID)" blur-on-enter /> + <input class="form-control editable" ng-model="model.id" placeholder="{{ model._id }} (reference ID not set)" blur-on-enter /> </div> <md-if-oneline ng-show="specEditor.descriptionVisible && modelDescription.isNonMultiline" data="modelDescription"></md-if-oneline> </div> diff --git a/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.html b/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.html index b91e673..ed70f2a 100644 --- a/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.html +++ b/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.html @@ -106,8 +106,7 @@ <i class="fa fa-fw fa-times-circle"></i> </div> <div class="error-line-text"> - {{ allIssues.entities[itemK].id ? allIssues.entities[itemK].id + ' ('+allIssues.entities[itemK].type+')' - : allIssues.entities[itemK].type }}: + {{ vm.entitySummary(allIssues.entities[itemK]) }}: {{ itemV.length }} {{ itemV.length==1 ? 'error' : 'errors' }} </div> <div class="error-line-action"> @@ -167,8 +166,7 @@ <i class="fa fa-fw fa-circle"></i> </div> <div class="error-line-text"> - {{ issue.issue.entity.id ? issue.issue.entity.id + ' ('+issue.issue.entity.type+')' - : issue.issue.entity.type }} + {{ vm.entitySummary(issue.issue.entity) }} <!-- could offer the issue-specific quick fixes; but clearer to navigate to entity and do there --> </div> <div class="error-line-action"> diff --git a/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.js b/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.js index 142f1f8..783bd57 100644 --- a/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.js +++ b/ui-modules/blueprint-composer/app/views/main/graphical/graphical.state.js @@ -60,6 +60,13 @@ function graphicalController($scope, $state, $filter, blueprintService, paletteS } this.messageNeedsPrefix = (itemV) => !itemV.message || (""+itemV.message).indexOf(itemV.ref)<0; + this.entitySummary = (entity) => { + return entity.id + ? entity.id + (entity.type ? ' ('+entity.type+')' : '') + : entity.name ? entity.name + (entity.type ? ' ('+entity.type+')' : '') + : entity.type ? entity.type + ' ('+entity._id+')' + : entity._id; + }; this.getOnSelectText = (selectableType) => $scope.canvasSelectedItem ? "Add to " + $filter('entityName')($scope.canvasSelectedItem) : "Add to application"; this.addSelectedTypeToTargetEntity = (selectedType, targetEntity) => {
