Merge branch '14813-cluster-config'
[arvados.git] / src / views / compute-node-panel / compute-node-panel.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { RootState } from '~/store/store';
6 import { Dispatch } from 'redux';
7 import { connect } from 'react-redux';
8 import {
9     ComputeNodePanelRoot,
10     ComputeNodePanelRootDataProps,
11     ComputeNodePanelRootActionProps
12 } from '~/views/compute-node-panel/compute-node-panel-root';
13 import { openComputeNodeContextMenu } from '~/store/context-menu/context-menu-actions';
14
15 const mapStateToProps = (state: RootState): ComputeNodePanelRootDataProps => {
16     return {
17         resources: state.resources
18     };
19 };
20
21 const mapDispatchToProps = (dispatch: Dispatch): ComputeNodePanelRootActionProps => ({
22     onContextMenu: (event, resourceUuid) => {
23         dispatch<any>(openComputeNodeContextMenu(event, resourceUuid));
24     },
25     onItemClick: (resourceUuid: string) => { return; },
26     onItemDoubleClick: uuid => { return; }
27 });
28
29 export const ComputeNodePanel = connect(mapStateToProps, mapDispatchToProps)(ComputeNodePanelRoot);