ds_http_settings.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <div class="gf-form-group">
  2. <h3 class="page-heading">Http settings</h3>
  3. <div class="gf-form-group">
  4. <div class="gf-form-inline">
  5. <div class="gf-form max-width-30">
  6. <span class="gf-form-label width-7">Url</span>
  7. <input class="gf-form-input" type="text"
  8. ng-model='current.url' placeholder="{{suggestUrl}}"
  9. bs-typeahead="getSuggestUrls" min-length="0"
  10. ng-pattern="/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/" required></input>
  11. <info-popover mode="right-absolute">
  12. <p>Specify a complete HTTP url (for example http://your_server:8080)</p>
  13. <span ng-show="current.access === 'direct'">
  14. Your access method is <em>Direct</em>, this means the url
  15. needs to be accessable from the browser.
  16. </span>
  17. <span ng-show="current.access === 'proxy'">
  18. Your access method is currently <em>Proxy</em>, this means the url
  19. needs to be accessable from the grafana backend.
  20. </span>
  21. </info-popover>
  22. </div>
  23. </div>
  24. <div class="gf-form-inline">
  25. <div class="gf-form max-width-30">
  26. <span class="gf-form-label width-7">Access</span>
  27. <div class="gf-form-select-wrapper gf-form-select-wrapper--has-help-icon max-width-24">
  28. <select class="gf-form-input" ng-model="current.access" ng-options="f for f in ['direct', 'proxy']"></select>
  29. <info-popover mode="right-absolute">
  30. Direct = url is used directly from browser<br>
  31. Proxy = Grafana backend will proxy the request
  32. </info-popover>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <h3 class="page-heading">Http Auth</h3>
  38. <div class="gf-form-inline">
  39. <gf-form-switch class="gf-form"
  40. label="Basic Auth"
  41. checked="current.basicAuth" label-class="width-8" switch-class="max-width-6">
  42. </gf-form-switch>
  43. <gf-form-switch class="gf-form"
  44. label="With Credentials" tooltip="Whether credentials such as cookies or auth headers should be sent with cross-site requests."
  45. checked="current.withCredentials" label-class="width-11" switch-class="max-width-6">
  46. </gf-form-switch>
  47. </div>
  48. <div class="gf-form-inline">
  49. <gf-form-switch class="gf-form" ng-if="current.access=='proxy'"
  50. label="TLS Client Auth" label-class="width-8"
  51. checked="current.jsonData.tlsAuth" switch-class="max-width-6">
  52. </gf-form-switch>
  53. <gf-form-switch class="gf-form" ng-if="current.access=='proxy'"
  54. label="With CA Cert" tooltip="Optional. Needed for self-signed TLS Certs."
  55. checked="current.jsonData.tlsAuthWithCACert" label-class="width-11" switch-class="max-width-6">
  56. </gf-form-switch>
  57. </div>
  58. </div>
  59. <div class="gf-form-group" ng-if="current.basicAuth">
  60. <h6>Basic Auth Details</h6>
  61. <div class="gf-form" ng-if="current.basicAuth">
  62. <span class="gf-form-label width-7">
  63. User
  64. </span>
  65. <input class="gf-form-input max-width-21" type="text" ng-model='current.basicAuthUser' placeholder="user" required></input>
  66. </div>
  67. <div class="gf-form">
  68. <span class="gf-form-label width-7">
  69. Password
  70. </span>
  71. <input class="gf-form-input max-width-21" type="password" ng-model='current.basicAuthPassword' placeholder="password" required></input>
  72. </div>
  73. </div>
  74. <div class="gf-form-group" ng-if="current.jsonData.tlsAuth && current.access=='proxy'">
  75. <div class="gf-form">
  76. <h6>TLS Auth Details</h6>
  77. <info-popover mode="header">TLS Certs are encrypted and stored in the Grafana database.</info-popover>
  78. </div>
  79. <div ng-if="current.jsonData.tlsAuthWithCACert">
  80. <div class="gf-form-inline">
  81. <div class="gf-form gf-form--v-stretch">
  82. <label class="gf-form-label width-7">CA Cert</label>
  83. </div>
  84. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsCACert">
  85. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsCACert" placeholder="Begins with -----BEGIN CERTIFICATE-----. The CA Certificate is necessary if you are using self-signed certificates."></textarea>
  86. </div>
  87. <div class="gf-form" ng-if="current.secureJsonFields.tlsCACert">
  88. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  89. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsCACert = false">reset</a>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="gf-form-inline">
  94. <div class="gf-form gf-form--v-stretch">
  95. <label class="gf-form-label width-7">Client Cert</label>
  96. </div>
  97. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsClientCert">
  98. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsClientCert" placeholder="Begins with -----BEGIN CERTIFICATE-----" required></textarea>
  99. </div>
  100. <div class="gf-form" ng-if="current.secureJsonFields.tlsClientCert">
  101. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  102. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsClientCert = false">reset</a>
  103. </div>
  104. </div>
  105. <div class="gf-form-inline">
  106. <div class="gf-form gf-form--v-stretch">
  107. <label class="gf-form-label width-7">Client Key</label>
  108. </div>
  109. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsClientKey">
  110. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsClientKey" placeholder="Begins with -----BEGIN RSA PRIVATE KEY-----" required></textarea>
  111. </div>
  112. <div class="gf-form" ng-if="current.secureJsonFields.tlsClientKey">
  113. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  114. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsClientKey = false">reset</a>
  115. </div>
  116. </div>
  117. </div>