config.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <h3 class="page-heading">MSSQL 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:1433" bs-typeahead="{{['localhost', 'localhost:1433']}}" 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>
  27. <h3 class="page-heading">MSSQL details</h3>
  28. <div class="gf-form-group">
  29. <div class="gf-form-inline">
  30. <div class="gf-form">
  31. <span class="gf-form-label width-9">Min time interval</span>
  32. <input type="text" class="gf-form-input width-6" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="1m"></input>
  33. <info-popover mode="right-absolute">
  34. A lower limit for the auto group by time interval. Recommended to be set to write frequency,
  35. for example <code>1m</code> if your data is written every minute.
  36. </info-popover>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="gf-form-group">
  41. <div class="grafana-info-box">
  42. <h5>User Permission</h5>
  43. <p>
  44. The database user should only be granted SELECT permissions on the specified database &amp; tables you want to query.
  45. Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements
  46. like <code>USE otherdb;</code> and <code>DROP TABLE user;</code> would be executed. To protect against this we
  47. <strong>Highly</strong> recommmend you create a specific MSSQL user with restricted permissions.
  48. </p>
  49. </div>
  50. </div>