mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
116 lines
4.5 KiB
HTML
116 lines
4.5 KiB
HTML
<div class="gf-form-inline" ng-class="{'gf-form-disabled': agg.hide}">
|
|
<div class="gf-form">
|
|
<label class="gf-form-label query-keyword width-7">
|
|
Metric
|
|
|
|
<a ng-click="toggleShowMetric()" bs-tooltip="'Click to toggle show / hide metric'">
|
|
<i class="fa fa-eye" ng-hide="agg.hide"></i>
|
|
<i class="fa fa-eye-slash" ng-show="agg.hide"></i>
|
|
</a>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="gf-form">
|
|
<metric-segment-model property="agg.type" options="metricAggTypes" on-change="onTypeChange()" custom="false" css-class="tight-form-item-large"></metric-segment-model>
|
|
<metric-segment-model ng-if="aggDef.requiresField" property="agg.field" get-options="getFieldsInternal()" on-change="onChange()" css-class="tight-form-item-xxlarge"></metric-segment-model>
|
|
<metric-segment-model ng-if="aggDef.isPipelineAgg" property="agg.pipelineAgg" options="pipelineAggOptions" on-change="onChangeInternal()" custom="false" css-class="tight-form-item-xxlarge"></metric-segment-model>
|
|
</div>
|
|
|
|
<div class="gf-form" ng-if="settingsLinkText">
|
|
<label class="gf-form-label">
|
|
<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 gf-form--grow">
|
|
<label class="gf-form-label gf-form-label--grow"></label>
|
|
</div>
|
|
|
|
<div class="gf-form">
|
|
<label class="gf-form-label" ng-if="isFirst">
|
|
<a class="pointer" ng-click="addMetricAgg()"><i class="fa fa-plus"></i></a>
|
|
</label>
|
|
<label class="gf-form-label" ng-if="!isSingle">
|
|
<a class="pointer" ng-click="removeMetricAgg()"><i class="fa fa-minus"></i></a>
|
|
</label>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="gf-form-group" ng-if="showOptions">
|
|
<div class="gf-form" ng-if="agg.type === 'derivative'">
|
|
<label class="gf-form-label width-8">Unit</label>
|
|
<input type="text" class="gf-form-input max-width-10" ng-model="agg.settings.unit" ng-blur="onChangeInternal()" spellcheck='false'>
|
|
</div>
|
|
|
|
<div class="gf-form" ng-if="agg.type === 'moving_avg'">
|
|
<label class="gf-form-label width-8">Window</label>
|
|
<input type="number" class="gf-form-input max-width-10" ng-model="agg.settings.window" ng-blur="onChangeInternal()" spellcheck='false'>
|
|
</div>
|
|
|
|
<div class="gf-form" ng-if="agg.type === 'moving_avg'">
|
|
<label class="gf-form-label width-8">Model</label>
|
|
<input type="text" class="gf-form-input max-width-10" ng-change="onChangeInternal()" ng-model="agg.settings.model" blur="onChange()" spellcheck='false'>
|
|
</div>
|
|
|
|
<div class="gf-form" ng-if="agg.type === 'percentiles'">
|
|
<label class="gf-form-label">Percentiles</label>
|
|
<input type="text" class="gf-form-input max-width-25" ng-model="agg.settings.percents" array-join ng-blur="onChange()"></input>
|
|
</div>
|
|
|
|
<div ng-if="agg.type === 'extended_stats'">
|
|
<div class="gf-form" ng-repeat="stat in extendedStats">
|
|
<ul class="gf-form-list">
|
|
<li class="tight-form-item" style="width: 100px">
|
|
{{stat.text}}
|
|
</li>
|
|
<li class="tight-form-item last">
|
|
<editor-checkbox text="" model="agg.meta.{{stat.value}}" change="onChange()"></editor-checkbox>
|
|
</li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
<div class="tight-form" ng-if="agg.type === 'extended_stats'">
|
|
<ul class="tight-form-list">
|
|
<li class="tight-form-item" style="width: 100px">
|
|
Sigma
|
|
</li>
|
|
<li>
|
|
<input type="number" class="input-mini tight-form-input last" placeholder="3" ng-model="agg.settings.sigma" ng-blur="onChange()"></input>
|
|
</li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
<div class="tight-form" ng-if="aggDef.supportsInlineScript">
|
|
<ul class="tight-form-list">
|
|
<li class="tight-form-item" style="width: 100px;">
|
|
Script
|
|
</li>
|
|
<li>
|
|
<input type="text" class="input-medium tight-form-input last" empty-to-null ng-model="agg.inlineScript" ng-blur="onChangeInternal()" spellcheck='false' placeholder="_value * 1">
|
|
</li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
<div class="tight-form" ng-if="aggDef.supportsMissing">
|
|
<ul class="tight-form-list">
|
|
<li class="tight-form-item" style="width: 100px;">
|
|
Missing
|
|
<tip>The missing parameter defines how documents that are missing a value should be treated. By default they will be ignored but it is also possible to treat them as if they had a value</tip>
|
|
</li>
|
|
<li>
|
|
<input type="number" class="input-medium tight-form-input last" empty-to-null ng-model="agg.settings.missing" ng-blur="onChangeInternal()" spellcheck='false'>
|
|
</li>
|
|
</ul>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
</div>
|