grafana 269 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. commit dede578c7d569f87c35724f74a72216743bf9508
  2. Author: Torkel Ödegaard <torkel.odegaard@gmail.com>
  3. Date: Fri Dec 19 12:52:00 2014 +0100
  4. Updated to datasource management
  5. diff --git a/src/app/partials/pro/account.html b/src/app/partials/pro/account.html
  6. index fa757a9e8..f707234a0 100644
  7. --- a/src/app/partials/pro/account.html
  8. +++ b/src/app/partials/pro/account.html
  9. @@ -53,7 +53,7 @@
  10. <table class="grafana-options-table">
  11. <tr ng-repeat="other in otherAccounts">
  12. - <td>name: {{other.name}}</td>
  13. + <td>email: {{other.email}}</td>
  14. <td>role: {{other.role}}</td>
  15. <td ng-show="other.isUsing">
  16. currently using this account
  17. diff --git a/src/app/partials/pro/datasources.html b/src/app/partials/pro/datasources.html
  18. index 2aff611db..a4cc52b82 100644
  19. --- a/src/app/partials/pro/datasources.html
  20. +++ b/src/app/partials/pro/datasources.html
  21. @@ -54,7 +54,7 @@
  22. <div class="editor-row">
  23. <div class="editor-option">
  24. <label class="small">Data source name</label>
  25. - <input type="text" class="input-large" required ng-model='current.name' placeholder="production" required></input>
  26. + <input type="text" class="input-large" ng-model='current.name' placeholder="production" required></input>
  27. </div>
  28. <div class="editor-option">
  29. <label class="small">Type</label>
  30. @@ -65,13 +65,31 @@
  31. <div class="editor-row">
  32. <div class="editor-option">
  33. <label class="small">Url</label>
  34. - <input type="text" class="input-xxlarge" required ng-model='current.url' placeholder="http://my.graphite.com:8080" required></input>
  35. + <input type="text" class="input-xxlarge" ng-model='current.url' placeholder="http://my.graphite.com:8080" required></input>
  36. </div>
  37. <div class="editor-option">
  38. <label class="small">Access method <tip>Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request</label>
  39. <select class="input-medium" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select>
  40. </div>
  41. </div>
  42. +
  43. + <div class="editor-row" ng-if="current.type === 'influxdb'">
  44. + <div class="section">
  45. + <h5>InfluxDB Details</h5>
  46. + <div class="editor-option">
  47. + <label class="small">Database name</label>
  48. + <input type="text" class="input-large" required ng-model='current.database' placeholder=""></input>
  49. + </div>
  50. + <div class="editor-option">
  51. + <label class="small">User</label>
  52. + <input type="text" class="input-large" ng-model='current.user' placeholder=""></input>
  53. + </div>
  54. + <div class="editor-option">
  55. + <label class="small">Password</label>
  56. + <input type="password" class="input-large" ng-model='current.password' placeholder=""></input>
  57. + </div>
  58. + </div>
  59. + </div>
  60. </div>
  61. <div class="dashboard-editor-footer" style="margin-top: 20px">
  62. diff --git a/src/app/services/pro/backendSrv.js b/src/app/services/pro/backendSrv.js
  63. index 28d323177..bad3412dd 100644
  64. --- a/src/app/services/pro/backendSrv.js
  65. +++ b/src/app/services/pro/backendSrv.js
  66. @@ -21,6 +21,10 @@ function (angular, _) {
  67. return this.request({ method: 'POST', url: url, data: data });
  68. };
  69. + this.put = function(url, data) {
  70. + return this.request({ method: 'PUT', url: url, data: data });
  71. + };
  72. +
  73. this.request = function(options) {
  74. var httpOptions = {
  75. url: options.url,