mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Change the global variable 'name' to a local variable so that it can not populate the global space. (#5970)
* Change the global variable 'name' to a local variable so that it can not populate the global space. Signed-off-by: 朱正浩,Zhu Zhenghao <zhenghao.zhu@daocloud.io> * run make assets Signed-off-by: 朱正浩,Zhu Zhenghao <zhenghao.zhu@daocloud.io>
This commit is contained in:
parent
9336c01dfd
commit
cb5213e914
File diff suppressed because one or more lines are too long
|
@ -637,7 +637,7 @@ PromConsole._interpolateName = function(name, metric) {
|
||||||
PromConsole._chooseNameFunction = function(data) {
|
PromConsole._chooseNameFunction = function(data) {
|
||||||
// By default, use the full metric name.
|
// By default, use the full metric name.
|
||||||
var nameFunc = function (metric) {
|
var nameFunc = function (metric) {
|
||||||
name = metric.__name__ + "{";
|
var name = metric.__name__ + "{";
|
||||||
for (var label in metric) {
|
for (var label in metric) {
|
||||||
if (label.substring(0,2) == "__") {
|
if (label.substring(0,2) == "__") {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue