* keep query criteria * configlist_returnpage_bug_fix
This commit is contained in:
parent
ee8da9ba6f
commit
49ff59ef67
@ -185,23 +185,31 @@ class ClusterNodeList extends React.Component {
|
|||||||
width="20%"
|
width="20%"
|
||||||
cell={function(value, index, record) {
|
cell={function(value, index, record) {
|
||||||
if (value === 'UP') {
|
if (value === 'UP') {
|
||||||
return (<Tag key={`p_p_${value}`} type="primary" color="green">
|
return (
|
||||||
{value}
|
<Tag key={`p_p_${value}`} type="primary" color="green">
|
||||||
</Tag>);
|
{value}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (value === 'DOWN') {
|
if (value === 'DOWN') {
|
||||||
return (<Tag key={`p_p_${value}`} type="primary" color="red">
|
return (
|
||||||
{value}
|
<Tag key={`p_p_${value}`} type="primary" color="red">
|
||||||
</Tag>);
|
{value}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (value === 'SUSPICIOUS') {
|
if (value === 'SUSPICIOUS') {
|
||||||
return (<Tag key={`p_p_${value}`} type="primary" color="orange">
|
return (
|
||||||
{value}
|
<Tag key={`p_p_${value}`} type="primary" color="orange">
|
||||||
</Tag>);
|
{value}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return (<Tag key={`p_p_${value}`} type="primary" color="turquoise">
|
return (
|
||||||
{value}
|
<Tag key={`p_p_${value}`} type="primary" color="turquoise">
|
||||||
</Tag>);
|
{value}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Column
|
<Column
|
||||||
@ -210,13 +218,17 @@ class ClusterNodeList extends React.Component {
|
|||||||
width="50%"
|
width="50%"
|
||||||
cell={function(value, index, record) {
|
cell={function(value, index, record) {
|
||||||
function showCollapse() {
|
function showCollapse() {
|
||||||
const collapse = (<Collapse>
|
const collapse = (
|
||||||
<Panel title="节点元数据">
|
<Collapse>
|
||||||
<ul>
|
<Panel title="节点元数据">
|
||||||
<li><pre>{JSON.stringify(value, null, 4)}</pre></li>
|
<ul>
|
||||||
</ul>
|
<li>
|
||||||
</Panel>
|
<pre>{JSON.stringify(value, null, 4)}</pre>
|
||||||
</Collapse>);
|
</li>
|
||||||
|
</ul>
|
||||||
|
</Panel>
|
||||||
|
</Collapse>
|
||||||
|
);
|
||||||
return collapse;
|
return collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ class ConfigDetail extends React.Component {
|
|||||||
this.tenant = getParams('namespace') || '';
|
this.tenant = getParams('namespace') || '';
|
||||||
this.searchDataId = getParams('searchDataId') || '';
|
this.searchDataId = getParams('searchDataId') || '';
|
||||||
this.searchGroup = getParams('searchGroup') || '';
|
this.searchGroup = getParams('searchGroup') || '';
|
||||||
|
this.pageSize = getParams('pageSize');
|
||||||
|
this.pageNo = getParams('pageNo');
|
||||||
// this.params = window.location.hash.split('?')[1]||'';
|
// this.params = window.location.hash.split('?')[1]||'';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,6 +151,8 @@ class ConfigDetail extends React.Component {
|
|||||||
group: this.searchGroup,
|
group: this.searchGroup,
|
||||||
dataId: this.searchDataId,
|
dataId: this.searchDataId,
|
||||||
namespace: this.tenant,
|
namespace: this.tenant,
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -318,8 +318,17 @@ class ConfigEditor extends React.Component {
|
|||||||
const namespace = getParams('namespace');
|
const namespace = getParams('namespace');
|
||||||
const group = getParams('searchGroup') || '';
|
const group = getParams('searchGroup') || '';
|
||||||
const dataId = getParams('searchDataId') || '';
|
const dataId = getParams('searchDataId') || '';
|
||||||
|
const pageSize = getParams('pageSize');
|
||||||
|
const pageNo = getParams('pageNo');
|
||||||
this.props.history.push(
|
this.props.history.push(
|
||||||
generateUrl('/configurationManagement', { serverId, group, dataId, namespace })
|
generateUrl('/configurationManagement', {
|
||||||
|
serverId,
|
||||||
|
group,
|
||||||
|
dataId,
|
||||||
|
namespace,
|
||||||
|
pageSize,
|
||||||
|
pageNo,
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class ConfigurationManagement extends React.Component {
|
|||||||
value: '',
|
value: '',
|
||||||
visible: false,
|
visible: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 10,
|
pageSize: getParams('pageSize') ? getParams('pageSize') : 10,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
fieldValue: [],
|
fieldValue: [],
|
||||||
@ -252,15 +252,21 @@ class ConfigurationManagement extends React.Component {
|
|||||||
}
|
}
|
||||||
this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数
|
this.tenant = getParams('namespace') || ''; // 为当前实例保存tenant参数
|
||||||
this.serverId = getParams('serverId') || '';
|
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 = {
|
const params = {
|
||||||
dataId: this.dataId,
|
dataId: this.dataId,
|
||||||
group: this.group,
|
group: this.group,
|
||||||
appName: this.appName,
|
appName: this.appName,
|
||||||
config_tags: this.state.config_tags.join(','),
|
config_tags: this.state.config_tags.join(','),
|
||||||
pageNo,
|
pageNo: prePageNo ? prePageNo : pageNo,
|
||||||
pageSize: this.state.pageSize,
|
pageSize: prePageSize ? prePageSize : this.state.pageSize,
|
||||||
tenant: this.tenant,
|
tenant: this.tenant,
|
||||||
};
|
};
|
||||||
|
setParams('pageSize', null);
|
||||||
|
setParams('pageNo', null);
|
||||||
if (this.dataId.indexOf('*') !== -1 || this.group.indexOf('*') !== -1) {
|
if (this.dataId.indexOf('*') !== -1 || this.group.indexOf('*') !== -1) {
|
||||||
params.search = 'blur';
|
params.search = 'blur';
|
||||||
} else {
|
} else {
|
||||||
@ -514,7 +520,7 @@ class ConfigurationManagement extends React.Component {
|
|||||||
record.group
|
record.group
|
||||||
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&searchDataId=${
|
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&searchDataId=${
|
||||||
this.dataId
|
this.dataId
|
||||||
}&searchGroup=${this.group}`
|
}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${this.pageNo}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,7 +532,9 @@ class ConfigurationManagement extends React.Component {
|
|||||||
record.group
|
record.group
|
||||||
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&edasAppId=${
|
}&namespace=${this.tenant}&edasAppName=${this.edasAppName}&edasAppId=${
|
||||||
this.edasAppId
|
this.edasAppId
|
||||||
}&searchDataId=${this.dataId}&searchGroup=${this.group}`
|
}&searchDataId=${this.dataId}&searchGroup=${this.group}&pageSize=${this.pageSize}&pageNo=${
|
||||||
|
this.pageNo
|
||||||
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user