mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(flot): fixed flot issue introduced in alerting branch
This commit is contained in:
parent
346ca3fc89
commit
9b4c0cca07
@ -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();
|
||||
}
|
||||
|
6
public/vendor/flot/jquery.flot.js
vendored
6
public/vendor/flot/jquery.flot.js
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user