feat(cluster): resource topology entrance

This commit is contained in:
jialin
2026-06-26 22:14:37 +08:00
committed by jialin
parent e37828a2cd
commit 8b34f68824
3 changed files with 10 additions and 4 deletions
+5 -1
View File
@@ -194,7 +194,11 @@ const Clusters: React.FC = () => {
});
};
const handleSelect = useMemoizedFn((val: any, row: ListItem) => {
const handleSelect = useMemoizedFn((val: any, row: ListItem, item?: any) => {
if (item?.onClick) {
item.onClick(row);
return;
}
if (val === 'edit') {
handleEditCluster(row);
} else if (val === 'delete') {
@@ -85,7 +85,7 @@ const clusterActionList = [
];
const useClusterColumns = (
handleSelect: (val: string, record: ClusterListItem) => void,
handleSelect: (val: string, record: ClusterListItem, item?: any) => void,
onCellClick?: (record: ClusterListItem, dataIndex: string) => void
): SealColumnProps[] => {
const intl = useIntl();
@@ -251,7 +251,9 @@ const useClusterColumns = (
render: (value: string, record: ClusterListItem) => (
<DropdownButtons
items={setActionsItems(record)}
onSelect={(val) => handleSelect(val, record)}
onSelect={(val: string, item: any) =>
handleSelect(val, record, item)
}
></DropdownButtons>
)
}
+1 -1
View File
@@ -44,7 +44,7 @@ export async function downloadWorkerPrivateKey({
export async function queryWorkersList<T extends Record<string, any>>(
params: Global.SearchParams & T,
options?: {
token: any;
token?: any;
skipErrorHandler?: boolean;
}
) {