mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Remove unneeded validation error messages (#14531)
This commit is contained in:
@@ -165,9 +165,6 @@ export const coresLimit = localize('arc.coresLimit', "CPU limit:");
|
|||||||
export const coresRequest = localize('arc.coresRequest', "CPU request:");
|
export const coresRequest = localize('arc.coresRequest', "CPU request:");
|
||||||
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB):");
|
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB):");
|
||||||
export const memoryRequest = localize('arc.memoryRequest', "Memory request (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 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");
|
export const arcResources = localize('arc.arcResources', "Azure Arc Resources");
|
||||||
export const enterANonEmptyPassword = localize('arc.enterANonEmptyPassword', "Enter a non empty password or press escape to exit.");
|
export const enterANonEmptyPassword = localize('arc.enterANonEmptyPassword', "Enter a non empty password or press escape to exit.");
|
||||||
export const thePasswordsDoNotMatch = localize('arc.thePasswordsDoNotMatch', "The passwords do not match. Confirm the password or press escape to exit.");
|
export const thePasswordsDoNotMatch = localize('arc.thePasswordsDoNotMatch', "The passwords do not match. Confirm the password or press escape to exit.");
|
||||||
@@ -182,7 +179,6 @@ export const connectToPostgresDescription = localize('arc.connectToPostgresDescr
|
|||||||
export const postgresExtension = localize('arc.postgresExtension', "microsoft.azuredatastudio-postgresql");
|
export const postgresExtension = localize('arc.postgresExtension', "microsoft.azuredatastudio-postgresql");
|
||||||
|
|
||||||
export function rangeSetting(min: string, max: string): string { return localize('arc.rangeSetting', "Value is expected to be in the range {0} - {1}", min, max); }
|
export function rangeSetting(min: string, max: string): string { return localize('arc.rangeSetting', "Value is expected to be in the range {0} - {1}", min, max); }
|
||||||
export function allowedValue(value: string): string { return localize('arc.allowedValue', "Value is expected to be {0}", value); }
|
|
||||||
export function databaseCreated(name: string): string { return localize('arc.databaseCreated', "Database {0} created", name); }
|
export function databaseCreated(name: string): string { return localize('arc.databaseCreated', "Database {0} created", name); }
|
||||||
export function deletingInstance(name: string): string { return localize('arc.deletingInstance', "Deleting instance '{0}'...", name); }
|
export function deletingInstance(name: string): string { return localize('arc.deletingInstance', "Deleting instance '{0}'...", name); }
|
||||||
export function installingExtension(name: string): string { return localize('arc.installingExtension', "Installing extension '{0}'...", name); }
|
export function installingExtension(name: string): string { return localize('arc.installingExtension', "Installing extension '{0}'...", name); }
|
||||||
@@ -207,13 +203,11 @@ export function numVCores(vCores: string | undefined): string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function updated(when: string): string { return localize('arc.updated', "Updated {0}", when); }
|
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
|
// Errors
|
||||||
export const pgConnectionRequired = localize('arc.pgConnectionRequired', "A connection is required to show and set database engine settings.");
|
export const pgConnectionRequired = localize('arc.pgConnectionRequired', "A connection is required to show and set database engine settings.");
|
||||||
export const miaaConnectionRequired = localize('arc.miaaConnectionRequired', "A connection is required to list the databases on this instance.");
|
export const miaaConnectionRequired = localize('arc.miaaConnectionRequired', "A connection is required to list the databases on this instance.");
|
||||||
export const couldNotFindControllerRegistration = localize('arc.couldNotFindControllerRegistration', "Could not find controller registration.");
|
export const couldNotFindControllerRegistration = localize('arc.couldNotFindControllerRegistration', "Could not find controller registration.");
|
||||||
export function outOfRange(min: string, max: string): string { return localize('arc.outOfRange', "The number must be in range {0} - {1}", min, max); }
|
|
||||||
export function refreshFailed(error: any): string { return localize('arc.refreshFailed', "Refresh failed. {0}", getErrorMessage(error)); }
|
export function refreshFailed(error: any): string { return localize('arc.refreshFailed', "Refresh failed. {0}", getErrorMessage(error)); }
|
||||||
export function resetFailed(error: any): string { return localize('arc.resetFailed', "Reset failed. {0}", getErrorMessage(error)); }
|
export function resetFailed(error: any): string { return localize('arc.resetFailed', "Reset failed. {0}", getErrorMessage(error)); }
|
||||||
export function openDashboardFailed(error: any): string { return localize('arc.openDashboardFailed', "Error opening dashboard. {0}", getErrorMessage(error)); }
|
export function openDashboardFailed(error: any): string { return localize('arc.openDashboardFailed', "Error opening dashboard. {0}", getErrorMessage(error)); }
|
||||||
|
|||||||
@@ -217,7 +217,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
this.memoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.memoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 2,
|
min: 2,
|
||||||
validationErrorMessage: loc.memoryLimitValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -235,7 +234,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
this.memoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.memoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 2,
|
min: 2,
|
||||||
validationErrorMessage: loc.memoryRequestValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -320,7 +318,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
currentCPUSize = '';
|
currentCPUSize = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coresRequestBox!.validationErrorMessage = loc.validationMin(this.coresRequestBox!.min!);
|
|
||||||
this.coresRequestBox!.placeHolder = currentCPUSize;
|
this.coresRequestBox!.placeHolder = currentCPUSize;
|
||||||
this.coresRequestBox!.value = '';
|
this.coresRequestBox!.value = '';
|
||||||
this.saveArgs.coresRequest = undefined;
|
this.saveArgs.coresRequest = undefined;
|
||||||
@@ -331,7 +328,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
currentCPUSize = '';
|
currentCPUSize = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coresLimitBox!.validationErrorMessage = loc.validationMin(this.coresLimitBox!.min!);
|
|
||||||
this.coresLimitBox!.placeHolder = currentCPUSize;
|
this.coresLimitBox!.placeHolder = currentCPUSize;
|
||||||
this.coresLimitBox!.value = '';
|
this.coresLimitBox!.value = '';
|
||||||
this.saveArgs.coresLimit = undefined;
|
this.saveArgs.coresLimit = undefined;
|
||||||
|
|||||||
@@ -263,7 +263,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
// Worker node count
|
// Worker node count
|
||||||
this.workerBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.workerBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
validationErrorMessage: loc.workerValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading,
|
placeHolder: loc.loading,
|
||||||
required: true
|
required: true
|
||||||
@@ -319,7 +318,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.workerMemoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.workerMemoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 0.25,
|
min: 0.25,
|
||||||
validationErrorMessage: loc.memoryRequestValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -340,7 +338,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.workerMemoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.workerMemoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 0.25,
|
min: 0.25,
|
||||||
validationErrorMessage: loc.memoryLimitValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -397,7 +394,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.coordinatorMemoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.coordinatorMemoryRequestBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 0.25,
|
min: 0.25,
|
||||||
validationErrorMessage: loc.memoryRequestValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -418,7 +414,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.coordinatorMemoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
this.coordinatorMemoryLimitBox = this.modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: 0.25,
|
min: 0.25,
|
||||||
validationErrorMessage: loc.memoryLimitValidationErrorMessage,
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
placeHolder: loc.loading
|
placeHolder: loc.loading
|
||||||
}).component();
|
}).component();
|
||||||
@@ -608,7 +603,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.currentConfiguration.workerCoresRequest = '';
|
this.currentConfiguration.workerCoresRequest = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workerCoresRequestBox!.validationErrorMessage = loc.validationMin(this.workerCoresRequestBox!.min!);
|
|
||||||
this.workerCoresRequestBox!.placeHolder = '';
|
this.workerCoresRequestBox!.placeHolder = '';
|
||||||
this.workerCoresRequestBox!.value = this.currentConfiguration.workerCoresRequest;
|
this.workerCoresRequestBox!.value = this.currentConfiguration.workerCoresRequest;
|
||||||
this.saveArgs.workerCoresRequest = undefined;
|
this.saveArgs.workerCoresRequest = undefined;
|
||||||
@@ -619,7 +613,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.currentConfiguration.workerCoresLimit = '';
|
this.currentConfiguration.workerCoresLimit = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workerCoresLimitBox!.validationErrorMessage = loc.validationMin(this.workerCoresLimitBox!.min!);
|
|
||||||
this.workerCoresLimitBox!.placeHolder = '';
|
this.workerCoresLimitBox!.placeHolder = '';
|
||||||
this.workerCoresLimitBox!.value = this.currentConfiguration.workerCoresLimit;
|
this.workerCoresLimitBox!.value = this.currentConfiguration.workerCoresLimit;
|
||||||
this.saveArgs.workerCoresLimit = undefined;
|
this.saveArgs.workerCoresLimit = undefined;
|
||||||
@@ -658,7 +651,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.currentConfiguration.coordinatorCoresRequest = '';
|
this.currentConfiguration.coordinatorCoresRequest = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coordinatorCoresRequestBox!.validationErrorMessage = loc.validationMin(this.coordinatorCoresRequestBox!.min!);
|
|
||||||
this.coordinatorCoresRequestBox!.placeHolder = '';
|
this.coordinatorCoresRequestBox!.placeHolder = '';
|
||||||
this.coordinatorCoresRequestBox!.value = this.currentConfiguration.coordinatorCoresRequest;
|
this.coordinatorCoresRequestBox!.value = this.currentConfiguration.coordinatorCoresRequest;
|
||||||
this.saveArgs.coordinatorCoresRequest = undefined;
|
this.saveArgs.coordinatorCoresRequest = undefined;
|
||||||
@@ -669,7 +661,6 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
|
|||||||
this.currentConfiguration.coordinatorCoresLimit = '';
|
this.currentConfiguration.coordinatorCoresLimit = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.coordinatorCoresLimitBox!.validationErrorMessage = loc.validationMin(this.coordinatorCoresLimitBox!.min!);
|
|
||||||
this.coordinatorCoresLimitBox!.placeHolder = '';
|
this.coordinatorCoresLimitBox!.placeHolder = '';
|
||||||
this.coordinatorCoresLimitBox!.value = this.currentConfiguration.coordinatorCoresLimit;
|
this.coordinatorCoresLimitBox!.value = this.currentConfiguration.coordinatorCoresLimit;
|
||||||
this.saveArgs.coordinatorCoresLimit = undefined;
|
this.saveArgs.coordinatorCoresLimit = undefined;
|
||||||
|
|||||||
@@ -468,7 +468,6 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
readOnly: false,
|
readOnly: false,
|
||||||
min: parseInt(engineSetting.min!),
|
min: parseInt(engineSetting.min!),
|
||||||
max: parseInt(engineSetting.max!),
|
max: parseInt(engineSetting.max!),
|
||||||
validationErrorMessage: loc.outOfRange(engineSetting.min!, engineSetting.max!),
|
|
||||||
inputType: 'number',
|
inputType: 'number',
|
||||||
value: engineSetting.value,
|
value: engineSetting.value,
|
||||||
width: '150px'
|
width: '150px'
|
||||||
@@ -492,7 +491,7 @@ export abstract class PostgresParametersPage extends DashboardPage {
|
|||||||
width: '15px',
|
width: '15px',
|
||||||
height: '15px',
|
height: '15px',
|
||||||
enabled: false,
|
enabled: false,
|
||||||
title: loc.allowedValue(loc.rangeSetting(engineSetting.min!, engineSetting.max!))
|
title: loc.rangeSetting(engineSetting.min!, engineSetting.max!)
|
||||||
}).component();
|
}).component();
|
||||||
valueContainer.addItem(information, { CSSStyles: { 'margin-left': '5px' } });
|
valueContainer.addItem(information, { CSSStyles: { 'margin-left': '5px' } });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,8 +146,6 @@ export const missingVersion = localize('missingVersion', "Missing 'version' entr
|
|||||||
export const unrecognizedDataSourcesVersion = localize('unrecognizedDataSourcesVersion', "Unrecognized version: ");
|
export const unrecognizedDataSourcesVersion = localize('unrecognizedDataSourcesVersion', "Unrecognized version: ");
|
||||||
export const unknownDataSourceType = localize('unknownDataSourceType', "Unknown data source type: ");
|
export const unknownDataSourceType = localize('unknownDataSourceType', "Unknown data source type: ");
|
||||||
export const invalidSqlConnectionString = localize('invalidSqlConnectionString', "Invalid SQL connection string");
|
export const invalidSqlConnectionString = localize('invalidSqlConnectionString', "Invalid SQL connection string");
|
||||||
export const projectNameRequired = localize('projectNameRequired', "Name is required to create a new database project.");
|
|
||||||
export const projectLocationRequired = localize('projectLocationRequired', "Location is required to create a new database project.");
|
|
||||||
export const extractTargetRequired = localize('extractTargetRequired', "Target information for extract is required to create database project.");
|
export const extractTargetRequired = localize('extractTargetRequired', "Target information for extract is required to create database project.");
|
||||||
export const schemaCompareNotInstalled = localize('schemaCompareNotInstalled', "Schema compare extension installation is required to run schema compare");
|
export const schemaCompareNotInstalled = localize('schemaCompareNotInstalled', "Schema compare extension installation is required to run schema compare");
|
||||||
export const buildFailedCannotStartSchemaCompare = localize('buildFailedCannotStartSchemaCompare', "Schema compare could not start because build failed");
|
export const buildFailedCannotStartSchemaCompare = localize('buildFailedCannotStartSchemaCompare', "Schema compare could not start because build failed");
|
||||||
|
|||||||
@@ -249,8 +249,7 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
ariaLabel: constants.projectNamePlaceholderText,
|
ariaLabel: constants.projectNamePlaceholderText,
|
||||||
placeHolder: constants.projectNamePlaceholderText,
|
placeHolder: constants.projectNamePlaceholderText,
|
||||||
required: true,
|
required: true,
|
||||||
width: cssStyles.createProjectFromDatabaseTextboxWidth,
|
width: cssStyles.createProjectFromDatabaseTextboxWidth
|
||||||
validationErrorMessage: constants.projectNameRequired
|
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.projectNameTextBox.onTextChanged(() => {
|
this.projectNameTextBox.onTextChanged(() => {
|
||||||
@@ -278,8 +277,7 @@ export class CreateProjectFromDatabaseDialog {
|
|||||||
value: '',
|
value: '',
|
||||||
ariaLabel: constants.projectLocationLabel,
|
ariaLabel: constants.projectLocationLabel,
|
||||||
placeHolder: constants.projectLocationPlaceholderText,
|
placeHolder: constants.projectLocationPlaceholderText,
|
||||||
width: cssStyles.createProjectFromDatabaseTextboxWidth,
|
width: cssStyles.createProjectFromDatabaseTextboxWidth
|
||||||
validationErrorMessage: constants.projectLocationRequired
|
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.projectLocationTextBox.onTextChanged(() => {
|
this.projectLocationTextBox.onTextChanged(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user