Skip to content

Commit

Permalink
fix(console): use pod name query can't find next page resource (#982)
Browse files Browse the repository at this point in the history
* fix(console): change name

* fix(console): can't find next page pod when use podName

* fix(console): rm no use file
  • Loading branch information
jo-hnny committed Dec 7, 2020
1 parent 2e45a9e commit a35f015
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions web/console/src/modules/cluster/actions/resourcePodActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const fetchPodActions = generateFetcherActionCreator({
}

k8sQueryObj = JSON.parse(JSON.stringify(k8sQueryObj));
let { records, continueToken } = await WebAPI.fetchResourceList(podQuery, {
const { records, continueToken } = await WebAPI.fetchResourceList(podQuery, {
resourceInfo: podResourceInfo,
isClearData,
k8sQueryObj,
Expand Down Expand Up @@ -223,8 +223,13 @@ const restActions = {
payload: podFilter
});

// 清除分页信息
dispatch(resourceDetailActions.pod.resetPaging());
if (podFilter.podName) {
// 清除分页信息
dispatch(resourceDetailActions.pod.changePaging({ pageIndex: 1, pageSize: 2048 }));
} else {
// 清除分页信息
dispatch(resourceDetailActions.pod.resetPaging());
}

// 根据筛选项,进行pod列表的查询,namespace、metadata.name等过滤条件
dispatch(resourceDetailActions.pod.poll(podQuery.filter));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class ResourcePodActionPanel extends React.Component<RootProps, ResourceP
{
type: 'input',
key: 'ip',
name: t('ip地址')
name: t('实例IP')
}
].concat(
isInNodeManage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function PodTabel({
<Card.Body>
<Table columns={columns} records={podList?.data?.records || []} recordKey="id" addons={addons} />
<Pagination
pageSizeOptions={[10, 20, 30, 50, 100, 200, 2048]}
pageIndex={paging.pageIndex}
pageSize={paging.pageSize}
recordCount={recordCount}
Expand Down

0 comments on commit a35f015

Please sign in to comment.