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') {
|
if (val === 'edit') {
|
||||||
handleEditCluster(row);
|
handleEditCluster(row);
|
||||||
} else if (val === 'delete') {
|
} else if (val === 'delete') {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const clusterActionList = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const useClusterColumns = (
|
const useClusterColumns = (
|
||||||
handleSelect: (val: string, record: ClusterListItem) => void,
|
handleSelect: (val: string, record: ClusterListItem, item?: any) => void,
|
||||||
onCellClick?: (record: ClusterListItem, dataIndex: string) => void
|
onCellClick?: (record: ClusterListItem, dataIndex: string) => void
|
||||||
): SealColumnProps[] => {
|
): SealColumnProps[] => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
@@ -251,7 +251,9 @@ const useClusterColumns = (
|
|||||||
render: (value: string, record: ClusterListItem) => (
|
render: (value: string, record: ClusterListItem) => (
|
||||||
<DropdownButtons
|
<DropdownButtons
|
||||||
items={setActionsItems(record)}
|
items={setActionsItems(record)}
|
||||||
onSelect={(val) => handleSelect(val, record)}
|
onSelect={(val: string, item: any) =>
|
||||||
|
handleSelect(val, record, item)
|
||||||
|
}
|
||||||
></DropdownButtons>
|
></DropdownButtons>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export async function downloadWorkerPrivateKey({
|
|||||||
export async function queryWorkersList<T extends Record<string, any>>(
|
export async function queryWorkersList<T extends Record<string, any>>(
|
||||||
params: Global.SearchParams & T,
|
params: Global.SearchParams & T,
|
||||||
options?: {
|
options?: {
|
||||||
token: any;
|
token?: any;
|
||||||
skipErrorHandler?: boolean;
|
skipErrorHandler?: boolean;
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user