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 e8fc8083c85d6463b9e8541f900a0a56914bcf61
Author: Alex Heneveld <[email protected]>
AuthorDate: Mon Aug 22 15:58:28 2022 +0100

    allow priority to be set on parameter, and used for config even if locally 
set
---
 .../app/components/spec-editor/spec-editor.directive.js     |  4 ++--
 .../app/components/spec-editor/spec-editor.less             |  6 ++++++
 .../app/components/spec-editor/spec-editor.template.html    | 13 +++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git 
a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js
 
b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js
index a83970f5..adc1dbfb 100644
--- 
a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js
+++ 
b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js
@@ -55,9 +55,9 @@ export const CONFIG_FILTERS = [
         id: 'suggested',
         label: 'Suggested',
         icon: 'plus-circle',
-        hoverText: 'Show config keys that marked as pinned or priority',
+        hoverText: 'Show config keys that are marked as pinned or priority',
         filter: (item)=> {
-            return item.pinned && item.priority > -1;
+            return item.pinned && (!item.priority || item.priority > -1);
         }
     },
     {
diff --git 
a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less 
b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
index 9fba5889..b19d94bf 100644
--- a/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
+++ b/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
@@ -643,6 +643,12 @@ spec-editor {
     .input-group .btn {
       padding: 3px 6px 2px 6px;
     }
+    .input-group input[type='checkbox'] {
+      height: 17px;
+      width: min-content;
+      margin: 5px 0px;
+      box-shadow: none;
+    }
     .form-control {
       padding: 3px 6px;
       height: 27px;
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 a60f6d1f..cdc5a811 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
@@ -272,6 +272,19 @@
                                     </textarea>
                                 </span>
                             </div>
+                            <div class="param-field"> <span 
class="param-field-label">Pinned
+                                <i class="fa fa-fw fa-info-circle" 
popover-trigger="'mouseenter'"
+                                   uib-popover="Optional flag that this 
parameter should be pinned as a suggested parameter in the UI"
+                                   x-popover-class="spec-editor-popover"
+                                   popover-placement="top-left" 
popover-append-to-body="true"></i>
+                              </span>
+                              <span class="param-field-value">
+                                <input type="checkbox" 
ng-model="filteredParams[$index].pinned" class="form-control rounded-edge" 
id="pinned-{{item.name}}"
+                                          
ng-focus="specEditor.recordParameterFocus(item)"
+                                          
on-enter="specEditor.advanceOutToFormGroupInPanel">
+                                </input>
+                              </span>
+                            </div>
                             <div class="param-field"> <span 
class="param-field-label">Constraints
                                     <i class="fa fa-fw fa-info-circle" 
popover-trigger="'mouseenter'"
                                            uib-popover="Constraints such as 
&quot;required&quot; or &quot;forbiddenUnless(otherKey)&quot;, expressed as a 
JSON list (wrapped in square brackets and double quotes)"

Reply via email to