From b14ea8fd9261ec11564116b2648c5b0f32449e7a Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 25 Sep 2024 08:58:36 +0300 Subject: [PATCH 1/3] update table header for more clarity --- src/components/Table/NodeDetails.tsx | 4 +-- src/components/Table/index.tsx | 40 ++++++++++++++++------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/components/Table/NodeDetails.tsx b/src/components/Table/NodeDetails.tsx index ad4e8d2..628bec9 100644 --- a/src/components/Table/NodeDetails.tsx +++ b/src/components/Table/NodeDetails.tsx @@ -55,7 +55,7 @@ const NodeDetails: FC = ({ nodeData, onClose }) => { Location: {`${nodeData.location?.city || ''} ${nodeData.location?.country || ''}`} - Uptime: {formatUptime(nodeData.uptime)} + Eligible Week Uptime: {formatUptime(nodeData.uptime)} Supported Storage: {formatSupportedStorage(nodeData.supportedStorage)} @@ -83,7 +83,7 @@ const NodeDetails: FC = ({ nodeData, onClose }) => { - Reward Eligibility: {nodeData?.eligible?.toLocaleString()} + Last Round Check Eligibility: {nodeData?.eligible?.toLocaleString()} Eligiblity Issue: {nodeData.eligibilityCauseStr?.toLocaleString()} diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index dff3ade..6f6b23f 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -81,7 +81,7 @@ export default function Table() { { field: 'index', renderHeader: () => ( - + Index ), @@ -95,7 +95,7 @@ export default function Table() { }, { field: 'uptime', - headerName: 'Week Uptime', + headerName: 'Eligible Week Uptime', sortable: true, flex: 1, minWidth: 150, @@ -119,7 +119,7 @@ export default function Table() { field: 'location', headerName: 'Location', flex: 1, - minWidth: 180, + minWidth: 150, renderCell: (params: GridRenderCellParams) => ( {`${params.row.location?.city || ''} ${params.row.location?.country || ''}`} ) @@ -128,16 +128,17 @@ export default function Table() { field: 'address', headerName: 'Address', flex: 1, - minWidth: 200 + minWidth: 150 }, { field: 'eligible', - headerName: 'Reward Eligibility', + headerName: 'Last Check Eligibility', flex: 1, - width: 20, + width: 80, renderHeader: () => ( - - Reward Eligibility + + Last Check Eligibility ), renderCell: (params: GridRenderCellParams) => ( @@ -150,11 +151,22 @@ export default function Table() { field: 'eligibilityCauseStr', headerName: 'Eligibility Issue', flex: 1, - width: 50, + width: 100, renderCell: (params: GridRenderCellParams) => ( {params.row.eligibilityCauseStr || 'none'} ) }, + { + field: 'lastCheck', + headerName: 'Last Check', + flex: 1, + minWidth: 140, + renderCell: (params: GridRenderCellParams) => ( + {new Date(params?.row?.lastCheck)?.toLocaleString(undefined, { + timeZoneName: 'short' + })} + ) + }, { field: 'network', headerName: 'Network', @@ -167,7 +179,7 @@ export default function Table() { { field: 'viewMore', headerName: '', - width: 150, + width: 120, renderCell: (params: GridRenderCellParams) => ( ), @@ -226,12 +238,6 @@ export default function Table() { headerName: 'Allowed Admins', flex: 1, minWidth: 200 - }, - { - field: 'lastCheck', - headerName: 'Last Check', - flex: 1, - minWidth: 150 } ] @@ -307,7 +313,7 @@ export default function Table() { platform: false, codeHash: false, allowedAdmins: false, - lastCheck: false + // lastCheck: false } }, pagination: { From 9cb0fbe600cb0d9e734ce0877e5dd7edd3604f89 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 25 Sep 2024 15:02:43 +0300 Subject: [PATCH 2/3] Update src/components/Table/NodeDetails.tsx Co-authored-by: Jamie Hewitt --- src/components/Table/NodeDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Table/NodeDetails.tsx b/src/components/Table/NodeDetails.tsx index 628bec9..6a41b46 100644 --- a/src/components/Table/NodeDetails.tsx +++ b/src/components/Table/NodeDetails.tsx @@ -83,7 +83,7 @@ const NodeDetails: FC = ({ nodeData, onClose }) => { - Last Round Check Eligibility: {nodeData?.eligible?.toLocaleString()} + Last Round Eligibility Check: {nodeData?.eligible?.toLocaleString()} Eligiblity Issue: {nodeData.eligibilityCauseStr?.toLocaleString()} From eccf260d5a63c1a335ffd7ae74485c788e24468c Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 26 Sep 2024 10:12:31 +0300 Subject: [PATCH 3/3] replace red cross with warning sign --- src/components/Table/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index 6f6b23f..1670509 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -12,7 +12,7 @@ import { useDataContext } from '@/context/DataContext' import NodeDetails from './NodeDetails' import { Button, Tooltip } from '@mui/material' import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline' -import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined' +import ReportIcon from '@mui/icons-material/Report'; import CustomToolbar from '../Toolbar' const getAllNetworks = (indexers: NodeData['indexer']): string => { @@ -55,7 +55,7 @@ const getEligibleCheckbox = (eligible: boolean): React.ReactElement => { return eligible ? ( ) : ( - + ) }