You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.6 KiB
149 lines
4.6 KiB
![]()
5 years ago
|
<div class="section gf-form-group">
|
||
![]()
6 years ago
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword">
|
||
![]()
6 years ago
|
Name
|
||
|
</label>
|
||
|
<input
|
||
![]()
5 years ago
|
type="text" class="gf-form-input"
|
||
![]()
6 years ago
|
ng-model="analyticUnit.name"
|
||
|
ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
>
|
||
|
</div>
|
||
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword"> Type </label>
|
||
![]()
6 years ago
|
<div class="gf-form-select-wrapper">
|
||
![]()
5 years ago
|
<select class="gf-form-input"
|
||
![]()
6 years ago
|
ng-model="analyticUnit.type"
|
||
|
ng-options="type.value as type.name for type in ctrl.analyticUnitTypes[analyticUnit.detectorType]"
|
||
|
ng-disabled="true"
|
||
|
/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
![]()
5 years ago
|
<div class="section gf-form-group">
|
||
![]()
6 years ago
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword"> Positive Color </label>
|
||
![]()
6 years ago
|
<label class="gf-form-label">
|
||
|
<color-picker
|
||
|
color="analyticUnit.labeledColor"
|
||
|
onChange="ctrl.onColorChange.bind(ctrl, analyticUnit.id, false)"
|
||
|
/>
|
||
|
</label>
|
||
|
</div>
|
||
|
|
||
|
<div class="gf-form"
|
||
|
ng-if="analyticUnit.detectorType === 'pattern' || analyticUnit.detectorType === 'anomaly'"
|
||
|
>
|
||
|
<label class="gf-form-label query-keyword"> Negative Color </label>
|
||
|
<label class="gf-form-label">
|
||
|
<color-picker
|
||
|
color="analyticUnit.deletedColor"
|
||
|
onChange="ctrl.onColorChange.bind(ctrl, analyticUnit.id, true)"
|
||
|
/>
|
||
|
</label>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
![]()
5 years ago
|
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'threshold'">
|
||
![]()
6 years ago
|
<!-- TODO: move analytic-unit-specific fields rendering to class -->
|
||
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword"> Condition </label>
|
||
![]()
6 years ago
|
<select class="gf-form-input"
|
||
|
ng-class="{
|
||
|
'width-5': analyticUnit.condition !== 'NO_DATA',
|
||
|
'width-9': analyticUnit.condition === 'NO_DATA'
|
||
|
}"
|
||
|
ng-model="analyticUnit.condition"
|
||
|
ng-options="type for type in ctrl.analyticsController.conditions"
|
||
|
ng-change="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
/>
|
||
![]()
5 years ago
|
<input class="gf-form-input"
|
||
![]()
6 years ago
|
ng-if="analyticUnit.condition !== 'NO_DATA'"
|
||
|
type="number"
|
||
|
ng-model="analyticUnit.value"
|
||
|
ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
/>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
![]()
5 years ago
|
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'anomaly'">
|
||
![]()
6 years ago
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword">
|
||
|
Alpha
|
||
|
|
||
![]()
6 years ago
|
<i class="fa fa-info" bs-tooltip="'Takes value from 0 to 1. Less Alpha means smoother bounds'"></i>
|
||
|
</label>
|
||
![]()
5 years ago
|
<input class="gf-form-input"
|
||
![]()
6 years ago
|
min="0"
|
||
|
max="1"
|
||
|
type="number"
|
||
|
ng-model="analyticUnit.alpha"
|
||
|
ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword">
|
||
|
Сonfidence
|
||
|
|
||
6 years ago
|
<i class="fa fa-info" bs-tooltip="'Bounds for the metric'"></i>
|
||
![]()
6 years ago
|
</label>
|
||
![]()
5 years ago
|
<input class="gf-form-input"
|
||
![]()
6 years ago
|
min="0"
|
||
|
type="number"
|
||
|
ng-model="analyticUnit.confidence"
|
||
|
ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
![]()
5 years ago
|
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'anomaly'">
|
||
![]()
6 years ago
|
<div class="gf-form">
|
||
|
<gf-form-switch
|
||
|
class="gf-form"
|
||
|
label="Seasonality"
|
||
![]()
5 years ago
|
label-class="query-keyword"
|
||
![]()
6 years ago
|
on-change="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
checked="analyticUnit.hasSeasonality"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
|
<div class="gf-form" ng-if="analyticUnit.hasSeasonality">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword"> Seasonality Period </label>
|
||
![]()
6 years ago
|
<input
|
||
![]()
5 years ago
|
type="number" class="gf-form-input"
|
||
![]()
6 years ago
|
ng-init="seasonalityValue = analyticUnit.seasonalityPeriod.value"
|
||
|
ng-model="seasonalityValue"
|
||
|
ng-blur="ctrl.onSeasonalityChange(analyticUnit.id, seasonalityValue)"
|
||
|
min="0"
|
||
|
>
|
||
|
</div>
|
||
|
|
||
|
<div class="gf-form" ng-if="analyticUnit.hasSeasonality">
|
||
|
<div class="gf-form-select-wrapper">
|
||
|
<!-- TODO: move periods from ng-options -->
|
||
![]()
5 years ago
|
<select class="gf-form-input"
|
||
![]()
6 years ago
|
ng-model="analyticUnit.seasonalityPeriod.unit"
|
||
|
ng-change="ctrl.onSeasonalityChange(analyticUnit.id)"
|
||
|
ng-options="type for type in ['seconds', 'minutes', 'hours', 'days', 'years']"
|
||
|
/>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
6 years ago
|
|
||
![]()
5 years ago
|
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'anomaly'">
|
||
6 years ago
|
<div class="gf-form">
|
||
![]()
5 years ago
|
<label class="gf-form-label query-keyword"> Enabled bounds </label>
|
||
6 years ago
|
<div class="gf-form-select-wrapper">
|
||
![]()
5 years ago
|
<select class="gf-form-input"
|
||
![]()
6 years ago
|
ng-model="analyticUnit.enableBounds"
|
||
6 years ago
|
ng-change="ctrl.onAnalyticUnitChange(analyticUnit)"
|
||
|
ng-options="bound.value as bound.name for bound in ctrl.boundTypes"
|
||
|
/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|