Solarized preset for discrete color mode

- add remove all button
This commit is contained in:
Ivan Mikheykin
2018-11-26 16:28:33 +03:00
parent ca2fcb582a
commit 76dc89b2dc
7 changed files with 165 additions and 63 deletions
+18
View File
@@ -244,12 +244,30 @@ export class StatusHeatmapCtrl extends MetricsPanelCtrl {
this.render();
};
onEditorRemoveThresholds = () => {
this.panel.color.thresholds = [];
this.render();
};
onEditorAddThreeLights = () => {
this.panel.color.thresholds.push({color: "red", value: 2, tooltip: "error" });
this.panel.color.thresholds.push({color: "yellow", value: 1, tooltip: "warning" });
this.panel.color.thresholds.push({color: "green", value: 0, tooltip: "ok" });
this.render();
};
/* https://ethanschoonover.com/solarized/ */
onEditorAddSolarized = () => {
this.panel.color.thresholds.push({color: "#b58900", value: 0, tooltip: "yellow" });
this.panel.color.thresholds.push({color: "#cb4b16", value: 1, tooltip: "orange" });
this.panel.color.thresholds.push({color: "#dc322f", value: 2, tooltip: "red" });
this.panel.color.thresholds.push({color: "#d33682", value: 3, tooltip: "magenta" });
this.panel.color.thresholds.push({color: "#6c71c4", value: 4, tooltip: "violet" });
this.panel.color.thresholds.push({color: "#268bd2", value: 5, tooltip: "blue" });
this.panel.color.thresholds.push({color: "#2aa198", value: 6, tooltip: "cyan" });
this.panel.color.thresholds.push({color: "#859900", value: 7, tooltip: "green" });
this.render();
}
link = (scope, elem, attrs, ctrl) => {
rendering(scope, elem, attrs, ctrl);