|
|
@ -42,7 +42,7 @@ interface CalculatedFieldAggMetricValuePanel extends CalculatedFieldAggMetricVal |
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: 'tb-calculated-field-metrics-panel', |
|
|
selector: 'tb-calculated-field-metrics-panel', |
|
|
templateUrl: './calculated-field-metrics-panel.component.html', |
|
|
templateUrl: './calculated-field-metrics-panel.component.html', |
|
|
styleUrl: '../common/calculated-field-panel.scss', |
|
|
styleUrls: ['../common/calculated-field-panel.scss', '../../calculated-field.component.scss'], |
|
|
}) |
|
|
}) |
|
|
export class CalculatedFieldMetricsPanelComponent implements OnInit { |
|
|
export class CalculatedFieldMetricsPanelComponent implements OnInit { |
|
|
|
|
|
|
|
|
@ -54,6 +54,7 @@ export class CalculatedFieldMetricsPanelComponent implements OnInit { |
|
|
@Input() editorCompleter: TbEditorCompleter; |
|
|
@Input() editorCompleter: TbEditorCompleter; |
|
|
@Input() highlightRules: AceHighlightRules; |
|
|
@Input() highlightRules: AceHighlightRules; |
|
|
@Input({required: true}) testScript: (expression?: string) => Observable<string>; |
|
|
@Input({required: true}) testScript: (expression?: string) => Observable<string>; |
|
|
|
|
|
@Input() readonly = false; |
|
|
|
|
|
|
|
|
metricDataApplied = output<CalculatedFieldAggMetricValue>(); |
|
|
metricDataApplied = output<CalculatedFieldAggMetricValue>(); |
|
|
filterExpanded = false; |
|
|
filterExpanded = false; |
|
|
@ -107,6 +108,10 @@ export class CalculatedFieldMetricsPanelComponent implements OnInit { |
|
|
if (this.simpleMode) { |
|
|
if (this.simpleMode) { |
|
|
this.AggFunctions = this.AggFunctions.filter(aggFunc => aggFunc !== AggFunction.COUNT_UNIQUE); |
|
|
this.AggFunctions = this.AggFunctions.filter(aggFunc => aggFunc !== AggFunction.COUNT_UNIQUE); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.readonly) { |
|
|
|
|
|
this.metricForm.disable({emitEvent: false}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
saveMetric(): void { |
|
|
saveMetric(): void { |
|
|
|