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
bbc5dae1
Commit
bbc5dae1
authored
Sep 07, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on better handling of variables and url init and state
parent
9e7c5572
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
+17
-1
src/test/specs/helpers.js
+2
-0
src/test/specs/templateValuesSrv-specs.js
+15
-1
No files found.
src/test/specs/helpers.js
View file @
bbc5dae1
...
@@ -51,6 +51,7 @@ define([
...
@@ -51,6 +51,7 @@ define([
self
.
templateSrv
=
new
TemplateSrvStub
();
self
.
templateSrv
=
new
TemplateSrvStub
();
self
.
timeSrv
=
new
TimeSrvStub
();
self
.
timeSrv
=
new
TimeSrvStub
();
self
.
datasourceSrv
=
{};
self
.
datasourceSrv
=
{};
self
.
$routeParams
=
{};
this
.
providePhase
=
function
(
mocks
)
{
this
.
providePhase
=
function
(
mocks
)
{
return
module
(
function
(
$provide
)
{
return
module
(
function
(
$provide
)
{
...
@@ -103,6 +104,7 @@ define([
...
@@ -103,6 +104,7 @@ define([
this
.
replace
=
function
(
text
)
{
this
.
replace
=
function
(
text
)
{
return
_
.
template
(
text
,
this
.
data
,
this
.
templateSettings
);
return
_
.
template
(
text
,
this
.
data
,
this
.
templateSettings
);
};
};
this
.
init
=
function
()
{};
this
.
updateTemplateData
=
function
()
{
};
this
.
updateTemplateData
=
function
()
{
};
this
.
variableExists
=
function
()
{
return
false
;
};
this
.
variableExists
=
function
()
{
return
false
;
};
this
.
highlightVariablesAsHtml
=
function
(
str
)
{
return
str
;
};
this
.
highlightVariablesAsHtml
=
function
(
str
)
{
return
str
;
};
...
...
src/test/specs/templateValuesSrv-specs.js
View file @
bbc5dae1
...
@@ -10,7 +10,7 @@ define([
...
@@ -10,7 +10,7 @@ define([
var
ctx
=
new
helpers
.
ServiceTestContext
();
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'datasourceSrv'
,
'timeSrv'
,
'templateSrv'
]));
beforeEach
(
ctx
.
providePhase
([
'datasourceSrv'
,
'timeSrv'
,
'templateSrv'
,
"$routeParams"
]));
beforeEach
(
ctx
.
createService
(
'templateValuesSrv'
));
beforeEach
(
ctx
.
createService
(
'templateValuesSrv'
));
describe
(
'update interval variable options'
,
function
()
{
describe
(
'update interval variable options'
,
function
()
{
...
@@ -27,6 +27,20 @@ define([
...
@@ -27,6 +27,20 @@ define([
});
});
});
});
describe
.
only
(
'should init values'
,
function
()
{
var
variables
=
[
{
name
:
'test'
,
current
:
{
value
:
'hej'
}}
];
var
dashboard
=
{
templating
:
{
list
:
variables
}
};
beforeEach
(
function
()
{
ctx
.
service
.
init
(
dashboard
);
});
it
(
'should update options array'
,
function
()
{
});
});
function
describeUpdateVariable
(
desc
,
fn
)
{
function
describeUpdateVariable
(
desc
,
fn
)
{
describe
(
desc
,
function
()
{
describe
(
desc
,
function
()
{
var
scenario
=
{};
var
scenario
=
{};
...
...
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