Skip to content

Commit

Permalink
Feature - Filtering for Jira Tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-Wood-Eric committed Sep 2, 2024
1 parent 067ccf7 commit f615bc3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-hornets-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axis-backstage/plugin-jira-dashboard': minor
---

Adding filters to the Jira Table
59 changes: 32 additions & 27 deletions plugins/jira-dashboard/src/components/JiraTable/JiraTable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from 'react';
import Typography from '@mui/material/Typography';
import { JiraDataResponse } from '@axis-backstage/plugin-jira-dashboard-common';
import { ErrorPanel, InfoCard, Table, TableFilter } from '@backstage/core-components';
import {
ErrorPanel,
InfoCard,
Table,
TableFilter,
} from '@backstage/core-components';
import { capitalize } from 'lodash';
import { columns } from './columns';

Expand Down Expand Up @@ -33,34 +38,34 @@ export const JiraTable = ({ tableContent }: Props) => {

return (
<InfoCard
title={
<Typography component="div" variant="h5" data-testid="table-header">
{`${capitalize(tableContent.name)} (${nbrOfIssues})`}
</Typography>
}
>
<Table
options={{
paging: false,
padding: 'dense',
search: true,
}}
filters={filters}
data={tableContent.issues || []}
columns={columns}
emptyContent={
<Typography display="flex" justifyContent="center" pt={30}>
No issues found&nbsp;
title={
<Typography component="div" variant="h5" data-testid="table-header">
{`${capitalize(tableContent.name)} (${nbrOfIssues})`}
</Typography>
}
style={{
height: `max-content`,
maxHeight: `500px`,
padding: '20px',
overflowY: 'auto',
width: '100%',
}}
/>
>
<Table
options={{
paging: false,
padding: 'dense',
search: true,
}}
filters={filters}
data={tableContent.issues || []}
columns={columns}
emptyContent={
<Typography display="flex" justifyContent="center" pt={30}>
No issues found&nbsp;
</Typography>
}
style={{
height: `max-content`,
maxHeight: `500px`,
padding: '20px',
overflowY: 'auto',
width: '100%',
}}
/>
</InfoCard>
);
};

0 comments on commit f615bc3

Please sign in to comment.