Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #2835] Fix an uncaught exception when accessing restricted namespace in authentication mode. #3541

Merged
merged 4 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class ConfigurationManagement extends React.Component {
if (this.state.loading) {
return;
}
const { locale = {}, configurations = {} } = this.props;
this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数
this.serverId = getParams('serverId') || '';
const prePageNo = getParams('pageNo');
Expand All @@ -273,14 +274,29 @@ class ConfigurationManagement extends React.Component {
params.search = 'accurate';
}
this.setState({ loading: true });
this.props.getConfigs(params).then(() =>
this.setState({
loading: false,
selectedRecord: [],
selectedKeys: [],
tenant: this.tenant,
})
);
this.props
.getConfigs(params)
.then(() =>
this.setState({
loading: false,
selectedRecord: [],
selectedKeys: [],
tenant: this.tenant,
})
)
.catch(res => {
configurations.pageItems = [];
configurations.totalCount = 0;
this.setState({
loading: false,
});
if (res && [401, 403].includes(res.status)) {
Dialog.alert({
title: locale.importFail,
content: locale.importFail403,
});
}
});
}

showMore() {}
Expand Down Expand Up @@ -1384,7 +1400,7 @@ class ConfigurationManagement extends React.Component {
</div>
<Pagination
style={{ float: 'right' }}
pageSizeList={ GLOBAL_PAGE_SIZE_LIST }
pageSizeList={GLOBAL_PAGE_SIZE_LIST}
ljhrot marked this conversation as resolved.
Show resolved Hide resolved
pageSizePosition="start"
pageSizeSelector="dropdown"
popupProps={{ align: 'bl tl' }}
Expand Down
12 changes: 6 additions & 6 deletions console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.