<commit_before><div class="gf-form-inline">
	<div class="gf-form">
		<label class="gf-form-label query-keyword width-7">
			<span ng-show="isFirst">Group by</span>
			<span ng-hide="isFirst">Then by</span>
		</label>

		<metric-segment-model property="agg.type" options="bucketAggTypes" on-change="onTypeChanged()" custom="false" css-class="width-10"></metric-segment-model>
		<metric-segment-model ng-if="agg.field" property="agg.field" get-options="getFieldsInternal()" on-change="onChange()" css-class="width-12"></metric-segment>
	</div>

	<div class="gf-form gf-form--grow">
		<label class="gf-form-label gf-form-label--grow">
			<a ng-click="toggleOptions()">
				<i class="fa fa-caret-down" ng-show="showOptions"></i>
				<i class="fa fa-caret-right" ng-hide="showOptions"></i>
				{{settingsLinkText}}
			</a>
		</label>
	</div>

	<div class="gf-form">
		<label class="gf-form-label" ng-if="isFirst">
			<a class="pointer" ng-click="addBucketAgg()"><i class="fa fa-plus"></i></a>
		</label>
		<label class="gf-form-label">
			<a class="pointer" ng-click="removeBucketAgg()"><i class="fa fa-minus"></i></a>
		</label>
	</div>
</div>

<div class="gf-form-group" ng-if="showOptions">
	<div ng-if="agg.type === 'date_histogram'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Interval</label>
			<metric-segment-model property="agg.settings.interval" get-options="getIntervalOptions()" on-change="onChangeInternal()" css-class="width-12" custom="true"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Min Doc Count</label>
			<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.min_doc_count" ng-blur="onChangeInternal()">
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">
				Trim edges
				<info-popover mode="right-normal">
					Trim the edges on the timeseries datapoints
				</info-popover>
			</label>
			<input class="gf-form-input max-width-12" type="number" ng-model="agg.settings.trimEdges" ng-change="onChangeInternal()">
		</div>
	</div>

	<div ng-if="agg.type === 'terms'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label">Order</label>
			<metric-segment-model property="agg.settings.order" options="orderOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Size</label>
			<metric-segment-model property="agg.settings.size" options="sizeOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Order By</label>
			<metric-segment-model property="agg.settings.orderBy" options="orderByOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>
	</div>

	<div ng-if="agg.type === 'filters'">
		<div class="gf-form-inline" ng-repeat="filter in agg.settings.filters" ng-class="{last: $last}">
			<div class="gf-form">
				<label class="gf-form-item width-10">Query {{$index + 1}}</label>
				<input type="text" class="gf-form-input max-width-12" ng-model="filter.query" spellcheck='false' placeholder="Lucene query" ng-blur="onChangeInternal()">
			</div>
			<div class="gf-form">
				<label class="gf-form-label" ng-if="$first">
					<a class="pointer" ng-click="addFiltersQuery()"><i class="fa fa-plus"></i></a>
				</label>
				<label class="gf-form-label" ng-if="!$first">
					<a class="pointer" ng-click="removeFiltersQuery(filter)"><i class="fa fa-minus"></i></a>
				</label>
			</div>
		</div>
	</div>

	<div ng-if="agg.type === 'geohash_grid'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label">Precision</label>
			<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.precision" spellcheck='false' placeholder="3" ng-blur="onChangeInternal()">
		</div>
	</div>

</div>


<commit_msg>fixes #4849 - minor fix for metric-segment-model (agg.field)<commit_after><div class="gf-form-inline">
	<div class="gf-form">
		<label class="gf-form-label query-keyword width-7">
			<span ng-show="isFirst">Group by</span>
			<span ng-hide="isFirst">Then by</span>
		</label>

		<metric-segment-model property="agg.type" options="bucketAggTypes" on-change="onTypeChanged()" custom="false" css-class="width-10"></metric-segment-model>
		<metric-segment-model ng-if="agg.field" property="agg.field" get-options="getFieldsInternal()" on-change="onChange()" css-class="width-12"></metric-segment-model>
	</div>

	<div class="gf-form gf-form--grow">
		<label class="gf-form-label gf-form-label--grow">
			<a ng-click="toggleOptions()">
				<i class="fa fa-caret-down" ng-show="showOptions"></i>
				<i class="fa fa-caret-right" ng-hide="showOptions"></i>
				{{settingsLinkText}}
			</a>
		</label>
	</div>

	<div class="gf-form">
		<label class="gf-form-label" ng-if="isFirst">
			<a class="pointer" ng-click="addBucketAgg()"><i class="fa fa-plus"></i></a>
		</label>
		<label class="gf-form-label">
			<a class="pointer" ng-click="removeBucketAgg()"><i class="fa fa-minus"></i></a>
		</label>
	</div>
</div>

<div class="gf-form-group" ng-if="showOptions">
	<div ng-if="agg.type === 'date_histogram'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Interval</label>
			<metric-segment-model property="agg.settings.interval" get-options="getIntervalOptions()" on-change="onChangeInternal()" css-class="width-12" custom="true"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Min Doc Count</label>
			<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.min_doc_count" ng-blur="onChangeInternal()">
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">
				Trim edges
				<info-popover mode="right-normal">
					Trim the edges on the timeseries datapoints
				</info-popover>
			</label>
			<input class="gf-form-input max-width-12" type="number" ng-model="agg.settings.trimEdges" ng-change="onChangeInternal()">
		</div>
	</div>

	<div ng-if="agg.type === 'terms'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label">Order</label>
			<metric-segment-model property="agg.settings.order" options="orderOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Size</label>
			<metric-segment-model property="agg.settings.size" options="sizeOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>

		<div class="gf-form offset-width-7">
			<label class="gf-form-label width-10">Order By</label>
			<metric-segment-model property="agg.settings.orderBy" options="orderByOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
		</div>
	</div>

	<div ng-if="agg.type === 'filters'">
		<div class="gf-form-inline" ng-repeat="filter in agg.settings.filters" ng-class="{last: $last}">
			<div class="gf-form">
				<label class="gf-form-item width-10">Query {{$index + 1}}</label>
				<input type="text" class="gf-form-input max-width-12" ng-model="filter.query" spellcheck='false' placeholder="Lucene query" ng-blur="onChangeInternal()">
			</div>
			<div class="gf-form">
				<label class="gf-form-label" ng-if="$first">
					<a class="pointer" ng-click="addFiltersQuery()"><i class="fa fa-plus"></i></a>
				</label>
				<label class="gf-form-label" ng-if="!$first">
					<a class="pointer" ng-click="removeFiltersQuery(filter)"><i class="fa fa-minus"></i></a>
				</label>
			</div>
		</div>
	</div>

	<div ng-if="agg.type === 'geohash_grid'">
		<div class="gf-form offset-width-7">
			<label class="gf-form-label">Precision</label>
			<input type="number" class="gf-form-input max-width-12" ng-model="agg.settings.precision" spellcheck='false' placeholder="3" ng-blur="onChangeInternal()">
		</div>
	</div>

</div>



{'fraction_non_alphanumeric': 0.21401210923019895, 'fraction_numerical': 0.01087359446435191, 'mean_word_length': 4.632567849686848, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '418925', 'n_tokens_mistral': 3255, 'n_tokens_neox': 2822, 'n_words': 484}