1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { RootState } from '~/store/store';
6 import { Dispatch } from 'redux';
7 import { connect } from 'react-redux';
8 import { } from '~/store/compute-nodes/compute-nodes-actions';
11 ComputeNodePanelRootDataProps,
12 ComputeNodePanelRootActionProps
13 } from '~/views/compute-node-panel/compute-node-panel-root';
14 import { openComputeNodeContextMenu } from '~/store/context-menu/context-menu-actions';
16 const mapStateToProps = (state: RootState): ComputeNodePanelRootDataProps => {
18 computeNodes: state.computeNodes,
19 hasComputeNodes: state.computeNodes.length > 0
23 const mapDispatchToProps = (dispatch: Dispatch): ComputeNodePanelRootActionProps => ({
24 openRowOptions: (event, computeNode) => {
25 dispatch<any>(openComputeNodeContextMenu(event, computeNode));
29 export const ComputeNodePanel = connect(mapStateToProps, mapDispatchToProps)(ComputeNodePanelRoot);