1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch, compose } from 'redux';
6 import { connect } from "react-redux";
7 import { ConfirmationDialog } from "~/components/confirmation-dialog/confirmation-dialog";
8 import { withDialog, WithDialogProps } from "~/store/dialog/with-dialog";
9 import { COMPUTE_NODE_REMOVE_DIALOG, removeComputeNode } from '~/store/compute-nodes/compute-nodes-actions';
11 const mapDispatchToProps = (dispatch: Dispatch, props: WithDialogProps<any>) => ({
14 dispatch<any>(removeComputeNode(props.data.uuid));
18 export const RemoveComputeNodeDialog = compose(
19 withDialog(COMPUTE_NODE_REMOVE_DIALOG),
20 connect(null, mapDispatchToProps)
21 )(ConfirmationDialog);