Commit 9b4c0cca by Torkel Ödegaard

fix(flot): fixed flot issue introduced in alerting branch

parent 346ca3fc
......@@ -9,4 +9,4 @@ collectd:
COLLECT_INTERVAL: 10
links:
- graphite
- memcached
# - memcached
......@@ -365,12 +365,20 @@ function ($, _, angular, Drop) {
plot.hooks.draw.push(function(plot) {
var options = plot.getOptions();
var container = plot.getPlaceholder();
var containerElem = container[0];
if (containerElem.removeEventsElements) {
container.find(".events_line").remove();
containerElem.removeEventsElements = false;
}
if (eventMarkers.eventsEnabled) {
// check for first run
if (eventMarkers.getEvents().length < 1) {
eventMarkers.setTypes(options.events.types);
eventMarkers.setupEvents(options.events.data);
containerElem.removeEventsElements = true;
} else {
eventMarkers.updateEvents();
}
......
......@@ -1316,14 +1316,10 @@ Licensed under the MIT license.
}
function setupCanvases() {
// Make sure the placeholder is clear of everything except canvases
// from a previous plot in this container that we'll try to re-use.
placeholder.css("padding", 0) // padding messes up the positioning
.children().filter(function(){
return $(this).hasClass("flot-text");
}).remove();
placeholder.find(".flot-text").remove();
if (placeholder.css("position") == 'static')
placeholder.css("position", "relative"); // for positioning labels and overlay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment