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/11/30 15:39:56 UTC
[1/3] brooklyn-ui git commit: Revert "remove
load-parameter-from-definition as it is not necessary, per PR comments"
Repository: brooklyn-ui
Updated Branches:
refs/heads/master 86c69c20f -> ef3ee0916
Revert "remove load-parameter-from-definition as it is not necessary, per PR comments"
This reverts commit 86c69c20f1f220c4f8ab7ef0ccfff4c7e2f7d8ae.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/88b3bf4d
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/88b3bf4d
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/88b3bf4d
Branch: refs/heads/master
Commit: 88b3bf4dd4f96659292ddb8e9cd6ac8eab4f4353
Parents: 86c69c2
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Nov 30 15:27:11 2018 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Nov 30 15:27:11 2018 +0000
----------------------------------------------------------------------
.../providers/blueprint-service.provider.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/88b3bf4d/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
----------------------------------------------------------------------
diff --git a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
index be572d7..7cc63b0 100644
--- a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
+++ b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
@@ -253,11 +253,13 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
entity.miscData.set('traits', []);
deferred.resolve(entity);
addUnlistedConfigKeysDefinitions(entity);
+ addUnlistedParameterDefinitions(entity);
} else {
entity.miscData.set('sensors', []);
entity.miscData.set('traits', []);
deferred.resolve(entity);
addUnlistedConfigKeysDefinitions(entity);
+ addUnlistedParameterDefinitions(entity);
}
return deferred.promise;
@@ -525,8 +527,6 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
}
function addUnlistedConfigKeysDefinitions(entity) {
- // there may be config in the entity definition not in the model; if so, add them.
- // parameters will all be defined in this model so no need to do this for them.
let allConfig = entity.miscData.get('config') || [];
entity.config.forEach((value, key) => {
if (!allConfig.some((e) => e.name === key)) {
@@ -536,6 +536,16 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
entity.miscData.set('config', allConfig);
}
+ function addUnlistedParameterDefinitions(entity) {
+ let allParams = entity.miscData.get('parameters') || [];
+ entity.parameters.forEach((param) => {
+ if (!allParams.some((e) => e.name === param.name)) {
+ allParams.push(param);
+ }
+ });
+ entity.miscData.set('parameters', allParams);
+ }
+
function populateEntityFromApiSuccess(entity, data) {
entity.clearIssues({group: 'type'});
entity.type = data.symbolicName;
@@ -558,6 +568,7 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
entity.miscData.set('ui-composer-hints', uiHints);
entity.miscData.set('virtual', data.virtual || null);
addUnlistedConfigKeysDefinitions(entity);
+ addUnlistedParameterDefinitions(entity);
return entity;
}
function mergeAppendingLists(dst, src) {
@@ -583,6 +594,7 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
entity.miscData.set('virtual', null);
entity.icon = typeNotFoundIcon;
addUnlistedConfigKeysDefinitions(entity);
+ addUnlistedParameterDefinitions(entity);
return entity;
}
[2/3] brooklyn-ui git commit: add comments on setting unlisted
parameters
Posted by he...@apache.org.
add comments on setting unlisted parameters
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/cb001728
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/cb001728
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/cb001728
Branch: refs/heads/master
Commit: cb00172817dab2935f81a4480e84e528386407bb
Parents: 88b3bf4
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Nov 30 15:37:39 2018 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Nov 30 15:37:39 2018 +0000
----------------------------------------------------------------------
.../app/components/providers/blueprint-service.provider.js | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/cb001728/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
----------------------------------------------------------------------
diff --git a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
index 7cc63b0..7b626e8 100644
--- a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
+++ b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
@@ -527,6 +527,7 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
}
function addUnlistedConfigKeysDefinitions(entity) {
+ // copy config key definitions set on this entity into the miscData aggregated view
let allConfig = entity.miscData.get('config') || [];
entity.config.forEach((value, key) => {
if (!allConfig.some((e) => e.name === key)) {
@@ -537,6 +538,7 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
}
function addUnlistedParameterDefinitions(entity) {
+ // copy parameter definitions set on this entity into the miscData aggregated view
let allParams = entity.miscData.get('parameters') || [];
entity.parameters.forEach((param) => {
if (!allParams.some((e) => e.name === param.name)) {
[3/3] brooklyn-ui git commit: add comments re adding unlisted
parameters
Posted by he...@apache.org.
add comments re adding unlisted parameters
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/ef3ee091
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/ef3ee091
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/ef3ee091
Branch: refs/heads/master
Commit: ef3ee09169dc3aa7ffb5ed5843933c5911683393
Parents: cb00172
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Nov 30 15:39:35 2018 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Nov 30 15:39:35 2018 +0000
----------------------------------------------------------------------
.../app/components/providers/blueprint-service.provider.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/ef3ee091/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
----------------------------------------------------------------------
diff --git a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
index 7b626e8..38604a3 100644
--- a/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
+++ b/ui-modules/blueprint-composer/app/components/providers/blueprint-service.provider.js
@@ -538,7 +538,8 @@ function BlueprintService($log, $q, $sce, paletteApi, iconGenerator, dslService)
}
function addUnlistedParameterDefinitions(entity) {
- // copy parameter definitions set on this entity into the miscData aggregated view
+ // copy parameter definitions set on this entity into the miscData aggregated view;
+ // TODO see discussions in PR 112 about whether this is necessary and/or there is a better way
let allParams = entity.miscData.get('parameters') || [];
entity.parameters.forEach((param) => {
if (!allParams.some((e) => e.name === param.name)) {