From 1138dd67705829a6af0d6c610cf3dbe09082187c Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 14 Jun 2017 08:56:56 -0400 Subject: PLT-6657 Move system console to use v4 endpoints and redux (#6572) * Move system console to use v4 endpoints and redux * Rename logs dir to get past gitignore * Fix test email * Update brand unit test * Updates per feedback --- webapp/components/admin_console/admin_settings.jsx | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'webapp/components/admin_console/admin_settings.jsx') diff --git a/webapp/components/admin_console/admin_settings.jsx b/webapp/components/admin_console/admin_settings.jsx index 180e6e5b9..2411fbdb8 100644 --- a/webapp/components/admin_console/admin_settings.jsx +++ b/webapp/components/admin_console/admin_settings.jsx @@ -1,11 +1,8 @@ -import PropTypes from 'prop-types'; - // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import React from 'react'; - -import * as AsyncClient from 'utils/async_client.jsx'; +import PropTypes from 'prop-types'; import FormError from 'components/form_error.jsx'; import SaveButton from 'components/admin_console/save_button.jsx'; @@ -13,10 +10,12 @@ import SaveButton from 'components/admin_console/save_button.jsx'; import {saveConfig} from 'actions/admin_actions.jsx'; export default class AdminSettings extends React.Component { - static get propTypes() { - return { - config: PropTypes.object - }; + static propTypes = { + + /* + * Object representing the config file + */ + config: PropTypes.object } constructor(props) { @@ -58,10 +57,8 @@ export default class AdminSettings extends React.Component { saveConfig( config, - () => { - AsyncClient.getConfig((savedConfig) => { - this.setState(this.getStateFromConfig(savedConfig)); - }); + (savedConfig) => { + this.setState(this.getStateFromConfig(savedConfig)); this.setState({ saveNeeded: false, -- cgit v1.2.3-1-g7c22