Added dropdown to select subscriber
diff --git a/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js b/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
index a333adf..dab5c3f 100644
--- a/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
+++ b/gui/ngXosViews/serviceTopology/src/js/topologyCanvas.js
@@ -255,10 +255,6 @@
Subscribers.query().$promise
.then((subscribers) => {
this.subscribers = subscribers;
- return ServiceRelation.get(subscribers[0])
- })
- .then((tree) => {
- draw(tree);
});
this.getInstances = (slice) => {
@@ -268,6 +264,13 @@
this.instances = instances;
})
};
+
+ this.getServiceChain = (subscriber) => {
+ ServiceRelation.get(subscriber)
+ .then((tree) => {
+ draw(tree);
+ });
+ };
}
}
});
diff --git a/gui/ngXosViews/serviceTopology/src/templates/topology_canvas.tpl.html b/gui/ngXosViews/serviceTopology/src/templates/topology_canvas.tpl.html
index afe76eb..e05ee17 100644
--- a/gui/ngXosViews/serviceTopology/src/templates/topology_canvas.tpl.html
+++ b/gui/ngXosViews/serviceTopology/src/templates/topology_canvas.tpl.html
@@ -1,3 +1,4 @@
+<select class="form-control" ng-options="s as s.name for s in vm.subscribers" ng-model="vm.selectedSubscriber" ng-change="vm.getServiceChain(vm.selectedSubscriber)"></select>
<div class="service-details">
<div class="service-slices animate" ng-hide="vm.slices.length == 0">
<div class="panel panel-info">