Set default for stats positioning
diff --git a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
index 29972fb..7649374 100644
--- a/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
+++ b/views/ngXosViews/diagnostic/src/js/nodeDrawer.js
@@ -325,7 +325,7 @@
const statsContainer = container.append('g')
.attr({
- transform: `translate(${translation[instance.humanReadableName]})`,
+ transform: `translate(${translation[instance.humanReadableName] || translation['mysite_vsg-1']})`,
class: 'stats-container'
})
.on('click', function(d) {
@@ -370,10 +370,10 @@
statsContainer.append('line')
.attr({
- x1: d => lines[d.humanReadableName].x1,
- y1: d => lines[d.humanReadableName].y1,
- x2: d => lines[d.humanReadableName].x2,
- y2: d => lines[d.humanReadableName].y2,
+ 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'],
stroke: 'black',
opacity: 0
})
diff --git a/xos/core/xoslib/static/js/xosDiagnostic.js b/xos/core/xoslib/static/js/xosDiagnostic.js
index 31cbf83..2c46d49 100644
--- a/xos/core/xoslib/static/js/xosDiagnostic.js
+++ b/xos/core/xoslib/static/js/xosDiagnostic.js
@@ -1164,7 +1164,7 @@
};
var statsContainer = container.append('g').attr({
- transform: 'translate(' + translation[instance.humanReadableName] + ')',
+ transform: 'translate(' + (translation[instance.humanReadableName] || translation['mysite_vsg-1']) + ')',
'class': 'stats-container'
}).on('click', function (d) {
// toggling visisbility
@@ -1204,16 +1204,16 @@
statsContainer.append('line').attr({
x1: function x1(d) {
- return lines[d.humanReadableName].x1;
+ return lines[d.humanReadableName].x1 || lines['mysite_vsg-1'];
},
y1: function y1(d) {
- return lines[d.humanReadableName].y1;
+ return lines[d.humanReadableName].y1 || lines['mysite_vsg-1'];
},
x2: function x2(d) {
- return lines[d.humanReadableName].x2;
+ return lines[d.humanReadableName].x2 || lines['mysite_vsg-1'];
},
y2: function y2(d) {
- return lines[d.humanReadableName].y2;
+ return lines[d.humanReadableName].y2 || lines['mysite_vsg-1'];
},
stroke: 'black',
opacity: 0