summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-05-29 15:46:35 -0400
committerGitHub <noreply@github.com>2017-05-29 15:46:35 -0400
commit860e5d483cd952ec833c40312a2141bb3e4ef579 (patch)
treea854943f1f008f9b0f607f486de4b117b98e08e4 /webapp
parentf9843b380074cc6082566a2752c5482210f912bb (diff)
downloadchat-860e5d483cd952ec833c40312a2141bb3e4ef579.tar.gz
chat-860e5d483cd952ec833c40312a2141bb3e4ef579.tar.bz2
chat-860e5d483cd952ec833c40312a2141bb3e4ef579.zip
PLT-6341/PLT-6342 Update gorp to mattermost fork and add connection timeout setting (#6410)
* Update gorp to mattermost fork and add connection timeout setting * Add go dependency * Rename from connection timeout to query timeout * Properly add gorp dependency
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/admin_console/database_settings.jsx22
-rwxr-xr-xwebapp/i18n/en.json3
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\"",