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
d705ee70
Commit
d705ee70
authored
Mar 13, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring out http settings to its own partial
parent
448717a7
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
49 deletions
+69
-49
src/app/features/org/datasourceEditCtrl.js
+2
-0
src/app/features/org/partials/datasourceEdit.html
+2
-47
src/app/features/org/partials/datasourceHttpConfig.html
+46
-0
src/app/plugins/datasource/elasticsearch/partials/config.html
+3
-0
src/app/plugins/datasource/graphite/partials/config.html
+3
-0
src/app/plugins/datasource/influxdb/partials/config.html
+4
-0
src/app/plugins/datasource/influxdb/plugin.json
+1
-2
src/app/plugins/datasource/influxdb_08/partials/config.html
+4
-0
src/app/plugins/datasource/opentsdb/partials/config.html
+4
-0
No files found.
src/app/features/org/datasourceEditCtrl.js
View file @
d705ee70
...
...
@@ -10,6 +10,8 @@ function (angular) {
module
.
controller
(
'DataSourceEditCtrl'
,
function
(
$scope
,
$q
,
backendSrv
,
$routeParams
,
$location
,
datasourceSrv
)
{
$scope
.
httpConfigPartialSrc
=
'app/features/org/partials/datasourceHttpConfig.html'
;
var
defaults
=
{
name
:
''
,
type
:
'graphite'
,
...
...
src/app/features/org/partials/datasourceEdit.html
View file @
d705ee70
...
...
@@ -30,7 +30,7 @@
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form"
>
<div
class=
"tight-form
last
"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Type
...
...
@@ -42,54 +42,9 @@
<div
class=
"clearfix"
></div>
</div>
<br>
<h5>
Http settings
</h5>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Url
</li>
<li>
<input
type=
"text"
class=
"tight-form-input input-xlarge"
ng-model=
'current.url'
placeholder=
"http://my.server.com:8080"
required
></input>
</li>
<li
class=
"tight-form-item"
>
Access
<tip>
Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request
</label>
</li>
<li>
<select
class=
"input-medium tight-form-input"
ng-model=
"current.access"
ng-options=
"f for f in ['direct', 'proxy']"
></select>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form last"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Basic Auth
</li>
<li
class=
"tight-form-item"
>
Enable
<input
class=
"cr1"
id=
"current.basicAuth"
type=
"checkbox"
ng-model=
"current.basicAuth"
ng-checked=
"current.basicAuth"
>
<label
for=
"current.basicAuth"
class=
"cr1"
></label>
</li>
<li
class=
"tight-form-item"
ng-if=
"current.basicAuth"
>
User
</li>
<li
ng-if=
"current.basicAuth"
>
<input
type=
"text"
class=
"tight-form-input input-medium"
style=
"width: 139px"
ng-model=
'current.basicAuthUser'
placeholder=
"user"
required
></input>
</li>
<li
class=
"tight-form-item"
style=
"width: 67px"
ng-if=
"current.basicAuth"
>
Password
</li>
<li
ng-if=
"current.basicAuth"
>
<input
type=
"password"
class=
"tight-form-input input-medium"
ng-model=
'current.basicAuthPassword'
placeholder=
"password"
required
></input>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<br>
<div
ng-include=
"datasourceMeta.partials.config"
ng-if=
"datasourceMeta.partials.config"
></div>
<br>
<br>
<div
class=
"pull-right"
>
<button
type=
"submit"
class=
"btn btn-success"
ng-show=
"isNew"
ng-click=
"add()"
>
Add
</button>
<button
type=
"submit"
class=
"btn btn-success"
ng-show=
"!isNew"
ng-click=
"update()"
>
Update
</button>
...
...
src/app/features/org/partials/datasourceHttpConfig.html
0 → 100644
View file @
d705ee70
<br>
<h5>
Http settings
</h5>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Url
</li>
<li>
<input
type=
"text"
class=
"tight-form-input input-xlarge"
ng-model=
'current.url'
placeholder=
"http://my.server.com:8080"
required
></input>
</li>
<li
class=
"tight-form-item"
>
Access
<tip>
Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request
</label>
</li>
<li>
<select
class=
"input-medium tight-form-input"
ng-model=
"current.access"
ng-options=
"f for f in ['direct', 'proxy']"
></select>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
<div
class=
"tight-form last"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 80px"
>
Basic Auth
</li>
<li
class=
"tight-form-item"
>
Enable
<input
class=
"cr1"
id=
"current.basicAuth"
type=
"checkbox"
ng-model=
"current.basicAuth"
ng-checked=
"current.basicAuth"
>
<label
for=
"current.basicAuth"
class=
"cr1"
></label>
</li>
<li
class=
"tight-form-item"
ng-if=
"current.basicAuth"
>
User
</li>
<li
ng-if=
"current.basicAuth"
>
<input
type=
"text"
class=
"tight-form-input input-medium"
style=
"width: 139px"
ng-model=
'current.basicAuthUser'
placeholder=
"user"
required
></input>
</li>
<li
class=
"tight-form-item"
style=
"width: 67px"
ng-if=
"current.basicAuth"
>
Password
</li>
<li
ng-if=
"current.basicAuth"
>
<input
type=
"password"
class=
"tight-form-input input-medium"
ng-model=
'current.basicAuthPassword'
placeholder=
"password"
required
></input>
</li>
</ul>
<div
class=
"clearfix"
></div>
</div>
src/app/plugins/datasource/elasticsearch/partials/config.html
View file @
d705ee70
<div
ng-include=
"httpConfigPartialSrc"
></div>
<br>
<h5>
Elastic search details
</h5>
<div
class=
"tight-form last"
>
...
...
src/app/plugins/datasource/graphite/partials/config.html
View file @
d705ee70
<div
ng-include=
"httpConfigPartialSrc"
></div>
src/app/plugins/datasource/influxdb/partials/config.html
View file @
d705ee70
<div
ng-include=
"httpConfigPartialSrc"
></div>
<br>
<h5>
InfluxDB Details
</h5>
<div
class=
"tight-form"
>
...
...
src/app/plugins/datasource/influxdb/plugin.json
View file @
d705ee70
...
...
@@ -13,6 +13,5 @@
"annotations"
:
"app/plugins/datasource/influxdb/partials/annotations.editor.html"
},
"metrics"
:
true
,
"annotations"
:
true
"metrics"
:
true
}
src/app/plugins/datasource/influxdb_08/partials/config.html
View file @
d705ee70
<div
ng-include=
"httpConfigPartialSrc"
></div>
<br>
<h5>
InfluxDB Details
</h5>
<div
class=
"tight-form"
>
...
...
src/app/plugins/datasource/opentsdb/partials/config.html
View file @
d705ee70
<div
ng-include=
"httpConfigPartialSrc"
></div>
<br>
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