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.
224 lines
9.2 KiB
224 lines
9.2 KiB
![]()
7 years ago
|
<div class="gf-form-button-row" ng-if="ctrl.analyticsController.serverStatus === false">
|
||
|
<h5>Hastic server at "{{ctrl.backendURL}}" is not available</h5>
|
||
|
<button class="btn btn-inverse" ng-click="ctrl.runBackendConnectivityCheck()">
|
||
|
<i class="fa fa-plug"></i>
|
||
|
Reconnect to Hastic server
|
||
|
</button>
|
||
|
</div>
|
||
![]()
7 years ago
|
|
||
![]()
7 years ago
|
<div ng-if="ctrl.analyticsController.serverStatus === true">
|
||
|
<h5> Analytic Units </h5>
|
||
|
<div class="editor-row">
|
||
|
<div class="gf-form" ng-repeat="analyticUnit in ctrl.analyticsController.analyticUnits">
|
||
![]()
7 years ago
|
|
||
![]()
6 years ago
|
<label class="gf-form-label width-6">
|
||
|
<i class="fa fa-info" bs-tooltip="'Analytic unit id: ' + analyticUnit.id"></i>
|
||
|
Name
|
||
|
</label>
|
||
![]()
7 years ago
|
<input
|
||
|
type="text" class="gf-form-input max-width-15"
|
||
|
ng-model="analyticUnit.name"
|
||
6 years ago
|
ng-change="ctrl.onAnalyticUnitNameChange(analyticUnit)"
|
||
![]()
7 years ago
|
>
|
||
|
|
||
![]()
7 years ago
|
<label class="gf-form-label width-8"> Type </label>
|
||
|
<div class="gf-form-select-wrapper">
|
||
|
<select class="gf-form-input width-12"
|
||
|
ng-model="analyticUnit.type"
|
||
6 years ago
|
ng-options="type.value as type.name for type in ctrl.analyticUnitTypes[analyticUnit.detectorType]"
|
||
![]()
7 years ago
|
ng-disabled="true"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
|
<!--
|
||
|
<label class="gf-form-label width-6"> Confidence </label>
|
||
|
<input
|
||
|
type="number" class="gf-form-input width-5 ng-valid ng-scope ng-empty ng-dirty ng-valid-number ng-touched"
|
||
|
placeholder="auto" bs-tooltip="'Override automatic decimal precision for legend and tooltips'"
|
||
|
data-placement="right" ng-model="ctrl.panel.decimals" ng-change="ctrl.render()" ng-model-onblur="" data-original-title="" title=""
|
||
|
/>
|
||
|
-->
|
||
|
|
||
|
<label class="gf-form-label width-6"> Color </label>
|
||
|
<span class="gf-form-label">
|
||
|
<color-picker
|
||
|
color="analyticUnit.color"
|
||
|
onChange="ctrl.onColorChange.bind(ctrl, analyticUnit.id)"
|
||
|
/>
|
||
|
</span>
|
||
|
|
||
6 years ago
|
<label
|
||
|
class="gf-form-label"
|
||
|
ng-if="analyticUnit.detectorType === 'pattern'"
|
||
|
ng-style="analyticUnit.status === 'LEARNING' && { 'cursor': 'not-allowed' }"
|
||
|
>
|
||
![]()
7 years ago
|
<a class="pointer" tabindex="1"
|
||
|
ng-click="ctrl.onToggleLabelingMode(analyticUnit.id)"
|
||
|
ng-disabled="analyticUnit.status === 'LEARNING'"
|
||
|
>
|
||
|
<i class="fa fa-bar-chart" ng-if="!analyticUnit.saving"></i>
|
||
|
<i class="fa fa-spinner fa-spin" ng-if="analyticUnit.saving"></i>
|
||
|
<b ng-if="analyticUnit.selected && !analyticUnit.deleteMode && !analyticUnit.saving"> labeling </b>
|
||
|
<b ng-if="analyticUnit.selected && analyticUnit.deleteMode && !analyticUnit.saving"> deleting </b>
|
||
|
<b ng-if="analyticUnit.saving" ng-disabled="true"> saving... </b>
|
||
|
</a>
|
||
|
</label>
|
||
|
|
||
![]()
6 years ago
|
<select class="gf-form-input width-7"
|
||
6 years ago
|
ng-model="ctrl.analyticsController.getThreshold(analyticUnit.id).condition"
|
||
|
ng-options="type for type in ctrl.analyticsController.conditions"
|
||
|
ng-if="analyticUnit.detectorType === 'threshold'"
|
||
|
ng-blur="ctrl.analyticsController.saveThreshold(analyticUnit.id)"
|
||
|
/>
|
||
|
|
||
|
<input
|
||
|
class="gf-form-input width-5"
|
||
|
type="number"
|
||
|
ng-model="ctrl.analyticsController.getThreshold(analyticUnit.id).value"
|
||
![]()
6 years ago
|
ng-if="analyticUnit.detectorType === 'threshold' && ctrl.analyticsController.getThreshold(analyticUnit.id).condition != 'No data'"
|
||
6 years ago
|
ng-blur="ctrl.analyticsController.saveThreshold(analyticUnit.id)"
|
||
|
/>
|
||
|
|
||
![]()
7 years ago
|
<label class="gf-form-label">
|
||
|
<a
|
||
|
ng-if="analyticUnit.visible"
|
||
|
ng-disabled="analyticUnit.selected"
|
||
|
bs-tooltip="'Hide. It`s visible now.'"
|
||
|
ng-click="ctrl.onToggleVisibility(analyticUnit.id)"
|
||
|
class="pointer"
|
||
|
>
|
||
|
<i class="fa fa-eye"></i>
|
||
|
</a>
|
||
|
|
||
|
<a
|
||
|
ng-if="!analyticUnit.visible"
|
||
|
ng-disabled="analyticUnit.selected"
|
||
|
bs-tooltip="'Show. It`s hidden now.'"
|
||
|
ng-click="ctrl.onToggleVisibility(analyticUnit.id)"
|
||
|
class="pointer"
|
||
|
>
|
||
|
<i class="fa fa-eye-slash"></i>
|
||
|
</a>
|
||
|
</label>
|
||
|
|
||
|
<label class="gf-form-label">
|
||
|
<a
|
||
|
ng-if="!analyticUnit.selected"
|
||
|
ng-click="ctrl.onRemove(analyticUnit.id)"
|
||
|
class="pointer"
|
||
|
>
|
||
|
<i class="fa fa-trash"></i>
|
||
|
</a>
|
||
|
|
||
|
<a
|
||
|
ng-if="analyticUnit.selected"
|
||
|
ng-click="ctrl.onCancelLabeling(analyticUnit.id)"
|
||
|
class="pointer"
|
||
|
>
|
||
|
<i class="fa fa-ban"></i>
|
||
|
</a>
|
||
|
</label>
|
||
|
|
||
|
<label>
|
||
|
<i ng-if="analyticUnit.status === 'LEARNING'" class="grafana-tip fa fa-leanpub ng-scope" bs-tooltip="'Learning'"></i>
|
||
|
<i ng-if="analyticUnit.status === 'PENDING'" class="grafana-tip fa fa-list-ul ng-scope" bs-tooltip="'Pending'"></i>
|
||
|
<i ng-if="analyticUnit.status === 'FAILED'" class="grafana-tip fa fa-exclamation-circle ng-scope" bs-tooltip="'Error: ' + analyticUnit.error"></i>
|
||
|
</label>
|
||
![]()
7 years ago
|
|
||
![]()
7 years ago
|
</div>
|
||
![]()
7 years ago
|
</div>
|
||
|
|
||
![]()
7 years ago
|
<div class="editor-row" ng-if="ctrl.analyticsController.creatingNew">
|
||
|
<div class="gf-form">
|
||
|
<label class="gf-form-label width-4"> Name </label>
|
||
|
<input
|
||
|
type="text" class="gf-form-input max-width-15"
|
||
|
ng-model="ctrl.analyticsController.newAnalyticUnit.name"
|
||
|
>
|
||
|
|
||
6 years ago
|
<label class="gf-form-label width-8"> Detector Type </label>
|
||
|
<div class="gf-form-select-wrapper">
|
||
|
<select class="gf-form-input width-12"
|
||
|
ng-model="ctrl.analyticsController.newAnalyticUnit.detectorType"
|
||
|
ng-options="analyticUnitDetectorType for analyticUnitDetectorType in ctrl.analyticUnitDetectorTypes"
|
||
|
ng-change="ctrl.analyticsController.onAnalyticUnitDetectorChange(ctrl.analyticUnitTypes);"
|
||
|
/>
|
||
|
</div>
|
||
|
|
||
![]()
7 years ago
|
<label class="gf-form-label width-8"> Type </label>
|
||
|
<div class="gf-form-select-wrapper">
|
||
|
<select class="gf-form-input width-12"
|
||
|
ng-model="ctrl.analyticsController.newAnalyticUnit.type"
|
||
6 years ago
|
ng-options="
|
||
|
type.value as type.name
|
||
|
for type in ctrl.analyticUnitTypes[ctrl.analyticsController.newAnalyticUnit.detectorType]
|
||
|
"
|
||
![]()
7 years ago
|
/>
|
||
|
</div>
|
||
|
|
||
|
<label class="gf-form-label">
|
||
|
<a class="pointer" tabindex="1" ng-click="ctrl.saveNew()">
|
||
|
<b ng-if="!ctrl.analyticsController.saving"> create </b>
|
||
|
<b ng-if="ctrl.analyticsController.saving" ng-disabled="true"> saving... </b>
|
||
|
</a>
|
||
|
</label>
|
||
7 years ago
|
</div>
|
||
![]()
7 years ago
|
</div>
|
||
7 years ago
|
|
||
![]()
6 years ago
|
<div class="gf-form-button-row" ng-if="!ctrl.analyticsController.creatingAnalyticUnit">
|
||
![]()
7 years ago
|
<button class="btn btn-inverse" ng-click="ctrl.createNew()">
|
||
|
<i class="fa fa-plus"></i>
|
||
|
Add Analytic Unit
|
||
|
</button>
|
||
![]()
7 years ago
|
</div>
|
||
![]()
6 years ago
|
<div class="gf-form-button-row">
|
||
![]()
6 years ago
|
<button class="gf-form-label width-10 pointer" ng-click="ctrl.showHelp = !ctrl.showHelp">
|
||
![]()
6 years ago
|
Show Help
|
||
|
<i class="fa fa-caret-down" ng-show="ctrl.showHelp"></i>
|
||
|
<i class="fa fa-caret-right" ng-hide="ctrl.showHelp"></i>
|
||
|
</button>
|
||
|
</div>
|
||
|
|
||
|
<div class="gf-form" ng-show="ctrl.showHelp" >
|
||
|
<pre class="gf-form-pre alert alert-info">
|
||
|
<b>Adding Analytic Units:</b>
|
||
|
1) Click on 'Add Analytic Unit' button to add an analytic unit.
|
||
|
2) Type in desired analytic unit name into provided 'Name' field.
|
||
|
3) Choose pattern type from the 'Type' dropdown menu. Pattern types explained below.
|
||
|
4) Click 'create' button.
|
||
|
|
||
|
<b>Labeling segments:</b>
|
||
|
1) Click on the chart symbol <img ng-src="{{ctrl.panelPath}}/img/chartSymbol.png"> to enter labeling mode.
|
||
|
2) Hold down 'Ctrl' button on your keyboard and hold down left mouse button while dragging to label segments manually. Release LMB to finish labeling the segment.
|
||
|
3) After all of the needed segments are labeled click on the chart symbol again to exit labeling mode.
|
||
|
|
||
|
<b>Hastic will now start learning, and after a short while you will see the results on your graph.</b>
|
||
|
|
||
|
<b>Deleting segments:</b>
|
||
|
1) Click on the chart symbol to enter labeling mode. (skip this step if you are already in labeling mode)
|
||
|
2) Press 'D' key twice to switch from <img ng-src="{{ctrl.panelPath}}/img/labeling.jpg"> to <img ng-src="{{ctrl.panelPath}}/img/deleting.jpg">.
|
||
|
3) Hold down 'Ctrl' button on your keyboard and hold down left mouse button while dragging to mark segments for deletion.
|
||
|
4) After all of the needed segments are deleted click on the chart symbol again to exit labeling mode.
|
||
|
|
||
|
<b>Hastic will now start learning again, based on updated segments list.</b>
|
||
|
|
||
|
<b>Available labeling patterns:</b>
|
||
|
1) General: patterns in your data that don't fall under any of provided built-in patterns.
|
||
|
|
||
|
2) Peaks: a sharp increase to a certain single value, followed by a return to the original value.
|
||
|
<img ng-src="{{ctrl.panelPath}}/img/peaks.jpg">
|
||
|
|
||
|
3) Troughs: a sharp decrease to a certain single value, followed by a return to the original value.
|
||
|
<img ng-src="{{ctrl.panelPath}}/img/troughs.jpg">
|
||
|
|
||
|
4) Jumps: increase to a certain value without returning to the original state.
|
||
|
<img ng-src="{{ctrl.panelPath}}/img/jumps.jpg">
|
||
6 years ago
|
|
||
![]()
6 years ago
|
5) Drops: decrease to a certain value without returning to the original state.
|
||
|
<img ng-src="{{ctrl.panelPath}}/img/drops.jpg">
|
||
|
|
||
|
6) Custom: any custom model created and imported by you.
|
||
|
</pre>
|
||
![]()
7 years ago
|
</div>
|
||
|
|