Last fixes for 0.0.1

- fix prometheus request error
- remove console.log
- bring back drawSimpleColorLegend
This commit is contained in:
Ivan Mikheykin
2018-09-18 13:31:52 +03:00
parent 2614ebccd7
commit 3e12ede595
4 changed files with 33 additions and 9 deletions
+4 -8
View File
@@ -153,12 +153,6 @@ export class StatusHeatmapCtrl extends MetricsPanelCtrl {
let minSpacing = this.panel.cards.cardSpacing;
let maxCardsCount = Math.ceil((chartWidth-minCardWidth) / (minCardWidth + minSpacing));
console.log("CALC INT", {
"chartWidth": chartWidth,
"panelWidth": panelWidth,
"maxCardsCount": maxCardsCount,
});
let intervalMs;
let rangeMs = this.range.to.valueOf() - this.range.from.valueOf();
@@ -208,7 +202,7 @@ export class StatusHeatmapCtrl extends MetricsPanelCtrl {
this.multipleValues = false;
if (!this.panel.useMax) {
if (!_.isEmpty(this.cardsData)) {
if (this.cardsData) {
this.multipleValues = this.cardsData.multipleValues;
}
}
@@ -216,7 +210,9 @@ export class StatusHeatmapCtrl extends MetricsPanelCtrl {
this.noColorDefined = false;
if (this.panel.color.mode === 'discrete') {
this.discreteHelper.updateCardsValuesHasColorInfo();
this.noColorDefined = this.cardsData.noColorDefined;
if (this.cardsData) {
this.noColorDefined = this.cardsData.noColorDefined;
}
}
};