commit | 68d6f9526b62cc447d789a0c59e234608333081a | [log] [tgz] |
---|---|---|
author | Steven Burrows <sburrows@villa-technologies.com> | Fri Mar 10 13:53:35 2017 +0000 |
committer | Simon Hunt <simon@onlab.us> | Tue Mar 14 06:23:26 2017 +0000 |
tree | f44299d18013bde5efb922f23ceef222d92a0023 | |
parent | 5d025c3e2745666647f830a0b95e4df5dde74bca [diff] [blame] |
Topo2: Adding peer region node to the topology Change-Id: I846d2f1ca27faa4602c772aba006f5be55da6106
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js b/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js index 94ab15f..9d46494 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js
@@ -93,6 +93,17 @@ return selected; }, + index: function () { + + var models = this.collection.models, + id = this.get('id'); + + var index = _.find(models, function (model, i) { + return model.get('id') === id; + }); + + return index || models.length; + }, deselect: function () { this.set('selected', false); },