-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnvAndUserGroupNew.js
More file actions
375 lines (347 loc) · 13 KB
/
Copy pathEnvAndUserGroupNew.js
File metadata and controls
375 lines (347 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
import React, { useState } from "react";
import PropTypes from 'prop-types';
import Dialog from '@mui/material/Dialog';
import { makeStyles } from '@mui/styles';
import { color } from "highcharts";
import NewChip from "../../../../components/newChip/NewChip";
const MachineFailure = (props) => {
const classes = useStyles();
const { open, handleClose } = props;
// Sample data - replace with your actual data
const executionData = [
{
service: 'Service-1', status: <NewChip
label={"Failed"}
variant={"error"}
shape="standard"
/>, reason: 'Canary is Already Running Via Pipeline: New_2024'
},
{
service: 'Service-2', status: <NewChip
label={"DIDN'T RUN"}
variant={"light"}
shape="standard"
/>, reason: '-'
},
{
service: 'Service-3', status: <NewChip
label={"DIDN'T RUN"}
variant={"light"}
shape="standard"
/>, reason: '-'
},
];
return (
<Dialog
fullWidth={true}
maxWidth={'md'}
open={open}
onClose={handleClose}
className={`${classes.root} dialog-align-corner`}
aria-labelledby="max-width-dialog-title"
>
<div className='d-grid ml-auto dialog-sub-component' style={{ gridTemplateColumns: '396px 650px' }}>
{
<div className={'left-panel-dialog-down'}>
</div>
}
<div className='right-panel-dialog bg-white'>
<>
{/* ... header ... */}
<div className='font-18 font-weight-600 color-white d-flex align-center space-between' style={{ backgroundColor: '#0086ff', padding: '13.5px 20px' }}>
<p>Manage Failure</p>
<button
className='btn float-cancel-button'
style={{ left: '396px' }}
onClick={handleClose}
>
<span className='ri-close-line'></span>
</button>
</div>
<div className='d-flex align-center space-between' style={{ padding: '20px 20px' }}>
<p>Job has failed with the following details:</p>
</div>
{/* Table Section */}
<div
className="body-panel-new-one"
style={{ padding: '0 0px 0px 20px' }}
>
<div className={classes.tableContainer}>
{/* ... table content ... */}
<div className={classes.tableHeader}>
<span className={classes.headerTitle}>
Execution details for deploy job
</span>
<span className={classes.stagingBadge}>
<NewChip
label={"Staging"}
variant={"highlight2"}
shape="standard"
/>
</span>
</div>
<table className={classes.table}>
<thead>
<tr>
<th>Service</th>
<th>Status</th>
<th>Reason</th>
</tr>
</thead>
<tbody>
{executionData.map((row, index) => (
<tr key={index}>
<td>{row.service}</td>
<td>
<span className={row.status === 'FAILED' ? classes.statusFailed : classes.statusDidntRun}>
{row.status}
</span>
</td>
<td>
{row.reason !== '-' ? (
<>
{row.reason.split('New_2024')[0]}
{row.reason.includes('New_2024') && (
<span className={classes.linkText}>New_2024</span>
)}
</>
) : (
row.reason
)}
</td>
</tr>
))}
</tbody>
</table>
</div>
<div>
<div className={classes.noteContainer}>
<div className={classes.noteHeader}>
<span className="ri-information-line font-24"></span>
<span className={classes.noteTitle}>PLEASE NOTE</span>
</div>
<div className={classes.noteBody}>
<p>
On pipeline failure, there are three ways of recovering from failure.
</p>
<ol>
<li>Re-run the failed job</li>
<li>Continue to next job with failure</li>
<li>Complete Rollback to baseline</li>
</ol>
</div>
</div>
</div>
<div className='footer-right-panel d-flex align-center justify-end' style={{ gap: '5px', marginTop: '20px' }}>
<button className='btn btn-outlined d-flex align-center justify-center btn-semi-bold' style={{ color: '#124D9B' }}>CONTINUE WITH FAILURE</button>
<button className='btn btn-secondary d-flex align-center justify-center btn-semi-bold' style={{ backgroundColor: '#FEA111' }}>COMPLETE ROLLBACK</button>
<button className='btn btn-primary d-flex align-center justify-center btn-semi-bold' >RE-RUN JOB</button>
</div>
</div>
</>
</div >
</div >
</Dialog >
);
};
MachineFailure.propTypes = {
open: PropTypes.bool,
handleClose: PropTypes.func,
}
export default MachineFailure;
const useStyles = makeStyles((theme) => ({
root: {
'&.dialog-align-corner': {
'& .MuiPaper-root': {
maxWidth: '1100px'
}
},
'& .input-with-icon': {
position: 'relative',
'& .cent-icon': {
width: '40px',
height: '44px',
backgroundColor: '#fafafa',
position: 'absolute',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: '14px',
fontWeight: 500,
top: '22px',
right: '1px',
borderRadius: '0px 4px 4px 0px',
borderLeft: '1px solid #b7b7b7'
}
},
'& .left-panel-dialog': {
width: '396px',
transition: 'width 5s',
'& .left-panel-header': {
borderBottom: '1px solid #f1f1f1'
},
'& .checkbox-only-divi': {
position: 'absolute',
bottom: '10px'
},
},
'& .left-panel-dialog-down': {
width: '0px',
overflow: 'hidden',
transition: `'width 5s', 'overflow 1s'`,
},
'& .body-panel-new-one': {
padding: '10px 16px',
height: 'calc(100vh - 120px)',
overflowY: 'auto',
position: 'relative',
},
'& .footer-right-panel': {
//backgroundColor: '#fafafa',
padding: '16px',
// position: 'absolute', // Removed absolute positioning
// bottom: '0px', // Removed bottom alignment
width: '100%', // Changed to 100% to fit container
'& .btn-semi-bold': {
fontFamily: 'Montserrat, sans-serif',
fontWeight: 600,
fontSize: '12px',
textTransform: 'uppercase',
lineHeight: '1',
height: '40px',
padding: '8px 16px',
border: 'none',
borderRadius: '6px',
textShadow: '0px 2px 1px rgba(0, 0, 0, 0.25)'
},
'& .btn-outlined': {
backgroundColor: '#ffffff',
border: '1px solid #9DC0EE',
textShadow: 'none'
},
}
},
tableContainer: {
border: '1px solid #e0e0e0',
borderRadius: '4px',
overflow: 'hidden',
marginRight: '20px'
},
noteContainer: {
border: '1px solid #e0e0e0',
borderRadius: '4px',
overflow: 'hidden',
marginTop: '24px',
background: '#DFEDFF',
marginRight: '20px'
},
tableHeader: {
//backgroundColor: 'none',
display: 'flex',
alignItems: 'center',
padding: '12px 16px',
borderBottom: '1px solid #e0e0e0',
fontSize: '14px',
fontWeight: 600,
//width:'521px'
},
noteHeader: {
//backgroundColor: 'none',
display: 'flex',
alignItems: 'center',
color: '#0086FF',
padding: '12px 6px 0 12px',
//borderBottom: '1px solid #e0e0e0',
fontSize: '14px',
fontWeight: 700,
//width:'521px'
},
headerContent: {
display: 'inline-flex',
alignItems: 'center',
gap: '8px',
},
headerTitle: {
fontSize: '14px',
fontWeight: 600,
color: '#333',
},
noteTitle: {
fontSize: '14px',
fontWeight: 600,
color: '#0086FF',
marginLeft: '12px'
},
noteBody: {
padding: '0 12px 16px 41px',
fontSize: '13px',
color: '#0086FF',
marginLeft: '10px',
'& p': {
margin: '0 0 18px 0',
},
'& ol': {
paddingLeft: '16px',
margin: 0,
},
'& li': {
marginBottom: '3px',
color: '#0086FF',
cursor: 'pointer',
},
},
stagingBadge: {
//backgroundColor: '#FFE8F5',
marginLeft: 'auto',
//color: '#E91E8C',
fontSize: '12px',
fontWeight: 700,
padding: '2px 8px',
//borderRadius: '3px',
},
table: {
width: '100%',
borderCollapse: 'collapse',
'& thead': {
backgroundColor: '#fafafa',
'& th': {
padding: '12px 16px',
textAlign: 'left',
fontSize: '12px',
fontWeight: 700,
color: '#2F2F2F',
borderBottom: '1px solid #e0e0e0',
}
},
'& tbody': {
'& tr': {
borderBottom: '1px solid #e0e0e0',
'&:last-child': {
borderBottom: 'none',
}
},
'& td': {
padding: '12px 16px',
fontSize: '13px',
color: '#333',
}
}
},
statusFailed: {
color: '#E53935',
fontWeight: 600,
fontSize: '12px',
},
statusDidntRun: {
color: '#999',
fontWeight: 600,
fontSize: '12px',
},
linkText: {
color: '#0086ff',
cursor: 'pointer',
'&:hover': {
textDecoration: 'underline',
}
}
}));