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
1695aece
Commit
1695aece
authored
Nov 24, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cloudwatch): add authtype dropdown to config page
parent
64784db8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
17 deletions
+50
-17
public/app/plugins/datasource/cloudwatch/config_ctrl.ts
+31
-0
public/app/plugins/datasource/cloudwatch/module.ts
+1
-4
public/app/plugins/datasource/cloudwatch/partials/config.html
+18
-13
No files found.
public/app/plugins/datasource/cloudwatch/config_ctrl.ts
0 → 100644
View file @
1695aece
///<reference path="../../../headers/common.d.ts" />
import
angular
from
'angular'
;
import
_
from
'lodash'
;
export
class
CloudWatchConfigCtrl
{
static
templateUrl
=
'partials/config.html'
;
current
:
any
;
/** @ngInject */
constructor
(
$scope
)
{
this
.
current
.
jsonData
.
timeField
=
this
.
current
.
jsonData
.
timeField
||
'@timestamp'
;
this
.
current
.
jsonData
.
authType
=
this
.
current
.
jsonData
.
authType
||
'credentials'
;
}
authTypes
=
[
{
name
:
'Access & secret key'
,
value
:
'keys'
},
{
name
:
'Credentials file'
,
value
:
'credentials'
},
{
name
:
'ARN'
,
value
:
'arn'
},
];
indexPatternTypes
=
[
{
name
:
'No pattern'
,
value
:
undefined
},
{
name
:
'Hourly'
,
value
:
'Hourly'
,
example
:
'[logstash-]YYYY.MM.DD.HH'
},
{
name
:
'Daily'
,
value
:
'Daily'
,
example
:
'[logstash-]YYYY.MM.DD'
},
{
name
:
'Weekly'
,
value
:
'Weekly'
,
example
:
'[logstash-]GGGG.WW'
},
{
name
:
'Monthly'
,
value
:
'Monthly'
,
example
:
'[logstash-]YYYY.MM'
},
{
name
:
'Yearly'
,
value
:
'Yearly'
,
example
:
'[logstash-]YYYY'
},
];
}
public/app/plugins/datasource/cloudwatch/module.ts
View file @
1695aece
...
@@ -2,10 +2,7 @@ import './query_parameter_ctrl';
...
@@ -2,10 +2,7 @@ import './query_parameter_ctrl';
import
{
CloudWatchDatasource
}
from
'./datasource'
;
import
{
CloudWatchDatasource
}
from
'./datasource'
;
import
{
CloudWatchQueryCtrl
}
from
'./query_ctrl'
;
import
{
CloudWatchQueryCtrl
}
from
'./query_ctrl'
;
import
{
CloudWatchConfigCtrl
}
from
'./config_ctrl'
;
class
CloudWatchConfigCtrl
{
static
templateUrl
=
'partials/config.html'
;
}
class
CloudWatchAnnotationsQueryCtrl
{
class
CloudWatchAnnotationsQueryCtrl
{
static
templateUrl
=
'partials/annotations.editor.html'
;
static
templateUrl
=
'partials/annotations.editor.html'
;
...
...
public/app/plugins/datasource/cloudwatch/partials/config.html
View file @
1695aece
...
@@ -2,24 +2,36 @@
...
@@ -2,24 +2,36 @@
<div
class=
"gf-form-group max-width-30"
>
<div
class=
"gf-form-group max-width-30"
>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Auth Provider
</label>
<select
class=
"gf-form-input gf-size-auto"
ng-model=
"ctrl.current.jsonData.authType"
ng-options=
"f.value as f.name for f in ctrl.authTypes"
></select>
</div>
<div
class=
"gf-form"
ng-show=
'ctrl.current.jsonData.authType == "credentials"'
>
<label
class=
"gf-form-label width-13"
>
Credentials profile name
</label>
<label
class=
"gf-form-label width-13"
>
Credentials profile name
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.database'
placeholder=
"default"
></input>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.database'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
<info-popover
mode=
"right-absolute"
>
Credentials profile name, as specified in ~/.aws/credentials, leave blank for default
Credentials profile name, as specified in ~/.aws/credentials, leave blank for default
</info-popover>
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
ng-show=
'ctrl.current.jsonData.authType == "keys"'
>
<label
class=
"gf-form-label width-13"
>
Credentials
Access key
</label>
<label
class=
"gf-form-label width-13"
>
Access key
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.accessKey'
placeholder=
"default"
></input>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.accessKey'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
<info-popover
mode=
"right-absolute"
>
A
ccesskey
A
WS Access key id
</info-popover>
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
ng-show=
'ctrl.current.jsonData.authType == "keys"'
>
<label
class=
"gf-form-label width-13"
>
Credentials
Secret key
</label>
<label
class=
"gf-form-label width-13"
>
Secret key
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.secretKey'
placeholder=
"default"
></input>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.secretKey'
placeholder=
"default"
></input>
<info-popover
mode=
"right-absolute"
>
<info-popover
mode=
"right-absolute"
>
Secret key
AWS Secret key
</info-popover>
</div>
<div
class=
"gf-form"
ng-show=
'ctrl.current.jsonData.authType == "arn"'
>
<label
class=
"gf-form-label width-13"
>
Assume Role ARN
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.assumeRoleArn'
placeholder=
"arn:aws:iam:*"
></input>
<info-popover
mode=
"right-absolute"
>
ARN of Assume Role
</info-popover>
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
>
...
@@ -38,11 +50,4 @@
...
@@ -38,11 +50,4 @@
Namespaces of Custom Metrics
Namespaces of Custom Metrics
</info-popover>
</info-popover>
</div>
</div>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label width-13"
>
Assume Role ARN
</label>
<input
type=
"text"
class=
"gf-form-input max-width-18"
ng-model=
'ctrl.current.jsonData.assumeRoleArn'
placeholder=
"arn:aws:iam:*"
></input>
<info-popover
mode=
"right-absolute"
>
ARN of Assume Role
</info-popover>
</div>
</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