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",
|
||||
"version": "2.8.0(44)",
|
||||
"version": "2.8.0(45)",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(44)",
|
||||
"version": "2.8.0(45)",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^2.0.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ucentral-client",
|
||||
"version": "2.8.0(44)",
|
||||
"version": "2.8.0(45)",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.tsx",
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"dfs": "DFS-Überschreibung",
|
||||
"gw_commands": "Gateway-Befehle",
|
||||
"identifier": "Identifikator",
|
||||
"key_verification": "Überprüfung des Signaturschlüssels",
|
||||
"key_verification": "Signieren von Schlüsselinformationen",
|
||||
"restricted": "Beschränkt",
|
||||
"signed_upgrade": "Nur signiertes Upgrade",
|
||||
"title": "Beschränkungen",
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"dfs": "DFS Override",
|
||||
"gw_commands": "Gateway Commands",
|
||||
"identifier": "Identifier",
|
||||
"key_verification": "Signing Key Verification",
|
||||
"key_verification": "Signing Key Information",
|
||||
"restricted": "Restricted",
|
||||
"signed_upgrade": "Signed Upgrade Only",
|
||||
"title": "Restrictions",
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"dfs": "Anulación de DFS",
|
||||
"gw_commands": "Comandos de puerta de enlace",
|
||||
"identifier": "Identificador",
|
||||
"key_verification": "Verificación de clave de firma",
|
||||
"key_verification": "Información clave de firma",
|
||||
"restricted": "Restringido",
|
||||
"signed_upgrade": "Solo actualización firmada",
|
||||
"title": "Las restricciones",
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"dfs": "Remplacement DFS",
|
||||
"gw_commands": "Commandes de passerelle",
|
||||
"identifier": "Identifiant",
|
||||
"key_verification": "Vérification de la clé de signature",
|
||||
"key_verification": "Signature des informations clés",
|
||||
"restricted": "Limité",
|
||||
"signed_upgrade": "Mise à niveau signée uniquement",
|
||||
"title": "Restrictions",
|
||||
|
||||
@@ -902,7 +902,7 @@
|
||||
"dfs": "Substituição DFS",
|
||||
"gw_commands": "Comandos de gateway",
|
||||
"identifier": "Identificador",
|
||||
"key_verification": "Verificação da chave de assinatura",
|
||||
"key_verification": "Informações Chave de Assinatura",
|
||||
"restricted": "Restrito",
|
||||
"signed_upgrade": "Somente atualização assinada",
|
||||
"title": "RESTRIÇÕES",
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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 ReactCountryFlag from 'react-country-flag';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import Actions from './Actions';
|
||||
import DeviceListFirmwareButton from './FirmwareButton';
|
||||
import AP from './icons/AP.png';
|
||||
@@ -49,7 +48,6 @@ const BADGE_COLORS: Record<string, string> = {
|
||||
|
||||
const DeviceListCard = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const [serialNumber, setSerialNumber] = React.useState<string>('');
|
||||
const [hiddenColumns, setHiddenColumns] = React.useState<string[]>([]);
|
||||
const [pageInfo, setPageInfo] = React.useState<PageInfo | undefined>(undefined);
|
||||
@@ -99,10 +97,6 @@ const DeviceListCard = () => {
|
||||
configureModalProps.onOpen();
|
||||
};
|
||||
|
||||
const goToSerial = (serial: string) => () => {
|
||||
navigate(`/devices/${serial}`);
|
||||
};
|
||||
|
||||
const badgeCell = React.useCallback(
|
||||
(device: DeviceWithStatus) => (
|
||||
<Box
|
||||
@@ -160,9 +154,9 @@ const DeviceListCard = () => {
|
||||
|
||||
const serialCell = React.useCallback(
|
||||
(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>
|
||||
</Button>
|
||||
</Link>
|
||||
),
|
||||
[],
|
||||
);
|
||||
@@ -406,7 +400,6 @@ const DeviceListCard = () => {
|
||||
// @ts-ignore
|
||||
setPageInfo={setPageInfo}
|
||||
saveSettingsId="gateway.devices.table"
|
||||
minHeight="600px"
|
||||
/>
|
||||
</Box>
|
||||
</CardBody>
|
||||
|
||||
Reference in New Issue
Block a user