diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-07-02 17:29:07 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-07-02 17:29:07 +0200 |
commit | 162977906265df2782845a092707f7176a6d5a45 (patch) | |
tree | d99d1b70d47ac4e3b8af258f29363302d0e0c973 /web/js/nms-map.js | |
parent | 88f59aee622a939c65b18cbcf5d59aaeda28bf96 (diff) |
Customizable titles on health map and sticky panes
Click a field in a switch summary and the health map will use it as a
legend, assuming it isn't already showing information.
And remember what panel was used last when browsing switches.
Diffstat (limited to 'web/js/nms-map.js')
-rw-r--r-- | web/js/nms-map.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/js/nms-map.js b/web/js/nms-map.js index f95cde5..5669acb 100644 --- a/web/js/nms-map.js +++ b/web/js/nms-map.js @@ -114,6 +114,11 @@ nmsMap.reset = function() { }; nmsMap.setSwitchInfo = function(sw,info) { + if (info != undefined) { + var textl = info.length; + if (textl > 15) + info = info.slice(0,15); + } if (this._info[sw] != info) { this._info[sw] = info; this._drawSwitchInfo(sw); |