Files
grafana/public/app/plugins/datasource/prometheus/partials/config.html
Andrej Ocenas 2596ce5076 Add pattern validation in configs (#16837)
Datasources: Add pattern validation for time input on datasource config pages
2019-05-02 11:02:00 +02:00

51 lines
1.8 KiB
HTML

<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:9090">
</datasource-http-settings>
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label width-8">Scrape interval</span>
<input
type="text"
class="gf-form-input width-8 gf-form-input--has-help-icon"
ng-model="ctrl.current.jsonData.timeInterval"
spellcheck='false'
placeholder="15s"
ng-pattern="/^\d+[Mwdhmsy]$/"
></input>
<info-popover mode="right-absolute">
Set this to your global scrape interval defined in your Prometheus config file. This will be used as a lower limit for the
Prometheus step query parameter.
</info-popover>
</div>
</div>
<div class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label width-8">Query timeout</span>
<input
type="text"
class="gf-form-input width-8 gf-form-input--has-help-icon"
ng-model="ctrl.current.jsonData.queryTimeout"
spellcheck="false"
placeholder="60s"
ng-pattern="/^\d+[Mwdhmsy]$/"
></input>
<info-popover mode="right-absolute">
Set the Prometheus query timeout.
</info-popover>
</div>
</div>
<div class="gf-form">
<label class="gf-form-label width-8">HTTP Method</label>
<div class="gf-form-select-wrapper width-8 gf-form-select-wrapper--has-help-icon">
<select class="gf-form-input" ng-model="ctrl.current.jsonData.httpMethod" ng-options="method for method in ['GET', 'POST']"></select>
<info-popover mode="right-absolute">
Specify the HTTP Method to query Prometheus. (POST is only available in Prometheus >= v2.1.0)
</info-popover>
</div>
</div>
</div>