Skip to content

Commit 206dad4

Browse files
fixed
1 parent 96b58c3 commit 206dad4

File tree

5 files changed

+114
-98
lines changed

5 files changed

+114
-98
lines changed

src/ui/layouts/pipelines/RunDetail/Configuration/index.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22

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';
610

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';
1115

12-
import styles from './index.module.scss';
16+
// import styles from './index.module.scss';
1317
import { useService } from './useService';
1418
import { NonEditableRunConfig } from '../../../NonEditableRunConfig';
1519

1620
export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
17-
const { downloadYamlFile, pipelineConfig, run } = useService({ runId });
18-
const [hover, setHover] = useState(false);
19-
const dispatch = useDispatch();
20-
const handleCopy = () => {
21-
navigator.clipboard.writeText(pipelineConfig);
22-
dispatch(
23-
showToasterAction({
24-
description: 'Config copied to clipboard',
25-
type: toasterTypes.success,
26-
}),
27-
);
28-
};
21+
const { run } = useService({ runId });
22+
// const [hover, setHover] = useState(false);
23+
// const dispatch = useDispatch();
24+
// const handleCopy = () => {
25+
// navigator.clipboard.writeText(pipelineConfig);
26+
// dispatch(
27+
// showToasterAction({
28+
// description: 'Config copied to clipboard',
29+
// type: toasterTypes.success,
30+
// }),
31+
// );
32+
// };
2933

3034
return (
3135
<FlexBox.Column fullWidth>
3236
<NonEditableRunConfig
3337
runConfiguration={run.pipelineConfiguration}
3438
></NonEditableRunConfig>
35-
<FlexBox
39+
{/* <FlexBox
3640
marginBottom="md"
3741
alignItems="center"
3842
justifyContent="space-between"
@@ -71,7 +75,7 @@ export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
7175
>
7276
{pipelineConfig}
7377
</SyntaxHighlighter>
74-
</FlexBox>
78+
</FlexBox> */}
7579
</FlexBox.Column>
7680
);
7781
};

src/ui/layouts/runs/RunDetail/Configuration/index.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22

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';
610

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';
1115

12-
import styles from './index.module.scss';
16+
// import styles from './index.module.scss';
1317
import { useService } from './useService';
1418

1519
import { NonEditableRunConfig } from '../../../NonEditableRunConfig';
1620

1721
export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
18-
const { downloadYamlFile, pipelineConfig, run } = useService({ runId });
19-
const [hover, setHover] = useState(false);
20-
const dispatch = useDispatch();
21-
const handleCopy = () => {
22-
navigator.clipboard.writeText(pipelineConfig);
23-
dispatch(
24-
showToasterAction({
25-
description: 'Config copied to clipboard',
26-
type: toasterTypes.success,
27-
}),
28-
);
29-
};
22+
const { run } = useService({ runId });
23+
// const [hover, setHover] = useState(false);
24+
// const dispatch = useDispatch();
25+
// const handleCopy = () => {
26+
// navigator.clipboard.writeText(pipelineConfig);
27+
// dispatch(
28+
// showToasterAction({
29+
// description: 'Config copied to clipboard',
30+
// type: toasterTypes.success,
31+
// }),
32+
// );
33+
// };
3034

3135
return (
3236
<FlexBox.Column fullWidth>
3337
<NonEditableRunConfig
3438
runConfiguration={run.pipelineConfiguration}
3539
></NonEditableRunConfig>
36-
<FlexBox
40+
{/* <FlexBox
3741
marginBottom="md"
3842
alignItems="center"
3943
justifyContent="space-between"
@@ -72,7 +76,7 @@ export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
7276
>
7377
{pipelineConfig}
7478
</SyntaxHighlighter>
75-
</FlexBox>
79+
</FlexBox> */}
7680
</FlexBox.Column>
7781
);
7882
};

src/ui/layouts/stackComponents/RunDetail/Configuration/index.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22

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';
610

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';
1115

12-
import styles from './index.module.scss';
16+
// import styles from './index.module.scss';
1317
import { useService } from './useService';
1418

1519
import { NonEditableRunConfig } from '../../../NonEditableRunConfig';
1620
export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
17-
const [hover, setHover] = useState(false);
18-
const { downloadYamlFile, pipelineConfig, run } = useService({ runId });
21+
// const [hover, setHover] = useState(false);
22+
const { run } = useService({ runId });
1923

20-
const dispatch = useDispatch();
21-
const handleCopy = () => {
22-
navigator.clipboard.writeText(pipelineConfig);
23-
dispatch(
24-
showToasterAction({
25-
description: 'Config copied to clipboard',
26-
type: toasterTypes.success,
27-
}),
28-
);
29-
};
24+
// const dispatch = useDispatch();
25+
// const handleCopy = () => {
26+
// navigator.clipboard.writeText(pipelineConfig);
27+
// dispatch(
28+
// showToasterAction({
29+
// description: 'Config copied to clipboard',
30+
// type: toasterTypes.success,
31+
// }),
32+
// );
33+
// };
3034

3135
return (
3236
<FlexBox.Column fullWidth>
3337
<NonEditableRunConfig
3438
runConfiguration={run.pipelineConfiguration}
3539
></NonEditableRunConfig>
36-
<FlexBox
40+
{/* <FlexBox
3741
marginBottom="md"
3842
alignItems="center"
3943
justifyContent="space-between"
@@ -72,7 +76,7 @@ export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
7276
>
7377
{pipelineConfig}
7478
</SyntaxHighlighter>
75-
</FlexBox>
79+
</FlexBox> */}
7680
</FlexBox.Column>
7781
);
7882
};

src/ui/layouts/stacks/RunDetail/Configuration/index.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,45 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22

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';
610

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';
1115

1216
// import { translate } from '../translate';
13-
import styles from './index.module.scss';
17+
// import styles from './index.module.scss';
1418
import { useService } from './useService';
1519

1620
import { NonEditableRunConfig } from '../../../NonEditableRunConfig';
1721

1822
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 });
2125

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+
// };
3236

3337
return (
3438
<FlexBox.Column fullWidth>
3539
<NonEditableRunConfig
3640
runConfiguration={run.pipelineConfiguration}
3741
></NonEditableRunConfig>
38-
<FlexBox
42+
{/* <FlexBox
3943
marginBottom="md"
4044
alignItems="center"
4145
justifyContent="space-between"
@@ -73,7 +77,7 @@ export const Configuration: React.FC<{ runId: TId }> = ({ runId }) => {
7377
>
7478
{pipelineConfig}
7579
</SyntaxHighlighter>
76-
</FlexBox>
80+
</FlexBox> */}
7781
</FlexBox.Column>
7882
);
7983
};

src/ui/layouts/stacks/StackDetail/Configuration/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export const Configuration: React.FC<{
176176
{/* <Container> */}
177177
<Box style={{ width: '30%' }}>
178178
<EditField
179-
// disabled
179+
disabled
180180
onKeyDown={(e: any) => onPressEnter(e, stack.is_shared)}
181181
onChangeText={(e: any) => onPressEnter(e, stack.is_shared)}
182182
label={'Stack Name'}
@@ -189,12 +189,12 @@ export const Configuration: React.FC<{
189189
/>
190190
</Box>
191191
<Box marginLeft="xxl2">
192-
<ToggleField
193-
name='Share Component with public'
192+
<ToggleField
193+
name="Share Component with public"
194194
value={stack.isShared}
195-
onHandleChange={() => onCallApi(stack.name, !stack.isShared)}
196-
label='Share Component with public'
197-
disabled={false}
195+
onHandleChange={() => onCallApi(stack.name, !stack.isShared)}
196+
label="Share Component with public"
197+
disabled={true}
198198
/>
199199
</Box>
200200
{/* <FlexBox

0 commit comments

Comments
 (0)