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
6ff188e4
Commit
6ff188e4
authored
Sep 04, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for adding syntax in addition to [[variable]]
parent
44edaad1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
src/app/controllers/graphiteTarget.js
+1
-1
src/app/partials/panelgeneral.html
+6
-3
src/app/services/influxdb/influxdbDatasource.js
+0
-3
src/app/services/templateSrv.js
+6
-4
src/css/less/overrides.less
+2
-1
No files found.
src/app/controllers/graphiteTarget.js
View file @
6ff188e4
...
@@ -165,7 +165,7 @@ function (angular, _, config, gfunc, Parser) {
...
@@ -165,7 +165,7 @@ function (angular, _, config, gfunc, Parser) {
_
.
each
(
templateSrv
.
variables
,
function
(
variable
)
{
_
.
each
(
templateSrv
.
variables
,
function
(
variable
)
{
$scope
.
altSegments
.
unshift
(
new
MetricSegment
({
$scope
.
altSegments
.
unshift
(
new
MetricSegment
({
type
:
'template'
,
type
:
'template'
,
value
:
'
[[
'
+
variable
.
name
+
']]'
,
value
:
'
$
'
+
variable
.
name
+
']]'
,
expandable
:
true
,
expandable
:
true
,
}));
}));
});
});
...
...
src/app/partials/panelgeneral.html
View file @
6ff188e4
...
@@ -4,8 +4,12 @@
...
@@ -4,8 +4,12 @@
<div
class=
"editor-option"
>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Title
</label><input
type=
"text"
class=
"input-medium"
ng-model=
'panel.title'
></input>
<label
class=
"small"
>
Title
</label><input
type=
"text"
class=
"input-medium"
ng-model=
'panel.title'
></input>
</div>
</div>
<div
class=
"editor-option"
ng-hide=
"panel.sizeable == false"
>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Span
</label>
<select
class=
"input-mini"
ng-model=
"panel.span"
ng-options=
"f for f in [0,1,2,3,4,5,6,7,8,9,10,11,12]"
></select>
<label
class=
"small"
>
Span
</label>
<select
class=
"input-mini"
ng-model=
"panel.span"
ng-options=
"f for f in [0,1,2,3,4,5,6,7,8,9,10,11,12]"
></select>
</div>
</div>
<div
class=
"editor-option"
>
<label
class=
"small"
>
Height
</label><input
type=
"text"
class=
"input-medium"
ng-model=
'panel.height'
></select>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
src/app/services/influxdb/influxdbDatasource.js
View file @
6ff188e4
...
@@ -19,9 +19,6 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
...
@@ -19,9 +19,6 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
this
.
username
=
datasource
.
username
;
this
.
username
=
datasource
.
username
;
this
.
password
=
datasource
.
password
;
this
.
password
=
datasource
.
password
;
this
.
name
=
datasource
.
name
;
this
.
name
=
datasource
.
name
;
this
.
templateSettings
=
{
interpolate
:
/
\[\[([\s\S]
+
?)\]\]
/g
,
};
this
.
saveTemp
=
_
.
isUndefined
(
datasource
.
save_temp
)
?
true
:
datasource
.
save_temp
;
this
.
saveTemp
=
_
.
isUndefined
(
datasource
.
save_temp
)
?
true
:
datasource
.
save_temp
;
this
.
saveTempTTL
=
_
.
isUndefined
(
datasource
.
save_temp_ttl
)
?
'30d'
:
datasource
.
save_temp_ttl
;
this
.
saveTempTTL
=
_
.
isUndefined
(
datasource
.
save_temp_ttl
)
?
'30d'
:
datasource
.
save_temp_ttl
;
...
...
src/app/services/templateSrv.js
View file @
6ff188e4
...
@@ -8,10 +8,12 @@ function (angular, _) {
...
@@ -8,10 +8,12 @@ function (angular, _) {
var
module
=
angular
.
module
(
'grafana.services'
);
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'templateSrv'
,
function
(
$q
,
$routeParams
)
{
module
.
service
(
'templateSrv'
,
function
(
$q
,
$routeParams
)
{
var
self
=
this
;
this
.
init
=
function
(
variables
)
{
this
.
init
=
function
(
variables
)
{
this
.
templateSettings
=
{
interpolate
:
/
\[\[([\s\S]
+
?)\]\]
/g
};
this
.
templateSettings
=
{
interpolate
:
/
\[\[([\s\S]
+
?)\]\]
/g
};
this
.
variables
=
variables
;
this
.
variables
=
variables
;
this
.
regex
=
/
\$(\w
+
)
|
\[\[([\s\S]
+
?)\]\]
/g
;
this
.
updateTemplateData
(
true
);
this
.
updateTemplateData
(
true
);
};
};
...
@@ -39,11 +41,11 @@ function (angular, _) {
...
@@ -39,11 +41,11 @@ function (angular, _) {
};
};
this
.
replace
=
function
(
target
)
{
this
.
replace
=
function
(
target
)
{
if
(
!
target
||
target
.
indexOf
(
'[['
)
===
-
1
)
{
if
(
!
target
)
{
return
;
}
return
target
;
}
return
_
.
template
(
target
,
this
.
_templateData
,
this
.
templateSettings
);
return
target
.
replace
(
this
.
regex
,
function
(
match
,
g1
,
g2
)
{
return
self
.
_templateData
[
g1
||
g2
]
||
match
;
});
};
};
});
});
...
...
src/css/less/overrides.less
View file @
6ff188e4
...
@@ -66,7 +66,8 @@ code, pre {
...
@@ -66,7 +66,8 @@ code, pre {
}
}
.panel {
.panel {
display: inline-table;
display: inline-block;
float: left;
vertical-align: top;
vertical-align: top;
}
}
...
...
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