http_settings.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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-10">URL</span>
  7. <input class="gf-form-input gf-form-input--has-help-icon" 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>Browser</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 <em>Server</em>, this means the URL
  19. needs to be accessible from the grafana backend/server.
  20. </span>
  21. </info-popover>
  22. </div>
  23. </div>
  24. <div class="gf-form-inline" ng-if="showAccessOption">
  25. <div class="gf-form max-width-30">
  26. <span class="gf-form-label width-10">Access</span>
  27. <div class="gf-form-select-wrapper max-width-24">
  28. <select class="gf-form-input" ng-model="current.access" ng-options="f.key as f.value for f in [{key: 'proxy', value: 'Server (Default)'}, { key: 'direct', value: 'Browser'}]"></select>
  29. </div>
  30. </div>
  31. <div class="gf-form">
  32. <label class="gf-form-label query-keyword pointer" ng-click="toggleAccessHelp()">
  33. Help&nbsp;
  34. <i class="fa fa-caret-down" ng-show="showAccessHelp"></i>
  35. <i class="fa fa-caret-right" ng-hide="showAccessHelp">&nbsp;</i>
  36. </label>
  37. </div>
  38. </div>
  39. <div class="grafana-info-box m-t-2" ng-show="showAccessHelp">
  40. <p>
  41. Access mode controls how requests to the data source will be handled.
  42. <strong><i>Server</i></strong> should be the preferred way if nothing else stated.
  43. </p>
  44. <div class="alert-title">Server access mode (Default):</div>
  45. <p>
  46. All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source
  47. and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements.
  48. The URL needs to be accessible from the grafana backend/server if you select this access mode.
  49. </p>
  50. <div class="alert-title">Browser access mode:</div>
  51. <p>
  52. All requests will be made from the browser directly to the data source and may be subject to
  53. Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this
  54. access mode.
  55. </div>
  56. <div class="gf-form-inline" ng-if="current.access=='proxy'">
  57. <div class="gf-form">
  58. <span class="gf-form-label width-10">Whitelisted Cookies</span>
  59. <bootstrap-tagsinput ng-model="current.jsonData.keepCookies" width-class="width-20 gf-form-input--has-help-icon" tagclass="label label-tag" placeholder="Add Name">
  60. </bootstrap-tagsinput>
  61. <info-popover mode="right-absolute">
  62. Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source.
  63. </info-popover>
  64. </div>
  65. </div>
  66. </div>
  67. <h3 class="page-heading">Auth</h3>
  68. <div class="gf-form-group">
  69. <div class="gf-form-inline">
  70. <gf-form-checkbox class="gf-form" label="Basic Auth" checked="current.basicAuth" label-class="width-13" switch-class="max-width-6"></gf-form-checkbox>
  71. <gf-form-checkbox class="gf-form" label="With Credentials" tooltip="Whether credentials such as cookies or auth
  72. headers should be sent with cross-site requests." checked="current.withCredentials" label-class="width-13"
  73. switch-class="max-width-6"></gf-form-checkbox>
  74. </div>
  75. <div class="gf-form-inline">
  76. <gf-form-checkbox class="gf-form" ng-if="current.access=='proxy'" label="TLS Client Auth" label-class="width-13"
  77. checked="current.jsonData.tlsAuth" switch-class="max-width-6"></gf-form-checkbox>
  78. <gf-form-checkbox class="gf-form" ng-if="current.access=='proxy'" label="With CA Cert" tooltip="Needed for
  79. verifing self-signed TLS Certs" checked="current.jsonData.tlsAuthWithCACert" label-class="width-13"
  80. switch-class="max-width-6"></gf-form-checkbox>
  81. </div>
  82. <div class="gf-form-inline">
  83. <gf-form-checkbox class="gf-form" ng-if="current.access=='proxy'" label="Skip TLS Verify" label-class="width-13"
  84. checked="current.jsonData.tlsSkipVerify" switch-class="max-width-6"></gf-form-checkbox>
  85. </div>
  86. <div class="gf-form-inline">
  87. <gf-form-checkbox class="gf-form" ng-if="current.access=='proxy'" label="Forward OAuth Identity" label-class="width-13" tooltip="Forward the user's upstream OAuth identity to the datasource (Their access token gets passed along)." checked="current.jsonData.oauthPassThru" switch-class="max-width-6"></gf-form-checkbox>
  88. </div>
  89. </div>
  90. <div class="gf-form-group" ng-if="current.basicAuth">
  91. <h6>Basic Auth Details</h6>
  92. <div class="gf-form" ng-if="current.basicAuth">
  93. <span class="gf-form-label width-10">User</span>
  94. <input class="gf-form-input max-width-21" type="text" ng-model='current.basicAuthUser' placeholder="user" required></input>
  95. </div>
  96. <div class="gf-form">
  97. <span class="gf-form-label width-10">Password</span>
  98. <input class="gf-form-input max-width-21" type="password" ng-model='current.basicAuthPassword' placeholder="password" required></input>
  99. </div>
  100. </div>
  101. <datasource-tls-auth-settings current="current" ng-if="(current.jsonData.tlsAuth || current.jsonData.tlsAuthWithCACert) && current.access=='proxy'">
  102. </datasource-tls-auth-settings>