From 3bef973326cf4c285fd312af6a77be45d7104ecc Mon Sep 17 00:00:00 2001 From: farbanas Date: Tue, 28 Feb 2023 17:27:58 +0100 Subject: [PATCH 01/18] fix: update versions of the latest release in changelogs from 1.0.11 to 1.1.11 --- CHANGELOG.md | 2 +- nym-connect/desktop/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db3d58a71..4d045624c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// ## [Unreleased] -## [v1.0.11] (2023-02-28) +## [v1.1.11] (2023-02-28) - Fix empty dealer set loop ([#3105]) - The nym-api db.sqlite is broken when trying to run against it it in `enabled-credentials-mode true` there is an ordering issue with migrations when using the credential binary to purchase bandwidth ([#3100]) diff --git a/nym-connect/desktop/CHANGELOG.md b/nym-connect/desktop/CHANGELOG.md index 9e6f08fe2d..4bfd4a39e8 100644 --- a/nym-connect/desktop/CHANGELOG.md +++ b/nym-connect/desktop/CHANGELOG.md @@ -2,7 +2,7 @@ ## [Unreleased] -## [v1.0.11] (2023-02-28) +## [v1.1.11] (2023-02-28) - NC - add the option to manually select and use a specific Service Provider ([#2953]) From 3d7c9ee2b88ed300fcfc6e7a262de7d51a1a81f2 Mon Sep 17 00:00:00 2001 From: Fouad Date: Wed, 1 Mar 2023 15:21:33 +0000 Subject: [PATCH 02/18] NE - fix gateways' version number sorting on the gateway list page (#3131) * fix filter input sizes * reorder gateway columns * update tooltips * fix column sorting in explorer lists fix lint errors --- .../src/components/CustomColumnHeading.tsx | 21 +--- explorer/src/components/TableToolbar.tsx | 50 +++++----- .../src/components/Universal-DataGrid.tsx | 1 - explorer/src/pages/GatewayDetail/index.tsx | 4 +- explorer/src/pages/Gateways/index.tsx | 96 ++++++++++++------- explorer/src/pages/Mixnodes/index.tsx | 11 +++ explorer/src/styles.css | 20 ++-- 7 files changed, 111 insertions(+), 92 deletions(-) diff --git a/explorer/src/components/CustomColumnHeading.tsx b/explorer/src/components/CustomColumnHeading.tsx index c15ef27f9b..1f85806fa2 100644 --- a/explorer/src/components/CustomColumnHeading.tsx +++ b/explorer/src/components/CustomColumnHeading.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { Box, Typography } from '@mui/material'; -import { ExpandLess, ExpandMore } from '@mui/icons-material'; import { useTheme } from '@mui/material/styles'; import { Tooltip } from '@nymproject/react/tooltip/Tooltip'; @@ -8,14 +7,10 @@ export const CustomColumnHeading: FCWithChildren<{ headingTitle: string; tooltip headingTitle, tooltipInfo, }) => { - const [filter, toggleFilter] = React.useState(false); const theme = useTheme(); - const handleClick = () => { - toggleFilter(!filter); - }; return ( - + {tooltipInfo && ( )} - - {headingTitle}  + + {headingTitle} - {filter ? : } ); }; diff --git a/explorer/src/components/TableToolbar.tsx b/explorer/src/components/TableToolbar.tsx index dc3b8a3e78..aaa9f9b510 100644 --- a/explorer/src/components/TableToolbar.tsx +++ b/explorer/src/components/TableToolbar.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Box, TextField, MenuItem } from '@mui/material'; +import { Box, TextField, MenuItem, FormControl } from '@mui/material'; import Select, { SelectChangeEvent } from '@mui/material/Select'; import { Filters } from './Filters/Filters'; import { useIsMobile } from '../hooks/useIsMobile'; @@ -39,36 +39,36 @@ export const TableToolbar: FCWithChildren = ({ {childrenBefore} - + + + :not(style)': { - height: fieldsHeight, - }, }} + size="small" value={searchTerm} data-testid="search-box" placeholder="search" diff --git a/explorer/src/components/Universal-DataGrid.tsx b/explorer/src/components/Universal-DataGrid.tsx index 928eb62e94..e545229a8c 100644 --- a/explorer/src/components/Universal-DataGrid.tsx +++ b/explorer/src/components/Universal-DataGrid.tsx @@ -62,7 +62,6 @@ export const UniversalDataGrid: FCWithChildren = ({ rows, columns }} columns={columns} pageSize={Number(pageSize)} - rowsPerPageOptions={[5]} disableSelectionOnClick autoHeight hideFooter={!pagination} diff --git a/explorer/src/pages/GatewayDetail/index.tsx b/explorer/src/pages/GatewayDetail/index.tsx index 8995b1733f..24f0186ef2 100644 --- a/explorer/src/pages/GatewayDetail/index.tsx +++ b/explorer/src/pages/GatewayDetail/index.tsx @@ -31,14 +31,14 @@ const columns: ColumnsType[] = [ flex: 1, headerAlign: 'left', tooltipInfo: - 'Routing score is relative to that of the network. Each time a gateway is tested, the test packets have to go through the full path of the network (gateway + 3 nodes). If a node in the path drop packets it will affect the score of the gateway and other nodes in the test.', + "Gateway's most recent score (measured in the last 15 minutes). Routing score is relative to that of the network. Each time a gateway is tested, the test packets have to go through the full path of the network (gateway + 3 nodes). If a node in the path drop packets it will affect the score of the gateway and other nodes in the test", }, { field: 'avgUptime', title: 'Avg. Score', flex: 1, headerAlign: 'left', - tooltipInfo: 'Is the average routing score in the last 24 hours', + tooltipInfo: "Gateway's average routing score in the last 24 hours", }, { field: 'host', diff --git a/explorer/src/pages/Gateways/index.tsx b/explorer/src/pages/Gateways/index.tsx index 98e14be808..5c52f4a5b3 100644 --- a/explorer/src/pages/Gateways/index.tsx +++ b/explorer/src/pages/Gateways/index.tsx @@ -1,10 +1,12 @@ import * as React from 'react'; import { Link as RRDLink } from 'react-router-dom'; import { Box, Card, Grid, Link as MuiLink } from '@mui/material'; +import { useTheme } from '@mui/material/styles'; import { CopyToClipboard } from '@nymproject/react/clipboard/CopyToClipboard'; import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; import { SelectChangeEvent } from '@mui/material/Select'; -import { diff, rcompare } from 'semver'; +import { diff, gte, rcompare } from 'semver'; +import { Tooltip as InfoTooltip } from '@nymproject/react/tooltip/Tooltip'; import { useMainContext } from '../../context/main'; import { gatewayToGridRow } from '../../components/Gateways'; import { GatewayResponse } from '../../typeDefs/explorer-api'; @@ -25,6 +27,8 @@ export const PageGateways: FCWithChildren = () => { const [searchTerm, setSearchTerm] = React.useState(''); const [versionFilter, setVersionFilter] = React.useState(VersionSelectOptions.latestVersion); + const theme = useTheme(); + const handleSearch = (str: string) => { setSearchTerm(str.toLowerCase()); }; @@ -89,6 +93,7 @@ export const PageGateways: FCWithChildren = () => { renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 380, + disableColumnMenu: true, headerAlign: 'left', renderCell: (params: GridRenderCellParams) => ( <> @@ -107,28 +112,24 @@ export const PageGateways: FCWithChildren = () => { ), }, - { - field: 'bond', - width: 150, - type: 'number', - renderHeader: () => , - headerClassName: 'MuiDataGrid-header-override', - headerAlign: 'left', - renderCell: (params: GridRenderCellParams) => ( - - {unymToNym(params.value, 6)} - - ), - }, { field: 'node_performance', - renderHeader: () => , - width: 150, + renderHeader: () => ( + <> + + + + ), + width: 175, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -143,26 +144,32 @@ export const PageGateways: FCWithChildren = () => { ), }, { - field: 'host', - renderHeader: () => , - width: 180, + field: 'version', + renderHeader: () => , + width: 150, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( {params.value} ), + sortComparator: (a, b) => { + if (gte(a, b)) return 1; + return -1; + }, }, { field: 'location', renderHeader: () => , width: 180, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -185,11 +192,30 @@ export const PageGateways: FCWithChildren = () => { ), }, + { + field: 'host', + renderHeader: () => , + width: 180, + disableColumnMenu: true, + headerAlign: 'left', + headerClassName: 'MuiDataGrid-header-override', + renderCell: (params: GridRenderCellParams) => ( + + {params.value} + + ), + }, { field: 'owner', headerName: 'Owner', renderHeader: () => , width: 180, + disableColumnMenu: true, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', renderCell: (params: GridRenderCellParams) => ( @@ -204,19 +230,21 @@ export const PageGateways: FCWithChildren = () => { ), }, { - field: 'version', - renderHeader: () => , + field: 'bond', width: 150, - headerAlign: 'left', + disableColumnMenu: true, + type: 'number', + renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', + headerAlign: 'left', renderCell: (params: GridRenderCellParams) => ( - {params.value} + {unymToNym(params.value, 6)} ), }, diff --git a/explorer/src/pages/Mixnodes/index.tsx b/explorer/src/pages/Mixnodes/index.tsx index 5aaa02640f..50d85583b1 100644 --- a/explorer/src/pages/Mixnodes/index.tsx +++ b/explorer/src/pages/Mixnodes/index.tsx @@ -85,6 +85,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'mix_id', headerName: 'Mix ID', + disableColumnMenu: true, renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 100, @@ -103,6 +104,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'identity_key', headerName: 'Identity Key', + disableColumnMenu: true, renderHeader: () => , headerClassName: 'MuiDataGrid-header-override', width: 170, @@ -128,6 +130,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'bond', headerName: 'Stake', + disableColumnMenu: true, renderHeader: () => , type: 'number', headerClassName: 'MuiDataGrid-header-override', @@ -146,6 +149,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'stake_saturation', headerName: 'Stake Saturation', + disableColumnMenu: true, renderHeader: () => ( { { field: 'pledge_amount', headerName: 'Bond', + disableColumnMenu: true, width: 175, headerClassName: 'MuiDataGrid-header-override', renderHeader: () => , @@ -189,6 +194,7 @@ export const PageMixnodes: FCWithChildren = () => { { field: 'profit_percentage', headerName: 'Profit Margin', + disableColumnMenu: true, renderHeader: () => ( { headerClassName: 'MuiDataGrid-header-override', width: 170, headerAlign: 'left', + disableColumnMenu: true, renderCell: (params: GridRenderCellParams) => ( { { field: 'avg_uptime', headerName: 'Routing Score', + disableColumnMenu: true, renderHeader: () => ( { { field: 'owner', headerName: 'Owner', + disableColumnMenu: true, renderHeader: () => , width: 120, headerAlign: 'left', @@ -274,6 +283,7 @@ export const PageMixnodes: FCWithChildren = () => { field: 'location', headerName: 'Location', renderHeader: () => , + disableColumnMenu: true, width: 120, headerAlign: 'left', headerClassName: 'MuiDataGrid-header-override', @@ -303,6 +313,7 @@ export const PageMixnodes: FCWithChildren = () => { field: 'host', headerName: 'Host', renderHeader: () => , + disableColumnMenu: true, headerClassName: 'MuiDataGrid-header-override', width: 130, headerAlign: 'left', diff --git a/explorer/src/styles.css b/explorer/src/styles.css index e06c314f6b..818211ccea 100644 --- a/explorer/src/styles.css +++ b/explorer/src/styles.css @@ -4,31 +4,27 @@ the theme declaration in index.tsx or the style prop in */ -.MuiDataGrid-sortIcon, .MuiDataGrid-menuIcon, .MuiDataGrid-iconButtonContainer{ - display: none !important; -} - .MuiDataGrid-columnSeparator { - visibility: hidden; + visibility: hidden; } /* TODO - this should be managed somehow in MUI DataGrid but documentation doesnt offer a way to do it. Possibly only included in Data Grid Pro package */ .MuiDataGrid-header-override { - height: 55px; - min-height: 55px; + height: 55px; + min-height: 55px; } /* Again, no offered way to add sx to this specific div to kill the padding which puts it out of sync with other (sx styled) cells */ div div.MuiDataGrid-root .MuiDataGrid-columnHeaderTitleContainer { - padding-left: 0; + padding-left: 0; } @media screen and (max-width: 900px) { - .MuiDrawer-paperAnchorLeft { - min-width: 100vw; - margin-top: 58px; - } + .MuiDrawer-paperAnchorLeft { + min-width: 100vw; + margin-top: 58px; + } } From ccf5990bc7ffcb45d80a02c21e65df06bea5787e Mon Sep 17 00:00:00 2001 From: Fouad Date: Wed, 1 Mar 2023 15:22:52 +0000 Subject: [PATCH 03/18] update selected service provider description style (#3128) --- Cargo.lock | 20 +++++++++---------- .../menu/settings/ServiceProviderSettings.tsx | 9 +++++++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4f0fab00f8..9f2d2f7a14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "client-core" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "dashmap 5.4.0", @@ -1802,7 +1802,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "explorer-api" -version = "1.1.10" +version = "1.1.11" dependencies = [ "chrono", "clap 4.1.4", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "nym-api" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "async-trait", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "base64 0.13.1", @@ -3449,7 +3449,7 @@ dependencies = [ [[package]] name = "nym-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", @@ -3543,7 +3543,7 @@ dependencies = [ [[package]] name = "nym-gateway" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "async-trait", @@ -3620,7 +3620,7 @@ dependencies = [ [[package]] name = "nym-mixnode" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "atty", @@ -3675,7 +3675,7 @@ dependencies = [ [[package]] name = "nym-network-requester" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "clap 4.1.4", @@ -3713,7 +3713,7 @@ dependencies = [ [[package]] name = "nym-network-statistics" -version = "1.1.10" +version = "1.1.11" dependencies = [ "dirs", "log", @@ -3788,7 +3788,7 @@ dependencies = [ [[package]] name = "nym-socks5-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", diff --git a/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx b/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx index 8f18caaacd..0d0a0cdd20 100644 --- a/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx +++ b/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx @@ -30,7 +30,7 @@ export const ServiceProviderSettings = () => { if (match) return match.description; - return 'The service provider specified is not in our known list.'; + return 'N/A'; }; const validateInput = (value: string) => { @@ -86,7 +86,12 @@ export const ServiceProviderSettings = () => { )} {userDefinedSPAddress.address && userDefinedSPAddress.isActive && ( - {getSPDescription(userDefinedSPAddress.address)} + + Name of Service Provider + + {getSPDescription(userDefinedSPAddress.address)} + + )} From 04e652441eed0f3d75d6f2f95a2270f06549d251 Mon Sep 17 00:00:00 2001 From: Pierre Dommerc Date: Wed, 1 Mar 2023 15:16:40 +0100 Subject: [PATCH 04/18] fix(explorer): fix layout responsiveness in mixnode details view (#3130) --- .../src/components/MixNodes/DetailSection.tsx | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/explorer/src/components/MixNodes/DetailSection.tsx b/explorer/src/components/MixNodes/DetailSection.tsx index dcf0f830b5..a07a6fb7d8 100644 --- a/explorer/src/components/MixNodes/DetailSection.tsx +++ b/explorer/src/components/MixNodes/DetailSection.tsx @@ -18,8 +18,8 @@ export const MixNodeDetailSection: FCWithChildren = ({ mixNo const statusText = React.useMemo(() => getMixNodeStatusText(mixNodeRow.status), [mixNodeRow.status]); return ( - - + + = ({ mixNo > - + {mixnodeDescription.name} {(mixnodeDescription.description || '').slice(0, 1000)}