ds_http_settings.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <div class="gf-form-group">
  2. <h3 class="page-heading">HTTP</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 accessible 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 accessible 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">Auth</h3>
  38. <div class="gf-form-group">
  39. <div class="gf-form-inline">
  40. <gf-form-switch class="gf-form" label="Basic Auth" checked="current.basicAuth" label-class="width-8" switch-class="max-width-6"></gf-form-switch>
  41. <gf-form-switch class="gf-form" label="With Credentials" tooltip="Whether credentials such as cookies or auth headers should be sent with cross-site requests." checked="current.withCredentials" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
  42. </div>
  43. <div class="gf-form-inline">
  44. <gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="TLS Client Auth" label-class="width-8" checked="current.jsonData.tlsAuth" switch-class="max-width-6"></gf-form-switch>
  45. <gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="With CA Cert" tooltip="Needed for verifing self-signed TLS Certs" checked="current.jsonData.tlsAuthWithCACert" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
  46. </div>
  47. </div>
  48. <div class="gf-form-inline">
  49. <gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="Skip TLS Verification (Insecure)" label-class="width-16" checked="current.jsonData.tlsSkipVerify" switch-class="max-width-6"></gf-form-switch>
  50. </div>
  51. </div>
  52. <div class="gf-form-group" ng-if="current.basicAuth">
  53. <h6>Basic Auth Details</h6>
  54. <div class="gf-form" ng-if="current.basicAuth">
  55. <span class="gf-form-label width-7">
  56. User
  57. </span>
  58. <input class="gf-form-input max-width-21" type="text" ng-model='current.basicAuthUser' placeholder="user" required></input>
  59. </div>
  60. <div class="gf-form">
  61. <span class="gf-form-label width-7">
  62. Password
  63. </span>
  64. <input class="gf-form-input max-width-21" type="password" ng-model='current.basicAuthPassword' placeholder="password" required></input>
  65. </div>
  66. </div>
  67. <div class="gf-form-group" ng-if="(current.jsonData.tlsAuth || current.jsonData.tlsAuthWithCACert) && current.access=='proxy'">
  68. <div class="gf-form">
  69. <h6>TLS Auth Details</h6>
  70. <info-popover mode="header">TLS Certs are encrypted and stored in the Grafana database.</info-popover>
  71. </div>
  72. <div ng-if="current.jsonData.tlsAuthWithCACert">
  73. <div class="gf-form-inline">
  74. <div class="gf-form gf-form--v-stretch">
  75. <label class="gf-form-label width-7">CA Cert</label>
  76. </div>
  77. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsCACert">
  78. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsCACert" placeholder="Begins with -----BEGIN CERTIFICATE-----"></textarea>
  79. </div>
  80. <div class="gf-form" ng-if="current.secureJsonFields.tlsCACert">
  81. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  82. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsCACert = false">reset</a>
  83. </div>
  84. </div>
  85. </div>
  86. <div ng-if="current.jsonData.tlsAuth">
  87. <div class="gf-form-inline">
  88. <div class="gf-form gf-form--v-stretch">
  89. <label class="gf-form-label width-7">Client Cert</label>
  90. </div>
  91. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsClientCert">
  92. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsClientCert" placeholder="Begins with -----BEGIN CERTIFICATE-----" required></textarea>
  93. </div>
  94. <div class="gf-form" ng-if="current.secureJsonFields.tlsClientCert">
  95. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  96. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsClientCert = false">reset</a>
  97. </div>
  98. </div>
  99. <div class="gf-form-inline">
  100. <div class="gf-form gf-form--v-stretch">
  101. <label class="gf-form-label width-7">Client Key</label>
  102. </div>
  103. <div class="gf-form gf-form--grow" ng-if="!current.secureJsonFields.tlsClientKey">
  104. <textarea rows="7" class="gf-form-input gf-form-textarea" ng-model="current.secureJsonData.tlsClientKey" placeholder="Begins with -----BEGIN RSA PRIVATE KEY-----" required></textarea>
  105. </div>
  106. <div class="gf-form" ng-if="current.secureJsonFields.tlsClientKey">
  107. <input type="text" class="gf-form-input max-width-12" disabled="disabled" value="configured">
  108. <a class="btn btn-secondary gf-form-btn" href="#" ng-click="current.secureJsonFields.tlsClientKey = false">reset</a>
  109. </div>
  110. </div>
  111. </div>
  112. </div>