Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d1bac6cd
Commit
d1bac6cd
authored
Mar 01, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(templating): prometheus now works with new template variable formating/escaping, #2918
parent
23a136d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
6 deletions
+5
-6
docker/blocks/prometheus/prometheus.yml
+1
-1
public/app/features/templating/templateSrv.js
+1
-1
public/app/plugins/datasource/prometheus/datasource.ts
+1
-1
public/app/plugins/datasource/prometheus/plugin.json
+1
-2
public/test/specs/templateSrv-specs.js
+1
-1
No files found.
docker/blocks/prometheus/prometheus.yml
View file @
d1bac6cd
...
...
@@ -23,4 +23,4 @@ scrape_configs:
# scheme defaults to 'http'.
target_groups
:
-
targets
:
[
'
localhost:9090'
,
'
172.17.
42
.1:9091'
]
-
targets
:
[
'
localhost:9090'
,
'
172.17.
0
.1:9091'
]
public/app/features/templating/templateSrv.js
View file @
d1bac6cd
...
...
@@ -50,7 +50,7 @@ function (angular, _) {
}
var
escapedValues
=
_
.
map
(
value
,
regexEscape
);
return
'('
+
escapedValues
.
join
(
'|'
)
+
')'
;
return
escapedValues
.
join
(
'|'
)
;
}
case
"lucene"
:
{
if
(
typeof
value
===
'string'
)
{
...
...
public/app/plugins/datasource/prometheus/datasource.ts
View file @
d1bac6cd
...
...
@@ -52,7 +52,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
}
var
query
:
any
=
{};
query
.
expr
=
templateSrv
.
replace
(
target
.
expr
,
options
.
scopedVars
);
query
.
expr
=
templateSrv
.
replace
(
target
.
expr
,
options
.
scopedVars
,
'regex'
);
var
interval
=
target
.
interval
||
options
.
interval
;
var
intervalFactor
=
target
.
intervalFactor
||
1
;
...
...
public/app/plugins/datasource/prometheus/plugin.json
View file @
d1bac6cd
...
...
@@ -4,6 +4,5 @@
"id"
:
"prometheus"
,
"metrics"
:
true
,
"annotations"
:
true
,
"defaultMatchFormat"
:
"pipe"
"annotations"
:
true
}
public/test/specs/templateSrv-specs.js
View file @
d1bac6cd
...
...
@@ -127,7 +127,7 @@ define([
it
(
'multi value and regex format should render regex string'
,
function
()
{
var
result
=
_templateSrv
.
formatValue
([
'test.'
,
'test2'
],
'regex'
);
expect
(
result
).
to
.
be
(
'
(test
\\
.|test2)
'
);
expect
(
result
).
to
.
be
(
'
test
\\
.|test2
'
);
});
it
(
'multi value and pipe should render pipe string'
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment