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
f90fda8e
Commit
f90fda8e
authored
Feb 07, 2016
by
utkarshcmu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tracking opentsdb version in opentsdb config
parent
517721ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
5 deletions
+41
-5
public/app/plugins/datasource/opentsdb/config_ctrl.ts
+21
-0
public/app/plugins/datasource/opentsdb/datasource.js
+5
-0
public/app/plugins/datasource/opentsdb/module.ts
+1
-4
public/app/plugins/datasource/opentsdb/partials/config.html
+13
-0
public/app/plugins/datasource/opentsdb/specs/datasource-specs.ts
+1
-1
No files found.
public/app/plugins/datasource/opentsdb/config_ctrl.ts
0 → 100644
View file @
f90fda8e
///<reference path="../../../headers/common.d.ts" />
import
angular
from
'angular'
;
import
_
from
'lodash'
;
export
class
OpenTsConfigCtrl
{
static
templateUrl
=
'public/app/plugins/datasource/opentsdb/partials/config.html'
;
current
:
any
;
/** @ngInject */
constructor
(
$scope
)
{
this
.
current
.
jsonData
=
this
.
current
.
jsonData
||
{};
this
.
current
.
jsonData
.
tsdbVersion
=
this
.
current
.
jsonData
.
tsdbVersion
||
1
;
}
tsdbVersions
=
[
{
name
:
'<=2.1'
,
value
:
1
},
{
name
:
'>=2.2'
,
value
:
2
},
];
}
public/app/plugins/datasource/opentsdb/datasource.js
View file @
f90fda8e
...
...
@@ -14,6 +14,11 @@ function (angular, _, dateMath) {
this
.
name
=
instanceSettings
.
name
;
this
.
withCredentials
=
instanceSettings
.
withCredentials
;
this
.
basicAuth
=
instanceSettings
.
basicAuth
;
this
.
tsdbVersions
=
[
{
name
:
'<=2.1'
,
value
:
1
},
{
name
:
'>=2.2'
,
value
:
2
},
];
this
.
tsdbVersion
=
instanceSettings
.
jsonData
.
tsdbVersion
;
this
.
supportMetrics
=
true
;
this
.
tagKeys
=
{};
...
...
public/app/plugins/datasource/opentsdb/module.ts
View file @
f90fda8e
import
{
OpenTsDatasource
}
from
'./datasource'
;
import
{
OpenTsQueryCtrl
}
from
'./query_ctrl'
;
class
OpenTsConfigCtrl
{
static
templateUrl
=
'partials/config.html'
;
}
import
{
OpenTsConfigCtrl
}
from
'./config_ctrl'
;
export
{
OpenTsDatasource
as
Datasource
,
...
...
public/app/plugins/datasource/opentsdb/partials/config.html
View file @
f90fda8e
<datasource-http-settings
current=
"ctrl.current"
></datasource-http-settings>
<br>
<h5>
Opentsdb settings
</h5>
<div
class=
"tight-form last"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Version
</li>
<li
class=
"tight-form-item"
>
<select
class=
"input-medium tight-form-input"
ng-model=
"ctrl.current.jsonData.tsdbVersion"
ng-options=
"v.value as v.name for v in ctrl.tsdbVersions"
></select>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
public/app/plugins/datasource/opentsdb/specs/datasource-specs.ts
View file @
f90fda8e
...
...
@@ -4,7 +4,7 @@ import {OpenTsDatasource} from "../datasource";
describe
(
'opentsdb'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
var
instanceSettings
=
{
url
:
''
};
var
instanceSettings
=
{
url
:
''
,
jsonData
:
{
tsdbVersion
:
1
}
};
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
...
...
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