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
6799b766
Commit
6799b766
authored
Mar 11, 2017
by
Daniel Lee
Committed by
GitHub
Mar 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7775 from hagen1778/prometheus-textarea-query
Make Prometheus query field a textarea #7663
parents
22553b15
04d90d71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
public/app/plugins/datasource/prometheus/partials/query.editor.html
+10
-7
public/app/plugins/datasource/prometheus/query_ctrl.ts
+4
-0
No files found.
public/app/plugins/datasource/prometheus/partials/query.editor.html
View file @
6799b766
<query-editor-row
query-ctrl=
"ctrl"
can-collapse=
"
fals
e"
>
<query-editor-row
query-ctrl=
"ctrl"
can-collapse=
"
true"
has-text-edit-mode=
"tru
e"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form gf-form--grow"
>
<label
class=
"gf-form-label width-8"
>
Query
</label>
<textarea
rows=
"3"
class=
"gf-form-input"
ng-model=
"ctrl.target.expr"
spellcheck=
"false"
placeholder=
"query expression"
data-min-length=
0
data-items=
100
ng-model-onblur
ng-change=
"ctrl.refreshMetricData()"
></textarea>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.expr"
spellcheck=
'false'
placeholder=
"query expression"
data-min-length=
0
data-items=
100
ng-model-onblur
ng-change=
"ctrl.refreshMetricData()"
>
</div>
<div
class=
"gf-form max-width-22"
>
<label
class=
"gf-form-label"
>
Metric lookup
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.metric"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestMetrics"
placeholder=
"metric name"
data-min-length=
0
data-items=
100
>
</div>
</div>
</div>
</div>
...
@@ -39,6 +34,14 @@
...
@@ -39,6 +34,14 @@
ng-change=
"ctrl.refreshMetricData()"
>
ng-change=
"ctrl.refreshMetricData()"
>
</select>
</select>
</div>
</div>
</div>
<div
class=
"gf-form max-width-22"
>
<label
class=
"gf-form-label"
>
Metric lookup
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.target.metric"
spellcheck=
'false'
bs-typeahead=
"ctrl.suggestMetrics"
placeholder=
"metric name"
data-min-length=
0
data-items=
100
>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label"
>
<label
class=
"gf-form-label"
>
<a
href=
"{{ctrl.linkToPrometheus}}"
target=
"_blank"
bs-tooltip=
"'Link to Graph in Prometheus'"
>
<a
href=
"{{ctrl.linkToPrometheus}}"
target=
"_blank"
bs-tooltip=
"'Link to Graph in Prometheus'"
>
<i
class=
"fa fa-share-square-o"
></i>
<i
class=
"fa fa-share-square-o"
></i>
...
...
public/app/plugins/datasource/prometheus/query_ctrl.ts
View file @
6799b766
...
@@ -75,6 +75,10 @@ class PrometheusQueryCtrl extends QueryCtrl {
...
@@ -75,6 +75,10 @@ class PrometheusQueryCtrl extends QueryCtrl {
var
hash
=
encodeURIComponent
(
JSON
.
stringify
([
expr
]));
var
hash
=
encodeURIComponent
(
JSON
.
stringify
([
expr
]));
this
.
linkToPrometheus
=
this
.
datasource
.
directUrl
+
'/graph#'
+
hash
;
this
.
linkToPrometheus
=
this
.
datasource
.
directUrl
+
'/graph#'
+
hash
;
}
}
getCollapsedText
()
{
return
this
.
target
.
expr
;
}
}
}
export
{
PrometheusQueryCtrl
};
export
{
PrometheusQueryCtrl
};
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