14
14
* limitations under the License.
15
15
*/
16
16
17
- import {
18
- DeploymentConfigDiffRadioSelect ,
19
- DeploymentWithConfigType ,
20
- Progressing ,
21
- Tooltip ,
22
- } from '@devtron-labs/devtron-fe-common-lib'
17
+ import { DeploymentConfigDiffRadioSelect , Icon , Tooltip } from '@devtron-labs/devtron-fe-common-lib'
23
18
24
19
import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
25
20
@@ -33,13 +28,9 @@ export const PipelineConfigDiffStatusTile = ({
33
28
noLastDeploymentConfig,
34
29
onClick,
35
30
canReviewConfig,
36
- urlFilters,
37
31
renderConfigNotAvailableTooltip,
38
32
radioSelectConfig,
39
33
} : PipelineConfigDiffStatusTileProps ) => {
40
- const { deploy } = urlFilters
41
- const lastDeployedOptionSelected = deploy === DeploymentWithConfigType . LATEST_TRIGGER_CONFIG
42
- const lastSavedConfigOptionSelected = deploy === DeploymentWithConfigType . LAST_SAVED_CONFIG
43
34
const _canReviewConfig = canReviewConfig && ! noLastDeploymentConfig
44
35
45
36
// RENDERERS
@@ -68,20 +59,12 @@ export const PipelineConfigDiffStatusTile = ({
68
59
const renderConfigViewState = ( ) => ( _canReviewConfig ? renderDiffState ( ) : renderConfigNotAvailableState ( ) )
69
60
70
61
const renderReviewState = ( ) =>
71
- _canReviewConfig || lastDeployedOptionSelected || noLastDeploymentConfig ? (
72
- < span className = "cb-5 mt-3 mb-3" > REVIEW</ span >
73
- ) : null
62
+ _canReviewConfig || noLastDeploymentConfig ? < span className = "cb-5 mt-3 mb-3" > REVIEW</ span > : null
74
63
75
64
const renderLoadingState = ( ) => (
76
65
< span className = "dc__border-radius-24 flex dc__gap-4 py-3 px-12 fs-12 fw-6 lh-20 cn-0 bcb-5" >
77
66
< span > Checking diff</ span >
78
- < Progressing
79
- size = { 16 }
80
- fillColor = "white"
81
- styles = { {
82
- width : 'auto' ,
83
- } }
84
- />
67
+ < Icon name = "ic-circle-loader" color = "N0" />
85
68
</ span >
86
69
)
87
70
@@ -92,7 +75,7 @@ export const PipelineConfigDiffStatusTile = ({
92
75
< DeploymentConfigDiffRadioSelect radioSelectConfig = { radioSelectConfig } position = "top" />
93
76
</ div >
94
77
< Tooltip
95
- alwaysShowTippyOnHover = { ! isLoading && ! lastDeployedOptionSelected && ! noLastDeploymentConfig }
78
+ alwaysShowTippyOnHover = { ! isLoading && ! noLastDeploymentConfig }
96
79
content = {
97
80
noLastDeploymentConfig
98
81
? renderConfigNotAvailableTooltip ( )
@@ -107,11 +90,7 @@ export const PipelineConfigDiffStatusTile = ({
107
90
disabled = { isLoading || ! canReviewConfig }
108
91
onClick = { onClick }
109
92
>
110
- { ! lastDeployedOptionSelected &&
111
- ! noLastDeploymentConfig &&
112
- ( isLoading && ! lastSavedConfigOptionSelected
113
- ? renderLoadingState ( )
114
- : renderConfigViewState ( ) ) }
93
+ { ! noLastDeploymentConfig && ( isLoading ? renderLoadingState ( ) : renderConfigViewState ( ) ) }
115
94
{ renderReviewState ( ) }
116
95
</ button >
117
96
</ div >
0 commit comments