config.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. <div class="gf-form-group">
  28. <div class="gf-form max-width-30">
  29. <span class="gf-form-label width-11">Max open connections</span>
  30. <input type="number" min="0" class="gf-form-input" ng-model="ctrl.current.jsonData.maxOpenConns" placeholder="unlimited"></input>
  31. </div>
  32. <div class="gf-form max-width-30">
  33. <span class="gf-form-label width-11">Max idle connections</span>
  34. <input type="number" min="0" class="gf-form-input" ng-model="ctrl.current.jsonData.maxIdleConns" placeholder="2"></input>
  35. </div>
  36. <div class="gf-form max-width-30">
  37. <span class="gf-form-label width-11">Connection lifetime</span>
  38. <input type="number" min="0" class="gf-form-input" ng-model="ctrl.current.jsonData.connMaxLifetime" placeholder="14400"></input>
  39. <info-popover mode="right-absolute">
  40. The connection lifetime in seconds.
  41. </info-popover>
  42. </div>
  43. </div>
  44. <h3 class="page-heading">MSSQL details</h3>
  45. <div class="gf-form-group">
  46. <div class="gf-form-inline">
  47. <div class="gf-form">
  48. <span class="gf-form-label width-9">Min time interval</span>
  49. <input type="text" class="gf-form-input width-6" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="1m"></input>
  50. <info-popover mode="right-absolute">
  51. A lower limit for the auto group by time interval. Recommended to be set to write frequency,
  52. for example <code>1m</code> if your data is written every minute.
  53. </info-popover>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="gf-form-group">
  58. <div class="grafana-info-box">
  59. <h5>User Permission</h5>
  60. <p>
  61. The database user should only be granted SELECT permissions on the specified database &amp; tables you want to query.
  62. Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements
  63. like <code>USE otherdb;</code> and <code>DROP TABLE user;</code> would be executed. To protect against this we
  64. <strong>Highly</strong> recommmend you create a specific MSSQL user with restricted permissions.
  65. </p>
  66. </div>
  67. </div>