mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-10-31 18:27:45 +00:00
Small fixes for other errors
This commit is contained in:
@@ -67,7 +67,7 @@ const DeviceCommands = ({selectedDeviceId}) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const toggleDetails = (item, index) => {
|
const toggleDetails = (item, index) => {
|
||||||
if(item.command !== 'wifiscan'){
|
if(item.command !== 'wifiscan' || !item.results.status){
|
||||||
const position = details.indexOf(index);
|
const position = details.indexOf(index);
|
||||||
let newDetails = details.slice();
|
let newDetails = details.slice();
|
||||||
|
|
||||||
@@ -91,10 +91,6 @@ const DeviceCommands = ({selectedDeviceId}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getDetails = (command, commandDetails) => {
|
const getDetails = (command, commandDetails) => {
|
||||||
if (command === 'wifiscan') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command === 'reboot' || command === 'leds'){
|
if (command === 'reboot' || command === 'leds'){
|
||||||
const result = commandDetails.results;
|
const result = commandDetails.results;
|
||||||
if(result)
|
if(result)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
CRow
|
CRow
|
||||||
} from '@coreui/react';
|
} from '@coreui/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { v4 as createUuid } from 'uuid';
|
||||||
import WifiChannelCard from './WifiChannelCard';
|
import WifiChannelCard from './WifiChannelCard';
|
||||||
|
|
||||||
const WifiChannelTable = ({channels}) => (
|
const WifiChannelTable = ({channels}) => (
|
||||||
@@ -10,7 +11,7 @@ const WifiChannelTable = ({channels}) => (
|
|||||||
<CCol>
|
<CCol>
|
||||||
{
|
{
|
||||||
channels.map((channel, index) => {
|
channels.map((channel, index) => {
|
||||||
if(index % 2 === 0) return <WifiChannelCard channel={channel}/>;
|
if(index % 2 === 0) return <WifiChannelCard key={createUuid()} channel={channel}/>;
|
||||||
return <></>
|
return <></>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -18,7 +19,7 @@ const WifiChannelTable = ({channels}) => (
|
|||||||
<CCol>
|
<CCol>
|
||||||
{
|
{
|
||||||
channels.map((channel, index) => {
|
channels.map((channel, index) => {
|
||||||
if(index % 2 === 1) return <WifiChannelCard channel={channel}/>;
|
if(index % 2 === 1) return <WifiChannelCard key={createUuid()} channel={channel}/>;
|
||||||
return <></>
|
return <></>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user