diff --git a/CHANGES.md b/CHANGES.md index cbd334d5..a4beefd5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +## GlobalNOC Networkmap Panel v1.1.2 - Wed Apr 29 2019 + +* Fixed issue with `` in threshold legend mode + ## GlobalNOC Networkmap Panel v1.1.1 - Wed Apr 24 2019 * Updated `` to `` to fix issues in Grafana v6 diff --git a/Makefile b/Makefile index 01c769cc..51d3a5ed 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = grnoc-grafana-worldview -VERSION = 1.1.1 +VERSION = 1.1.2 rpm: dist rpmbuild -ta dist/$(NAME)-$(VERSION).tar.gz diff --git a/grnoc-grafana-worldview.spec b/grnoc-grafana-worldview.spec index 1c021bad..55638568 100644 --- a/grnoc-grafana-worldview.spec +++ b/grnoc-grafana-worldview.spec @@ -1,5 +1,5 @@ Name: grnoc-grafana-worldview -Version: 1.1.1 +Version: 1.1.2 Release: 1%{?dist} Summary: GRNOC Worldview Grafana Plugin Group: GRNOC diff --git a/package.json b/package.json index 6ab1ad8d..c0c4fec8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Network-Map" , - "version": "1.1.1", + "version": "1.1.2", "description": "GlobalNOC Networkmap Panel for Grafana", "main": "index.js", "scripts": { diff --git a/src/atlas3.js b/src/atlas3.js index f745865b..c22412f2 100755 --- a/src/atlas3.js +++ b/src/atlas3.js @@ -72,7 +72,7 @@ const panelDefaults = { legendTypes: ['opacity','spectrum','threshold'], opacityScales: ['linear', 'sqrt'], colorScheme : 'interpolateRdYlGn', - threshold_colors: [] + threshold_colors: ['#37872D', '#C4162A'] }; var tempArray=[]; @@ -407,6 +407,18 @@ export class Atlas3 extends MetricsPanelCtrl { this.render(); } + updateThresholdDefaults() { + console.log(this.panel.legend.thresholds); + if(!this.panel.threshold_colors[0]) { + this.panel.threshold_colors[0] = "rgb(200,200,200)"; + } + this.panel.legend.thresholds.forEach((threshold,idx) => { + if(!this.panel.threshold_colors[idx+1]) { + this.panel.threshold_colors[idx+1] = "rgb(200,200,200)"; + } + }); + } + jsonModal(){ var modalScope = this.$scope.$new(false); modalScope.panel = this.panel; diff --git a/src/partials/display_editor.html b/src/partials/display_editor.html index 522b3c68..39ad7c5c 100755 --- a/src/partials/display_editor.html +++ b/src/partials/display_editor.html @@ -57,7 +57,7 @@
Colors
- +
diff --git a/src/plugin.json b/src/plugin.json index 0f431aab..35a64179 100755 --- a/src/plugin.json +++ b/src/plugin.json @@ -14,8 +14,8 @@ {"name": "Github", "url": "https://github.com/GlobalNOC/globalnoc-networkmap-panel"}, {"name": "Apache License", "url": "https://raw.githubusercontent.com/globalnoc/globalnoc-networkmap-panel/master/LICENSE"} ], - "version": "1.1.1", - "updated": "2019-04-24" + "version": "1.1.2", + "updated": "2019-04-29" }, "dependencies": {