mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 07:23:02 +00:00
Fix callback function bind with object as parameter (#7984)
Signed-off-by: TAY TS <taytzushieh@gmail.com>
This commit is contained in:
parent
f0d87b5d86
commit
c9d827c1d0
@ -937,9 +937,11 @@ Prometheus.Page.prototype.init = function() {
|
||||
if (graphOptions.length === 0) {
|
||||
graphOptions.push({});
|
||||
}
|
||||
|
||||
var pageInstance = this;
|
||||
graphOptions.forEach(this.addGraph, this);
|
||||
$("#add_graph").click(this.addGraph.bind(this, {}));
|
||||
$("#add_graph").click(function() {
|
||||
pageInstance.addGraph({});
|
||||
});
|
||||
};
|
||||
|
||||
Prometheus.Page.prototype.parseURL = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user