Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Minor chaneges in monitor UI
Browse files Browse the repository at this point in the history
  • Loading branch information
JD2455 committed Nov 24, 2020
1 parent ada5e2e commit f7c75d6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
</mat-select>
</mat-form-field>

<mat-form-field class="ft-14-600 form-control">
<mat-label>{{ 'query.form-data-filter-function.text' | translate | titlecase }}</mat-label>
<mat-form-field class="ft-14-600 form-control" *ngIf="selectedNode?.metadata?.type !== IMetricMetadata.CONTINUOUS">
<mat-label>{{ 'query.form-comparison-function.text' | translate | titlecase }}</mat-label>
<mat-select class="ft-14-400" formControlName="compareFn">
<mat-option>{{ 'query.none-option.text' | translate }}</mat-option>
<mat-option
Expand All @@ -80,30 +80,17 @@
</mat-select>
</mat-form-field>

<mat-form-field
class="ft-14-600 form-control"
*ngIf="selectedNode?.metadata?.type === IMetricMetadata.CONTINUOUS; else allowedValuesTemplate"
>
<input
matInput
class="ft-14-400"
[placeholder]="'query.form-compare-value.text' | translate"
formControlName="compareValue"
/>
<mat-form-field class="ft-14-600 form-control" *ngIf="selectedNode?.metadata?.type !== IMetricMetadata.CONTINUOUS">
<mat-label>{{ 'query.form-compare-value.text' | translate | titlecase }}</mat-label>
<mat-select class="ft-14-400" formControlName="compareValue">
<mat-option
*ngFor="let value of selectedNode?.allowedData"
[value]="value"
>
{{ value | titlecase }}
</mat-option>
</mat-select>
</mat-form-field>
<ng-template #allowedValuesTemplate>
<mat-form-field class="ft-14-600 form-control">
<mat-label>{{ 'query.form-compare-value.text' | translate | titlecase }}</mat-label>
<mat-select class="ft-14-400" formControlName="compareValue">
<mat-option
*ngFor="let value of selectedNode?.allowedData"
[value]="value"
>
{{ value | titlecase }}
</mat-option>
</mat-select>
</mat-form-field>
</ng-template>
</div>
<div *ngIf="selectedNode && tabIndex !== 0">
<label>{{ 'monitor.metric-repeated-measure.text' | translate }}</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class CreateQueryComponent implements OnInit, OnDestroy {
options: any[] = [];
selectedNode = null;

controlTitles = ['Class', 'Key', 'Metric']; // Used to show different titles in grouped metrics
controlTitles = ['Type', 'ID', 'Metric']; // Used to show different titles in grouped metrics

constructor(
private analysisService: AnalysisService,
Expand Down Expand Up @@ -126,6 +126,7 @@ export class CreateQueryComponent implements OnInit, OnDestroy {
resetForm() {
this.keys.clear();
this.queryForm.reset();
this.queryForm.get('repeatedMeasure').setValue(REPEATED_MEASURE.mostRecent);
this.options = [this.options[0]];
this.filteredOptions = [];
this.keys.push(this.addKey());
Expand Down
6 changes: 3 additions & 3 deletions projects/abtesting/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@
"query.metric.text": "METRIC",
"query.table-name.text": "NAME",
"query.query-name.text": "Name",
"query.form-data-filter-function.text": "Data Filter Function",
"query.form-compare-value.text": "Compare Value",
"query.form-comparison-function.text": "Comparison",
"query.form-compare-value.text": "Value",
"query.table-experiment.text": "EXPERIMENT",
"query.table-execute.text": "EXECUTE",
"query.table-repeated-measure.text": "REPEATED MEASURE",
Expand All @@ -254,7 +254,7 @@
"monitor.metrics-list.text": "MONITORED METRICS LIST",
"monitor.simple-metric.text": "Simple Metric",
"monitor.grouped-metric.text": "Grouped Metric",
"monitor.metric-creation.text": "Monitor Metric",
"monitor.metric-creation.text": "Monitored Metrics",
"monitor.metric-mean.text": "Mean",
"monitor.metric-earliest.text": "Earliest",
"monitor.metric-most-recent.text": "Most recent",
Expand Down

0 comments on commit f7c75d6

Please sign in to comment.