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
1d8222ef
Commit
1d8222ef
authored
Mar 03, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(example): add basic annotation support for ds
parent
ee635be4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
examples/datasource-plugin-genericdatasource/plugin.json
+1
-1
examples/datasource-plugin-genericdatasource/src/datasource.js
+9
-0
examples/datasource-plugin-genericdatasource/src/module.js
+5
-1
examples/datasource-plugin-genericdatasource/src/partials/annotations.editor.html
+9
-0
No files found.
examples/datasource-plugin-genericdatasource/plugin.json
View file @
1d8222ef
...
...
@@ -8,7 +8,7 @@
"staticRoot"
:
"."
,
"metrics"
:
true
,
"annotations"
:
fals
e
,
"annotations"
:
tru
e
,
"info"
:
{
"description"
:
"generic datsource plugin"
,
...
...
examples/datasource-plugin-genericdatasource/src/datasource.js
View file @
1d8222ef
...
...
@@ -37,6 +37,15 @@ export class GenericDatasource {
});
}
annotationQuery
(
options
)
{
return
this
.
backendSrv
.
datasourceRequest
({
url
:
this
.
url
+
'/annotations'
,
method
:
'GET'
}).
then
(
result
=>
{
return
result
.
data
;
});
}
// Optional
// Required for templating
metricFindQuery
(
options
)
{
...
...
examples/datasource-plugin-genericdatasource/src/module.js
View file @
1d8222ef
...
...
@@ -7,9 +7,13 @@ GenericConfigCtrl.templateUrl = 'partials/config.html';
class
GenericQueryOptionsCtrl
{}
GenericQueryOptionsCtrl
.
templateUrl
=
'partials/query.options.html'
;
class
GenericAnnotationsQueryCtrl
{}
GenericAnnotationsQueryCtrl
.
templateUrl
=
'partials/annotations.editor.html'
export
{
GenericDatasource
as
Datasource
,
GenericDatasourceQueryCtrl
as
QueryCtrl
,
GenericConfigCtrl
as
ConfigCtrl
,
GenericQueryOptionsCtrl
as
QueryOptionsCtrl
GenericQueryOptionsCtrl
as
QueryOptionsCtrl
,
GenericAnnotationsQueryCtrl
as
AnnotationsQueryCtrl
};
examples/datasource-plugin-genericdatasource/src/partials/annotations.editor.html
0 → 100644
View file @
1d8222ef
<h5
class=
"section-heading"
>
Query
</h5>
<div
class=
"gf-form-group"
>
<div
class=
"gf-form"
>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
'ctrl.annotation.query'
placeholder=
""
></input>
</div>
</div>
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