Commit dede578c by Torkel Ödegaard

Updated to datasource management

parent 4e542d8b
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<table class="grafana-options-table"> <table class="grafana-options-table">
<tr ng-repeat="other in otherAccounts"> <tr ng-repeat="other in otherAccounts">
<td>name: {{other.name}}</td> <td>email: {{other.email}}</td>
<td>role: {{other.role}}</td> <td>role: {{other.role}}</td>
<td ng-show="other.isUsing"> <td ng-show="other.isUsing">
currently using this account currently using this account
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<div class="editor-row"> <div class="editor-row">
<div class="editor-option"> <div class="editor-option">
<label class="small">Data source name</label> <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>
<div class="editor-option"> <div class="editor-option">
<label class="small">Type</label> <label class="small">Type</label>
...@@ -65,13 +65,31 @@ ...@@ -65,13 +65,31 @@
<div class="editor-row"> <div class="editor-row">
<div class="editor-option"> <div class="editor-option">
<label class="small">Url</label> <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>
<div class="editor-option"> <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> <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> <select class="input-medium" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select>
</div> </div>
</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>
<div class="dashboard-editor-footer" style="margin-top: 20px"> <div class="dashboard-editor-footer" style="margin-top: 20px">
......
...@@ -21,6 +21,10 @@ function (angular, _) { ...@@ -21,6 +21,10 @@ function (angular, _) {
return this.request({ method: 'POST', url: url, data: data }); 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) { this.request = function(options) {
var httpOptions = { var httpOptions = {
url: options.url, url: options.url,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment