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 #2089]Config list return page bug fix #2737

Merged
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -182,23 +182,31 @@ class ClusterNodeList extends React.Component {
width="20%"
cell={function(value, index, record) {
if (value === 'UP') {
return (<Tag key={`p_p_${value}`} type="primary" color="green">
{value}
</Tag>);
return (
<Tag key={`p_p_${value}`} type="primary" color="green">
{value}
</Tag>
);
}
if (value === 'DOWN') {
return (<Tag key={`p_p_${value}`} type="primary" color="red">
{value}
</Tag>);
return (
<Tag key={`p_p_${value}`} type="primary" color="red">
{value}
</Tag>
);
}
if (value === 'SUSPICIOUS') {
return (<Tag key={`p_p_${value}`} type="primary" color="orange">
{value}
</Tag>);
return (
<Tag key={`p_p_${value}`} type="primary" color="orange">
{value}
</Tag>
);
}
return (<Tag key={`p_p_${value}`} type="primary" color="turquoise">
{value}
</Tag>);
return (
<Tag key={`p_p_${value}`} type="primary" color="turquoise">
{value}
</Tag>
);
}}
/>
<Column
Expand All @@ -207,13 +215,17 @@ class ClusterNodeList extends React.Component {
width="50%"
cell={function(value, index, record) {
function showCollapse() {
const collapse = (<Collapse>
<Panel title="节点元数据">
<ul>
<li><pre>{JSON.stringify(value, null, 4)}</pre></li>
</ul>
</Panel>
</Collapse>);
const collapse = (
<Collapse>
<Panel title="节点元数据">
<ul>
<li>
<pre>{JSON.stringify(value, null, 4)}</pre>
</li>
</ul>
</Panel>
</Collapse>
);
return collapse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class ConfigDetail extends React.Component {
this.tenant = getParams('namespace') || '';
this.searchDataId = getParams('searchDataId') || '';
this.searchGroup = getParams('searchGroup') || '';
this.pageSize = getParams('pageSize');
this.pageNo = getParams('pageNo');
// this.params = window.location.hash.split('?')[1]||'';
}

Expand Down Expand Up @@ -146,6 +148,8 @@ class ConfigDetail extends React.Component {
group: this.searchGroup,
dataId: this.searchDataId,
namespace: this.tenant,
pageNo: this.pageNo,
pageSize: this.pageSize,
})
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,17 @@ class ConfigEditor extends React.Component {
const namespace = getParams('namespace');
const group = getParams('searchGroup') || '';
const dataId = getParams('searchDataId') || '';
const pageSize = getParams('pageSize');
const pageNo = getParams('pageNo');
this.props.history.push(
generateUrl('/configurationManagement', { serverId, group, dataId, namespace })
generateUrl('/configurationManagement', {
serverId,
group,
dataId,
namespace,
pageSize,
pageNo,
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ConfigurationManagement extends React.Component {
value: '',
visible: false,
total: 0,
pageSize: 10,
pageSize: getParams('pageSize') ? getParams('pageSize') : 10,
currentPage: 1,
dataSource: [],
fieldValue: [],
Expand Down Expand Up @@ -249,15 +249,21 @@ class ConfigurationManagement extends React.Component {
}
this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数
this.serverId = getParams('serverId') || '';
const prePageNo = getParams('pageNo');
const prePageSize = getParams('pageSize');
this.pageNo = prePageNo ? prePageNo : pageNo;
this.pageSize = prePageSize ? prePageSize : this.state.pageSize;
const params = {
dataId: this.dataId,
group: this.group,
appName: this.appName,
config_tags: this.state.config_tags.join(','),
pageNo,
pageSize: this.state.pageSize,
pageNo: prePageNo ? prePageNo : pageNo,
pageSize: prePageSize ? prePageSize : this.state.pageSize,
tenant: this.tenant,
};
setParams('pageSize', null);
setParams('pageNo', null);
if (this.dataId.indexOf('*') !== -1 || this.group.indexOf('*') !== -1) {
params.search = 'blur';
} else {
Expand Down Expand Up @@ -511,7 +517,7 @@ class ConfigurationManagement extends React.Component {
record.group
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&searchDataId=${
this.dataId
}&searchGroup=${this.group}`
}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${this.pageNo}`
);
}

Expand All @@ -523,7 +529,9 @@ class ConfigurationManagement extends React.Component {
record.group
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&edasAppId=${
this.edasAppId
}&searchDataId=${this.dataId}&searchGroup=${this.group}`
}&searchDataId=${this.dataId}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${
this.pageNo
}`
);
}

Expand Down