From a163f8d9849393b9ff3fa33e94b76054071b03d7 Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 1 Jun 2016 09:32:43 -0300 Subject: PLT-3064 Add ErrorBar to System Console (#3189) --- webapp/components/admin_console/admin_console.jsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/webapp/components/admin_console/admin_console.jsx b/webapp/components/admin_console/admin_console.jsx index e5c528614..33868950b 100644 --- a/webapp/components/admin_console/admin_console.jsx +++ b/webapp/components/admin_console/admin_console.jsx @@ -1,9 +1,9 @@ // Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import $ from 'jquery'; import React from 'react'; +import ErrorBar from 'components/error_bar.jsx'; import AdminStore from 'stores/admin_store.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -42,8 +42,14 @@ export default class AdminConsole extends React.Component { } render() { - if ($.isEmptyObject(this.state.config)) { - return
; + const config = this.state.config; + if (config && Object.keys(config).length === 0 && config.constructor === 'Object') { + return ( +
+ +
+
+ ); } // not every page in the system console will need the config, but the vast majority will @@ -52,9 +58,12 @@ export default class AdminConsole extends React.Component { }); return ( -
- - {children} +
+ +
+ + {children} +
); } -- cgit v1.2.3-1-g7c22