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';
10 ComputeNodePanelRootDataProps,
11 ComputeNodePanelRootActionProps
12 } from '~/views/compute-node-panel/compute-node-panel-root';
13 import { openComputeNodeContextMenu } from '~/store/context-menu/context-menu-actions';
15 const mapStateToProps = (state: RootState): ComputeNodePanelRootDataProps => {
17 resources: state.resources
21 const mapDispatchToProps = (dispatch: Dispatch): ComputeNodePanelRootActionProps => ({
22 onContextMenu: (event, resourceUuid) => {
23 dispatch<any>(openComputeNodeContextMenu(event, resourceUuid));
25 onItemClick: (resourceUuid: string) => { return; },
26 onItemDoubleClick: uuid => { return; }
29 export const ComputeNodePanel = connect(mapStateToProps, mapDispatchToProps)(ComputeNodePanelRoot);