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
d8df421b
Commit
d8df421b
authored
Sep 22, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(build): fixed issues with optimized build, fixes #6096
parent
39af588a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
62 deletions
+5
-62
public/app/features/templating/constant_variable.ts
+1
-1
public/app/features/templating/datasource_variable.ts
+1
-1
public/app/features/templating/editor_ctrl.ts
+1
-1
public/app/features/templating/interval_variable.ts
+1
-1
public/app/features/templating/query_variable.ts
+1
-0
public/test/specs/templateValuesSrv-specs.js
+0
-58
No files found.
public/app/features/templating/constant_variable.ts
View file @
d8df421b
...
...
@@ -18,7 +18,7 @@ export class ConstantVariable implements Variable {
current
:
{},
};
/** @ngInject */
/** @ngInject *
*
/
constructor
(
private
model
,
private
variableSrv
)
{
assignModelProperties
(
this
,
model
,
this
.
defaults
);
}
...
...
public/app/features/templating/datasource_variable.ts
View file @
d8df421b
...
...
@@ -22,7 +22,7 @@ export class DatasourceVariable implements Variable {
query
:
''
,
};
/** @ngInject */
/** @ngInject *
*
/
constructor
(
private
model
,
private
datasourceSrv
,
private
variableSrv
)
{
assignModelProperties
(
this
,
model
,
this
.
defaults
);
}
...
...
public/app/features/templating/editor_ctrl.ts
View file @
d8df421b
...
...
@@ -6,7 +6,7 @@ import {variableTypes} from './variable';
export
class
VariableEditorCtrl
{
/** @ngInject */
/** @ngInject *
*
/
constructor
(
private
$scope
,
private
datasourceSrv
,
private
variableSrv
,
templateSrv
)
{
$scope
.
variableTypes
=
variableTypes
;
$scope
.
ctrl
=
{};
...
...
public/app/features/templating/interval_variable.ts
View file @
d8df421b
...
...
@@ -28,7 +28,7 @@ export class IntervalVariable implements Variable {
auto_count
:
30
,
};
/** @ngInject */
/** @ngInject *
*
/
constructor
(
private
model
,
private
timeSrv
,
private
templateSrv
,
private
variableSrv
)
{
assignModelProperties
(
this
,
model
,
this
.
defaults
);
this
.
refresh
=
2
;
...
...
public/app/features/templating/query_variable.ts
View file @
d8df421b
...
...
@@ -40,6 +40,7 @@ export class QueryVariable implements Variable {
tagValuesQuery
:
null
,
};
/** @ngInject **/
constructor
(
private
model
,
private
datasourceSrv
,
private
templateSrv
,
private
variableSrv
,
private
$q
)
{
// copy model properties to this instance
assignModelProperties
(
this
,
model
,
this
.
defaults
);
...
...
public/test/specs/templateValuesSrv-specs.js
deleted
100644 → 0
View file @
39af588a
define
([
'../mocks/dashboard-mock'
,
'./helpers'
,
'app/features/templating/templateValuesSrv'
],
function
(
dashboardMock
,
helpers
)
{
'use strict'
;
describe
(
'templateValuesSrv'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'datasourceSrv'
,
'timeSrv'
,
'templateSrv'
,
'$location'
]));
beforeEach
(
ctx
.
createService
(
'templateValuesSrv'
));
describe
(
'when template variable is present in url'
,
function
()
{
describe
(
'and setting simple variable'
,
function
()
{
var
variable
=
{
name
:
'apps'
,
current
:
{
text
:
"test"
,
value
:
"test"
},
options
:
[{
text
:
"test"
,
value
:
"test"
}]
};
beforeEach
(
function
(
done
)
{
var
dashboard
=
{
templating
:
{
list
:
[
variable
]
}
};
var
urlParams
=
{};
urlParams
[
"var-apps"
]
=
"new"
;
ctx
.
$location
.
search
=
sinon
.
stub
().
returns
(
urlParams
);
ctx
.
service
.
init
(
dashboard
).
then
(
function
()
{
done
();
});
ctx
.
$rootScope
.
$digest
();
});
it
(
'should update current value'
,
function
()
{
expect
(
variable
.
current
.
value
).
to
.
be
(
"new"
);
expect
(
variable
.
current
.
text
).
to
.
be
(
"new"
);
});
});
// describe('and setting adhoc variable', function() {
// var variable = {name: 'filters', type: 'adhoc'};
//
// beforeEach(function(done) {
// var dashboard = { templating: { list: [variable] } };
// var urlParams = {};
// urlParams["var-filters"] = "hostname|gt|server2";
// ctx.$location.search = sinon.stub().returns(urlParams);
// ctx.service.init(dashboard).then(function() { done(); });
// ctx.$rootScope.$digest();
// });
//
// it('should update current value', function() {
// expect(variable.tags[0]).to.eq({tag: 'hostname', value: 'server2'});
// });
// });
});
});
});
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