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 2018/07/26 10:50:34 UTC

[17/28] brooklyn-ui git commit: This adds the contributed brooklyn-ui-angular code in the folder new/.

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/29927b73/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
----------------------------------------------------------------------
diff --git a/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less b/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
new file mode 100644
index 0000000..1c14c92
--- /dev/null
+++ b/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.less
@@ -0,0 +1,814 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+@right-align-controls: false;
+@lightweight-controls-when-collapsed: true;
+@hide-info-button-when-not-hovered: false;
+@hide-unset-undefault-values: true;
+
+@label-gray: darken(@gray-light, 10%);
+@gray-lightest: #f8f8f9;
+
+spec-editor {
+  display: block;
+  margin-top: 15px;
+  color: @gray;
+
+  .toolbar-button-affordance() {
+    color: mix(@gray, @gray-lighter);
+    cursor: pointer;
+    transition: 0.1s ease all;
+    &:hover {
+      color: @brand-primary;
+    }
+  }
+  .remove-affordance() {
+    .toolbar-button-affordance();
+    &:hover {
+      color: @brand-danger;
+    }
+  }
+
+  .badge-danger {
+    background-color: @brand-danger;
+  }
+
+  .badge-warning {
+    background-color: @brand-warning;
+  }
+
+  input.editable {
+    font-size: inherit;
+    padding: 0.3rem;
+    margin: -0.3rem;
+    border-color: transparent;
+    box-shadow: none;
+    .text-overflow();
+
+    &:hover:not(:focus) {
+      border-color: @gray-lighter;
+    }
+    &::placeholder {
+      font-style: italic;
+      .text-overflow();
+    }
+  }
+
+  .overflow-visible {
+    overflow: visible !important;
+  }
+
+  .panel-header-body {
+    padding-left: 2em;
+    .panel-header-icon {
+      width: 30px;
+      margin-left: -30px;
+      text-align: center;
+    }  
+    .identifier {
+      > * {
+          display: inline-block;
+      }
+      margin-top: -3px;
+    }
+    .identifier .panel-header-icon {
+      font-size: 90%;
+      margin-right: -3px;
+    } 
+    .entity-type-header {
+      font-size: 105%;
+      margin-right: 1em;
+    }
+    .label.version {
+      vertical-align: 2px;
+      line-height: 36px;
+      font-size: 80%;
+    }
+  }
+
+  .spec-adjunct {
+    // used when adding enrichers; also used for config of type entity spec
+    
+    position: relative;
+    margin-top: 15px;
+    &:first-child {
+      margin-top: 0;
+    }
+
+    & > a {
+      position: absolute;
+      top: 0;
+      left: 0;
+      right: 0;
+      bottom: 0;
+    }
+    ng-include  {
+      display: block;
+    }
+
+    .media {
+        height: 60px;
+        img {
+            max-width: 60px;
+            max-height: 60px;
+        }
+        .media-left {
+            padding-right: 9px;
+            padding-left: 3px;
+        }
+        .media-body {
+            vertical-align: middle;
+            border: 1px solid @gray-lighter;
+            padding-left: 12px;
+            border-radius: 4px;
+            height: 60px;
+        }
+    }
+    
+    .remove-spec-adjunct {
+      cursor: pointer;
+      position: absolute;
+      top: 5px;
+      right: 5px;
+      display: none;
+      padding: 8px;
+      .remove-affordance();
+    }
+    .update-spec-adjunct {
+      cursor: pointer;
+      position: absolute;
+      top: 0px;
+      right: 5px;
+      display: none;
+      padding: 8px;
+      color: mix(@gray, @gray-lighter);
+      transition: color 0.1s ease;
+      &:hover {
+        color: @brand-primary;
+      }
+    }
+    
+    &:hover .media-body {
+        background-color: @gray-lighter;
+        .remove-spec-adjunct, .update-spec-adjunct {
+            display: block;  // make visible on hover
+        }
+    }
+  }
+
+  .media {
+    border-width: 0;
+    background-image: none;
+    transition: all 0.3s ease;
+    &.has-issues {
+      border-left: 5px solid @brand-danger;
+      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='@{brand-danger}' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
+    }
+  }
+
+  .spec-type {
+    .panel {
+      padding-top: 3px;
+      padding-bottom: 3px;
+    }
+
+    .spec-type-header {
+      display: flex;
+      .spec-title {
+        flex-grow: 1;
+      }
+      .spec-actions {
+        flex-grow: 0;
+      }
+    }
+
+    .spec-actions {
+      margin-top: -3px;
+      margin-right: -3px;
+
+      button {
+        color: @gray-lighter;
+        transition: color 0.3s ease;
+        &:hover {
+          color: @gray;
+        }
+      }
+    }
+    .spec-title {
+      margin-top: 0;
+    }
+  }
+
+  .spec-type,
+  .spec-configuration,
+  .spec-policies,
+  .spec-enrichers {
+    .media-left {
+      padding-right: 24px;
+    }
+    .media-object {
+      .make-icon(100px);
+    }
+    .media-body {
+      h4, p {
+        .text-overflow();
+      }
+    }
+    p.buttons {
+      margin-top: 24px;
+    }
+  }
+
+  .spec-configuration-add {
+    margin-bottom: 15px;
+  }
+  .spec-configuration {
+    & > div {
+      margin-top: 30px;
+      padding-top: 10px;
+      border-top: 1px solid @gray-lighter;
+
+      &:first-child {
+        margin-top: 0;
+        padding-top: 0;
+        border: none;
+      }
+    }
+
+    .form-group {
+      margin: 9px 0;
+      padding: 4px 8px;
+      border-radius: 3px;
+      background: lighten(@brand-primary, 55%);
+      &.used {
+        background: lighten(@brand-primary, 50%);
+      }
+      &:first-child {
+        margin-top: 6px;
+      }
+      .help-block {
+        margin-bottom: 0;
+      }
+    }    
+    
+    .remove-spec-configuration {
+      margin-left: 0.5em;
+      margin-right: 0.5em;
+      .remove-affordance();
+    }
+    .json-config i {
+        margin-top: 2px; //nudge down to make aligned
+    }
+    .dsl-open-wizard-from-toolbar, .dsl-manual-override-editor, .json-config {
+        .toolbar-button-affordance()
+    }
+    .dsl-manual-override-editor.dsl-viewer-manual-override,
+    .json-config.code-mode-active {
+        i {
+            border: 1px solid @gray-light;
+            background: @brand-primary;
+            color: @gray-lighter;
+        }
+        &:hover i {
+            color: white; //mix(@gray, @gray-lighter);
+            // background: none;
+        }
+        &.code-mode-forced {
+            // use disable cursor (and tooltip) as primary feedback
+            cursor: not-allowed;
+            i {
+                // style changes below subtle but does a bit to make it look less clickable
+                border: 1px solid @gray;
+                color: @gray-light;
+            }
+        }
+    }
+      
+    .control-label {
+      display: flex;
+      align-items: center;
+      font-weight: 100;
+      color: @label-gray;
+      padding-bottom: 1px;  // use padding not margin so hovers are picked up to focus on control
+      margin-bottom: 0;
+
+      .label-spec-configuration {
+        flex-shrink: 1;
+        .text-overflow();
+      }
+
+      .info-spec-configuration {
+        width: 2em;
+        margin-right: 1ex;
+        text-align: center;
+        .fa-info-circle {
+          color: mix(@gray-light, @gray-lighter, 50%);
+          transition: color 0.3s ease;
+          &:hover {
+            color: @brand-primary;
+          }
+        }
+      }
+    }
+    .form-group {
+        display: flex;
+        flex-flow: row wrap;
+        .control-label {
+            flex: 0 0 auto;
+            order: 10;
+            padding-top: 3px;
+        }
+        .label-rhs-buttons {
+            flex: 1 0 auto;
+            text-align: right;
+            order: 20;
+            display: none;
+            .spacer {
+                flex: 1 0 auto;
+            }
+            .remove-spec-configuration {
+                margin-top: 1px;
+            }
+            .dsl-active:not(.dsl-viewer-manual-override) button.btn {
+                color: @brand-primary;
+            }
+        }
+        .control-value {
+            flex: 1 0 auto;
+            line-height: 20px;
+            max-width: 100%;
+            order: 30;
+            &.inline-control {
+                // inline controls - eg boolean button and map button does not go to new line when form-group is focussed
+                order: 15;
+
+                & when (@right-align-controls = true) {
+                    // these should be right aligned when compressed
+                    flex: 0 0 auto;
+                    margin-left: auto;
+                    // this seems to align it with other widgets (text boxes)
+                    margin-right: 2px;
+                }
+            }
+            .btn-group-value {
+                word-break: all;
+            }
+            p.collection-toggle {
+                color: @brand-primary;
+                margin-top: 2px;
+            }
+            &.unset p.collection-toggle {
+                // if it's a default, render gray, like textbox placeholder
+                color: @gray-light;
+            }
+            
+            &.code-mode-active .input-group textarea {
+                font-family: courier;
+            }
+        }
+        .issue {
+            flex-basis: 100%;
+            order: 40;
+        }
+        .control-label .info-spec-configuration when (@hide-info-button-when-not-hovered = true) {
+            visibility: hidden;
+        }
+        .btn-group,
+        .input-group {
+            width: 100%;
+        }
+        .input-group {
+            .dsl-wizard-button {
+                max-width: 0;
+                width: 0;
+                overflow: hidden;
+            }
+        }
+        .btn-group {
+            .dsl-wizard-button {
+                width: auto;
+            }
+        }
+        &:not(:focus-within):not(:focus) {
+            input {
+                // the RHS is square if DSL button hidden; simplest fix is to make LHS square too
+                border-radius: 0;
+            }
+            textarea {
+              max-height: @input-height-base * 2;
+            }
+            .boolean .btn-group > :not(.active) {
+                display: none;
+                border-radius: 0;
+                cursor: pointer;
+            }
+        }
+    }
+    .form-group:hover, .form-group:focus, .form-group:focus-within {
+        .control-label .info-spec-configuration {
+            visibility: visible;
+        }
+    }
+    .form-group:focus, .form-group:focus-within {
+        .control-value:not(.inline-control) {
+            flex-basis: 100%;
+        }
+        .label-rhs-buttons {
+            display: flex;
+        }
+        .input-group {
+            .dsl-wizard-button {
+                max-width: none;
+                width: 1%;
+            }
+        }
+        .caret-default:before {
+            content: "\f0d8";  // fa-caret-up
+        }
+        .control-value {
+            .input-group, dsl-viewer {
+                margin-top: 3px;
+            }
+        }
+    }
+    .form-group:not(:focus):not(:focus-within) {
+        .control-value.unset:not(.has-default),
+        .control-value.unset.has-default p.collection-toggle:not(.has-default) {
+            & when (@hide-unset-undefault-values = true) {
+                display: none;
+            }
+        }
+        input, select {
+            cursor: pointer;
+            // the RHS for input is square if DSL button hidden; simplest fix is to make LHS square too
+            // would be nice if applies to select also, but it doesn't
+            border-radius: 0;
+        }
+        .boolean .btn-group {
+            > .active {
+                border-radius: 0;
+                pointer: cursor;
+            }
+            > :not(.active) {
+                display: none;
+            }
+        }
+        .default-collapse {
+            &:extend(.collapse all);
+        }
+        .caret-default:before {
+            content: "\f0d7";  // fa-caret-down
+        }
+        .collection-item.collection-add.nonempty {
+            display: none;
+        }
+
+        & when (@right-align-controls = true) {       
+            .inline-control, div.collection:not(.open-when-unfocused) {
+                margin-right: 2px;
+            }
+            div.collection:not(.open-when-unfocused) {
+                // right-align when unfocused and tree-collapsed, as for inline control above
+                flex: 0 0 auto;
+                margin-left: auto;
+                // also make min width so right-align takes effect
+                width: min-content;
+                p.collection-toggle {
+                    white-space: nowrap;
+                }
+            }
+        }
+        & when (@lightweight-controls-when-collapsed = true) {
+          input, select {
+            box-shadow: none;
+            border-top: none;
+            border-right: none;
+            border-left: none;
+            border-image: initial;
+            border-bottom: none; //or for an underline effect, 1px solid @gray-light;
+            border-radius: 0;
+            padding-bottom: 0px;
+            background: none;
+            height: auto;
+            margin-top: 2px;
+            margin-bottom: 2px;
+            color: mix(@brand-primary, @gray);
+          }
+          select {
+            padding-bottom: 1px;
+          }
+        }
+    }
+    .form-group .collection-caret {
+        width: 2ex;
+        margin-left: -0.5ex;
+        text-align: center;
+    }
+    
+    .no-spec {  // spec needs to be selected
+      border: 3px dashed @gray-lighter;
+      padding: 3px;
+      display: block;
+      color: @gray;
+      opacity: 0.5;
+      font-style: italic;
+      transition: background-color 0.1s ease;
+      &:hover {
+        background-color: @gray-lighter;
+      }
+    }
+
+    .table-responsive {
+      margin: 0;
+      border-bottom: none;
+      .table {
+        margin-bottom: 0;
+      }
+      tr > td:nth-child(2) {
+        min-width: 300px;
+      }
+    }
+    .input input,
+    .input button {
+      border-radius: 0;
+    }
+    .input-group .btn {
+      padding: 3px 6px 2px 6px;
+    }
+    .form-control {
+      padding: 3px 6px;
+      height: 27px;
+    }
+    input, select {
+        border: 1px solid @gray-lighter;
+    }
+    input {
+        height: inherit;
+        padding-top: 1px;
+        padding-bottom: 1px;
+        .placeholder(@rules) {
+            &::placeholder { @rules(); }
+            &::-webkit-input-placeholder { @rules(); }
+            &:-moz-placeholder { @rules(); }
+            &::-moz-placeholder { @rules(); }
+            &:-ms-input-placeholder { @rules(); }
+        }
+        .placeholder({ 
+            color: @gray;
+            opacity: 0.5;
+            font-style: italic;
+        });
+    }
+    textarea.auto-grow-single-row {
+        // for single-line entries (no newlines) we don't do autosize -
+        // it's not hard, see https://stackoverflow.com/questions/454202/creating-a-textarea-with-auto-resize - 
+        // and maybe we should, but for now we only autogrow with newlines (see autogrow/index.js).
+        // but wrapping at line end instead of word boundaries is a bit better.
+        word-break: break-all;
+    }
+    textarea.auto-grow-multi-row {
+        // multi-line entries shouldn't wrap
+        white-space: nowrap;
+    }
+
+    .collapsing {  transition: height 0.15s; }
+
+    .boolean {
+      .btn-group-value {
+        margin-top: 5px;
+        font-size: 0.9em;
+        color: @gray;
+        .text-overflow();
+      }
+    }
+
+    .collection {
+      margin-left: 3px;
+      
+      .collection-toggle {
+        cursor: pointer;
+        color: @gray-light;
+        font-weight: 100;
+        font-style: italic;
+        font-size: 0.85em;
+        margin-bottom: 0.1em;
+      }
+
+      .collection-list,
+      .collection-map {
+        margin-left: 0.2em;
+        margin-bottom: 0;
+        border-left: 1px dotted @gray-light;
+        padding-left: 0em;
+        list-style: none;
+
+        .collection-item {
+          margin-left: 0;
+          padding: 0.2em 0 0.2em 0.1em;
+          display: flex;
+          &.collection-add {
+            padding-top: 0.3em;
+            padding-left: 0.4em;
+          }
+
+          .collection-item-shrink {
+            flex-shrink: 0;
+          }
+          .collection-item-grow {
+            flex-grow: 1;
+            span.input-group {
+                display: flex;
+                input {
+                  width: 120px;  // overridden by flex, but allows it to compress when not focused
+                  flex-grow: 1;
+                }
+                .dsl-wizard-button {
+                  width: auto;
+                }
+            }
+          }
+
+          .input-group {
+            margin-top: -0.23em;
+          }
+
+          .remove-spec-configuration {
+            margin-left: 0.2em;
+            margin-right: -0.2em;
+          }
+        }
+      }
+      .collection-list .collection-item-shrink {
+        margin-right: 0.3em;
+      }
+      .collection-map {
+        li {
+          display: flex;
+
+          .collection-map-key {
+            font-family: monospace;
+            &:after {
+              content: ':';
+              padding-left: 0.2em;
+            }
+            margin-right: 0.2em;
+          }
+        }
+      }
+    }
+    .form-group {  
+        // apply these to true/false toggle, but not to "display all configuration" button
+        button.btn,
+        a.btn {
+            color: @label-gray;
+        }
+        .btn-success:active, .btn-success.active,
+        .btn-success:active:hover, .btn-success.active:hover, 
+        .btn-success:active:focus, .btn-success.active:focus {
+            // true/false buttons
+            color: #fff;
+            background-color: @brand-primary;
+            border-color: @gray;
+        }
+
+    }
+    
+  }
+
+  .spec-empty-state {
+    color: @gray-light;
+    text-align: center;
+
+    h4 {
+      margin-top: 0;
+      &:before {
+        display: block;
+        font-family: FontAwesome;
+        font-size: 4em;
+        margin-bottom: 0.25em;
+        color: @gray-lighter;
+      }
+    }
+  }
+  .spec-configuration .spec-empty-state h4:before {
+    // fa-sliders => http://fontawesome.io/icon/sliders/
+    content: '\f1de';
+  }
+  .spec-location .spec-empty-state h4:before {
+    // fa-map-pin => http://fontawesome.io/icon/map-pin/
+    content: '\f276';
+  }
+  .spec-policies .spec-empty-state h4:before {
+    // fa-heartbeat => http://fontawesome.io/icon/heartbeat/
+    content: '\f21e';
+  }
+  .spec-enrichers .spec-empty-state h4:before {
+    // fa-puzzle-piece => http://fontawesome.io/icon/puzzle-piece/
+    content: '\f12e';
+  }
+
+  .spec-toolbar-action, 
+  .panel-group .panel-title > a span.spec-toolbar-action {
+    // copied from log-action styling in stream.less; should refactor to share code.
+    // but because that is on darker gray it is lightened 20%; this is not
+    @base-color: @brand-primary;
+    .fa {
+      color: desaturate(@base-color, 40%);
+      transition: 0.3s color ease;
+    }
+    &:hover .fa  {
+      color: lighten(desaturate(@base-color, 40%), 10%);
+    }
+    &.active .fa {
+      color: @base-color
+    }
+    &.active:hover .fa {
+      color: desaturate(@base-color, 20%);
+    }
+  }
+  
+  .spec-configuration-filters,
+  .spec-configuration-add {
+    background: @gray-lighter;
+    border: 1px solid @gray-light;
+    transition: 0.15s ease all;
+    padding: 0.5em;
+    margin-top: -12px;
+    margin-bottom: 24px;
+
+    legend {
+      color: @gray;
+      width: inherit;
+      margin: 0;
+      font-size: 1em;
+      border: none;
+      padding: 0 0.5em 0 0.5em;
+    }
+
+    .spec-configuration-filters-categories {
+      overflow: hidden;
+      list-style: none;
+      padding: 0;
+      li {
+        cursor: pointer;
+        &:not(:first-child) {
+          margin-left: 1.5em;
+        }
+        .filter-checkbox {
+          width: 1em;
+        }
+        &.disabled {
+          color: @gray-light;
+          cursor: inherit;
+        }
+      }
+      color: @gray;
+    }
+  }
+  .spec-configuration-filters .form-group {
+    margin-bottom: 5px;
+    &:last-child {
+      margin-bottom: 0;  // get padding from parent
+    }
+    > ul {
+      margin-left: 2px;
+      margin-right: auto;
+      margin-bottom: 0;
+    }
+  }
+  a.open-entity-spec {
+    cursor: alias;
+  }
+}
+
+.popover.spec-editor-popover {
+    margin-left: -0.62em;
+    max-width: 320px;
+}
+
+.config-item-quick-info {
+     &:extend(.catalog-selector-popover .palette-item-quick-info all);
+     .config-type { margin-left: 1em; }
+     .config-required { font-style: italic; }
+}
+dsl-viewer {
+    a {
+        cursor: alias;
+    }
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/29927b73/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html
----------------------------------------------------------------------
diff --git a/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html b/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html
new file mode 100644
index 0000000..b305651
--- /dev/null
+++ b/new/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html
@@ -0,0 +1,483 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- ENTITY TYPE -->
+<section class="spec-type container-fluid panel-group">
+  <div class="panel">
+    <div class="spec-type-header">
+        <h2 class="spec-title"><input class="form-control editable" ng-model="model.name" placeholder="{{model.miscData.get('typeName') || 'Unnamed ' + (!model.hasParent() ? 'application' : model.family.displayName)}}" blur-on-enter /></h2>
+
+        <div class="btn-group pull-right spec-actions" ng-if="model.hasType()" uib-dropdown>
+            <button id="spec-actions" type="button" class="btn btn-link" uib-dropdown-toggle>
+                <span class="fa fa-bars"></span>
+            </button>
+            <ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="spec-actions">
+                <li role="menuitem"><a ng-href="/brooklyn-ui-catalog/#!/bundles/{{model.miscData.get('bundle').symbolicName}}/{{model.miscData.get('bundle').version}}/types/{{model.type}}/{{model.version || 'latest'}}" target="_blank">Open in Catalog</a></li>
+                <li role="separator" class="divider"></li>
+                <li role="menuitem"><a href ng-click="removeEntity()"><span class="text-danger">Delete</span></a></li>
+            </ul>
+        </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>
+
+    <div class="media" ng-if="model.hasParent()">
+        <div class="media-left">
+            <img ng-src="{{model.icon}}" alt="{{model | entityName}} logo" class="media-object" />
+        </div>
+        <div class="media-body panel-header-body">
+            <div title="{{ model.miscData.get('typeName') }}"><i class="fa fa-bookmark panel-header-icon"></i><samp class="entity-type-header">{{model.type}}</samp> <span class="label label-primary version">{{model | entityVersion}}</span></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 />
+                </div>
+        </div>
+    </div>
+  </div>
+</section>
+
+<!-- ENTITY CONFIGURATION -->
+<br-collapsible state="state.config.open">
+    <heading>
+        Configuration
+        <span ng-if="getConfigIssues().length> 0" class="badge" ng-class="getBadgeClass(getConfigIssues())">{{getConfigIssues().length}}</span>
+        <span class="pull-right" ng-show="$parent.stateWrapped.state">
+            <span class="spec-toolbar-action" ng-class="{'active': state.config.filter.open}"><i class="fa fa-filter collapsible-action" title="Filter configuration" ng-click="$event.stopPropagation(); $event.preventDefault(); state.config.filter.open = !state.config.filter.open" ng-class="{'text-info': state.config.search.length > 0}"></i></span>
+            <span class="spec-toolbar-action"><i class="fa fa-plus collapsible-action" title="Add configuration" ng-click="$event.stopPropagation(); $event.preventDefault(); state.config.add.open = !state.config.add.open"></i></span>
+        </span>
+    </heading>
+
+    <fieldset uib-collapse="!state.config.filter.open" class="spec-configuration-filters">
+        <div class="form-group">
+            <input ng-model="state.config.search" type="text" class="form-control" placeholder="Search for config key by name" auto-focus="state.config.filter.open" blur-on-enter />
+        </div>
+        <div class="form-group">
+            <ul class="spec-configuration-filters-categories">
+                <li ng-repeat="filter in filters.config track by filter.id"
+                    ng-class="{ 'disabled': isFilterDisabled(filter) }"
+                    ng-click="onFilterClicked(filter)"
+                    class="pull-left">
+                    <i class="filter-checkbox fa" ng-class="{'fa-check-square-o': state.config.filter.values[ filter.id ], 'fa-square-o': !state.config.filter.values[ filter.id ]}"></i> {{filter.label}}
+                </li>
+            </ul>
+        </div>
+    </fieldset>
+
+    <fieldset uib-collapse="!state.config.add.open" class="spec-configuration-add">
+        <legend>Add config key</legend>
+
+        <input auto-focus="state.config.add.open"
+             type="text"
+             autocomplete="off"
+             ng-model="state.config.add.value"
+             placeholder="Add a new configuration key"
+             class="form-control"
+             uib-typeahead="config.name for config in state.config.add.list | filter:{name:$viewValue}"
+             typeahead-template-url="ConfigItemTemplate.html"
+             typeahead-editable="true"
+             typeahead-show-hint="true"
+             typeahead-min-length="0"
+             typeahead-select-on-blur="true"
+             typeahead-on-select="onFocusOnConfig($item, $model, $label, $event)"
+             typeahead-no-results="noResults"
+             blur-on-enter />
+
+        <div ng-if="state.config.add.value.length > 0 && noResults" uib-dropdown uib-dropdown-toggle auto-close="disabled" is-open="true">
+            <ul class="dropdown-menu">
+                <li><a ng-click="addConfigKey()">
+                    <div class="dropdown-item">
+                        <div class="details">
+                            <h4 class="dropdown-item-heading repo-name truncate">
+                                <span ng-bind-html="state.config.add.value | uibTypeaheadHighlight:state.config.add.value"></span>
+                            </h4>
+                            <p class="dropdown-item-subheading version truncate">Click to add the new config key</p>
+                        </div>
+                    </div>
+                </a></li>
+            </ul>
+        </div>
+    </fieldset>
+
+    <div class="spec-configuration">
+        <div class="spec-empty-state" ng-if="filteredItems.length === 0">
+          <div ng-if="model.miscData.get('config').length === 0">
+            <h4>No configuration</h4>
+          </div>
+          <div ng-if="model.miscData.get('config').length > 0">
+            <h4>No matching configuration</h4>
+            <p class="buttons">
+                <button class="btn btn-sm btn-default" ng-if="state.config.search.length > 0" ng-click="state.config.search = ''">Clear search</button>
+                <button class="btn btn-sm btn-success" ng-if="!state.config.filter.values.all" ng-click="state.config.filter.values.all = true">
+                    <i class="fa fa-filter"></i> Display all config options
+                </button>
+            </p>
+          </div>
+        </div>
+
+        <form name="formSpecConfig" novalidate class="lightweight">
+            <div ng-repeat="item in (filteredItems = (model.miscData.get('config') | specEditorConfig:state.config.filter.values:model.config | filter:{name:state.config.search} | orderBy:+priority)) track by item.name ">
+                <div class="form-group" ng-class="{'has-error': (model.issues | filter:{ref: item.name}:true).length > 0, 'used': config[item.name] !== undefined}" ng-switch="getConfigWidgetMode(item)" tabindex="1"
+                        auto-focus="state.config.focus === item.name"
+                        auto-focus-listen-to-window="true"
+                        auto-focus-not-if-within="true"
+                        ng-focus="recordFocus(item)"
+                        on-enter="advanceControlInFormGroup">
+                    <label class="control-label" for="{{item.name}}">
+                        <span class="label-spec-configuration">{{item.label || item.name}}</span>
+                        <span class="info-spec-configuration">
+                           <i class="fa fa-fw fa-info-circle" popover-trigger="'mouseenter'"
+                               popover-title="{{item.label || item.name}}"
+                               uib-popover-template="'ConfigInfoTemplate.html'"
+                               popover-class="spec-editor-popover" popover-placement="top-left" popover-append-to-body="true"></i>
+                        </span>
+                    </label>
+                    
+                    <span class="label-rhs-buttons">
+                        <span class="spacer"> </span>
+                        <span class="json-config" ng-class="{'code-mode-active': state.config.codeModeActive[item.name], 'code-mode-forced': state.config.codeModeForced[item.name]}" ng-if="isCodeModeAvailable(item)">
+                            <i class="fa fa-fw fa-code" ng-click="codeModeClick(item)" aria-hidden="true" title="{{getJsonModeTitle(item.name)}}"></i>
+                            <span class="sr-only">{{getJsonModeTitle(item.name)}}</span>
+                        </span>
+                        <span ng-if="isDsl(item.name)">
+                            <span class="dsl-open-wizard-from-toolbar" ng-if="!state.config.dslViewerManualOverride[item.name]">
+                                <i class="fa fa-fw fa-bolt" ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name})" aria-hidden="true" title="Open in DSL editor [{{item.name}}]"></i>
+                                <span class="sr-only">Open in DSL editor [{{item.name}}]</span>
+                            </span>
+                            <span class="dsl-manual-override-editor" ng-class="{ 'dsl-viewer-manual-override': state.config.dslViewerManualOverride[item.name] }">
+                                <i class="fa fa-fw fa-pencil" ng-click="state.config.dslViewerManualOverride[item.name] = !state.config.dslViewerManualOverride[item.name]" aria-hidden="true" title="Edit DSL code [{{item.name}}]"></i>
+                                <span class="sr-only">Edit DSL code [{{item.name}}]</span>
+                            </span>
+                        </span>
+                        <span class="remove-spec-configuration" ng-if="config[item.name] !== undefined">
+                            <i class="fa fa-fw fa-eraser" ng-click="model.removeConfig(item.name)" aria-hidden="true" title="Clear configuration [{{item.name}}]"></i>
+                            <span class="sr-only">Clear configuration [{{item.name}}]</span>
+                        </span>
+                    </span>
+                    
+                    <div class="control-value" ng-class="{ 'inline-control': item.widgetMode==='boolean', 'unset': !defined(config[item.name]), 'has-default': defined(item.defaultValue) && item.defaultValue!=null, 'code-mode-active': state.config.codeModeActive[item.name] }">
+                        <div ng-switch-when="boolean" class="boolean">
+                            <div class="btn-group btn-block" role="group">
+                                <button type="button" class="btn btn-xs btn-default" ng-class="{'btn-success active': config[item.name] === false, 'active': config[item.name] === undefined && item.defaultValue === false}" ng-click="config[item.name] = false" ng-focus="recordFocus(item)">false</button>
+                                <button type="button" class="btn btn-xs btn-default" ng-class="{'btn-success active': config[item.name] === true, 'active': config[item.name] === undefined && item.defaultValue === true}" ng-click="config[item.name] = true" ng-focus="recordFocus(item)">true</button>
+                                <span class="input-group-btn dsl-wizard-button" ng-if="isDslWizardButtonAllowed(item.name)">
+                                    <a ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name})" class="btn btn-xs btn-default" ng-class="{'btn-success active': config[item.name].length > 0}" title="Open in DSL editor" ng-focus="recordFocus(item)"><i class="fa fa-bolt"></i></a>
+                                </span>
+                            </div>
+                        </div>
+
+                        <select ng-switch-when="java.lang.Enum"
+                                ng-model="config[item.name]"
+                                ng-options="s.value as (s.description + (item.defaultValue === s.value ? ' --- default' : '')) for s in item.possibleValues"
+                                ng-focus="recordFocus(item)"
+                                class="form-control"
+                                name="{{item.name}}"
+                                id="{{item.name}}"></select>
+
+                        <div ng-switch-when="map" 
+                                ng-init="expandMode = 'default'" class="collection"
+                                ng-class="{ 'open-when-unfocused': expandMode=='open' }">
+                            <p class="collection-toggle" ng-click="expandMode = cycleExpandMode(expandMode, 'map', item, state)" ng-focus="recordFocus(item)"
+                                    ng-class="{ 'has-default': item.defaultValue && getObjectSize(item.defaultValue) }">
+                                <i class="fa collection-caret" ng-class="{'fa-caret-square-o-down': expandMode=='closed', 'fa-caret-square-o-up': expandMode=='open', 'caret-default': expandMode=='default' }" aria-hidden="true" title="{{expandMode=='closed' ? 'Unpin' : expandMode=='open' ? 'Close (pin)' : 'Open (pin)'}} map"></i>
+                                <span class="sr-only">{{expandMode=='closed' ? 'Unpin' : expandMode=='open' ? 'Close (pin)' : 'Open (pin)'}} map</span>
+                                <ng-pluralize count="getObjectSize(config[item.name])"
+                                              when="{'0': 'No entries',
+                                            'one': '{} entry',
+                                            'other': '{} entries'}"></ng-pluralize>
+                                <span ng-if="!defined(config[item.name]) && getObjectSize(item.defaultValue)">
+                                    (default <ng-pluralize count="getObjectSize(item.defaultValue)"
+                                              when="{'0': 'no entries',
+                                        'one': '{} entry',
+                                        'other': '{} entries'}"></ng-pluralize>)
+                                </span>
+                            </p>
+                            <ul class="collection-map" 
+                                    ng-class="{'default-collapse': expandMode=='default', 'collapse': expandMode=='closed'}">
+                                <li ng-repeat="(mapKey, mapValue) in config[item.name] track by mapKey" class="collection-item">
+                                    <span class="collection-item-shrink collection-map-key">
+                                        <i ng-click="onDeleteMapProperty(config[item.name], mapKey)" class="fa fa-fw fa-times remove-spec-configuration" aria-hidden="true" title="Remove property [{{mapKey}}]"></i>
+                                        <span class="sr-only">Remove property [{{mapKey}}]</span>
+                                        {{mapKey}}
+                                    </span>
+                                    <div class="collection-item-grow">
+                                        <span class="input-group">
+                                            <input type="text" ng-model="config[item.name][mapKey]" class="form-control" placeholder="(empty)" 
+                                                    ng-focus="recordFocus(item)"
+                                                    on-enter="advanceControlInFormGroup" />
+                                            <span class="input-group-btn dsl-wizard-button" ng-if="isDslWizardButtonAllowed(item.name, mapKey)">
+                                                <a ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name, index: mapKey})" class="btn btn-default" title="Open in DSL editor"><i class="fa fa-bolt"></i></a>
+                                            </span>
+                                        </span>
+                                    </div>
+                                </li>
+                                <li class="collection-item collection-add" ng-class="{'nonempty': nonempty(config[item.name])}">
+                                    <input ng-model="newKey" type="text" placeholder="Add property key" class="form-control" 
+                                        ng-focus="recordFocus(item)"
+                                        on-enter="advanceOutToFormGroupInPanel" ng-blur="onAddMapProperty(item.name, newKey, $event); newKey = '';" required />
+                                </li>
+                            </ul>
+                        </div>
+
+                        <div ng-switch-when="array" ng-switch-when-separator="|" 
+                                ng-init="expandMode = 'default'" class="collection"
+                                ng-class="{ 'open-when-unfocused': expandMode=='open' }">
+                            <p class="collection-toggle" ng-click="expandMode = cycleExpandMode(expandMode, 'map', item, state)" ng-focus="recordFocus(item)"
+                                    ng-class="{ 'has-default': item.defaultValue && item.defaultValue.length }">
+                                <i class="fa collection-caret" ng-class="{'fa-caret-square-o-down': expandMode=='closed', 'fa-caret-square-o-up': expandMode=='open', 'caret-default': expandMode=='default' }" aria-hidden="true" title="{{expandMode=='closed' ? 'Unpin' : expandMode=='open' ? 'Close (pin)' : 'Open (pin)'}} list"></i>
+                                <span class="sr-only">{{expandMode=='closed' ? 'Unpin' : expandMode=='open' ? 'Close (pin)' : 'Open (pin)'}} list</span>
+                                <ng-pluralize count="config[item.name] ? config[item.name].length : 0"
+                                              when="{'0': 'No entries',
+                                        'one': '{} entry',
+                                        'other': '{} entries'}"></ng-pluralize>
+                                <span ng-if="!defined(config[item.name]) && item.defaultValue && item.defaultValue.length">
+                                    (default <ng-pluralize count="item.defaultValue.length"
+                                              when="{'0': 'no entries',
+                                        'one': '{} entry',
+                                        'other': '{} entries'}"></ng-pluralize>)
+                                </span>
+                            </p>
+                            <ul class="collection-list"
+                                    ng-class="{'default-collapse': expandMode=='default', 'collapse': expandMode=='closed'}">
+                                <li ng-repeat="value in config[item.name] track by $index" class="collection-item">
+                                    <span class="collection-item-shrink">
+                                        <i ng-click="onDeleteListItem(config[item.name], $index)" class="fa fa-fw fa-times remove-spec-configuration" aria-hidden="true" title="Remove item [{{value}}]"></i>
+                                        <span class="sr-only">Remove item [{{value}}]</span>
+                                    </span>
+                                    <div class="collection-item-grow">
+                                        <span class="input-group">
+                                            <input type="text" ng-model="config[item.name][$index]" class="form-control" placeholder="(empty)" 
+                                                    ng-focus="recordFocus(item)"
+                                                    on-enter="advanceControlInFormGroup" />
+                                            <span class="input-group-btn dsl-wizard-button" ng-if="isDslWizardButtonAllowed(item.name, $index)" ng-focus="recordFocus(item)">
+                                                <a ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name, index: $index})" class="btn btn-default" title="Open in DSL editor"><i class="fa fa-bolt"></i></a>
+                                            </span>
+                                        </span>
+                                    </div>
+                                </li>
+                                <li class="collection-item collection-add" ng-class="{'nonempty': config[item.name].length>0}">
+                                    <span class="input-group">
+                                        <input ng-model="newItem" type="text" placeholder="Add item" class="form-control" auto-focus="expandMode != 'closed'" 
+                                            ng-focus="recordFocus(item)"
+                                            on-enter="advanceOutToFormGroupInPanel" ng-blur="onAddListItem(item.name, newItem, $event, $element); newItem = '';" required />
+                                        <span class="input-group-btn dsl-wizard-button" ng-if="isDslWizardButtonAllowed(item.name, -1)">
+                                            <a ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name, index: config[item.name].length})" class="btn btn-default" title="Open in DSL editor"><i class="fa fa-bolt"></i></a>
+                                        </span>
+                                    </span>
+                                </li>
+                            </ul>
+                        </div>
+
+                        <div ng-switch-when="org.apache.brooklyn.api.entity.EntitySpec" ng-init="adjunct = config[item.name][REPLACED_DSL_ENTITYSPEC]">
+                            <div class="spec-adjunct" ng-if="config[item.name][REPLACED_DSL_ENTITYSPEC]">
+                                <a ui-sref="main.graphical.edit.spec({entityId: model._id, specId: adjunct._id})"
+                                            class="open-entity-spec"
+                                            title="Open in spec editor"
+                                            ng-focus="recordFocus(item)"></a>
+                                <ng-include src="'AdjunctTemplate.html'"></ng-include>
+                            </div>
+                            <a ng-if="!config[item.name][REPLACED_DSL_ENTITYSPEC]" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'spec', configKey: item.name})" class="no-spec">
+                                (no spec set)
+                            </a>
+                        </div>
+
+                        <div class="input-group" ng-switch-default>
+                            <textarea ng-model="config[item.name]" class="form-control" name="{{item.name}}" id="{{item.name}}" auto-grow
+                                      placeholder="{{defined(config[item.name]) ? null : item.defaultValue=='' || item.defaultValue==null ? '(empty)' : item.defaultValue}}"
+                                      ng-focus="recordFocus(item)" on-enter="advanceOutToFormGroupInPanel"></textarea>
+                            <span class="input-group-btn dsl-wizard-button" ng-if="isDslWizardButtonAllowed(item.name)">
+                                <a ui-sref="main.graphical.edit.dsl({entityId: model._id, for: item.name})" class="btn btn-default" title="Open in DSL editor"><i class="fa fa-bolt"></i></a>
+                            </span>
+                        </div>
+
+                        <dsl-viewer dsl="model.config.get(item.name)" ng-switch-when="dsl-viewer"></dsl-viewer>
+                        
+                    </div>
+                    
+                    <small ng-repeat="issue in model.issues | filter:{ref: item.name}:true" class="help-block issue" ng-bind-html="issue.message"></small>
+                </div>
+            </div>
+        </form>
+    </div>
+</br-collapsible>
+
+<!-- ENTITY LOCATION -->
+<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.location.open">
+    <heading>
+        Location
+        <span ng-if="(model.issues | filter:{group:'location'}).length> 0" class="badge" ng-class="getBadgeClass((model.issues | filter:{group:'location'}))">{{(model.issues | filter:{group:'location'}).length}}</span>
+    </heading>
+
+    <div class="spec-location">
+        <div ng-repeat="issue in model.issues | filter:{group:'location'}" class="alert" ng-class="{'alert-warning': issue.level.id === 'warn', 'alert-danger': issue.level.id === 'error'}" role="alert">
+            <span ng-bind-html="issue.message"></span>
+        </div>
+        <div class="spec-empty-state" ng-if="!model.hasLocation()">
+            <h4>No location attached</h4>
+            <p ng-if="!model.hasLocation() && model.hasInheritedLocation()">However, location <strong class="text-primary">{{model.getInheritedLocation()}}</strong> has been attached on an ancestor.</p>
+            <p><a ui-sref="main.graphical.edit.add({entityId: model._id, family: 'location'})" class="btn btn-sm btn-success"><i class="fa fa-plus"></i> Attach a location</a></p>
+        </div>
+        <div ng-if="model.hasLocation()">
+            <p ng-repeat="issue in state.issues | filter:{group:'location'}" class="alert alert-{{issue.severity}}">
+                <em ng-bind-html="issue.message"></em>
+            </p>
+            <p>Will be deployed to: <strong>{{model.miscData.get('locationName')}}</strong></p>
+            <a class="btn btn-default" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'location'})">Change location</a>
+            <button class="btn btn-danger btn-link" ng-click="model.clearIssues({group: 'location'}).removeLocation()">Remove</button>
+        </div>
+    </div>
+</br-collapsible>
+
+<!-- ENTITY POLICIES -->
+<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.policy.open">
+    <heading>
+        Policies
+        <span ng-if="getPoliciesIssues().length> 0" class="badge" ng-class="getBadgeClass(getPoliciesIssues())">{{getPoliciesIssues().length}}</span>
+
+        <span class="pull-right" ng-show="$parent.stateWrapped.state">
+            <i class="fa fa-search collapsible-action" title="Filter policies" ng-click="$event.stopPropagation(); $event.preventDefault();" ng-class="{'text-success': state.policy.search.length > 0}" uib-popover-template="'SearchPolicyTemplate.html'" popover-placement="bottom-right" popover-trigger="'outsideClick'"></i>
+            <a class="fa fa-plus collapsible-action" title="Add policy" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'policy'})" ng-click="$event.stopPropagation()" ></a>
+        </span>
+    </heading>
+
+    <div class="spec-policies">
+        <div class="spec-empty-state" ng-if="!model.hasPolicies() || filteredPolicies.length === 0 ">
+            <h4 ng-if="!model.hasPolicies()">No policies attached</h4>
+            <h4 ng-if="model.hasPolicies() && filteredPolicies.length === 0">No policies matching the current search</h4>
+            <p>
+                <button class="btn btn-sm btn-default" ng-if="state.policy.search.length > 0" ng-click="state.policy.search = ''">Clear search</button>
+                <a ui-sref="main.graphical.edit.add({entityId: model._id, family: 'policy'})" class="btn btn-sm btn-success">
+                    <i class="fa fa-plus"></i>
+                    <span ng-if="!model.hasPolicies()">Attach a policy</span>
+                    <span ng-if="model.hasPolicies() && filteredPolicies.length === 0">Attach another policy</span>
+                </a>
+            </p>
+        </div>
+
+        <div ng-repeat="adjunct in filteredPolicies = (model.getPoliciesAsArray() | specEditorType:state.policy.search) track by adjunct._id" class="spec-policy spec-adjunct">
+            <a ui-sref="main.graphical.edit.policy({entityId: model._id, policyId: adjunct._id})"></a>
+            <ng-include src="'AdjunctTemplate.html'"></ng-include>
+        </div>
+    </div>
+</br-collapsible>
+
+<!-- ENTITY ENRICHERS -->
+<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.enricher.open">
+    <heading>
+        Enrichers
+        <span ng-if="getEnrichersIssues().length> 0" class="badge" ng-class="getBadgeClass(getEnrichersIssues())">{{getEnrichersIssues().length}}</span>
+
+        <span class="pull-right" ng-show="$parent.stateWrapped.state">
+            <i class="fa fa-search collapsible-action" title="Search enrichers" ng-click="$event.stopPropagation(); $event.preventDefault();" ng-class="{'text-success': state.enricher.search.length > 0}" uib-popover-template="'SearchEnricherTemplate.html'" popover-placement="bottom-right" popover-trigger="'outsideClick'"></i>
+            <a class="fa fa-plus collapsible-action" title="Add enricher" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'enricher'})" ng-click="$event.stopPropagation()" ></a>
+        </span>
+    </heading>
+
+    <div class="spec-enrichers">
+        <div class="spec-empty-state" ng-if="!model.hasEnrichers() || filteredEnrichers.length === 0">
+            <h4 ng-if="!model.hasEnrichers()">No Enrichers attached</h4>
+            <h4 ng-if="model.hasEnrichers() && filteredEnrichers.length === 0">No enrichers matching the current search</h4>
+            <p>
+                <button class="btn btn-sm btn-default" ng-if="state.enricher.search.length > 0" ng-click="state.enricher.search = ''">Clear search</button>
+                <a ui-sref="main.graphical.edit.add({entityId: model._id, family: 'enricher'})" class="btn btn-sm btn-success">
+                    <i class="fa fa-plus"></i>
+                    <span ng-if="!model.hasEnrichers()">Attach an enricher</span>
+                    <span ng-if="model.hasEnrichers() && filteredEnrichers.length === 0">Attach another enricher</span>
+                </a>
+            </p>
+        </div>
+
+        <div ng-repeat="adjunct in filteredEnrichers = (model.getEnrichersAsArray() | specEditorType:state.enricher.search) track by adjunct._id" class="spec-enricher spec-adjunct">
+            <a ui-sref="main.graphical.edit.enricher({entityId: model._id, enricherId: adjunct._id})"></a>
+            <ng-include src="'AdjunctTemplate.html'"></ng-include>
+        </div>
+    </div>
+</br-collapsible>
+
+<!-- CONFIG INFO TEMPLATE :: START -->
+<script type="text/ng-template" id="ConfigInfoTemplate.html">
+    <div class="config-item-quick-info">
+        <div class="quick-info-metadata">
+            <p><i class="mini-icon fa fa-fw fa-cog"></i> <samp class="type-symbolic-name">{{item.name}}</samp>
+            <span class="config-type label-color column-for-type oneline label label-success">{{item.type}}</span></p>
+        </div>
+        <p class="quick-info-description" ng-if="item.description">{{item.description}}</p>
+        <div class="quick-info-metadata config-default" ng-if="item.defaultValue"></i>Default value: <samp>{{item.defaultValue}}</samp></div>
+        <div class="quick-info-metadata config-required" ng-if="item.constraints.required"><i>This field is required.</div>
+    </div>
+        
+</script>
+<!-- CONFIG INFO TEMPLATE :: START-->
+
+<!-- SEARCH POLICY TEMPLATE :: START -->
+<script type="text/ng-template" id="SearchPolicyTemplate.html">
+    <div ng-click="$event.stopPropagation(); $event.preventDefault();">
+        <input ng-model="state.policy.search" type="text" class="form-control" placeholder="Search for a policy" auto-focus blur-on-enter />
+    </div>
+</script>
+<!--SEARCH POLICY TEMPLATE :: START-->
+
+<!-- SEARCH ENRICHER TEMPLATE :: START -->
+<script type="text/ng-template" id="SearchEnricherTemplate.html">
+    <div ng-click="$event.stopPropagation(); $event.preventDefault();">
+        <input ng-model="state.enricher.search" type="text" class="form-control" placeholder="Search for an enricher" auto-focus blur-on-enter />
+    </div>
+</script>
+<!--SEARCH ENRICHER TEMPLATE :: START-->
+
+<!--TYPEAHEAD TEMPLATE :: START-->
+<script type="text/ng-template" id="ConfigItemTemplate.html">
+    <div class="dropdown-item">
+        <div class="details">
+            <h4 class="dropdown-item-heading repo-name truncate">
+                <span ng-bind-html="match.model.label | uibTypeaheadHighlight:query"></span>
+                <i class="fa fa-fw fa-asterisk" ng-if="match.model.constraints.required"></i>
+                <i class="fa fa-fw fa-eye-slash" ng-if="match.model.isHidden"></i>
+            </h4>
+            <p class="dropdown-item-subheading version truncate">{{ match.model.description }}</p>
+        </div>
+    </div>
+</script>
+<!--TYPEAHEAD TEMPLATE :: END-->
+
+<!--ADJUNCT TEMPLATE :: START-->
+<script type="text/ng-template" id="AdjunctTemplate.html">
+    <div class="media" ng-class="{'has-issues': adjunct.hasIssues()}">
+        <div class="media-left media-middle">
+            <img ng-src="{{adjunct.icon}}" alt="{{adjunct | entityName}} logo" class="media-object" />
+        </div>
+        <div class="media-body">
+            <div>
+                {{adjunct.miscData.get('typeName')}}
+                <span ng-if="adjunct.issues.length > 0" > • <small class="text-danger">
+                    <em>
+                      <i class="fa fa-ban"></i>
+                        <ng-pluralize count="adjunct.issues.length" when="{
+                             'one': '{} issue',
+                             'other': '{} issues'}">
+                        </ng-pluralize>
+                    </em>
+                </small></span>
+            </div>
+            <i ng-if="['POLICY', 'ENRICHER'].indexOf(adjunct.family.id) > -1" class="fa fa-trash remove-spec-adjunct" ng-click="removeAdjunct($event, adjunct)" title="Remove"></i>
+            <a ng-if="adjunct.family.id === 'SPEC'" ui-sref="main.graphical.edit.add({entityId: model._id, family: 'spec', configKey: item.name})" class="update-spec-adjunct" title="Change type">
+                <i class="fa fa-exchange"></i>
+            </a>
+        </div>
+    </div>
+</script>
+<!--ADJUNCT TEMPLATE :: END-->