1) Fixed pgAgent related issues. Fixes #6827

2) Added helpMessageMode parameter to hide help messages from properties panel.
pull/61/head
Akshay Joshi 2021-09-29 19:48:43 +05:30
parent aa8854db53
commit 1b6ab6b3bb
6 changed files with 25 additions and 4 deletions

View File

@ -136,6 +136,7 @@ export default class PublicationSchema extends BaseUISchema {
id: 'only_table', label: gettext('Only table?'), type: 'switch',
group: gettext('Definition'), mode: ['edit', 'create'],
deps: ['name', 'pubtable', 'all_table'], readonly: obj.isTable,
helpMessageMode: ['edit', 'create'],
helpMessage: gettext('If ONLY is specified before the table name, only that table is added to the publication. If ONLY is not specified, the table and all its descendant tables (if any) are added.'),
},{
id: 'pubtable', label: gettext('Tables'), type: 'select',

View File

@ -184,6 +184,7 @@ export default class SubscriptionSchema extends BaseUISchema{
group: gettext('Connection'), mode: ['create', 'edit'],
deps: ['all_table', 'host', 'port', 'username', 'db', 'password'], disabled: obj.isAllConnectionDataEnter,
helpMessage: gettext('Click the refresh button to get the publications'),
helpMessageMode: ['edit', 'create'],
type: (state)=>{
return {
type: 'select-refresh',
@ -297,6 +298,7 @@ export default class SubscriptionSchema extends BaseUISchema{
group: gettext('With'),
readonly: obj.isRefresh, deps :['refresh_pub'],
helpMessage: gettext('Specifies whether the existing data in the publications that are being subscribed to should be copied once the replication starts.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'copy_data', label: gettext('Copy data?'),
@ -304,6 +306,7 @@ export default class SubscriptionSchema extends BaseUISchema{
group: gettext('With'),
readonly: obj.isConnect, deps :['connect'],
helpMessage: gettext('Specifies whether the existing data in the publications that are being subscribed to should be copied once the replication starts.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'create_slot', label: gettext('Create slot?'),
@ -312,7 +315,7 @@ export default class SubscriptionSchema extends BaseUISchema{
disabled: obj.isSameDB,
readonly: obj.isConnect, deps :['connect', 'host', 'port'],
helpMessage: gettext('Specifies whether the command should create the replication slot on the publisher.This field will be disabled and set to false if subscription connects to same database.Otherwise, the CREATE SUBSCRIPTION call will hang.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'enabled', label: gettext('Enabled?'),
@ -320,12 +323,14 @@ export default class SubscriptionSchema extends BaseUISchema{
group: gettext('With'),
readonly: obj.isConnect, deps :['connect'],
helpMessage: gettext('Specifies whether the subscription should be actively replicating, or whether it should be just setup but not started yet.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'refresh_pub', label: gettext('Refresh publication?'),
type: 'switch', mode: ['edit'],
group: gettext('With'),
helpMessage: gettext('Fetch missing table information from publisher.'),
helpMessageMode: ['edit', 'create'],
deps:['enabled'], disabled: function(state){
if (state.enabled)
return false;
@ -338,17 +343,20 @@ export default class SubscriptionSchema extends BaseUISchema{
group: gettext('With'),
disabled: obj.isDisable, deps:['enabled', 'create_slot', 'copy_data'],
helpMessage: gettext('Specifies whether the CREATE SUBSCRIPTION should connect to the publisher at all. Setting this to false will change default values of enabled, create_slot and copy_data to false.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'slot_name', label: gettext('Slot name'),
type: 'text', mode: ['create','edit', 'properties'],
group: gettext('With'),
helpMessage: gettext('Name of the replication slot to use. The default behavior is to use the name of the subscription for the slot name.'),
helpMessageMode: ['edit', 'create'],
},
{
id: 'sync', label: gettext('Synchronous commit'), control: 'select2', deps:['event'],
group: gettext('With'), type: 'select',
helpMessage: gettext('The value of this parameter overrides the synchronous_commit setting. The default value is off.'),
helpMessageMode: ['edit', 'create'],
controlProps: {
width: '100%',
allowClear: false,

View File

@ -62,6 +62,7 @@ export default class PgaJobSchema extends BaseUISchema {
mode: ['create', 'edit'],
controlProps: {allowClear: false},
helpMessage: gettext('Please select a class to categorize the job. This option will not affect the way the job runs.'),
helpMessageMode: ['edit', 'create'],
},{
id: 'jobhostagent', label: gettext('Host agent'), type: 'text',
mode: ['properties'],
@ -69,6 +70,7 @@ export default class PgaJobSchema extends BaseUISchema {
id: 'jobhostagent', label: gettext('Host agent'), type: 'text',
mode: ['edit', 'create'],
helpMessage: gettext('Enter the hostname of a machine running pgAgent if you wish to ensure only that machine will run this job. Leave blank if any host may run the job.'),
helpMessageMode: ['edit', 'create'],
},{
id: 'jobcreated', type: 'text', mode: ['properties'],
label: gettext('Created'),

View File

@ -113,18 +113,27 @@ export default class PgaJobStepSchema extends BaseUISchema {
deps: ['jstkind'],
disabled: function(state) { return !state.jstkind; },
helpMessage: gettext('Select <strong>Local</strong> if the job step will execute on the local database server, or <strong>Remote</strong> to specify a remote database server.'),
helpMessageMode: ['edit', 'create'],
}, {
id: 'jstdbname', label: gettext('Database'), type: 'select',
options: this.fieldOptions.databases,
controlProps: {allowClear: true, placeholder: ''},
disabled: function(state) { return !state.jstkind || !state.jstconntype; },
disabled: function(state) {
let retVal = !state.jstkind || !state.jstconntype
if (retVal) {
state.jstdbname = null;
}
return retVal;
},
deps: ['jstkind', 'jstconntype'],
helpMessage: gettext('Please select the database on which the job step will run.'),
helpMessageMode: ['edit', 'create'],
}, {
id: 'jstconnstr', label: gettext('Connection string'), type: 'text',
deps: ['jstkind', 'jstconntype'],
disabled: function(state) { return !state.jstkind || state.jstconntype; },
helpMessage: gettext('Please specify the connection string for the remote database server. Each parameter setting is in the form keyword = value. Spaces around the equal sign are optional. To write an empty value, or a value containing spaces, surround it with single quotes, e.g., keyword = \'a value\'. Single quotes and backslashes within the value must be escaped with a backslash, i.e., \' and \\.<br>For more information, please see the documentation on <a href="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING" target="_blank">libpq connection strings</a>.'),
helpMessageMode: ['edit', 'create'],
}, {
id: 'jstonerror', label: gettext('On error'), type: 'select',
cell: 'select',

View File

@ -100,6 +100,7 @@ export default class RoleSchema extends BaseUISchema {
mode: ['properties', 'edit', 'create'],
deps: ['rolcanlogin'],
helpMessage: gettext('Please note that if you leave this field blank, then password will never expire.'),
helpMessageMode: ['edit', 'create'],
controlProps: {
ampm: false,
placeholder: gettext('No Expiry'), autoOk: true,

View File

@ -207,8 +207,8 @@ const DATE_TIME_FORMAT = {
DATE_TIME_12: 'yyyy-MM-dd hh:mm:ss aa xxx',
DATE_TIME_24: 'yyyy-MM-dd HH:mm:ss XXX',
DATE: 'yyyy-MM-dd',
TIME_12: 'hh:mm aa',
TIME_24: 'HH:mm',
TIME_12: 'hh:mm:ss aa',
TIME_24: 'HH:mm:ss',
};
export function InputDateTimePicker({value, onChange, readonly, controlProps, ...props}) {