Skip to content

Commit 056ced2

Browse files
authored
Merge pull request #34 from zenml-io/talha/feedback-fixes
Talha/feedback fixes
2 parents 3ad71ec + 3c60bbc commit 056ced2

File tree

1 file changed

+71
-2
lines changed

1 file changed

+71
-2
lines changed

src/ui/components/Filters/index.tsx

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ export const getInitialFilterStateForRuns = () => {
214214
label: 'Pipeline Name',
215215
type: 'string',
216216
},
217+
{
218+
value: 'status',
219+
label: 'Status',
220+
type: 'status',
221+
},
217222
{
218223
value: 'stackName',
219224
label: 'Stack Name',
@@ -289,6 +294,26 @@ export const getInitialFilterStateForRuns = () => {
289294
label: 'false',
290295
type: 'boolean',
291296
},
297+
{
298+
value: 'completed',
299+
label: 'Completed',
300+
type: 'status',
301+
},
302+
{
303+
value: 'running',
304+
label: 'Running',
305+
type: 'status',
306+
},
307+
{
308+
value: 'failed',
309+
label: 'Failed',
310+
type: 'status',
311+
},
312+
{
313+
value: 'cached',
314+
label: 'Cached',
315+
type: 'status',
316+
},
292317
],
293318
},
294319
filterValue: '',
@@ -386,6 +411,7 @@ const FilterComponent = ({
386411

387412
return (
388413
<FlexBox.Column fullWidth>
414+
{console.log(filters)}
389415
<FlexBox
390416
fullWidth
391417
className="border border-primary rounded rounded-4 p-2 align-item-center mb-3"
@@ -405,9 +431,52 @@ const FilterComponent = ({
405431
color={iconColors.white}
406432
/>
407433
</Box>
434+
{console.log(filters)}
408435
<Box style={{ padding: '5px 0px 0px 7px' }} className="text-muted h5">
409-
{' '}
410-
Filter your stack
436+
{/* Filter your stack */}
437+
{!applyFilter && !filters[0]?.column?.selectedValue?.label
438+
? 'Filter your stack'
439+
: filters[0]?.column?.selectedValue.label && !applyFilter
440+
? filters.map((filter: any, index: number) => {
441+
return (
442+
<FlexBox.Row>
443+
<Box
444+
onClick={() => hanldeDelete(index)}
445+
style={{
446+
width: '33px',
447+
height: '33px',
448+
// background: '#8045FF',
449+
borderRadius: '4px',
450+
}}
451+
>
452+
{`${filter.column.selectedValue.label} ${filter.filterValue}`}
453+
</Box>
454+
</FlexBox.Row>
455+
);
456+
})
457+
: 'Filter your stack'}
458+
{!applyFilter && !filters[0]?.column?.selectedValue?.label ? (
459+
'Filter your stack'
460+
) : filters[0]?.column?.selectedValue.label && !applyFilter ? (
461+
<Box
462+
onClick={() => setFilter([])}
463+
style={{
464+
marginTop: '23px',
465+
width: '130px',
466+
height: '40px',
467+
border: '1px solid #c9cbd0',
468+
borderRadius: '4px',
469+
}}
470+
>
471+
<icons.delete
472+
style={{ padding: '7px 0px 0px 7px' }}
473+
size={iconSizes.md}
474+
color={iconColors.grey}
475+
/>
476+
</Box>
477+
) : (
478+
'Filter your stack'
479+
)}
411480
</Box>
412481
</FlexBox>
413482
{applyFilter && (

0 commit comments

Comments
 (0)