| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- commit dede578c7d569f87c35724f74a72216743bf9508
- Author: Torkel Ödegaard <torkel.odegaard@gmail.com>
- Date: Fri Dec 19 12:52:00 2014 +0100
- Updated to datasource management
- diff --git a/src/app/partials/pro/account.html b/src/app/partials/pro/account.html
- index fa757a9e8..f707234a0 100644
- --- a/src/app/partials/pro/account.html
- +++ b/src/app/partials/pro/account.html
- @@ -53,7 +53,7 @@
-
- <table class="grafana-options-table">
- <tr ng-repeat="other in otherAccounts">
- - <td>name: {{other.name}}</td>
- + <td>email: {{other.email}}</td>
- <td>role: {{other.role}}</td>
- <td ng-show="other.isUsing">
- currently using this account
- diff --git a/src/app/partials/pro/datasources.html b/src/app/partials/pro/datasources.html
- index 2aff611db..a4cc52b82 100644
- --- a/src/app/partials/pro/datasources.html
- +++ b/src/app/partials/pro/datasources.html
- @@ -54,7 +54,7 @@
- <div class="editor-row">
- <div class="editor-option">
- <label class="small">Data source name</label>
- - <input type="text" class="input-large" required ng-model='current.name' placeholder="production" required></input>
- + <input type="text" class="input-large" ng-model='current.name' placeholder="production" required></input>
- </div>
- <div class="editor-option">
- <label class="small">Type</label>
- @@ -65,13 +65,31 @@
- <div class="editor-row">
- <div class="editor-option">
- <label class="small">Url</label>
- - <input type="text" class="input-xxlarge" required ng-model='current.url' placeholder="http://my.graphite.com:8080" required></input>
- + <input type="text" class="input-xxlarge" ng-model='current.url' placeholder="http://my.graphite.com:8080" required></input>
- </div>
- <div class="editor-option">
- <label class="small">Access method <tip>Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request</label>
- <select class="input-medium" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select>
- </div>
- </div>
- +
- + <div class="editor-row" ng-if="current.type === 'influxdb'">
- + <div class="section">
- + <h5>InfluxDB Details</h5>
- + <div class="editor-option">
- + <label class="small">Database name</label>
- + <input type="text" class="input-large" required ng-model='current.database' placeholder=""></input>
- + </div>
- + <div class="editor-option">
- + <label class="small">User</label>
- + <input type="text" class="input-large" ng-model='current.user' placeholder=""></input>
- + </div>
- + <div class="editor-option">
- + <label class="small">Password</label>
- + <input type="password" class="input-large" ng-model='current.password' placeholder=""></input>
- + </div>
- + </div>
- + </div>
- </div>
-
- <div class="dashboard-editor-footer" style="margin-top: 20px">
- diff --git a/src/app/services/pro/backendSrv.js b/src/app/services/pro/backendSrv.js
- index 28d323177..bad3412dd 100644
- --- a/src/app/services/pro/backendSrv.js
- +++ b/src/app/services/pro/backendSrv.js
- @@ -21,6 +21,10 @@ function (angular, _) {
- return this.request({ method: 'POST', url: url, data: data });
- };
-
- + this.put = function(url, data) {
- + return this.request({ method: 'PUT', url: url, data: data });
- + };
- +
- this.request = function(options) {
- var httpOptions = {
- url: options.url,
|