mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add rickshawGraph proerty to the Graph object. (#2438)
Add rickshawGraph property to the Graph object. This allows further changes to be made to the graph, for example, annotations.
This commit is contained in:
parent
089dc1076b
commit
74a3b1051a
|
@ -332,6 +332,9 @@ PromConsole.Graph = function(params) {
|
||||||
|
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.rendered_data = null;
|
this.rendered_data = null;
|
||||||
|
// Keep a reference so that further updates (e.g. annotations) can be made
|
||||||
|
// by the user in their templates.
|
||||||
|
this.rickshawGraph = null;
|
||||||
PromConsole._graph_registry.push(this);
|
PromConsole._graph_registry.push(this);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -504,6 +507,8 @@ PromConsole.Graph.prototype._render = function(data) {
|
||||||
xAxis.render();
|
xAxis.render();
|
||||||
yAxis.render();
|
yAxis.render();
|
||||||
graph.render();
|
graph.render();
|
||||||
|
|
||||||
|
this.rickshawGraph = graph;
|
||||||
};
|
};
|
||||||
|
|
||||||
PromConsole.Graph.prototype._clearGraph = function() {
|
PromConsole.Graph.prototype._clearGraph = function() {
|
||||||
|
@ -513,6 +518,7 @@ PromConsole.Graph.prototype._clearGraph = function() {
|
||||||
while (this.legendDiv.lastChild) {
|
while (this.legendDiv.lastChild) {
|
||||||
this.legendDiv.removeChild(this.legendDiv.lastChild);
|
this.legendDiv.removeChild(this.legendDiv.lastChild);
|
||||||
}
|
}
|
||||||
|
this.rickshawGraph = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
PromConsole.Graph.prototype._xhrs = [];
|
PromConsole.Graph.prototype._xhrs = [];
|
||||||
|
|
Loading…
Reference in a new issue