Browse Source

Analytics units details view hastic/hastic-grafana-app#282

pull/1/head
rozetko 5 years ago
parent
commit
63f0fc93fa
  1. 9
      server/src/models/analytic_units/analytic_unit_model.ts
  2. 9
      server/src/models/analytic_units/anomaly_analytic_unit_model.ts
  3. 9
      server/src/models/analytic_units/pattern_analytic_unit_model.ts
  4. 9
      server/src/models/analytic_units/threshold_analytic_unit_model.ts
  5. 3
      server/src/models/analytic_units/types.ts

9
server/src/models/analytic_units/analytic_unit_model.ts

@ -24,7 +24,8 @@ export abstract class AnalyticUnit {
public deletedColor?: string, public deletedColor?: string,
// TODO: detectorType -> type // TODO: detectorType -> type
public detectorType?: DetectorType, public detectorType?: DetectorType,
public visible?: boolean public visible?: boolean,
public collapsed?: boolean
) { ) {
if(name === undefined) { if(name === undefined) {
@ -58,7 +59,8 @@ export abstract class AnalyticUnit {
labeledColor: this.labeledColor, labeledColor: this.labeledColor,
deletedColor: this.deletedColor, deletedColor: this.deletedColor,
detectorType: this.detectorType, detectorType: this.detectorType,
visible: this.visible visible: this.visible,
collapsed: this.collapsed
}; };
} }
@ -71,7 +73,8 @@ export abstract class AnalyticUnit {
labeledColor: this.labeledColor, labeledColor: this.labeledColor,
deletedColor: this.deletedColor, deletedColor: this.deletedColor,
detectorType: this.detectorType, detectorType: this.detectorType,
visible: this.visible visible: this.visible,
collapsed: this.collapsed
}; };
} }

9
server/src/models/analytic_units/anomaly_analytic_unit_model.ts

@ -28,7 +28,8 @@ export class AnomalyAnalyticUnit extends AnalyticUnit {
error?: string, error?: string,
labeledColor?: string, labeledColor?: string,
deletedColor?: string, deletedColor?: string,
visible?: boolean visible?: boolean,
collapsed?: boolean
) { ) {
super( super(
name, name,
@ -44,7 +45,8 @@ export class AnomalyAnalyticUnit extends AnalyticUnit {
labeledColor, labeledColor,
deletedColor, deletedColor,
DetectorType.ANOMALY, DetectorType.ANOMALY,
visible visible,
collapsed
); );
} }
@ -94,7 +96,8 @@ export class AnomalyAnalyticUnit extends AnalyticUnit {
obj.error, obj.error,
obj.labeledColor, obj.labeledColor,
obj.deletedColor, obj.deletedColor,
obj.visible obj.visible,
obj.collapsed
); );
} }
} }

9
server/src/models/analytic_units/pattern_analytic_unit_model.ts

@ -18,7 +18,8 @@ export class PatternAnalyticUnit extends AnalyticUnit {
error?: string, error?: string,
labeledColor?: string, labeledColor?: string,
deletedColor?: string, deletedColor?: string,
visible?: boolean visible?: boolean,
collapsed?: boolean
) { ) {
super( super(
name, name,
@ -34,7 +35,8 @@ export class PatternAnalyticUnit extends AnalyticUnit {
labeledColor, labeledColor,
deletedColor, deletedColor,
DetectorType.PATTERN, DetectorType.PATTERN,
visible visible,
collapsed
); );
} }
@ -72,7 +74,8 @@ export class PatternAnalyticUnit extends AnalyticUnit {
obj.error, obj.error,
obj.labeledColor, obj.labeledColor,
obj.deletedColor, obj.deletedColor,
obj.visible obj.visible,
obj.collapsed
); );
} }
} }

9
server/src/models/analytic_units/threshold_analytic_unit_model.ts

@ -32,7 +32,8 @@ export class ThresholdAnalyticUnit extends AnalyticUnit {
error?: string, error?: string,
labeledColor?: string, labeledColor?: string,
deletedColor?: string, deletedColor?: string,
visible?: boolean visible?: boolean,
collapsed?: boolean
) { ) {
super( super(
name, name,
@ -48,7 +49,8 @@ export class ThresholdAnalyticUnit extends AnalyticUnit {
labeledColor, labeledColor,
deletedColor, deletedColor,
DetectorType.THRESHOLD, DetectorType.THRESHOLD,
visible visible,
collapsed
); );
} }
@ -92,7 +94,8 @@ export class ThresholdAnalyticUnit extends AnalyticUnit {
obj.error, obj.error,
obj.labeledColor, obj.labeledColor,
obj.deletedColor, obj.deletedColor,
obj.visible obj.visible,
obj.collapsed
); );
} }
} }

3
server/src/models/analytic_units/types.ts

@ -25,7 +25,8 @@ export type FindManyQuery = {
labeledColor?: string, labeledColor?: string,
deletedColor?: string, deletedColor?: string,
detectorType?: DetectorType, detectorType?: DetectorType,
visible?: boolean visible?: boolean,
collapsed?: boolean
}; };
export const ANALYTIC_UNIT_TYPES = { export const ANALYTIC_UNIT_TYPES = {

Loading…
Cancel
Save