Browse Source

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

pull/1/head
rozetko 6 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,
// TODO: detectorType -> type
public detectorType?: DetectorType,
public visible?: boolean
public visible?: boolean,
public collapsed?: boolean
) {
if(name === undefined) {
@ -58,7 +59,8 @@ export abstract class AnalyticUnit {
labeledColor: this.labeledColor,
deletedColor: this.deletedColor,
detectorType: this.detectorType,
visible: this.visible
visible: this.visible,
collapsed: this.collapsed
};
}
@ -71,7 +73,8 @@ export abstract class AnalyticUnit {
labeledColor: this.labeledColor,
deletedColor: this.deletedColor,
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,
labeledColor?: string,
deletedColor?: string,
visible?: boolean
visible?: boolean,
collapsed?: boolean
) {
super(
name,
@ -44,7 +45,8 @@ export class AnomalyAnalyticUnit extends AnalyticUnit {
labeledColor,
deletedColor,
DetectorType.ANOMALY,
visible
visible,
collapsed
);
}
@ -94,7 +96,8 @@ export class AnomalyAnalyticUnit extends AnalyticUnit {
obj.error,
obj.labeledColor,
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,
labeledColor?: string,
deletedColor?: string,
visible?: boolean
visible?: boolean,
collapsed?: boolean
) {
super(
name,
@ -34,7 +35,8 @@ export class PatternAnalyticUnit extends AnalyticUnit {
labeledColor,
deletedColor,
DetectorType.PATTERN,
visible
visible,
collapsed
);
}
@ -72,7 +74,8 @@ export class PatternAnalyticUnit extends AnalyticUnit {
obj.error,
obj.labeledColor,
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,
labeledColor?: string,
deletedColor?: string,
visible?: boolean
visible?: boolean,
collapsed?: boolean
) {
super(
name,
@ -48,7 +49,8 @@ export class ThresholdAnalyticUnit extends AnalyticUnit {
labeledColor,
deletedColor,
DetectorType.THRESHOLD,
visible
visible,
collapsed
);
}
@ -92,7 +94,8 @@ export class ThresholdAnalyticUnit extends AnalyticUnit {
obj.error,
obj.labeledColor,
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,
deletedColor?: string,
detectorType?: DetectorType,
visible?: boolean
visible?: boolean,
collapsed?: boolean
};
export const ANALYTIC_UNIT_TYPES = {

Loading…
Cancel
Save