Skip to content

Commit

Permalink
fixed prettier errors in ej.json and removed unused values from file (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagnik56 authored May 10, 2024
1 parent 42fbdbb commit c8d6004
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<div class="no-include-message-container">
<span
class="ft-14-600 no-include-message"
[innerHTML]="'home.new-experiment.participants.inital.include-message' | translate"
[innerHTML]="'home.new-experiment.participants.initial.include-message' | translate"
></span>
</div>
</ng-template>
Expand All @@ -131,7 +131,7 @@
<span
class="ft-14-600 validation-message"
*ngIf="segmentNotValid"
[innerHTML]="'home.new-experiment.participants.unvalid-segment.text' | translate"
[innerHTML]="'home.new-experiment.participants.invalid-segment.text' | translate"
></span>
</div>
<br />
Expand Down Expand Up @@ -250,7 +250,7 @@
<div class="no-exclude-message-container">
<span
class="ft-14-600 no-exclude-message"
[innerHTML]="'home.new-experiment.participants.inital.exclude-message' | translate"
[innerHTML]="'home.new-experiment.participants.initial.exclude-message' | translate"
></span>
</div>
</ng-template>
Expand All @@ -265,7 +265,7 @@
<span
class="ft-14-600 validation-message"
*ngIf="segmentNotValid2"
[innerHTML]="'home.new-experiment.participants.unvalid-segment.text' | translate"
[innerHTML]="'home.new-experiment.participants.invalid-segment.text' | translate"
></span>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<div class="no-decision-point-message-container">
<span
class="ft-14-600 no-decision-point-message"
[innerHTML]="'home.new-experiment.design.decision-point.inital.include-message' | translate"
[innerHTML]="'home.new-experiment.design.decision-point.initial.include-message' | translate"
></span>
</div>
</ng-template>
Expand Down Expand Up @@ -715,7 +715,7 @@
<div class="no-factor-message-container">
<span
class="ft-14-600 no-factor-message"
[innerHTML]="'home.new-experiment.design.factors.inital.include-message' | translate"
[innerHTML]="'home.new-experiment.design.factors.initial.include-message' | translate"
></span>
</div>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
>
<mat-select
class="ft-14-400"
[placeholder]="'home.new-experiment.metrics.repeatedmeasure.placeholder.text' | translate | titlecase"
[placeholder]="'home.new-experiment.metrics.repeated-measure.placeholder.text' | translate | titlecase"
formControlName="repeatedMeasure"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
</div>
<div class="groupsatisfied-status" *ngIf="experiment.group">
<span *ngIf="experiment.groupSatisfied">{{
'home.new-experiment.schedule.group-count-having-met-ending-criters.text'
'home.new-experiment.schedule.group-count-having-met-ending-criteria.text'
| translate: { groupSatisfied: experiment.groupSatisfied }
}}</span>
<span *ngIf="!experiment.groupSatisfied">{{
'home.new-experiment.schedule.group-count-having-met-ending-criters.text' | translate: { groupSatisfied: 0 }
'home.new-experiment.schedule.group-count-having-met-ending-criteria.text' | translate: { groupSatisfied: 0 }
}}</span>
</div>
</mat-radio-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<mat-tab>
<ng-template mat-tab-label>
<span class="ft-22-600 tab-label">
{{ 'home.view-experiment.mattab.overview.text' | translate }}
{{ 'home.view-experiment.mat-tab.overview.text' | translate }}
</span>
</ng-template>
<div class="experiment-secondary-info tab-body-container">
Expand Down Expand Up @@ -456,7 +456,7 @@
<mat-tab>
<ng-template mat-tab-label>
<span class="ft-22-600 tab-label">
{{ 'home.view-experiment.mattab.design.text' | translate }}
{{ 'home.view-experiment.mat-tab.design.text' | translate }}
</span>
</ng-template>
<div class="tab-body-container tab-table-body-container">
Expand Down Expand Up @@ -774,7 +774,7 @@
<mat-tab>
<ng-template mat-tab-label>
<span class="ft-22-600 tab-label">
{{ 'home.view-experiment.mattab.participants.text' | translate }}
{{ 'home.view-experiment.mat-tab.participants.text' | translate }}
</span>
</ng-template>
<div class="tab-body-container tab-table-body-container">
Expand Down Expand Up @@ -869,13 +869,13 @@
<mat-tab>
<ng-template mat-tab-label>
<span class="ft-22-600 tab-label">
{{ 'home.view-experiment.mattab.metrics.text' | translate }}
{{ 'home.view-experiment.mat-tab.metrics.text' | translate }}
</span>
</ng-template>
<div class="tab-body-container tab-table-body-container">
<!-- Experiment metrics table -->
<div class="table-container table-container-metrics">
<span class="ft-24-700">{{ 'home.view-experiment.mattab.metrics.text' | translate }}</span>
<span class="ft-24-700">{{ 'home.view-experiment.mat-tab.metrics.text' | translate }}</span>
<mat-table [dataSource]="displayMetrics" class="table">
<!-- Metrics Column -->
<ng-container matColumnDef="metricsKey">
Expand Down Expand Up @@ -932,15 +932,15 @@
<mat-tab>
<ng-template mat-tab-label>
<span class="ft-22-600 tab-label">
{{ 'home.view-experiment.mattab.data.text' | translate }}
{{ 'home.view-experiment.mat-tab.data.text' | translate }}
</span>
</ng-template>
<div class="tab-body-container">
<div class="ft-24-700 enrollment-text">
{{ 'home.view-experiment.mattab.data.enrollment.text' | translate }}
{{ 'home.view-experiment.mat-tab.data.enrollment.text' | translate }}
</div>
<div class="ft-12-600 enrollment-details-text">
{{ 'home.view-experiment.mattab.data.enrollment-detail.text' | translate }}
{{ 'home.view-experiment.mat-tab.data.enrollment-detail.text' | translate }}
</div>

<!-- Enrollment over time section -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="import-segment-body">
<p class="ft-16-400 import-message">
{{ 'segments.import-segmemt.message.text' | translate }}
{{ 'segments.import-segment.message.text' | translate }}
</p>
<input accept=".json" type="file" multiple class="ft-14-400 file-input" (change)="uploadFile($event)" />
<ng-container *ngIf="!isLoadingSegments$; else loadingSegmentState">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ng-container>

<ng-container matColumnDef="removeMember">
<mat-header-cell class="ft-12-600 import-csv" [ngClass]="{ 'disabled': !isImportMembervalid }" aria-hidden="true" (click)="fileInput.click()" *matHeaderCellDef>
<mat-header-cell class="ft-12-600 import-csv" [ngClass]="{ 'disabled': !isImportMemberValid }" aria-hidden="true" (click)="fileInput.click()" *matHeaderCellDef>
<mat-icon class="upload-icon">
upload_2
</mat-icon>
Expand All @@ -70,7 +70,7 @@
accept=".csv"
type="file"
#fileInput
[disabled]="!isImportMembervalid"
[disabled]="!isImportMemberValid"
file-input
(change)="onFileSelected($event)"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class SegmentMembersComponent implements OnInit, OnChanges {
membersCountError: string = null;
groupString = ' ( group )';
membersValid = true;
isImportMembervalid = true;
isImportMemberValid = true;

membersDisplayedColumns = ['type', 'id', 'removeMember'];
constructor(
Expand Down Expand Up @@ -127,29 +127,29 @@ export class SegmentMembersComponent implements OnInit, OnChanges {
checkImportMemberValidation() {
if (this.segmentMembersForm?.value) {
if (this.segmentMembersForm.value.members.length === 0) {
this.isImportMembervalid = true;
this.isImportMemberValid = true;
} else if (
this.segmentMembersForm.value.members.length === 1 &&
!this.segmentMembersForm.value.members[0].type &&
!this.segmentMembersForm.value.members[0].id
) {
this.isImportMembervalid = true;
this.isImportMemberValid = true;
} else if (this.segmentMembersForm.value.members.length > 1) {
const members = this.segmentMembersForm.value.members;
for (const member of members) {
if (!member.id && !member.type) {
this.isImportMembervalid = true;
this.isImportMemberValid = true;
continue;
} else {
this.isImportMembervalid = false;
this.isImportMemberValid = false;
break;
}
}
} else {
this.isImportMembervalid = false;
this.isImportMemberValid = false;
}
} else {
this.isImportMembervalid = false;
this.isImportMemberValid = false;
}
}

Expand Down
36 changes: 17 additions & 19 deletions frontend/projects/upgrade/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
"home.new-experiment.experiment-design.text": "Design",
"home.new-experiment.monitored-metrics.text": "Metrics",
"home.new-experiment.participants.text": "Participants",
"home.new-experiment.participants.inital.include-message": "No one will be enrolled in the experiment",
"home.new-experiment.participants.inital.exclude-message": "No participants will be excluded",
"home.new-experiment.participants.unvalid-segment.text": "Segment Id/Name must be selected from the menu. Please choose an option.",
"home.new-experiment.participants.initial.include-message": "No one will be enrolled in the experiment",
"home.new-experiment.participants.initial.exclude-message": "No participants will be excluded",
"home.new-experiment.participants.invalid-segment.text": "Segment Id/Name must be selected from options provided. Please choose an option.",
"home.new-experiment.schedule.text": "Schedule",
"home.new-experiment.schedule-end-date-and-time-error.text": "Select experiment end date and time",
"home.new-experiment.schedule-start-date-and-time-error.text": "Select experiment start date and time",
Expand All @@ -119,8 +119,8 @@
"home.new-experiment.overview.stratification-factor.error.text": "Please select stratification factor",
"home.new-experiment.overview.no-stratification-factor.error.text": "Please import the stratification factor you require from Participants Menu > Stratification Tab",
"home.new-experiment.design.design-type.label": "Design Type",
"home.new-experiment.design.decision-point.inital.include-message": "Experiments require at least one decision point",
"home.new-experiment.design.factors.inital.include-message": "Factorial experiments require factors",
"home.new-experiment.design.decision-point.initial.include-message": "Experiments require at least one decision point",
"home.new-experiment.design.factors.initial.include-message": "Factorial experiments require factors",
"home.new-experiment.design.toggle-actions.payloads": "PAYLOADS",
"home.new-experiment.design.toggle-actions.conditions": "CONDITIONS",
"home.new-experiment.design.toggle-actions.factors": "FACTORS",
Expand Down Expand Up @@ -181,15 +181,15 @@
"home.new-experiment.metrics.metric.placeholder.text": "Metric",
"home.new-experiment.metrics.key.placeholder.text": "Key",
"home.new-experiment.metrics.statistics.placeholder.text": "Aggregate Statistic",
"home.new-experiment.metrics.repeatedmeasure.placeholder.text": "Individual Statistic",
"home.new-experiment.metrics.repeated-measure.placeholder.text": "Individual Statistic",
"home.new-experiment.metrics.description.placeholder.text": "Display Name",
"home.new-experiment.metrics.description-header.placeholder.text": "DISPLAY NAME",
"home.new-experiment.metrics.metrics-key-exist.validation.text": "Metric/Key are required",
"home.new-experiment.metrics.statistics-exist.validation.text": "Statistic is required",
"home.new-experiment.metrics.comparison-statistics-exist.validation.text": "Comparison Statistics are required",
"home.new-experiment.metrics.description-exist.validation.text": "Query Name/Description is required",
"home.new-experiment.metrics.metric-name-exist.validation.text": "Metric must be selected from the menu. Please choose an option.",
"home.new-experiment.metrics.unvalid-metric.text": "Metric must be selected from the menu. Please choose an option.",
"home.new-experiment.metrics.invalid-metric.text": "Metric must be selected from the menu. Please choose an option.",
"home.new-experiment.metrics.no-available-metrics.text": "Currently no metrics available to select. Metrics can be added later when available. You can continue to next step.",
"home.new-experiment.schedule.start-automatically.text": "Start Automatically",
"home.new-experiment.schedule.end-automatically.text": "End Automatically",
Expand All @@ -202,7 +202,7 @@
"home.new-experiment.schedule.user-count-per-group.title.text": "Participants enrolled per {{ groupType }}",
"home.new-experiment.schedule.group-count.placeholder.text": "Number of",
"home.new-experiment.schedule.group-count.text": "enrolled",
"home.new-experiment.schedule.group-count-having-met-ending-criters.text": "Number of groups having met ending criteria: {{ groupSatisfied }}",
"home.new-experiment.schedule.group-count-having-met-ending-criteria.text": "Number of groups having met ending criteria: {{ groupSatisfied }}",
"home.view-experiment-global.description.text": "DESCRIPTION",
"home.view-experiment-global.experiment-site.text": "SITE",
"home.view-experiment-global.experiment-target.text": "TARGET",
Expand Down Expand Up @@ -250,13 +250,13 @@
"home.view-experiment.graph-time.text": "Time",
"home.view-experiment.graph-select-all.text": "Select All",
"home.view-experiment.logging.text": "Logging",
"home.view-experiment.mattab.data.text": "Data",
"home.view-experiment.mattab.data.enrollment.text": "Enrollment",
"home.view-experiment.mattab.data.enrollment-detail.text": "Enrollments reflects participants who have started the experiment.",
"home.view-experiment.mattab.overview.text": "Overview",
"home.view-experiment.mattab.design.text": "Design",
"home.view-experiment.mattab.participants.text": "Participants",
"home.view-experiment.mattab.metrics.text": "Metrics",
"home.view-experiment.mat-tab.data.text": "Data",
"home.view-experiment.mat-tab.data.enrollment.text": "Enrollment",
"home.view-experiment.mat-tab.data.enrollment-detail.text": "Enrollments reflects participants who have started the experiment.",
"home.view-experiment.mat-tab.overview.text": "Overview",
"home.view-experiment.mat-tab.design.text": "Design",
"home.view-experiment.mat-tab.participants.text": "Participants",
"home.view-experiment.mat-tab.metrics.text": "Metrics",
"home.import-experiment.message.text": "Select the JSON to import experiment:",
"home.import-experiment.error.message.text": "Invalid Experiment JSON data",
"home.import-experiment.stratification-factor-error.message.text": "Missing Stratification Factor in Experiment JSON data",
Expand Down Expand Up @@ -399,9 +399,7 @@
"segments.view-segment.members-subtitle.text": "Member(s)",
"segments.global-members.segments-count-members-error.text": "Please have at least 1 valid member to move forward",
"segments.import-segment.text": "IMPORT SEGMENT",
"segments.import-segmemt.message.text": "Select the JSON to import segment:",
"segments.import-segmemt-csv.message.text": "Select the CSV to import segment:",
"segments.download-segmemt-csv-sample.message.text": "(Download the CSV import segment format)",
"segments.import-segment.message.text": "Select the JSON to import segment:",
"segments.import-segment.error.message.text": "Invalid Segment JSON data",
"segments.segment-experiment-list-title.text": "Experiments using '{{ segmentName }}' ",
"segments.segment-experiment-list-name.text": "Name",
Expand All @@ -412,7 +410,7 @@
"stratifications.global-members-factor.text": "FACTOR",
"stratifications.global-members-summary.text": "SUMMARY",
"stratifications.global-members-status.text": "STATUS",
"stratifications.global-members-status-tooltip.text": "Stratification factor is used/unsed in any experiment",
"stratifications.global-members-status-tooltip.text": "Stratification factor is used/unused in any experiment",
"stratifications.import-stratification.text": "Import Stratification(s)",
"stratifications.import-stratification.message.text": "Select the CSV file(s) to Import Stratification.",
"stratifications.import-stratification.error.message.text": "Invalid Stratification CSV data",
Expand Down

0 comments on commit c8d6004

Please sign in to comment.