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
|
COLLECT_INTERVAL: 10
|
||||||
links:
|
links:
|
||||||
- graphite
|
- graphite
|
||||||
- memcached
|
# - memcached
|
||||||
|
@ -365,12 +365,20 @@ function ($, _, angular, Drop) {
|
|||||||
|
|
||||||
plot.hooks.draw.push(function(plot) {
|
plot.hooks.draw.push(function(plot) {
|
||||||
var options = plot.getOptions();
|
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) {
|
if (eventMarkers.eventsEnabled) {
|
||||||
// check for first run
|
// check for first run
|
||||||
if (eventMarkers.getEvents().length < 1) {
|
if (eventMarkers.getEvents().length < 1) {
|
||||||
eventMarkers.setTypes(options.events.types);
|
eventMarkers.setTypes(options.events.types);
|
||||||
eventMarkers.setupEvents(options.events.data);
|
eventMarkers.setupEvents(options.events.data);
|
||||||
|
containerElem.removeEventsElements = true;
|
||||||
} else {
|
} else {
|
||||||
eventMarkers.updateEvents();
|
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() {
|
function setupCanvases() {
|
||||||
|
|
||||||
// Make sure the placeholder is clear of everything except canvases
|
// Make sure the placeholder is clear of everything except canvases
|
||||||
// from a previous plot in this container that we'll try to re-use.
|
// from a previous plot in this container that we'll try to re-use.
|
||||||
|
|
||||||
placeholder.css("padding", 0) // padding messes up the positioning
|
placeholder.find(".flot-text").remove();
|
||||||
.children().filter(function(){
|
|
||||||
return $(this).hasClass("flot-text");
|
|
||||||
}).remove();
|
|
||||||
|
|
||||||
if (placeholder.css("position") == 'static')
|
if (placeholder.css("position") == 'static')
|
||||||
placeholder.css("position", "relative"); // for positioning labels and overlay
|
placeholder.css("position", "relative"); // for positioning labels and overlay
|
||||||
|
Loading…
Reference in New Issue
Block a user