Skip to content

Commit 73542c5

Browse files
aarthy-dkluis-dk
authored andcommitted
fix: update label and help text in connection and table group forms
1 parent ef8e2ba commit 73542c5

3 files changed

Lines changed: 21 additions & 26 deletions

File tree

testgen/ui/components/frontend/js/components/alert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const { div } = van.tags;
1515
const alertTypeColors = {
1616
info: {backgroundColor: 'rgba(28, 131, 225, 0.1)', color: 'rgb(0, 66, 128)'},
1717
success: {backgroundColor: 'rgba(33, 195, 84, 0.1)', color: 'rgb(23, 114, 51)'},
18+
warn: {backgroundColor: 'rgba(255, 227, 18, 0.2)', color: 'rgb(255, 255, 194)'},
1819
error: {backgroundColor: 'rgba(255, 43, 43, 0.09)', color: 'rgb(125, 53, 59)'},
1920
};
2021

testgen/ui/components/frontend/js/components/connection_form.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,12 @@ const ConnectionForm = (props, saveButton) => {
217217
div(
218218
{ class: 'flex-column fx-gap-3', style: 'flex: 2' },
219219
Select({
220-
label: 'SQL Flavor',
220+
label: 'Database Type',
221221
value: connectionFlavor,
222222
options: props.flavors,
223223
disabled: props.disableFlavor,
224224
height: 38,
225-
help: 'The type of database server that you will connect to. This determines TestGen\'s drivers and SQL dialect.',
225+
help: 'Type of database server to connect to. This determines the database driver and SQL dialect that will be used by TestGen.',
226226
testId: 'sql_flavor',
227227
onChange: (value) => connectionFlavor.val = value,
228228
}),
@@ -231,7 +231,7 @@ const ConnectionForm = (props, saveButton) => {
231231
label: 'Connection Name',
232232
value: connectionName,
233233
height: 38,
234-
help: 'Your name for this connection. Can be any text.',
234+
help: 'Unique name to describe the connection',
235235
onChange: (value, state) => {
236236
connectionName.val = value;
237237
setFieldValidity('connection_name', state.valid);
@@ -272,7 +272,6 @@ const ConnectionForm = (props, saveButton) => {
272272
label: 'Database',
273273
value: connectionDatabase,
274274
height: 38,
275-
help: 'The name of the database defined on your host where your schemas and tables is present.',
276275
disabled: connectByUrl,
277276
onChange: (value, state) => {
278277
connectionDatabase.val = value;
@@ -282,10 +281,9 @@ const ConnectionForm = (props, saveButton) => {
282281
}),
283282
Input({
284283
name: 'db_user',
285-
label: 'User',
284+
label: 'Username',
286285
value: connectionUsername,
287286
height: 38,
288-
help: 'Username to connect to your database.',
289287
onChange: (value, state) => {
290288
connectionUsername.val = value;
291289
setFieldValidity('db_user', state.valid);
@@ -318,7 +316,7 @@ const ConnectionForm = (props, saveButton) => {
318316
Checkbox({
319317
name: 'connect_by_url',
320318
label: 'URL Override',
321-
help: 'If this switch is set to on, the connection string will be driven by the field below. Only user name and password will be passed per the relevant fields above.',
319+
help: 'When checked, the connection string will be driven by the field below, along with the username and password from the fields above',
322320
checked: connectByUrl.val,
323321
onChange: (checked) => connectByUrl.val = checked,
324322
}),
@@ -344,7 +342,6 @@ const ConnectionForm = (props, saveButton) => {
344342
}),
345343
Input({
346344
label: 'URL Suffix',
347-
help: `Provide a connection string directly. This will override connection parameters if the 'Connect by URL' switch is set.`,
348345
value: connectionStringSuffix,
349346
class: 'fx-flex',
350347
height: 38,
@@ -392,7 +389,6 @@ const PasswordConnectionForm = (password, onValueChange, useSecretsPlaceholder)
392389
value: password,
393390
height: 38,
394391
type: 'password',
395-
help: 'Password to connect to your database.',
396392
placeholder: useSecretsPlaceholder ? secretsPlaceholder : '',
397393
onChange: onValueChange,
398394
}),
@@ -429,7 +425,6 @@ const HttpPathConnectionForm = (
429425
value: password,
430426
height: 38,
431427
type: 'password',
432-
help: 'Password to connect to your database.',
433428
placeholder: useSecretsPlaceholder ? secretsPlaceholder : '',
434429
onChange: (value, state) => passwordFieldState.val = {value, valid: state.valid},
435430
}),
@@ -507,7 +502,7 @@ const KeyPairConnectionForm = (
507502
value: privateKeyPhrase,
508503
height: 38,
509504
type: 'password',
510-
help: 'Passphrase used while creating the private Key (leave empty if not applicable)',
505+
help: 'Passphrase used when creating the private key. Leave empty if the private key is not encrypted.',
511506
placeholder: useSecretsPlaceholder ? secretsPlaceholder : '',
512507
onChange: (value, state) => privateKeyPhraseFieldState.val = {value, valid: state.valid},
513508
}),
@@ -529,7 +524,6 @@ const KeyPairConnectionForm = (
529524
value: password,
530525
height: 38,
531526
type: 'password',
532-
help: 'Password to connect to your database.',
533527
placeholder: useSecretsPlaceholder ? secretsPlaceholder : '',
534528
onChange: (value, state) => passwordFieldState.val = {value, valid: state.valid},
535529
});

testgen/ui/components/frontend/js/components/table_group_form.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const MainForm = (
173173
label: 'Name',
174174
value: tableGroupsName,
175175
height: 38,
176-
help: 'A unique name to describe the table group',
176+
help: 'Unique name to describe the table group',
177177
helpPlacement: 'bottom-right',
178178
onChange: (value, state) => {
179179
tableGroupsName.val = value;
@@ -186,7 +186,7 @@ const MainForm = (
186186
label: 'Tables to Include Mask',
187187
value: profilingIncludeMask,
188188
height: 38,
189-
help: 'A SQL filter supported by your database\'s LIKE operator for table names to include',
189+
help: 'SQL filter supported by your database\'s LIKE operator for table names to include',
190190
onChange: (value, state) => {
191191
profilingIncludeMask.val = value;
192192
options.setValidity?.('profiling_include_mask', state.valid);
@@ -197,7 +197,7 @@ const MainForm = (
197197
label: 'Tables to Exclude Mask',
198198
value: profilingExcludeMask,
199199
height: 38,
200-
help: 'A SQL filter supported by your database\'s LIKE operator for table names to exclude',
200+
help: 'SQL filter supported by your database\'s LIKE operator for table names to exclude',
201201
onChange: (value, state) => {
202202
profilingExcludeMask.val = value;
203203
options.setValidity?.('profiling_exclude_mask', state.valid);
@@ -208,7 +208,7 @@ const MainForm = (
208208
label: 'Explicit Table List',
209209
value: profilingTableSet,
210210
height: 38,
211-
help: 'A list of specific table names to include, separated by commas',
211+
help: 'List of specific table names to include, separated by commas',
212212
onChange: (value, state) => {
213213
profilingTableSet.val = value;
214214
options.setValidity?.('profiling_table_set', state.valid);
@@ -225,7 +225,7 @@ const MainForm = (
225225
label: 'Schema',
226226
value: tableGroupSchema,
227227
height: 38,
228-
help: 'The database schema containing the tables in the Table Group',
228+
help: 'Database schema containing the tables for the Table Group',
229229
helpPlacement: 'bottom-left',
230230
onChange: (value, state) => {
231231
tableGroupSchema.val = value;
@@ -235,21 +235,21 @@ const MainForm = (
235235
}),
236236
Input({
237237
name: 'profile_id_column_mask',
238-
label: 'Profiling ID column mask',
238+
label: 'Profiling ID Column Mask',
239239
value: profileIdColumnMask,
240240
height: 38,
241-
help: 'A SQL filter supported by your database\'s LIKE operator representing ID columns (optional)',
241+
help: 'SQL filter supported by your database\'s LIKE operator representing ID columns (optional)',
242242
onChange: (value, state) => {
243243
profileIdColumnMask.val = value;
244244
options.setValidity?.('profile_id_column_mask', state.valid);
245245
},
246246
}),
247247
Input({
248248
name: 'profile_sk_column_mask',
249-
label: 'Profiling Surrogate Key column mask',
249+
label: 'Profiling Surrogate Key Column Mask',
250250
value: profileSkColumnMask,
251251
height: 38,
252-
help: 'A SQL filter supported by your database\'s LIKE operator representing surrogate key columns (optional)',
252+
help: 'SQL filter supported by your database\'s LIKE operator representing surrogate key columns (optional)',
253253
onChange: (value, state) => {
254254
profileSkColumnMask.val = value
255255
options.setValidity?.('profile_sk_column_mask', state.valid);
@@ -258,10 +258,10 @@ const MainForm = (
258258
Input({
259259
name: 'profiling_delay_days',
260260
type: 'number',
261-
label: 'Min Profiling Age, Days',
261+
label: 'Min Profiling Age (in days)',
262262
value: profilingDelayDays,
263263
height: 38,
264-
help: 'The number of days to wait before new profiling will be available to generate tests',
264+
help: 'Number of days to wait before new profiling will be available to generate tests',
265265
onChange: (value, state) => {
266266
profilingDelayDays.val = value;
267267
options.setValidity?.('profiling_delay_days', state.valid);
@@ -288,7 +288,7 @@ const SamplingForm = (
288288
Checkbox({
289289
name: 'profile_use_sampling',
290290
label: 'Use profile sampling',
291-
help: 'Toggle on to base profiling on a sample of records instead of the full table',
291+
help: 'When checked, profiling will be based on a sample of records instead of the full table',
292292
checked: profileUseSampling,
293293
onChange: (value) => profileUseSampling.val = value,
294294
}),
@@ -303,7 +303,7 @@ const SamplingForm = (
303303
label: 'Sample percent',
304304
value: profileSamplePercent,
305305
height: 38,
306-
help: 'Percent of records to include in the sample, unless the calculated count falls below the specified minimum.',
306+
help: 'Percent of records to include in the sample, unless the calculated count falls below the specified minimum',
307307
onChange: (value, state) => {
308308
profileSamplePercent.val = value;
309309
options.setValidity?.('profile_sample_percent', state.valid);
@@ -316,7 +316,7 @@ const SamplingForm = (
316316
label: 'Min Sample Record Count',
317317
value: profileSampleMinCount,
318318
height: 38,
319-
help: 'The minimum number of records to be included in any sample (if available)',
319+
help: 'Minimum number of records to be included in any sample (if available)',
320320
onChange: (value, state) => {
321321
profileSampleMinCount.val = value;
322322
options.setValidity?.('profile_sample_min_count', state.valid);

0 commit comments

Comments
 (0)