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
b1bfd359
Commit
b1bfd359
authored
Feb 01, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(datasources): last fixes for data sources
parent
a053552f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
26 deletions
+28
-26
public/app/plugins/datasource/elasticsearch/partials/query.editor.html
+7
-7
public/app/plugins/datasource/elasticsearch/partials/query.options.html
+3
-3
public/app/plugins/datasource/elasticsearch/query_ctrl.js
+4
-3
public/app/plugins/datasource/opentsdb/partials/query.editor.html
+5
-6
public/app/plugins/datasource/opentsdb/queryCtrl.js
+1
-0
public/app/plugins/datasource/prometheus/partials/query.editor.html
+5
-6
public/app/plugins/datasource/prometheus/query_ctrl.js
+3
-1
No files found.
public/app/plugins/datasource/elasticsearch/partials/query.editor.html
View file @
b1bfd359
...
...
@@ -14,15 +14,15 @@
<i
class=
"fa fa-bars"
></i>
</a>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index+1)"
>
Move down
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"
panelCtrl.
duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"
panelCtrl.
moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"
panelCtrl.
moveDataQuery($index, $index+1)"
>
Move down
</a></li>
</ul>
</div>
</li>
<li
class=
"tight-form-item last"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"removeDataQuery(target)"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"
panelCtrl.
removeDataQuery(target)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
...
...
@@ -33,7 +33,7 @@
{{target.refId}}
</li>
<li>
<a
class=
"tight-form-item"
ng-click=
"target.hide = !target.hide;
get_data
();"
role=
"menuitem"
>
<a
class=
"tight-form-item"
ng-click=
"target.hide = !target.hide;
panelCtrl.refresh
();"
role=
"menuitem"
>
<i
class=
"fa fa-eye"
></i>
</a>
</li>
...
...
@@ -44,13 +44,13 @@
Query
</li>
<li>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 345px;"
ng-model=
"target.query"
spellcheck=
'false'
placeholder=
"Lucene query"
ng-blur=
"
get_data
()"
>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 345px;"
ng-model=
"target.query"
spellcheck=
'false'
placeholder=
"Lucene query"
ng-blur=
"
panelCtrl.refresh
()"
>
</li>
<li
class=
"tight-form-item query-keyword"
>
Alias
</li>
<li>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 200px;"
ng-model=
"target.alias"
spellcheck=
'false'
placeholder=
"alias patterns (empty = auto)"
ng-blur=
"
get_data
()"
>
<input
type=
"text"
class=
"tight-form-input"
style=
"width: 200px;"
ng-model=
"target.alias"
spellcheck=
'false'
placeholder=
"alias patterns (empty = auto)"
ng-blur=
"
panelCtrl.refresh
()"
>
</li>
</ul>
<div
class=
"clearfix"
></div>
...
...
public/app/plugins/datasource/elasticsearch/partials/query.options.html
View file @
b1bfd359
...
...
@@ -8,7 +8,7 @@
Group by time interval
</li>
<li>
<input
type=
"text"
class=
"input-medium tight-form-input"
ng-model=
"
panel.interval"
ng-blur=
"get_data
();"
<input
type=
"text"
class=
"input-medium tight-form-input"
ng-model=
"
ctrl.panel.interval"
ng-blur=
"ctrl.refresh
();"
spellcheck=
'false'
placeholder=
"example: >10s"
>
</li>
<li
class=
"tight-form-item"
>
...
...
@@ -23,7 +23,7 @@
<i
class=
"fa fa-info-circle"
></i>
</li>
<li
class=
"tight-form-item"
>
<a
ng-click=
"toggleEditorHelp(1);"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
<a
ng-click=
"
ctrl.
toggleEditorHelp(1);"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
alias patterns
</a>
</li>
...
...
@@ -34,7 +34,7 @@
<div
class=
"editor-row"
>
<div
class=
"pull-left"
style=
"margin-top: 30px;"
>
<div
class=
"grafana-info-box span6"
ng-if=
"editorHelpIndex === 1"
>
<div
class=
"grafana-info-box span6"
ng-if=
"
ctrl.
editorHelpIndex === 1"
>
<h5>
Alias patterns
</h5>
<ul
ng-non-bindable
>
<li>
{{term fieldname}} = replaced with value of term group by
</li>
...
...
public/app/plugins/datasource/elasticsearch/query_ctrl.js
View file @
b1bfd359
...
...
@@ -6,8 +6,9 @@ function (angular) {
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'ElasticQueryCtrl'
,
function
(
$scope
,
$timeout
,
uiSegmentSrv
)
{
module
.
controller
(
'ElasticQueryCtrl'
,
function
(
$scope
,
$
rootScope
,
$
timeout
,
uiSegmentSrv
)
{
$scope
.
esVersion
=
$scope
.
datasource
.
esVersion
;
$scope
.
panelCtrl
=
$scope
.
ctrl
;
$scope
.
init
=
function
()
{
var
target
=
$scope
.
target
;
...
...
@@ -27,10 +28,10 @@ function (angular) {
var
newJson
=
angular
.
toJson
(
$scope
.
datasource
.
queryBuilder
.
build
(
$scope
.
target
),
true
);
if
(
newJson
!==
$scope
.
oldQueryRaw
)
{
$scope
.
rawQueryOld
=
newJson
;
$scope
.
get_data
();
$scope
.
panelCtrl
.
refresh
();
}
$
s
cope
.
appEvent
(
'elastic-query-updated'
);
$
rootS
cope
.
appEvent
(
'elastic-query-updated'
);
};
$scope
.
handleQueryError
=
function
(
err
)
{
...
...
public/app/plugins/datasource/opentsdb/partials/query.editor.html
View file @
b1bfd359
...
...
@@ -9,15 +9,14 @@
<i
class=
"fa fa-bars"
></i>
</a>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"toggleQueryMode()"
>
Switch editor mode
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index+1)"
>
Move down
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.moveDataQuery($index, $index+1)"
>
Move down
</a></li>
</ul>
</div>
</li>
<li
class=
"tight-form-item last"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"removeDataQuery(target)"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"
panelCtrl.
removeDataQuery(target)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
...
...
@@ -29,7 +28,7 @@
</li>
<li>
<a
class=
"tight-form-item"
ng-click=
"target.hide = !target.hide;
get_data
();"
ng-click=
"target.hide = !target.hide;
panelCtrl.refresh
();"
role=
"menuitem"
>
<i
class=
"fa fa-eye"
></i>
</a>
...
...
public/app/plugins/datasource/opentsdb/queryCtrl.js
View file @
b1bfd359
...
...
@@ -9,6 +9,7 @@ function (angular, _, kbn) {
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'OpenTSDBQueryCtrl'
,
function
(
$scope
)
{
$scope
.
panelCtrl
=
$scope
.
ctrl
;
$scope
.
init
=
function
()
{
$scope
.
target
.
errors
=
validateTarget
(
$scope
.
target
);
...
...
public/app/plugins/datasource/prometheus/partials/query.editor.html
View file @
b1bfd359
...
...
@@ -9,15 +9,14 @@
<i
class=
"fa fa-bars"
></i>
</a>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"toggleQueryMode()"
>
Switch editor mode
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"moveDataQuery($index, $index+1)"
>
Move down
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.duplicateDataQuery(target)"
>
Duplicate
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.moveDataQuery($index, $index-1)"
>
Move up
</a></li>
<li
role=
"menuitem"
><a
tabindex=
"1"
ng-click=
"panelCtrl.moveDataQuery($index, $index+1)"
>
Move down
</a></li>
</ul>
</div>
</li>
<li
class=
"tight-form-item last"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"removeDataQuery(target)"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"
panelCtr.
removeDataQuery(target)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
...
...
@@ -29,7 +28,7 @@
</li>
<li>
<a
class=
"tight-form-item"
ng-click=
"target.hide = !target.hide;
get_data
();"
ng-click=
"target.hide = !target.hide;
panelCtrl.refresh
();"
role=
"menuitem"
>
<i
class=
"fa fa-eye"
></i>
</a>
...
...
public/app/plugins/datasource/prometheus/query_ctrl.js
View file @
b1bfd359
...
...
@@ -8,6 +8,8 @@ function (angular, _) {
var
module
=
angular
.
module
(
'grafana.controllers'
);
module
.
controller
(
'PrometheusQueryCtrl'
,
function
(
$scope
,
templateSrv
)
{
$scope
.
panelCtrl
=
$scope
.
ctrl
;
$scope
.
panel
=
$scope
.
panelCtrl
.
panel
;
$scope
.
init
=
function
()
{
var
target
=
$scope
.
target
;
...
...
@@ -29,7 +31,7 @@ function (angular, _) {
$scope
.
refreshMetricData
=
function
()
{
if
(
!
_
.
isEqual
(
$scope
.
oldTarget
,
$scope
.
target
))
{
$scope
.
oldTarget
=
angular
.
copy
(
$scope
.
target
);
$scope
.
get_data
();
$scope
.
paneCtrl
.
refresh
();
}
};
...
...
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