1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(app): migrate app parent view to react [EE-5361] (#10086)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-08-27 23:01:35 +02:00 committed by GitHub
parent 531f88b947
commit 841ca1ebd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 1448 additions and 810 deletions

View file

@ -0,0 +1,5 @@
import { createColumnHelper } from '@tanstack/react-table';
import { NodePlacementRowData } from '../../types';
export const columnHelper = createColumnHelper<NodePlacementRowData>();

View file

@ -0,0 +1,15 @@
import { buildExpandColumn } from '@@/datatables/expand-column';
import { NodePlacementRowData } from '../../types';
import { columnHelper } from './helper';
import { status } from './status';
export const columns = [
buildExpandColumn<NodePlacementRowData>(),
status,
columnHelper.accessor('name', {
header: 'Node',
id: 'node',
}),
];

View file

@ -0,0 +1,25 @@
import { Check, X } from 'lucide-react';
import { Icon } from '@@/Icon';
import { columnHelper } from './helper';
export const status = columnHelper.accessor('acceptsApplication', {
header: '',
id: 'status',
enableSorting: false,
cell: ({ getValue }) => {
const acceptsApplication = getValue();
return (
<Icon
icon={acceptsApplication ? Check : X}
mode={acceptsApplication ? 'success' : 'danger'}
size="sm"
/>
);
},
meta: {
width: 30,
},
enableResizing: false,
});