diff --git a/src/colors.ts b/src/colors.ts index 7cebdcd..e0d4a75 100644 --- a/src/colors.ts +++ b/src/colors.ts @@ -1,4 +1,3 @@ -import _ from 'lodash'; import tinycolor from 'tinycolor2'; export const PALETTE_ROWS = 4; diff --git a/src/models/analytic_unit.ts b/src/models/analytic_unit.ts index 0bd8c8e..349029e 100644 --- a/src/models/analytic_unit.ts +++ b/src/models/analytic_unit.ts @@ -39,7 +39,7 @@ export class AnalyticUnit { this._panelObject = {}; } _.defaults(this._panelObject, { - name: 'AnalyticUnitName', confidence: 0.2, color: ANALYTIC_UNIT_COLORS[0], type: 'general' + name: 'AnalyticUnitName', confidence: 0.2, color: ANALYTIC_UNIT_COLORS[0], type: 'GENERAL' }); //this._metric = new Metric(_panelObject.metric); @@ -96,10 +96,10 @@ export class AnalyticUnit { get status() { return this._status; } set status(value) { if( - value !== 'ready' && - value !== 'learning' && - value !== 'pending' && - value !== 'failed' + value !== 'READY' && + value !== 'LEARNING' && + value !== 'PENDING' && + value !== 'FAILED' ) { throw new Error('Unsupported status value: ' + value); } @@ -110,7 +110,7 @@ export class AnalyticUnit { set error(value) { this._error = value; } get isActiveStatus() { - return this.status !== 'ready' && this.status !== 'failed'; + return this.status !== 'READY' && this.status !== 'FAILED'; } get panelObject() { return this._panelObject; } diff --git a/src/models/segment_array.ts b/src/models/segment_array.ts index db74941..a07ffa4 100644 --- a/src/models/segment_array.ts +++ b/src/models/segment_array.ts @@ -1,8 +1,6 @@ import { SegmentsSet } from './segment_set'; import { Segment, SegmentId } from './segment'; -import _ from 'lodash'; - export class SegmentArray implements SegmentsSet { private _segments: T[]; diff --git a/src/module.ts b/src/module.ts index 1bb3ac4..f7c80ec 100644 --- a/src/module.ts +++ b/src/module.ts @@ -27,11 +27,11 @@ const BACKEND_VARIABLE_NAME = 'HASTIC_SERVER_URL'; class GraphCtrl extends MetricsPanelCtrl { static template = template; ANALYTIC_TYPES: Array<{name: string, value: string}> = [ - { name: 'General', value: 'general' }, - { name: 'Peaks', value: 'peak' }, - { name: 'Jumps', value: 'jump' }, - { name: 'Drops', value: 'drop' }, - { name: 'Custom', value: 'custom' } + { name: 'General', value: 'GENERAL' }, + { name: 'Peaks', value: 'PEAK' }, + { name: 'Jumps', value: 'JUMP' }, + { name: 'Drops', value: 'DROP' }, + { name: 'Custom', value: 'CUSTOM' } ]; hiddenSeries: any = {}; diff --git a/src/partials/tab_analytics.html b/src/partials/tab_analytics.html index 1d2e508..7ffa9a3 100644 --- a/src/partials/tab_analytics.html +++ b/src/partials/tab_analytics.html @@ -35,10 +35,10 @@ /> -