You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by tb...@apache.org on 2018/11/06 15:21:17 UTC
[5/9] brooklyn-ui git commit: allow spec editor sections to be
customized
allow spec editor sections to be customized
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/feac3fc1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/feac3fc1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/feac3fc1
Branch: refs/heads/master
Commit: feac3fc1b1034160fda7c1a285061a2cd8ef4d1f
Parents: bad6676
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Wed Oct 31 16:56:58 2018 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Nov 1 12:16:33 2018 +0000
----------------------------------------------------------------------
.../spec-editor/spec-editor.directive.js | 6 +++--
.../spec-editor/spec-editor.template.html | 26 +++++++++++++++-----
2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/feac3fc1/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.directive.js
----------------------------------------------------------------------
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 a5341b9..b0663a1 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
@@ -78,13 +78,15 @@ export function specEditorDirective($rootScope, $templateCache, $injector, $sani
scope: {
model: '='
},
- controller: controller,
+ controller: ['$scope', '$element', controller],
template: template,
link: link,
controllerAs: 'specEditor',
};
- function controller() {
+ function controller($scope, $element) {
+ (composerOverrides.configureSpecEditorController || function() {})(this, $scope, $element);
+
// does very little currently, but link adds to this
return this;
}
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/feac3fc1/ui-modules/blueprint-composer/app/components/spec-editor/spec-editor.template.html
----------------------------------------------------------------------
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 2b0a4c4..937bbaa 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
@@ -341,7 +341,9 @@
</br-collapsible>
<!-- ENTITY LOCATION -->
-<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.location.open">
+<ng-include src="'SpecEditorLocationSection.html'"></ng-include>
+<script type="text/ng-template" id="SpecEditorLocationSection.html">
+ <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>
@@ -365,10 +367,13 @@
<button class="btn btn-danger btn-link" ng-click="model.clearIssues({group: 'location'}).removeLocation()">Remove</button>
</div>
</div>
-</br-collapsible>
+ </br-collapsible>
+</script>
<!-- ENTITY POLICIES -->
-<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.policy.open">
+<ng-include src="'SpecEditorPoliciesSection.html'"></ng-include>
+<script type="text/ng-template" id="SpecEditorPoliciesSection.html">
+ <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>
@@ -398,10 +403,13 @@
<ng-include src="'AdjunctTemplate.html'"></ng-include>
</div>
</div>
-</br-collapsible>
+ </br-collapsible>
+</script>
<!-- ENTITY ENRICHERS -->
-<br-collapsible ng-if="[FAMILIES.ENTITY, FAMILIES.SPEC].indexOf(model.family) > -1" state="state.enricher.open">
+<ng-include src="'SpecEditorEnrichersSection.html'"></ng-include>
+<script type="text/ng-template" id="SpecEditorEnrichersSection.html">
+ <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>
@@ -431,7 +439,13 @@
<ng-include src="'AdjunctTemplate.html'"></ng-include>
</div>
</div>
-</br-collapsible>
+ </br-collapsible>
+</script>
+
+<ng-include src="'SpecEditorOtherSections.html'"></ng-include>
+<script type="text/ng-template" id="SpecEditorOtherSections.html">
+</script>
+
<!-- CONFIG INFO TEMPLATE :: START -->
<script type="text/ng-template" id="ConfigInfoTemplate.html">