Browse Source

Update configuration UI in Grafana 7.x (#464)

master
Alexander Velikiy 4 years ago committed by GitHub
parent
commit
e02c4870e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      src/panel/graph_panel/partials/analytic_unit_7.x.html
  2. 2
      src/panel/graph_panel/partials/analytic_units_7.x.html
  3. 10
      src/panel/graph_panel/partials/new_analytic_unit.html
  4. 2
      src/panel/graph_panel/partials/new_analytic_unit_7.x.html
  5. 3
      src/panel/graph_panel/partials/tab_analytics.html

22
src/panel/graph_panel/partials/analytic_unit_7.x.html

@ -1,18 +1,18 @@
<div class="section gf-form-group"> <div class="section gf-form-group">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> <label class="gf-form-label query-keyword width-6">
Name Name
</label> </label>
<input <input
type="text" class="gf-form-input" type="text" class="gf-form-input width-12"
ng-model="analyticUnit.name" ng-model="analyticUnit.name"
ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)" ng-blur="ctrl.onAnalyticUnitChange(analyticUnit)"
> >
</div> </div>
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> Type </label> <label class="gf-form-label query-keyword width-6"> Type </label>
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">
<select class="gf-form-input" <select class="gf-form-input width-12"
ng-model="analyticUnit.type" ng-model="analyticUnit.type"
ng-options="type.value as type.name for type in ctrl.analyticUnitTypes[analyticUnit.detectorType]" ng-options="type.value as type.name for type in ctrl.analyticUnitTypes[analyticUnit.detectorType]"
ng-disabled="true" ng-disabled="true"
@ -23,7 +23,7 @@
<div class="section gf-form-group"> <div class="section gf-form-group">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> Positive Color </label> <label class="gf-form-label query-keyword width-6"> Positive Color </label>
<label class="gf-form-label"> <label class="gf-form-label">
<color-picker <color-picker
color="analyticUnit.labeledColor" color="analyticUnit.labeledColor"
@ -35,7 +35,7 @@
<div class="gf-form" <div class="gf-form"
ng-if="analyticUnit.detectorType === 'pattern' || analyticUnit.detectorType === 'anomaly'" ng-if="analyticUnit.detectorType === 'pattern' || analyticUnit.detectorType === 'anomaly'"
> >
<label class="gf-form-label query-keyword"> Negative Color </label> <label class="gf-form-label query-keyword width-6"> Negative Color </label>
<label class="gf-form-label"> <label class="gf-form-label">
<color-picker <color-picker
color="analyticUnit.deletedColor" color="analyticUnit.deletedColor"
@ -48,7 +48,7 @@
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'threshold'"> <div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'threshold'">
<!-- TODO: move analytic-unit-specific fields rendering to class --> <!-- TODO: move analytic-unit-specific fields rendering to class -->
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> Condition </label> <label class="gf-form-label query-keyword width-6"> Condition </label>
<select class="gf-form-input" <select class="gf-form-input"
ng-class="{ ng-class="{
'width-5': analyticUnit.condition !== 'NO_DATA', 'width-5': analyticUnit.condition !== 'NO_DATA',
@ -69,12 +69,12 @@
<div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'anomaly'"> <div class="section gf-form-group" ng-if="analyticUnit.detectorType === 'anomaly'">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> <label class="gf-form-label query-keyword width-6">
Alpha Alpha
&nbsp; &nbsp;
<i class="fa fa-info" bs-tooltip="'Takes value from 0 to 1. Less Alpha means smoother bounds'"></i> <i class="fa fa-info" bs-tooltip="'Takes value from 0 to 1. Less Alpha means smoother bounds'"></i>
</label> </label>
<input class="gf-form-input" <input class="gf-form-input width-12"
min="0" min="0"
max="1" max="1"
type="number" type="number"
@ -84,12 +84,12 @@
</div> </div>
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword"> <label class="gf-form-label query-keyword width-6">
Сonfidence Сonfidence
&nbsp; &nbsp;
<i class="fa fa-info" bs-tooltip="'Bounds for the metric'"></i> <i class="fa fa-info" bs-tooltip="'Bounds for the metric'"></i>
</label> </label>
<input class="gf-form-input" <input class="gf-form-input width-12"
min="0" min="0"
type="number" type="number"
ng-model="analyticUnit.confidence" ng-model="analyticUnit.confidence"

2
src/panel/graph_panel/partials/analytic_units_7.x.html

@ -100,7 +100,7 @@
</a> </a>
</button> </button>
</div> </div>
<div class="query-editor-row__body"> <div>
<ng-include src="ctrl.partialsPath + '/analytic_unit_7.x.html'"></ng-include> <ng-include src="ctrl.partialsPath + '/analytic_unit_7.x.html'"></ng-include>
</div> </div>
</div> </div>

10
src/panel/graph_panel/partials/new_analytic_unit.html

@ -2,7 +2,7 @@
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword width-8"> Name </label> <label class="gf-form-label query-keyword width-8"> Name </label>
<input <input
type="text" class="gf-form-input width-15" type="text" class="gf-form-input width-12"
ng-model="ctrl.analyticsController.newAnalyticUnit.name" ng-model="ctrl.analyticsController.newAnalyticUnit.name"
> >
</div> </div>
@ -16,7 +16,7 @@
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword width-8"> Detector Type </label> <label class="gf-form-label query-keyword width-8"> Detector Type </label>
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">
<select class="gf-form-input width-10" <select class="gf-form-input width-12"
ng-model="ctrl.analyticsController.newAnalyticUnit.detectorType" ng-model="ctrl.analyticsController.newAnalyticUnit.detectorType"
ng-options="analyticUnitDetectorType for analyticUnitDetectorType in ctrl.analyticUnitDetectorTypes" ng-options="analyticUnitDetectorType for analyticUnitDetectorType in ctrl.analyticUnitDetectorTypes"
ng-change="ctrl.analyticsController.onAnalyticUnitDetectorChange(ctrl.analyticUnitTypes);" ng-change="ctrl.analyticsController.onAnalyticUnitDetectorChange(ctrl.analyticUnitTypes);"
@ -24,6 +24,12 @@
</div> </div>
</div> </div>
<div class="gf-form gf-form--grow">
<div class="gf-form-label gf-form-label--grow"></div>
</div>
</div>
<div class="gf-form-inline">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label query-keyword width-8"> Type </label> <label class="gf-form-label query-keyword width-8"> Type </label>
<div class="gf-form-select-wrapper"> <div class="gf-form-select-wrapper">

2
src/panel/graph_panel/partials/new_analytic_unit_7.x.html

@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="query-editor-row__body gf-form-query"> <div class="gf-form-query">
<ng-include src="ctrl.partialsPath + '/new_analytic_unit.html'"></ng-include> <ng-include src="ctrl.partialsPath + '/new_analytic_unit.html'"></ng-include>
</div> </div>
</div> </div>

3
src/panel/graph_panel/partials/tab_analytics.html

@ -80,6 +80,7 @@
</div> </div>
<div ng-if="ctrl.analyticsController.serverStatus === true && ctrl.analyticsController.loading"> <div ng-if="ctrl.analyticsController.serverStatus === true && ctrl.analyticsController.loading">
<i class="fa fa-spinner fa-spin" > Fetching analytic units... </i> <i class="fa fa-spinner fa-spin" ></i>
<span>Fetching analytic units...</span>
</div> </div>
</div> </div>

Loading…
Cancel
Save