feat(cluster): resource topology entrance
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user