fix: replicas, ready_replicas sorting

This commit is contained in:
jialin
2025-12-23 18:35:33 +08:00
parent 9e019a98f6
commit 530e8f7537
18 changed files with 106 additions and 77 deletions
@@ -105,9 +105,8 @@ const useModelsColumns = ({
<QuestionCircleOutlined className="m-l-5" />
</Tooltip>
),
dataIndex: 'ready_replicas',
key: 'ready_replicas',
dataField: 'replicas',
dataIndex: 'replicas',
key: 'replicas',
align: 'left',
sorter: tableSorter(4),
span: 4,
+8 -1
View File
@@ -316,7 +316,14 @@ const Models: React.FC = () => {
};
const handleOnSortChange = (order: TableOrder | Array<TableOrder>) => {
const sortKeys = handleMultiSortChange(order);
let orderList = Array.isArray(order) ? order : [order];
if (orderList[0].columnKey === 'replicas') {
orderList.push({
columnKey: 'ready_replicas',
order: orderList[0].order
});
}
const sortKeys = handleMultiSortChange(orderList);
setQueryParams((pre: any) => {
return {
...pre,