Coin de Gamma
6 years ago
1 changed files with 72 additions and 1 deletions
@ -1 +1,72 @@ |
|||||||
<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:8000"/> |
<div class="gf-form-group"> |
||||||
|
<h3 class="page-heading">HTTP</h3> |
||||||
|
<div class="gf-form-group"> |
||||||
|
<div class="gf-form-inline"> |
||||||
|
<div class="gf-form max-width-30"> |
||||||
|
<span class="gf-form-label width-10">URL</span> |
||||||
|
<input class="gf-form-input" type="text" |
||||||
|
ng-model='current.url' placeholder="http://localhost:8000" |
||||||
|
bs-typeahead="getSuggestUrls" min-length="0" |
||||||
|
ng-pattern="/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/" required></input> |
||||||
|
<info-popover mode="right-absolute"> |
||||||
|
<p>Specify a complete HTTP URL (for example http://your_server:8080)</p> |
||||||
|
<span ng-show="current.access === 'direct'"> |
||||||
|
Your access method is <em>Browser</em>, this means the URL |
||||||
|
needs to be accessible from the browser. |
||||||
|
</span> |
||||||
|
<span ng-show="current.access === 'proxy'"> |
||||||
|
Your access method is <em>Server</em>, this means the URL |
||||||
|
needs to be accessible from the grafana backend/server. |
||||||
|
</span> |
||||||
|
</info-popover> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="gf-form-inline" ng-if="showAccessOption"> |
||||||
|
<div class="gf-form max-width-30"> |
||||||
|
<span class="gf-form-label width-10">Access</span> |
||||||
|
<div class="gf-form-select-wrapper max-width-24"> |
||||||
|
<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> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="gf-form"> |
||||||
|
<label class="gf-form-label query-keyword pointer" ng-click="toggleAccessHelp()"> |
||||||
|
Help |
||||||
|
<i class="fa fa-caret-down" ng-show="showAccessHelp"></i> |
||||||
|
<i class="fa fa-caret-right" ng-hide="showAccessHelp"> </i> |
||||||
|
</label> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="grafana-info-box m-t-2" ng-show="showAccessHelp"> |
||||||
|
<p> |
||||||
|
Access mode controls how requests to the data source will be handled. |
||||||
|
<strong><i>Server</i></strong> should be the preferred way if nothing else stated. |
||||||
|
</p> |
||||||
|
<div class="alert-title">Server access mode (Default):</div> |
||||||
|
<p> |
||||||
|
All requests will be made from the browser to Grafana backend/server which in turn will forward the requests to the data source |
||||||
|
and by that circumvent possible Cross-Origin Resource Sharing (CORS) requirements. |
||||||
|
The URL needs to be accessible from the grafana backend/server if you select this access mode. |
||||||
|
</p> |
||||||
|
<div class="alert-title">Browser access mode:</div> |
||||||
|
<p> |
||||||
|
All requests will be made from the browser directly to the data source and may be subject to |
||||||
|
Cross-Origin Resource Sharing (CORS) requirements. The URL needs to be accessible from the browser if you select this |
||||||
|
access mode. |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="gf-form-inline" ng-if="current.access=='proxy'"> |
||||||
|
<div class="gf-form"> |
||||||
|
<span class="gf-form-label width-10">Whitelisted Cookies</span> |
||||||
|
<bootstrap-tagsinput ng-model="current.jsonData.keepCookies" width-class="width-20" tagclass="label label-tag" placeholder="Add Name"> |
||||||
|
</bootstrap-tagsinput> |
||||||
|
<info-popover mode="right-absolute"> |
||||||
|
Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source. |
||||||
|
</info-popover> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue