swapout material-table for backstage table

Signed-off-by: Jeremy Guarini <jguarini@paloaltonetworks.com>
This commit is contained in:
Jeremy Guarini
2021-11-11 12:41:30 -08:00
parent fdc35dbff7
commit 1e33ce7407
2 changed files with 3 additions and 38 deletions
-1
View File
@@ -37,7 +37,6 @@
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"material-table": "^1.69.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^6.0.0-beta.0",
@@ -16,16 +16,7 @@
// NEEDS WORK
import { Button, LinearProgress, Tooltip, Typography } from '@material-ui/core';
import MaterialTable from 'material-table';
import ArrowDownward from '@material-ui/icons/ArrowDownward';
import ChevronLeft from '@material-ui/icons/ChevronLeft';
import ChevronRight from '@material-ui/icons/ChevronRight';
import Clear from '@material-ui/icons/Clear';
import FilterList from '@material-ui/icons/FilterList';
import FirstPage from '@material-ui/icons/FirstPage';
import LastPage from '@material-ui/icons/LastPage';
import Search from '@material-ui/icons/Search';
import React, { forwardRef } from 'react';
import React from 'react';
import { useAsync } from 'react-use';
import { gcpApiRef, Project } from '../../api';
@@ -37,6 +28,7 @@ import {
HeaderLabel,
Link,
Page,
Table,
SupportButton,
WarningPanel,
} from '@backstage/core-components';
@@ -90,31 +82,7 @@ const PageContents = () => {
return (
<div style={{ height: '95%', width: '100%' }}>
<MaterialTable
icons={{
Filter: forwardRef((props, ref) => (
<FilterList {...props} ref={ref} />
)),
FirstPage: forwardRef((props, ref) => (
<FirstPage {...props} ref={ref} />
)),
LastPage: forwardRef((props, ref) => (
<LastPage {...props} ref={ref} />
)),
NextPage: forwardRef((props, ref) => (
<ChevronRight {...props} ref={ref} />
)),
PreviousPage: forwardRef((props, ref) => (
<ChevronLeft {...props} ref={ref} />
)),
ResetSearch: forwardRef((props, ref) => (
<Clear {...props} ref={ref} />
)),
Search: forwardRef((props, ref) => <Search {...props} ref={ref} />),
SortArrow: forwardRef((props, ref) => (
<ArrowDownward {...props} ref={ref} />
)),
}}
<Table
columns={[
{
field: 'name',
@@ -150,10 +118,8 @@ const PageContents = () => {
})) || []
}
options={{
filtering: true,
pageSize: 5,
pageSizeOptions: [5, 10, 25, 50, 100],
showTitle: false,
}}
/>
</div>