PLT-3191 E20: Updates to Reload Configuration from Disk and Recycle Database Connections (#3424)

* added help text to reload configuration and recycle db

* Update reload_config.jsx

* Update en.json
Этот коммит содержится в:
David Lu
2016-06-28 14:53:36 -04:00
коммит произвёл Christopher Speller
родитель 422e12c364
Коммит 8c2282f89e
4 изменённых файлов: 26 добавлений и 4 удалений

Просмотреть файл

@@ -44,7 +44,6 @@ export default class ConfigurationSettings extends AdminSettings {
renderSettings() { renderSettings() {
return ( return (
<SettingsGroup> <SettingsGroup>
<ReloadConfigButton/>
<TextSetting <TextSetting
id='listenAddress' id='listenAddress'
label={ label={
@@ -63,6 +62,7 @@ export default class ConfigurationSettings extends AdminSettings {
value={this.state.listenAddress} value={this.state.listenAddress}
onChange={this.handleChange} onChange={this.handleChange}
/> />
<ReloadConfigButton/>
</SettingsGroup> </SettingsGroup>
); );
} }

Просмотреть файл

@@ -6,7 +6,7 @@ import React from 'react';
import Client from 'utils/web_client.jsx'; import Client from 'utils/web_client.jsx';
import * as Utils from 'utils/utils.jsx'; import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl'; import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
export default class RecycleDbButton extends React.Component { export default class RecycleDbButton extends React.Component {
constructor(props) { constructor(props) {
@@ -64,6 +64,13 @@ export default class RecycleDbButton extends React.Component {
); );
} }
let helpText = (
<FormattedHTMLMessage
id='admin.recycle.recycleDescription'
defaultMessage='Deployments using multiple databases can switch from one master database to another without restarting the Mattermost server by updating "config.json" to the new desired confugration and using the <a href="../general/configuration"><b>Configuration > Reload Configuration from Disk</b></a> feature to load the new settings while the server is running. The administrator should then use <b>Recycle Database Connections</b> feature to recycle the database connections based on the new settings.'
/>
);
let contents = null; let contents = null;
if (this.state.loading) { if (this.state.loading) {
contents = ( contents = (
@@ -93,6 +100,9 @@ export default class RecycleDbButton extends React.Component {
</button> </button>
{testMessage} {testMessage}
</div> </div>
<div className='help-text'>
{helpText}
</div>
</div> </div>
</div> </div>
); );

Просмотреть файл

@@ -6,7 +6,7 @@ import React from 'react';
import Client from 'utils/web_client.jsx'; import Client from 'utils/web_client.jsx';
import * as Utils from 'utils/utils.jsx'; import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl'; import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
export default class ReloadConfigButton extends React.Component { export default class ReloadConfigButton extends React.Component {
constructor(props) { constructor(props) {
@@ -64,6 +64,13 @@ export default class ReloadConfigButton extends React.Component {
); );
} }
let helpText = (
<FormattedHTMLMessage
id='admin.reload.reloadDescription'
defaultMessage='Deployments using multiple databases can switch from one master database to another without restarting the Mattermost server by updating "config.json" to the new desired configuration and using the <b>Reload Configuration from Disk</b> feature to load the new settings while the server is running. The administrator should then use the <a href="../advanced/database"><b>Database > Recycle Database Connections</b></a> feature to recycle the database connections based on the new settings.'
/>
);
let contents = null; let contents = null;
if (this.state.loading) { if (this.state.loading) {
contents = ( contents = (
@@ -93,6 +100,9 @@ export default class ReloadConfigButton extends React.Component {
</button> </button>
{testMessage} {testMessage}
</div> </div>
<div className='help-text'>
{helpText}
</div>
</div> </div>
</div> </div>
); );

Просмотреть файл

@@ -387,10 +387,12 @@
"admin.recycle.button": "Recycle Database Connections", "admin.recycle.button": "Recycle Database Connections",
"admin.recycle.loading": " Recycling...", "admin.recycle.loading": " Recycling...",
"admin.recycle.reloadFail": "Recycling unsuccessful: {error}", "admin.recycle.reloadFail": "Recycling unsuccessful: {error}",
"admin.recycle.recycleDescription": "Deployments using multiple databases can switch from one master database to another without restarting the Mattermost server by updating \"config.json\" to the new desired confugration and using the <a href=\"../general/configuration\"><b>Configuration > Reload Configuration from Disk</b></a> feature to load the new settings while the server is running. The administrator should then use <b>Recycle Database Connections</b> feature to recycle the database connections based on the new settings.",
"admin.regenerate": "Regenerate", "admin.regenerate": "Regenerate",
"admin.reload.button": "Reload Configuration From Disk", "admin.reload.button": "Reload Configuration From Disk",
"admin.reload.loading": " Loading...", "admin.reload.loading": " Loading...",
"admin.reload.reloadFail": "Reloading unsuccessful: {error}", "admin.reload.reloadFail": "Reloading unsuccessful: {error}",
"admin.reload.reloadDescription": "Deployments using multiple databases can switch from one master database to another without restarting the Mattermost server by updating \"config.json\" to the new desired configuration and using the <b>Reload Configuration from Disk</b> feature to load the new settings while the server is running. The administrator should then use the <a href=\"../advanced/database\"><b>Database > Recycle Database Connections</b></a> feature to recycle the database connections based on the new settings.",
"admin.reset_password.close": "Close", "admin.reset_password.close": "Close",
"admin.reset_password.newPassword": "New Password", "admin.reset_password.newPassword": "New Password",
"admin.reset_password.select": "Select", "admin.reset_password.select": "Select",