UNPKG

@digital-ai/plugin-dai-deploy

Version:

Frontend functionalities for the dai-deploy backstage plugin

44 lines (41 loc) 1.22 kB
import { DenseTable, defaultActiveColumns } from '../DenseTable/DenseTable.esm.js'; import { DeployResponseErrorPanel } from '../DeployResponseErrorPanel/DeployResponseErrorPanel.esm.js'; import React from 'react'; import { useCurrentDeployments } from '../../hooks/useDeployments.esm.js'; import { useEntity } from '@backstage/plugin-catalog-react'; const DeploymentsTable = () => { const { entity } = useEntity(); const { items, loading, error, retry, page, setPage, rowsPerPage, setRowsPerPage, setOrderDirection, setOrderBy } = useCurrentDeployments(entity); if (error) { return /* @__PURE__ */ React.createElement(DeployResponseErrorPanel, { error }); } return /* @__PURE__ */ React.createElement( DenseTable, { page, pageSize: rowsPerPage, loading, totalCount: items?.totalCount ?? 100, tableData: items?.deploymentStatus || [], onRowsPerPageChange: setRowsPerPage, onPageChange: setPage, columns: defaultActiveColumns, retry, onOrderDirection: setOrderDirection, onOrderBy: setOrderBy } ); }; export { DeploymentsTable }; //# sourceMappingURL=DeploymentsTable.esm.js.map