diff options
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/admin_console/database_settings.jsx | 22 | ||||
-rwxr-xr-x | webapp/i18n/en.json | 3 |
2 files changed, 24 insertions, 1 deletions
diff --git a/webapp/components/admin_console/database_settings.jsx b/webapp/components/admin_console/database_settings.jsx index f4fbdbc72..7b8891b2a 100644 --- a/webapp/components/admin_console/database_settings.jsx +++ b/webapp/components/admin_console/database_settings.jsx @@ -29,6 +29,7 @@ export default class DatabaseSettings extends AdminSettings { config.SqlSettings.MaxOpenConns = this.parseIntNonZero(this.state.maxOpenConns); config.SqlSettings.AtRestEncryptKey = this.state.atRestEncryptKey; config.SqlSettings.Trace = this.state.trace; + config.SqlSettings.QueryTimeout = this.parseIntNonZero(this.state.queryTimeout); return config; } @@ -40,7 +41,8 @@ export default class DatabaseSettings extends AdminSettings { maxIdleConns: config.SqlSettings.MaxIdleConns, maxOpenConns: config.SqlSettings.MaxOpenConns, atRestEncryptKey: config.SqlSettings.AtRestEncryptKey, - trace: config.SqlSettings.Trace + trace: config.SqlSettings.Trace, + queryTimeout: config.SqlSettings.QueryTimeout }; } @@ -128,6 +130,24 @@ export default class DatabaseSettings extends AdminSettings { value={this.state.maxOpenConns} onChange={this.handleChange} /> + <TextSetting + id='queryTimeout' + label={ + <FormattedMessage + id='admin.sql.queryTimeoutTitle' + defaultMessage='Query Timeout:' + /> + } + placeholder={Utils.localizeMessage('admin.sql.queryTimeoutExample', 'Ex "30"')} + helpText={ + <FormattedMessage + id='admin.sql.queryTimeoutDescription' + defaultMessage='The number of seconds to wait for a response from the database after opening a connection and sending the query. Errors that you see in the UI or in the logs as a result of a query timeout can vary depending on the type of query. This setting has no effect on PostgreSQL databases.' + /> + } + value={this.state.queryTimeout} + onChange={this.handleChange} + /> <GeneratedSetting id='atRestEncryptKey' label={ diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 04c55d077..fe2a9ae5a 100755 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -818,6 +818,9 @@ "admin.sql.keyTitle": "At Rest Encrypt Key:", "admin.sql.maxConnectionsDescription": "Maximum number of idle connections held open to the database.", "admin.sql.maxConnectionsExample": "E.g.: \"10\"", + "admin.sql.queryTimeoutTitle": "Query Timeout:", + "admin.sql.queryTimeoutDescription": "The number of seconds to wait for a response from the database after opening a connection and sending the query. Errors that you see in the UI or in the logs as a result of a query timeout can vary depending on the type of query. This setting has no effect on PostgreSQL databases.", + "admin.sql.queryTimeoutExample": "E.g.: \"30\"", "admin.sql.maxConnectionsTitle": "Maximum Idle Connections:", "admin.sql.maxOpenDescription": "Maximum number of open connections held open to the database.", "admin.sql.maxOpenExample": "E.g.: \"10\"", |