diff --git a/extensions/arc/src/localizedConstants.ts b/extensions/arc/src/localizedConstants.ts index fd4ec3054a..a17906bb0e 100644 --- a/extensions/arc/src/localizedConstants.ts +++ b/extensions/arc/src/localizedConstants.ts @@ -139,7 +139,6 @@ export const coresRequest = localize('arc.coresRequest', "CPU request:"); export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB):"); export const memoryRequest = localize('arc.memoryRequest', "Memory request (in GB):"); export const workerValidationErrorMessage = localize('arc.workerValidationErrorMessage', "The number of workers cannot be decreased."); -export const coresValidationErrorMessage = localize('arc.coresValidationErrorMessage', "Valid CPU resource quantities are strictly positive."); export const memoryRequestValidationErrorMessage = localize('arc.memoryRequestValidationErrorMessage', "Memory request must be at least 0.25Gib"); export const memoryLimitValidationErrorMessage = localize('arc.memoryLimitValidationErrorMessage', "Memory limit must be at least 0.25Gib"); export const arcResources = localize('arc.arcResources', "Azure Arc Resources"); @@ -172,6 +171,7 @@ export function numVCores(vCores: string | undefined): string { } } export function updated(when: string): string { return localize('arc.updated', "Updated {0}", when); } +export function validationMin(min: number): string { return localize('arc.validationMin', "Value must be greater than or equal to {0}.", min); } // Errors export const connectionRequired = localize('arc.connectionRequired', "A connection is required to show all properties. Click refresh to re-enter connection information"); diff --git a/extensions/arc/src/ui/dashboards/miaa/miaaComputeAndStoragePage.ts b/extensions/arc/src/ui/dashboards/miaa/miaaComputeAndStoragePage.ts index f8d54eb0e0..ca00119c23 100644 --- a/extensions/arc/src/ui/dashboards/miaa/miaaComputeAndStoragePage.ts +++ b/extensions/arc/src/ui/dashboards/miaa/miaaComputeAndStoragePage.ts @@ -179,7 +179,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage { this.coresLimitBox = this.modelView.modelBuilder.inputBox().withProperties({ readOnly: false, min: 1, - validationErrorMessage: loc.coresValidationErrorMessage, inputType: 'number', placeHolder: loc.loading }).component(); @@ -197,7 +196,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage { this.coresRequestBox = this.modelView.modelBuilder.inputBox().withProperties({ readOnly: false, min: 1, - validationErrorMessage: loc.coresValidationErrorMessage, inputType: 'number', placeHolder: loc.loading }).component(); @@ -318,6 +316,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage { currentCPUSize = ''; } + this.coresRequestBox!.validationErrorMessage = loc.validationMin(this.coresRequestBox!.min!); this.coresRequestBox!.placeHolder = currentCPUSize; this.coresRequestBox!.value = ''; this.saveArgs.coresRequest = undefined; @@ -328,6 +327,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage { currentCPUSize = ''; } + this.coresLimitBox!.validationErrorMessage = loc.validationMin(this.coresLimitBox!.min!); this.coresLimitBox!.placeHolder = currentCPUSize; this.coresLimitBox!.value = ''; this.saveArgs.coresLimit = undefined; diff --git a/extensions/arc/src/ui/dashboards/postgres/postgresComputeAndStoragePage.ts b/extensions/arc/src/ui/dashboards/postgres/postgresComputeAndStoragePage.ts index bf195adc32..9df68e66ad 100644 --- a/extensions/arc/src/ui/dashboards/postgres/postgresComputeAndStoragePage.ts +++ b/extensions/arc/src/ui/dashboards/postgres/postgresComputeAndStoragePage.ts @@ -225,7 +225,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage { this.coresLimitBox = this.modelView.modelBuilder.inputBox().withProperties({ readOnly: false, min: 1, - validationErrorMessage: loc.coresValidationErrorMessage, inputType: 'number', placeHolder: loc.loading }).component(); @@ -243,7 +242,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage { this.coresRequestBox = this.modelView.modelBuilder.inputBox().withProperties({ readOnly: false, min: 1, - validationErrorMessage: loc.coresValidationErrorMessage, inputType: 'number', placeHolder: loc.loading }).component(); @@ -448,6 +446,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage { currentCPUSize = ''; } + this.coresRequestBox!.validationErrorMessage = loc.validationMin(this.coresRequestBox!.min!); this.coresRequestBox!.placeHolder = currentCPUSize; this.coresRequestBox!.value = ''; this.saveArgs.coresRequest = undefined; @@ -458,6 +457,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage { currentCPUSize = ''; } + this.coresLimitBox!.validationErrorMessage = loc.validationMin(this.coresLimitBox!.min!); this.coresLimitBox!.placeHolder = currentCPUSize; this.coresLimitBox!.value = ''; this.saveArgs.coresLimit = undefined;