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
f5d992f6
Commit
f5d992f6
authored
Jul 15, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InfluxDB: Support for alias & alias patterns when using raw query mode, #584
parent
25407fb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
src/app/partials/influxdb/editor.html
+24
-6
src/app/services/influxdb/influxdbDatasource.js
+4
-4
No files found.
src/app/partials/influxdb/editor.html
View file @
f5d992f6
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"duplicate()"
>
Duplicate
</a>
<a
tabindex=
"1"
ng-click=
"duplicate()"
>
Duplicate
</a>
<a
tabindex=
"2"
ng-click=
"showQuery()"
ng-hide=
"target.rawQuery"
>
Show Query
</a>
<a
tabindex=
"2"
ng-click=
"showQuery()"
ng-hide=
"target.rawQuery"
>
Raw query mode
</a>
<a
tabindex=
"2"
ng-click=
"hideQuery()"
ng-show=
"target.rawQuery"
>
Hide Query
</a>
<a
tabindex=
"2"
ng-click=
"hideQuery()"
ng-show=
"target.rawQuery"
>
Query editor mode
</a>
</li>
</li>
</ul>
</ul>
</li>
</li>
...
@@ -41,17 +41,35 @@
...
@@ -41,17 +41,35 @@
</li>
</li>
</ul>
</ul>
<input
type=
"text"
<!-- Raw Query mode -->
class=
"grafana-target-text-input span10"
<ul
class=
"grafana-segment-list"
ng-show=
"target.rawQuery"
>
<li>
<input
type=
"text"
class=
"grafana-target-segment-input span8"
ng-model=
"target.query"
ng-model=
"target.query"
placeholder=
"select ..."
placeholder=
"select ..."
focus-me=
"target.rawQuery"
focus-me=
"target.rawQuery"
spellcheck=
'false'
spellcheck=
'false'
data-min-length=
0
data-items=
100
data-min-length=
0
data-items=
100
ng-model-onblur
ng-model-onblur
ng-blur=
"get_data()"
ng-blur=
"get_data()"
>
ng-show=
"target.rawQuery"
>
</li
>
<li
class=
"grafana-target-segment"
>
as
</li>
<li>
<input
type=
"text"
class=
"input-medium grafana-target-segment-input"
ng-model=
"target.alias"
spellcheck=
'false'
placeholder=
"alias"
ng-blur=
"get_data()"
>
</li>
</ul>
<!-- Query editor mode -->
<ul
class=
"grafana-segment-list"
role=
"menu"
ng-hide=
"target.rawQuery"
>
<ul
class=
"grafana-segment-list"
role=
"menu"
ng-hide=
"target.rawQuery"
>
<li>
<li>
<input
type=
"text"
<input
type=
"text"
...
...
src/app/services/influxdb/influxdbDatasource.js
View file @
f5d992f6
...
@@ -94,10 +94,6 @@ function (angular, _, kbn, InfluxSeries) {
...
@@ -94,10 +94,6 @@ function (angular, _, kbn, InfluxSeries) {
query
=
_
.
template
(
template
,
templateData
,
this
.
templateSettings
);
query
=
_
.
template
(
template
,
templateData
,
this
.
templateSettings
);
query
=
filterSrv
.
applyTemplateToTarget
(
query
);
query
=
filterSrv
.
applyTemplateToTarget
(
query
);
if
(
target
.
alias
)
{
alias
=
filterSrv
.
applyTemplateToTarget
(
target
.
alias
);
}
if
(
target
.
groupby_field_add
)
{
if
(
target
.
groupby_field_add
)
{
groupByField
=
target
.
groupby_field
;
groupByField
=
target
.
groupby_field
;
}
}
...
@@ -105,6 +101,10 @@ function (angular, _, kbn, InfluxSeries) {
...
@@ -105,6 +101,10 @@ function (angular, _, kbn, InfluxSeries) {
target
.
query
=
query
;
target
.
query
=
query
;
}
}
if
(
target
.
alias
)
{
alias
=
filterSrv
.
applyTemplateToTarget
(
target
.
alias
);
}
var
handleResponse
=
_
.
partial
(
handleInfluxQueryResponse
,
alias
,
groupByField
);
var
handleResponse
=
_
.
partial
(
handleInfluxQueryResponse
,
alias
,
groupByField
);
return
this
.
doInfluxRequest
(
query
,
alias
).
then
(
handleResponse
);
return
this
.
doInfluxRequest
(
query
,
alias
).
then
(
handleResponse
);
...
...
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