mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 10:02:26 +08:00
This commit is contained in:
@ -43,6 +43,9 @@ function (angular, _) {
|
||||
}
|
||||
|
||||
this.formatValue = function(value, format, variable) {
|
||||
// for some scopedVars there is no variable
|
||||
variable = variable || {};
|
||||
|
||||
if (typeof format === 'function') {
|
||||
return format(value, variable, this.formatValue);
|
||||
}
|
||||
@ -126,9 +129,6 @@ function (angular, _) {
|
||||
|
||||
return target.replace(this._regex, function(match, g1, g2) {
|
||||
variable = self._index[g1 || g2];
|
||||
if (!variable) {
|
||||
return match;
|
||||
}
|
||||
|
||||
if (scopedVars) {
|
||||
value = scopedVars[g1 || g2];
|
||||
@ -137,6 +137,10 @@ function (angular, _) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!variable) {
|
||||
return match;
|
||||
}
|
||||
|
||||
systemValue = self._grafanaVariables[variable.current.value];
|
||||
if (systemValue) {
|
||||
return self.formatValue(systemValue, format, variable);
|
||||
|
Reference in New Issue
Block a user