PLT-3064 Add ErrorBar to System Console (#3189)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
c7fcb4e25d
Коммит
a163f8d984
@@ -1,9 +1,9 @@
|
|||||||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import $ from 'jquery';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import ErrorBar from 'components/error_bar.jsx';
|
||||||
import AdminStore from 'stores/admin_store.jsx';
|
import AdminStore from 'stores/admin_store.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
|
|
||||||
@@ -42,8 +42,14 @@ export default class AdminConsole extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if ($.isEmptyObject(this.state.config)) {
|
const config = this.state.config;
|
||||||
return <div className='admin-console'/>;
|
if (config && Object.keys(config).length === 0 && config.constructor === 'Object') {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<ErrorBar/>
|
||||||
|
<div className='admin-console'/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// not every page in the system console will need the config, but the vast majority will
|
// 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 (
|
return (
|
||||||
<div className='admin-console'>
|
<div>
|
||||||
<AdminSidebar/>
|
<ErrorBar/>
|
||||||
{children}
|
<div className='admin-console'>
|
||||||
|
<AdminSidebar/>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user