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 2016/02/18 11:36:58 UTC
[06/27] brooklyn-ui git commit: use location identifier spec/name,
not a random id, in app-add-wizard
use location identifier spec/name, not a random id, in app-add-wizard
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/f49de1ca
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/f49de1ca
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/f49de1ca
Branch: refs/heads/master
Commit: f49de1ca782ea158f511d80ba450e5e990e578da
Parents: 9c6c06c
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Thu Feb 11 02:57:32 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Thu Feb 11 17:44:11 2016 +0000
----------------------------------------------------------------------
src/main/webapp/assets/js/view/application-add-wizard.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/f49de1ca/src/main/webapp/assets/js/view/application-add-wizard.js
----------------------------------------------------------------------
diff --git a/src/main/webapp/assets/js/view/application-add-wizard.js b/src/main/webapp/assets/js/view/application-add-wizard.js
index 1174c5e..1436eea 100644
--- a/src/main/webapp/assets/js/view/application-add-wizard.js
+++ b/src/main/webapp/assets/js/view/application-add-wizard.js
@@ -595,7 +595,7 @@ define([
var $locationOptions = container.find('.select-location');
var templated = this.locations.map(function(aLocation) {
return optionTemplate({
- id: aLocation.id || "",
+ id: aLocation.getIdentifierName() || aLocation.id || "",
name: aLocation.getPrettyName()
});
});
@@ -647,7 +647,7 @@ define([
},
addLocation:function () {
if (this.locations.models.length>0) {
- this.model.spec.addLocation(this.locations.models[0].get("id"))
+ this.model.spec.addLocation(this.locations.models[0].getIdentifierName())
} else {
// i.e. No location
this.model.spec.addLocation(undefined);
@@ -702,7 +702,7 @@ define([
var loc_id = $(event.currentTarget).val(),
isNoneLocation = loc_id === NO_LOCATION_INDICATOR;
var locationValid = isNoneLocation || this.locations.find(function (candidate) {
- return candidate.get("id")==loc_id;
+ return candidate.getIdentifierName()==loc_id;
});
if (!locationValid) {
log("invalid location "+loc_id);