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
00f5f8b2
Commit
00f5f8b2
authored
Aug 17, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(mixed datasource): polishing feature, making sure everything works, #436
parent
95f1343a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
37 deletions
+84
-37
public/app/features/templating/editorCtrl.js
+4
-1
public/app/partials/metrics.html
+2
-2
public/app/plugins/datasource/grafana/datasource.js
+1
-0
public/app/plugins/datasource/grafana/directives.js
+13
-0
public/app/plugins/datasource/grafana/partials/query.editor.html
+53
-13
public/app/plugins/datasource/graphite/partials/query.editor.html
+11
-21
No files found.
public/app/features/templating/editorCtrl.js
View file @
00f5f8b2
...
...
@@ -23,7 +23,10 @@ function (angular, _) {
$scope
.
init
=
function
()
{
$scope
.
editor
=
{
index
:
0
};
$scope
.
datasources
=
datasourceSrv
.
getMetricSources
();
$scope
.
datasources
=
_
.
filter
(
datasourceSrv
.
getMetricSources
(),
function
(
ds
)
{
return
!
ds
.
meta
.
builtIn
;
});
$scope
.
variables
=
templateSrv
.
variables
;
$scope
.
reset
();
...
...
public/app/partials/metrics.html
View file @
00f5f8b2
...
...
@@ -6,12 +6,12 @@
</div>
<div
style=
"margin: 20px 0 0 0"
>
<button
class=
"btn btn-inverse"
ng-click=
"addDataQuery()"
ng-hide=
"datasource.meta.
builtIn
"
>
<button
class=
"btn btn-inverse"
ng-click=
"addDataQuery()"
ng-hide=
"datasource.meta.
mixed
"
>
<i
class=
"fa fa-plus"
></i>
Query
</button>
<div
class=
"dropdown"
ng-if=
"datasource.meta.
builtIn
"
>
<div
class=
"dropdown"
ng-if=
"datasource.meta.
mixed
"
>
<button
class=
"btn btn-inverse dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-plus"
></i>
Query
<span
class=
"caret"
></span>
...
...
public/app/plugins/datasource/grafana/datasource.js
View file @
00f5f8b2
...
...
@@ -2,6 +2,7 @@ define([
'angular'
,
'lodash'
,
'kbn'
,
'./directives'
,
],
function
(
angular
,
_
,
kbn
)
{
'use strict'
;
...
...
public/app/plugins/datasource/grafana/directives.js
0 → 100644
View file @
00f5f8b2
define
([
'angular'
,
],
function
(
angular
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.directives'
);
module
.
directive
(
'metricQueryEditorGrafana'
,
function
()
{
return
{
templateUrl
:
'app/plugins/datasource/grafana/partials/query.editor.html'
};
});
});
public/app/plugins/datasource/grafana/partials/query.editor.html
View file @
00f5f8b2
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list pull-right"
>
<li
ng-show=
"parserError"
class=
"tight-form-item"
>
<a
bs-tooltip=
"parserError"
style=
"color: rgb(229, 189, 28)"
role=
"menuitem"
>
<i
class=
"fa fa-warning"
></i>
</a>
</li>
<li
class=
"tight-form-item"
>
<div
class=
"dropdown"
>
<a
class=
"pointer dropdown-toggle"
data-toggle=
"dropdown"
tabindex=
"1"
>
<i
class=
"fa fa-bars"
></i>
</a>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"duplicate()"
>
Duplicate
</a>
</li>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"moveMetricQuery($index, $index-1)"
>
Move up
</a>
</li>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"moveMetricQuery($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)"
>
<i
class=
"fa fa-remove"
></i>
</a>
</li>
</ul>
<div
class=
"fluid-row"
style=
"margin-top: 20px
"
>
<div
class=
"span2"
></div
>
<div
class=
"grafana-info-box span8"
>
<
h5>
Test graph
</h5
>
<p
>
This is just a test data source that generates random walk series. If this is your only data source
open the left side menu and navigate to the data sources admin screen and add your data sources (you need to be
logged in to do this). You can change data source using the button to the left of the
<strong>
Add query
</strong>
button.
<
/p
>
</div>
<div
class=
"span2"
></div
>
<ul
class=
"tight-form-list
"
>
<li
class=
"tight-form-item"
style=
"min-width: 15px; text-align: center"
>
{{target.refId}}
<
/li
>
<li>
<a
class=
"tight-form-item"
ng-click=
"target.hide = !target.hide; get_data();"
role=
"menuitem"
>
<i
class=
"fa fa-eye"
></i>
</a>
</li>
<
li
class=
"tight-form-item"
>
Test metric (fake data source)
</li
>
</ul>
<div
class=
"clearfix"
></div>
</div>
public/app/plugins/datasource/graphite/partials/query.editor.html
View file @
00f5f8b2
...
...
@@ -5,36 +5,28 @@
<i
class=
"fa fa-warning"
></i>
</a>
</li>
<li
class=
"tight-form-item"
>
<a
class=
"pointer"
tabindex=
"1"
ng-click=
"toggleEditorMode()"
>
<i
class=
"fa fa-pencil"
></i>
</a>
<li
class=
"tight-form-item small"
ng-show=
"target.datasource"
>
<i
class=
"fa fa-database"
></i>
<em>
{{target.datasource}}
</em>
</li>
<li
class=
"tight-form-item"
>
<div
class=
"dropdown"
>
<a
class=
"pointer dropdown-toggle"
data-toggle=
"dropdown"
tabindex=
"1"
>
<a
class=
"pointer dropdown-toggle"
data-toggle=
"dropdown"
tabindex=
"1"
>
<i
class=
"fa fa-bars"
></i>
</a>
<ul
class=
"dropdown-menu pull-right"
role=
"menu"
>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"duplicate()"
>
Duplicate
<a
tabindex=
"1"
ng-click=
"toggleEditorMode()"
>
Switch editor mode
</a>
</li>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"moveMetricQuery($index, $index-1)"
>
Move up
</a>
<a
tabindex=
"1"
ng-click=
"duplicate()"
>
Duplicate
</a>
</li>
<li
role=
"menuitem"
>
<a
tabindex=
"1"
ng-click=
"moveMetricQuery($index, $index+1)"
>
Move down
</a>
<a
tabindex=
"1"
ng-click=
"moveMetricQuery($index, $index-1)"
>
Move up
</a>
</li
>
<li
role=
"menuitem"
>
<
a
tabindex=
"1"
ng-click=
"moveMetricQuery($index, $index+1)"
>
Move down
<
/a>
</li>
</ul>
</div>
...
...
@@ -51,9 +43,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; get_data();"
role=
"menuitem"
>
<i
class=
"fa fa-eye"
></i>
</a>
</li>
...
...
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