mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-30 17:57:46 +00:00
[WIFI-11936] Serial number in device table now real link
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(44)",
|
"version": "2.8.0(45)",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(44)",
|
"version": "2.8.0(45)",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/icons": "^2.0.11",
|
"@chakra-ui/icons": "^2.0.11",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(44)",
|
"version": "2.8.0(45)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.tsx",
|
"main": "index.tsx",
|
||||||
|
|||||||
@@ -902,7 +902,7 @@
|
|||||||
"dfs": "DFS-Überschreibung",
|
"dfs": "DFS-Überschreibung",
|
||||||
"gw_commands": "Gateway-Befehle",
|
"gw_commands": "Gateway-Befehle",
|
||||||
"identifier": "Identifikator",
|
"identifier": "Identifikator",
|
||||||
"key_verification": "Überprüfung des Signaturschlüssels",
|
"key_verification": "Signieren von Schlüsselinformationen",
|
||||||
"restricted": "Beschränkt",
|
"restricted": "Beschränkt",
|
||||||
"signed_upgrade": "Nur signiertes Upgrade",
|
"signed_upgrade": "Nur signiertes Upgrade",
|
||||||
"title": "Beschränkungen",
|
"title": "Beschränkungen",
|
||||||
|
|||||||
@@ -902,7 +902,7 @@
|
|||||||
"dfs": "DFS Override",
|
"dfs": "DFS Override",
|
||||||
"gw_commands": "Gateway Commands",
|
"gw_commands": "Gateway Commands",
|
||||||
"identifier": "Identifier",
|
"identifier": "Identifier",
|
||||||
"key_verification": "Signing Key Verification",
|
"key_verification": "Signing Key Information",
|
||||||
"restricted": "Restricted",
|
"restricted": "Restricted",
|
||||||
"signed_upgrade": "Signed Upgrade Only",
|
"signed_upgrade": "Signed Upgrade Only",
|
||||||
"title": "Restrictions",
|
"title": "Restrictions",
|
||||||
|
|||||||
@@ -902,7 +902,7 @@
|
|||||||
"dfs": "Anulación de DFS",
|
"dfs": "Anulación de DFS",
|
||||||
"gw_commands": "Comandos de puerta de enlace",
|
"gw_commands": "Comandos de puerta de enlace",
|
||||||
"identifier": "Identificador",
|
"identifier": "Identificador",
|
||||||
"key_verification": "Verificación de clave de firma",
|
"key_verification": "Información clave de firma",
|
||||||
"restricted": "Restringido",
|
"restricted": "Restringido",
|
||||||
"signed_upgrade": "Solo actualización firmada",
|
"signed_upgrade": "Solo actualización firmada",
|
||||||
"title": "Las restricciones",
|
"title": "Las restricciones",
|
||||||
|
|||||||
@@ -902,7 +902,7 @@
|
|||||||
"dfs": "Remplacement DFS",
|
"dfs": "Remplacement DFS",
|
||||||
"gw_commands": "Commandes de passerelle",
|
"gw_commands": "Commandes de passerelle",
|
||||||
"identifier": "Identifiant",
|
"identifier": "Identifiant",
|
||||||
"key_verification": "Vérification de la clé de signature",
|
"key_verification": "Signature des informations clés",
|
||||||
"restricted": "Limité",
|
"restricted": "Limité",
|
||||||
"signed_upgrade": "Mise à niveau signée uniquement",
|
"signed_upgrade": "Mise à niveau signée uniquement",
|
||||||
"title": "Restrictions",
|
"title": "Restrictions",
|
||||||
|
|||||||
@@ -902,7 +902,7 @@
|
|||||||
"dfs": "Substituição DFS",
|
"dfs": "Substituição DFS",
|
||||||
"gw_commands": "Comandos de gateway",
|
"gw_commands": "Comandos de gateway",
|
||||||
"identifier": "Identificador",
|
"identifier": "Identificador",
|
||||||
"key_verification": "Verificação da chave de assinatura",
|
"key_verification": "Informações Chave de Assinatura",
|
||||||
"restricted": "Restrito",
|
"restricted": "Restrito",
|
||||||
"signed_upgrade": "Somente atualização assinada",
|
"signed_upgrade": "Somente atualização assinada",
|
||||||
"title": "RESTRIÇÕES",
|
"title": "RESTRIÇÕES",
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Box, Button, Heading, Image, Spacer, Tooltip, useDisclosure } from '@chakra-ui/react';
|
import { Box, Heading, Image, Link, Spacer, Tooltip, useDisclosure } from '@chakra-ui/react';
|
||||||
import { LockSimple } from 'phosphor-react';
|
import { LockSimple } from 'phosphor-react';
|
||||||
import ReactCountryFlag from 'react-country-flag';
|
import ReactCountryFlag from 'react-country-flag';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import Actions from './Actions';
|
import Actions from './Actions';
|
||||||
import DeviceListFirmwareButton from './FirmwareButton';
|
import DeviceListFirmwareButton from './FirmwareButton';
|
||||||
import AP from './icons/AP.png';
|
import AP from './icons/AP.png';
|
||||||
@@ -49,7 +48,6 @@ const BADGE_COLORS: Record<string, string> = {
|
|||||||
|
|
||||||
const DeviceListCard = () => {
|
const DeviceListCard = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
|
||||||
const [serialNumber, setSerialNumber] = React.useState<string>('');
|
const [serialNumber, setSerialNumber] = React.useState<string>('');
|
||||||
const [hiddenColumns, setHiddenColumns] = React.useState<string[]>([]);
|
const [hiddenColumns, setHiddenColumns] = React.useState<string[]>([]);
|
||||||
const [pageInfo, setPageInfo] = React.useState<PageInfo | undefined>(undefined);
|
const [pageInfo, setPageInfo] = React.useState<PageInfo | undefined>(undefined);
|
||||||
@@ -99,10 +97,6 @@ const DeviceListCard = () => {
|
|||||||
configureModalProps.onOpen();
|
configureModalProps.onOpen();
|
||||||
};
|
};
|
||||||
|
|
||||||
const goToSerial = (serial: string) => () => {
|
|
||||||
navigate(`/devices/${serial}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
const badgeCell = React.useCallback(
|
const badgeCell = React.useCallback(
|
||||||
(device: DeviceWithStatus) => (
|
(device: DeviceWithStatus) => (
|
||||||
<Box
|
<Box
|
||||||
@@ -160,9 +154,9 @@ const DeviceListCard = () => {
|
|||||||
|
|
||||||
const serialCell = React.useCallback(
|
const serialCell = React.useCallback(
|
||||||
(device: DeviceWithStatus) => (
|
(device: DeviceWithStatus) => (
|
||||||
<Button variant="link" onClick={goToSerial(device.serialNumber)} fontSize="sm">
|
<Link href={`#/devices/${device.serialNumber}`} fontSize="sm" my="auto" pt={1}>
|
||||||
<pre>{device.serialNumber}</pre>
|
<pre>{device.serialNumber}</pre>
|
||||||
</Button>
|
</Link>
|
||||||
),
|
),
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
@@ -406,7 +400,6 @@ const DeviceListCard = () => {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
setPageInfo={setPageInfo}
|
setPageInfo={setPageInfo}
|
||||||
saveSettingsId="gateway.devices.table"
|
saveSettingsId="gateway.devices.table"
|
||||||
minHeight="600px"
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
|||||||
Reference in New Issue
Block a user