<datasource-http-settings current="ctrl.current" suggest-url="http://localhost:9200">
</datasource-http-settings>

<h3 class="page-heading">Elasticsearch details</h3>

<div class="gf-form-group">
	<div class="gf-form-inline">
		<div class="gf-form max-width-25">
			<span class="gf-form-label width-9">Index name</span>
			<input class="gf-form-input" type="text" ng-model='ctrl.current.database' placeholder="" required></input>
		</div>

		<div class="gf-form width-14">
      <span class="gf-form-label width-9">Pattern</span>
      <span class="gf-form-select-wrapper">
          <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.interval" ng-options="f.value as f.name for f in ctrl.indexPatternTypes" ng-change="ctrl.indexPatternTypeChanged()" ></select>
      </span>
		</div>
	</div>

	<div class="gf-form max-width-25">
		<span class="gf-form-label width-9">Time field name</span>
		<input class="gf-form-input" type="text"  ng-model='ctrl.current.jsonData.timeField' placeholder="" required ng-init=""></input>
	</div>

	<div class="gf-form">
    <span class="gf-form-label width-9">Version</span>
    <span class="gf-form-select-wrapper">
        <select class="gf-form-input gf-size-auto" ng-model="ctrl.current.jsonData.esVersion" ng-options="f.value as f.name for f in ctrl.esVersions"></select>
    </span>
	</div>
    <div class="gf-form max-width-30" ng-if="ctrl.current.jsonData.esVersion>=56">
        <span class="gf-form-label width-15">Max concurrent Shard Requests</span>
        <input class="gf-form-input" type="text"  ng-model='ctrl.current.jsonData.maxConcurrentShardRequests' placeholder="" required></input>
    </div>
	<div class="gf-form-inline">
		<div class="gf-form">
			<span class="gf-form-label width-9">Min time interval</span>
			<input type="text" class="gf-form-input width-6" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="10s"></input>
			<info-popover mode="right-absolute">
				A lower limit for the auto group by time interval. Recommended to be set to write frequency,
				for example <code>1m</code> if your data is written every minute.
			</info-popover>
		</div>
	</div>
</div>
