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
79933299
Commit
79933299
authored
Dec 07, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:grafana/grafana into develop
parents
eb6d0e9f
569f5e8d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
1 deletions
+33
-1
public/app/features/explore/Explore.tsx
+1
-1
public/app/features/plugins/datasource_srv.ts
+5
-0
public/app/features/plugins/specs/datasource_srv.test.ts
+26
-0
public/app/features/templating/template_srv.ts
+1
-0
No files found.
public/app/features/explore/Explore.tsx
View file @
79933299
...
...
@@ -158,7 +158,7 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
if
(
!
datasourceSrv
)
{
throw
new
Error
(
'No datasource service passed as props.'
);
}
const
datasources
=
datasourceSrv
.
get
Al
l
();
const
datasources
=
datasourceSrv
.
get
Externa
l
();
const
exploreDatasources
=
datasources
.
map
(
ds
=>
({
value
:
ds
.
name
,
label
:
ds
.
name
,
...
...
public/app/features/plugins/datasource_srv.ts
View file @
79933299
...
...
@@ -78,6 +78,11 @@ export class DatasourceSrv {
return
Object
.
keys
(
datasources
).
map
(
name
=>
datasources
[
name
]);
}
getExternal
()
{
const
datasources
=
this
.
getAll
().
filter
(
ds
=>
!
ds
.
meta
.
builtIn
);
return
_
.
sortBy
(
datasources
,
[
'name'
]);
}
getAnnotationSources
()
{
const
sources
=
[];
...
...
public/app/features/plugins/specs/datasource_srv.test.ts
View file @
79933299
...
...
@@ -18,6 +18,32 @@ const templateSrv = {
describe
(
'datasource_srv'
,
()
=>
{
const
_datasourceSrv
=
new
DatasourceSrv
({},
{},
{},
templateSrv
);
describe
(
'when loading external datasources'
,
()
=>
{
beforeEach
(()
=>
{
config
.
datasources
=
{
buildInDs
:
{
name
:
'buildIn'
,
meta
:
{
builtIn
:
true
},
},
nonBuildIn
:
{
name
:
'external1'
,
meta
:
{
builtIn
:
false
},
},
nonExplore
:
{
name
:
'external2'
,
meta
:
{},
},
};
});
it
(
'should return list of explore sources'
,
()
=>
{
const
externalSources
=
_datasourceSrv
.
getExternal
();
expect
(
externalSources
.
length
).
toBe
(
2
);
expect
(
externalSources
[
0
].
name
).
toBe
(
'external1'
);
expect
(
externalSources
[
1
].
name
).
toBe
(
'external2'
);
});
});
describe
(
'when loading metric sources'
,
()
=>
{
let
metricSources
;
const
unsortedDatasources
=
{
...
...
public/app/features/templating/template_srv.ts
View file @
79933299
...
...
@@ -17,6 +17,7 @@ export class TemplateSrv {
constructor
()
{
this
.
builtIns
[
'__interval'
]
=
{
text
:
'1s'
,
value
:
'1s'
};
this
.
builtIns
[
'__interval_ms'
]
=
{
text
:
'100'
,
value
:
'100'
};
this
.
variables
=
[];
}
init
(
variables
)
{
...
...
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