Added error message if ceilometer fail
diff --git a/views/ngXosViews/diagnostic/src/js/logicTopology.js b/views/ngXosViews/diagnostic/src/js/logicTopology.js
index f88b80a..5ab5d0f 100644
--- a/views/ngXosViews/diagnostic/src/js/logicTopology.js
+++ b/views/ngXosViews/diagnostic/src/js/logicTopology.js
@@ -17,6 +17,7 @@
var svg;
this.selectedInstances = [];
this.hideInstanceStats = true;
+ var _this = this;
const handleSvg = (el) => {
@@ -61,6 +62,12 @@
.then((instances) => {
LogicTopologyHelper.updateTree(svg);
})
+ .catch(e => {
+ _this.error = 'Service statistics are not available at this time. Please try again later.'
+ $timeout(() => {
+ _this.error = null;
+ }, 2000);
+ })
});
d3.select(window)
diff --git a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
index 6828abb..514f114 100644
--- a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
+++ b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
@@ -374,10 +374,10 @@
statsContainer.append('line')
.attr({
- x1: d => lines[d.humanReadableName].x1 || lines['mysite_vsg-1'],
- y1: d => lines[d.humanReadableName].y1 || lines['mysite_vsg-1'],
- x2: d => lines[d.humanReadableName].x2 || lines['mysite_vsg-1'],
- y2: d => lines[d.humanReadableName].y2 || lines['mysite_vsg-1'],
+ x1: d => lines[d.humanReadableName].x1 || lines['mysite_vsg-1'].x1,
+ y1: d => lines[d.humanReadableName].y1 || lines['mysite_vsg-1'].y1,
+ x2: d => lines[d.humanReadableName].x2 || lines['mysite_vsg-1'].x2,
+ y2: d => lines[d.humanReadableName].y2 || lines['mysite_vsg-1'].y2,
stroke: 'black',
opacity: 0
})
diff --git a/views/ngXosViews/diagnostic/src/templates/logicTopology.tpl.html b/views/ngXosViews/diagnostic/src/templates/logicTopology.tpl.html
index 8c81015..e942fca 100644
--- a/views/ngXosViews/diagnostic/src/templates/logicTopology.tpl.html
+++ b/views/ngXosViews/diagnostic/src/templates/logicTopology.tpl.html
@@ -1,6 +1,9 @@
<select-subscriber-modal open="vm.openSelectSubscriberModal" subscribers="vm.subscribers"></select-subscriber-modal>
<subscriber-status-modal open="vm.openSubscriberStatusModal" subscriber="vm.currentSubscriber"></subscriber-status-modal>
-<div class="instances-stats animate" ng-hide="vm.hideInstanceStats">
+<div class="alert alert-danger animate" ng-hide="!vm.error">
+ {{vm.error}}
+</div>
+<!-- <div class="instances-stats animate" ng-hide="vm.hideInstanceStats">
<div class="row">
<div class="col-sm-3 col-sm-offset-8">
<div class="panel panel-primary" ng-repeat="instance in vm.selectedInstances">
@@ -21,4 +24,4 @@
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div> -->
\ No newline at end of file