config.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <h3 class="page-heading">PostgreSQL Connection</h3>
  2. <div class="gf-form-group">
  3. <div class="gf-form max-width-30">
  4. <span class="gf-form-label width-7">Host</span>
  5. <input type="text" class="gf-form-input" ng-model='ctrl.current.url' placeholder="localhost:5432" bs-typeahead="{{['localhost:5432', 'localhost:5433']}}" required></input>
  6. </div>
  7. <div class="gf-form max-width-30">
  8. <span class="gf-form-label width-7">Database</span>
  9. <input type="text" class="gf-form-input" ng-model='ctrl.current.database' placeholder="database name" required></input>
  10. </div>
  11. <div class="gf-form-inline">
  12. <div class="gf-form max-width-15">
  13. <span class="gf-form-label width-7">User</span>
  14. <input type="text" class="gf-form-input" ng-model='ctrl.current.user' placeholder="user"></input>
  15. </div>
  16. <div class="gf-form max-width-15" ng-if="!ctrl.current.secureJsonFields.password">
  17. <span class="gf-form-label width-7">Password</span>
  18. <input type="password" class="gf-form-input" ng-model='ctrl.current.secureJsonData.password' placeholder="password"></input>
  19. </div>
  20. <div class="gf-form max-width-19" ng-if="ctrl.current.secureJsonFields.password">
  21. <span class="gf-form-label width-7">Password</span>
  22. <input type="text" class="gf-form-input" disabled="disabled" value="configured">
  23. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="ctrl.current.secureJsonFields.password = false">reset</a>
  24. </div>
  25. </div>
  26. <div class="gf-form">
  27. <label class="gf-form-label width-7">SSL Mode</label>
  28. <div class="gf-form-select-wrapper max-width-15 gf-form-select-wrapper--has-help-icon">
  29. <select class="gf-form-input" ng-model="ctrl.current.jsonData.sslmode" ng-options="mode for mode in ['disable', 'require', 'verify-ca', 'verify-full']" ng-init="ctrl.current.jsonData.sslmode"></select>
  30. <info-popover mode="right-absolute">
  31. This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
  32. </info-popover>
  33. </div>
  34. </div>
  35. </div>
  36. <h3 class="page-heading">PostgreSQL details</h3>
  37. <div class="gf-form-group">
  38. <div class="gf-form">
  39. <span class="gf-form-label width-8">
  40. Version
  41. <info-popover mode="right-normal" position="top center">
  42. This option controls what functions are used when expanding grafana macros.
  43. </info-popover>
  44. </span>
  45. <span class="gf-form-select-wrapper">
  46. <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.postgresVersion" ng-options="f.value as f.name for f in ctrl.postgresVersions"></select>
  47. </span>
  48. </div>
  49. </div>
  50. <div class="gf-form-group">
  51. <div class="grafana-info-box">
  52. <h5>User Permission</h5>
  53. <p>
  54. The database user should only be granted SELECT permissions on the specified database &amp; tables you want to query.
  55. Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements
  56. like <code>DELETE FROM user;</code> and <code>DROP TABLE user;</code> would be executed. To protect against this we
  57. <strong>Highly</strong> recommmend you create a specific PostgreSQL user with restricted permissions.
  58. </p>
  59. </div>
  60. </div>