Skip to content

Commit

Permalink
fix: ui dashboard not showing tags (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm authored Jan 4, 2025
1 parent f560d95 commit 56c3aaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dkron/ui-dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
window.DKRON_FAILED_JOBS = {{.DKRON_FAILED_JOBS}};
window.DKRON_UNTRIGGERED_JOBS = {{.DKRON_UNTRIGGERED_JOBS}};
window.DKRON_ACL_ENABLED = {{.DKRON_ACL_ENABLED}};</script>
<script type="module" crossorigin src="./assets/index-24692354.js"></script>
<script type="module" crossorigin src="./assets/index-a0a8ac74.js"></script>
<link rel="stylesheet" href="./assets/index-73a69410.css">
</head>

Expand Down
7 changes: 3 additions & 4 deletions ui/src/TagsField.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Chip } from '@mui/material';
import { useRecordContext } from 'react-admin';

export const TagsField = ({ record }: any) => {
export const TagsField = () => {
const record = useRecordContext();
if (record === undefined) {
return null
} else {
Expand All @@ -11,6 +13,3 @@ export const TagsField = ({ record }: any) => {
</ul>
}
};
TagsField.defaultProps = {
addLabel: true
};
2 changes: 1 addition & 1 deletion ui/src/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Dashboard = () => (
<TextField source="Addr" sortable={false} />
<TextField source="Port" sortable={false} />
<TextField label="Status" source="statusText" sortable={false} />
<TagsField source="Tags" sortable={false} />
<TagsField source="Tags" />
</Datagrid>
</List>
</CardContent>
Expand Down

0 comments on commit 56c3aaa

Please sign in to comment.