|
|
|
<div class="query-editor-row" ng-repeat="analyticUnit in ctrl.analyticsController.analyticUnits">
|
|
|
|
<div class="query-editor-row__header">
|
|
|
|
<div class="query-editor-row__ref-id" ng-click="ctrl.onToggleCollapsed(analyticUnit.id)">
|
|
|
|
<i class="fa fa-fw fa-caret-down" ng-hide="analyticUnit.collapsed"></i>
|
|
|
|
<i class="fa fa-fw fa-caret-right" ng-show="analyticUnit.collapsed"></i>
|
|
|
|
<span>{{analyticUnit.name}}</span>
|
|
|
|
<em class="query-editor-row__context-info">({{analyticUnit.id}})</em>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="query-editor-row__collapsed-text"
|
|
|
|
style="line-height: 0px;"
|
|
|
|
>
|
|
|
|
|
|
|
|
<i ng-if="analyticUnit.status === 'READY'"
|
|
|
|
class="fa fa-fw fa-check-circle"
|
|
|
|
bs-tooltip="'Ready'"
|
|
|
|
></i>
|
|
|
|
<i ng-if="analyticUnit.status === 'SUCCESS'"
|
|
|
|
class="fa fa-fw fa-check"
|
|
|
|
bs-tooltip="'Learning succeeded'"
|
|
|
|
></i>
|
|
|
|
<i ng-if="analyticUnit.status === 'LEARNING'"
|
|
|
|
class="fa fa-fw fa-leanpub"
|
|
|
|
bs-tooltip="'Learning'"
|
|
|
|
></i>
|
|
|
|
<i ng-if="analyticUnit.status === 'DETECTION'"
|
|
|
|
class="fa fa-fw fa-search"
|
|
|
|
bs-tooltip="'Detection'"
|
|
|
|
></i>
|
|
|
|
<i ng-if="analyticUnit.status === 'PENDING'"
|
|
|
|
class="fa fa-fw fa-list-ul"
|
|
|
|
bs-tooltip="'Pending'"
|
|
|
|
></i>
|
|
|
|
<i ng-if="analyticUnit.status === 'FAILED'"
|
|
|
|
class="fa fa-fw fa-exclamation-circle"
|
|
|
|
bs-tooltip="'Error: ' + analyticUnit.error"
|
|
|
|
></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="gf-form-query"
|
|
|
|
ng-class="analyticUnit.collapsed && 'query-editor-row__body--collapsed'"
|
|
|
|
>
|
|
|
|
<div class="query-editor-row__header">
|
|
|
|
<button class="query-editor-row__action" ng-click=ctrl.onToggleVisibility(analyticUnit.id)>
|
|
|
|
<a ng-if="analyticUnit.visible" bs-tooltip="'Hide. It`s visible now.'" class="pointer">
|
|
|
|
<i class="fa fa-fw fa-eye"></i>
|
|
|
|
</a>
|
|
|
|
<a ng-if="!analyticUnit.visible" bs-tooltip="'Show. It`s hidden now.'" class="pointer">
|
|
|
|
<i class="fa fa-fw fa-eye-slash"></i>
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button class="query-editor-row__action" ng-click="ctrl.onToggleInspect(analyticUnit.id)" bs-tooltip="'Inspect Mode'">
|
|
|
|
<a class="pointer">
|
|
|
|
<!--use ctrl.pluginPath-->
|
|
|
|
<img src="public/plugins/corpglory-hastic-app/img/inspect_enabled.svg" class="fa fa-fw"
|
|
|
|
ng-if="analyticUnit.inspect"></img>
|
|
|
|
<img src="public/plugins/corpglory-hastic-app/img/inspect_disabled.svg" class="fa fa-fw"
|
|
|
|
ng-if="!analyticUnit.inspect"></img>
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button class="query-editor-row__action" ng-click="ctrl.onRemove(analyticUnit.id)" bs-tooltip="'Delete'">
|
|
|
|
<a class="pointer">
|
|
|
|
<i class="fa fa-fw fa-trash"></i>
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button class="query-editor-row__action" ng-if="
|
|
|
|
(analyticUnit.detectorType === 'pattern' ||
|
|
|
|
(analyticUnit.detectorType === 'anomaly' && analyticUnit.hasSeasonality)) &&
|
|
|
|
!analyticUnit.selected" bs-tooltip="'Label'">
|
|
|
|
<a class="pointer" ng-style="analyticUnit.status === 'LEARNING' && { 'cursor': 'not-allowed' }"
|
|
|
|
ng-click="ctrl.onToggleLabelingMode(analyticUnit.id)" ng-disabled="analyticUnit.status === 'LEARNING'">
|
|
|
|
<i class="fa fa-fw fa-bar-chart" ng-if="!analyticUnit.saving"></i>
|
|
|
|
<i class="fa fa-fw fa-spinner fa-spin" ng-if="analyticUnit.saving"></i>
|
|
|
|
Label
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<select class="gf-form-input width-11" ng-if="analyticUnit.selected && !analyticUnit.saving"
|
|
|
|
ng-model="ctrl.analyticsController.labelingMode"
|
|
|
|
ng-options="type.value as type.name for type in analyticUnit.labelingModes"
|
|
|
|
ng-disabled="analyticUnit.status === 'LEARNING'"
|
|
|
|
></select>
|
|
|
|
|
|
|
|
<button class="query-editor-row__action" ng-if="analyticUnit.selected && !analyticUnit.saving"
|
|
|
|
bs-tooltip="'Cancel labeling'">
|
|
|
|
<a class="pointer" ng-click="ctrl.onCancelLabeling(analyticUnit.id)">
|
|
|
|
<i class="fa fa-fw fa-ban"></i>
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button class="query-editor-row__action" ng-click="ctrl.runDetectInCurrentRange(analyticUnit)"
|
|
|
|
ng-disabled="analyticUnit.saving" bs-tooltip="'Learn & Detect'">
|
|
|
|
<a class="pointer">
|
|
|
|
Apply
|
|
|
|
</a>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<ng-include src="ctrl.partialsPath + '/analytic_unit_7.x.html'"></ng-include>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|