|
1 | | -import React, { useState } from 'react'; |
| 1 | +import React from 'react'; |
2 | 2 |
|
3 | | -import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; |
4 | | -import { okaidia } from 'react-syntax-highlighter/dist/esm/styles/prism'; |
5 | | -import { Box, FlexBox, H4, GhostButton, icons } from '../../../../components'; |
| 3 | +// import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; |
| 4 | +// import { okaidia } from 'react-syntax-highlighter/dist/esm/styles/prism'; |
| 5 | +import { |
| 6 | + // Box, |
| 7 | + FlexBox, |
| 8 | + // H4, GhostButton, icons |
| 9 | +} from '../../../../components'; |
6 | 10 |
|
7 | | -import { useDispatch } from '../../../../hooks'; |
8 | | -import { showToasterAction } from '../../../../../redux/actions'; |
9 | | -import { toasterTypes } from '../../../../../constants'; |
10 | | -import { iconColors, iconSizes } from '../../../../../constants'; |
| 11 | +// import { useDispatch } from '../../../../hooks'; |
| 12 | +// import { showToasterAction } from '../../../../../redux/actions'; |
| 13 | +// import { toasterTypes } from '../../../../../constants'; |
| 14 | +// import { iconColors, iconSizes } from '../../../../../constants'; |
11 | 15 |
|
12 | 16 | // import { translate } from '../translate'; |
13 | | -import styles from './index.module.scss'; |
| 17 | +// import styles from './index.module.scss'; |
14 | 18 | import { useService } from './useService'; |
15 | 19 |
|
16 | 20 | import { NonEditableRunConfig } from '../../../NonEditableRunConfig'; |
17 | 21 |
|
18 | 22 | export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => { |
19 | | - const [hover, setHover] = useState(false); |
20 | | - const { downloadYamlFile, pipelineConfig, run } = useService({ runId }); |
| 23 | + // const [hover, setHover] = useState(false); |
| 24 | + const { run } = useService({ runId }); |
21 | 25 |
|
22 | | - const dispatch = useDispatch(); |
23 | | - const handleCopy = () => { |
24 | | - navigator.clipboard.writeText(pipelineConfig); |
25 | | - dispatch( |
26 | | - showToasterAction({ |
27 | | - description: 'Config copied to clipboard', |
28 | | - type: toasterTypes.success, |
29 | | - }), |
30 | | - ); |
31 | | - }; |
| 26 | + // const dispatch = useDispatch(); |
| 27 | + // const handleCopy = () => { |
| 28 | + // navigator.clipboard.writeText(pipelineConfig); |
| 29 | + // dispatch( |
| 30 | + // showToasterAction({ |
| 31 | + // description: 'Config copied to clipboard', |
| 32 | + // type: toasterTypes.success, |
| 33 | + // }), |
| 34 | + // ); |
| 35 | + // }; |
32 | 36 |
|
33 | 37 | return ( |
34 | 38 | <FlexBox.Column fullWidth> |
35 | 39 | <NonEditableRunConfig |
36 | 40 | runConfiguration={run.pipelineConfiguration} |
37 | 41 | ></NonEditableRunConfig> |
38 | | - <FlexBox |
| 42 | + {/* <FlexBox |
39 | 43 | marginBottom="md" |
40 | 44 | alignItems="center" |
41 | 45 | justifyContent="space-between" |
@@ -73,7 +77,7 @@ export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => { |
73 | 77 | > |
74 | 78 | {pipelineConfig} |
75 | 79 | </SyntaxHighlighter> |
76 | | - </FlexBox> |
| 80 | + </FlexBox> */} |
77 | 81 | </FlexBox.Column> |
78 | 82 | ); |
79 | 83 | }; |
0 commit comments