mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
status screen updates
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -37,7 +37,7 @@ stats.html
|
|||||||
!.yarn/sdks
|
!.yarn/sdks
|
||||||
!.yarn/versions
|
!.yarn/versions
|
||||||
yarn.lock
|
yarn.lock
|
||||||
interface/analyse.html
|
analyse.html
|
||||||
interface/vite.config.ts.timestamp*
|
interface/vite.config.ts.timestamp*
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
|
|||||||
@@ -23,15 +23,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alova/adapter-xhr": "^1.0.3",
|
"@alova/adapter-xhr": "^1.0.3",
|
||||||
"@babel/core": "^7.24.0",
|
"@babel/core": "^7.24.1",
|
||||||
"@emotion/react": "^11.11.4",
|
"@emotion/react": "^11.11.4",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@mui/icons-material": "^5.15.13",
|
"@mui/icons-material": "^5.15.14",
|
||||||
"@mui/material": "^5.15.13",
|
"@mui/material": "^5.15.14",
|
||||||
"@table-library/react-table-library": "4.1.7",
|
"@table-library/react-table-library": "4.1.7",
|
||||||
"@types/imagemin": "^8.0.5",
|
"@types/imagemin": "^8.0.5",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^20.11.28",
|
"@types/node": "^20.11.30",
|
||||||
"@types/react": "^18.2.67",
|
"@types/react": "^18.2.67",
|
||||||
"@types/react-dom": "^18.2.22",
|
"@types/react-dom": "^18.2.22",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@preact/compat": "^17.1.2",
|
"@preact/compat": "^17.1.2",
|
||||||
"@preact/preset-vite": "^2.8.2",
|
"@preact/preset-vite": "^2.8.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.3.0",
|
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
||||||
"@typescript-eslint/parser": "^7.3.0",
|
"@typescript-eslint/parser": "^7.3.1",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import NetworkConnection from 'framework/network/NetworkConnection';
|
|||||||
import NetworkTime from 'framework/ntp/NetworkTime';
|
import NetworkTime from 'framework/ntp/NetworkTime';
|
||||||
import OTASettingsForm from 'framework/ota/OTASettingsForm';
|
import OTASettingsForm from 'framework/ota/OTASettingsForm';
|
||||||
import Security from 'framework/security/Security';
|
import Security from 'framework/security/Security';
|
||||||
|
import ESPSystemStatus from 'framework/system/ESPSystemStatus';
|
||||||
import Status from 'framework/system/Status';
|
import Status from 'framework/system/Status';
|
||||||
import UploadDownload from 'framework/system/UploadDownload';
|
import UploadDownload from 'framework/system/UploadDownload';
|
||||||
import ApplicationSettings from 'project/ApplicationSettings';
|
import ApplicationSettings from 'project/ApplicationSettings';
|
||||||
@@ -42,6 +43,7 @@ const AuthenticatedRouting: FC = () => {
|
|||||||
<Route path="/settings/mqtt/*" element={<Mqtt />} />
|
<Route path="/settings/mqtt/*" element={<Mqtt />} />
|
||||||
<Route path="/settings/ota/*" element={<OTASettingsForm />} />
|
<Route path="/settings/ota/*" element={<OTASettingsForm />} />
|
||||||
<Route path="/settings/security/*" element={<Security />} />
|
<Route path="/settings/security/*" element={<Security />} />
|
||||||
|
<Route path="/settings/espsystemstatus/*" element={<ESPSystemStatus />} />
|
||||||
<Route path="/settings/upload/*" element={<UploadDownload />} />
|
<Route path="/settings/upload/*" element={<UploadDownload />} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { alovaInstance, alovaInstanceGH } from './endpoints';
|
import { alovaInstance, alovaInstanceGH } from './endpoints';
|
||||||
import type { OTASettings, SystemStatus, LogSettings } from 'types';
|
import type { OTASettings, SystemStatus, LogSettings, ESPSystemStatus } from 'types';
|
||||||
|
|
||||||
// SystemStatus - also used to ping in Restart monitor for pinging
|
// ESPSystemStatus - also used to ping in Restart monitor for pinging
|
||||||
|
export const readESPSystemStatus = () => alovaInstance.Get<ESPSystemStatus>('/rest/ESPSystemStatus');
|
||||||
|
|
||||||
|
// SystemStatus
|
||||||
export const readSystemStatus = () => alovaInstance.Get<SystemStatus>('/rest/systemStatus');
|
export const readSystemStatus = () => alovaInstance.Get<SystemStatus>('/rest/systemStatus');
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import CastIcon from '@mui/icons-material/Cast';
|
|||||||
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
|
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
|
||||||
import ImportExportIcon from '@mui/icons-material/ImportExport';
|
import ImportExportIcon from '@mui/icons-material/ImportExport';
|
||||||
import LockIcon from '@mui/icons-material/Lock';
|
import LockIcon from '@mui/icons-material/Lock';
|
||||||
|
import MemoryIcon from '@mui/icons-material/Memory';
|
||||||
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
|
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
|
||||||
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
|
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
|
||||||
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
|
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
|
||||||
@@ -24,7 +25,8 @@ import {
|
|||||||
DialogActions,
|
DialogActions,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
Box
|
Box,
|
||||||
|
Divider
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { useRequest } from 'alova';
|
import { useRequest } from 'alova';
|
||||||
import { useState, type FC } from 'react';
|
import { useState, type FC } from 'react';
|
||||||
@@ -294,6 +296,26 @@ const Settings: FC = () => {
|
|||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
||||||
|
<Divider />
|
||||||
|
|
||||||
|
<ListItem
|
||||||
|
disablePadding
|
||||||
|
secondaryAction={
|
||||||
|
<ListItemIcon style={{ justifyContent: 'right', color: 'lightblue', verticalAlign: 'middle' }}>
|
||||||
|
<NavigateNextIcon />
|
||||||
|
</ListItemIcon>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<ListItemButton component={Link} to="espsystemstatus">
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar sx={{ color: 'white' }}>
|
||||||
|
<MemoryIcon />
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText primary={LL.STATUS_OF('ESP32')} secondary="ESP32 Information" />
|
||||||
|
</ListItemButton>
|
||||||
|
</ListItem>
|
||||||
|
|
||||||
<ListItem
|
<ListItem
|
||||||
disablePadding
|
disablePadding
|
||||||
secondaryAction={
|
secondaryAction={
|
||||||
@@ -312,8 +334,10 @@ const Settings: FC = () => {
|
|||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|
||||||
{renderRestartDialog()}
|
{renderRestartDialog()}
|
||||||
{renderFactoryResetDialog()}
|
{renderFactoryResetDialog()}
|
||||||
|
|
||||||
<Box display="flex" flexWrap="wrap">
|
<Box display="flex" flexWrap="wrap">
|
||||||
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
||||||
<ButtonRow>
|
<ButtonRow>
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ const APSettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF(LL.ACCESS_POINT(1))}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ const APStatusForm: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <SectionContent title={LL.STATUS_OF(LL.ACCESS_POINT(1))}>{content()}</SectionContent>;
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default APStatusForm;
|
export default APStatusForm;
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ const MqttSettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF('MQTT')}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const MqttStatusForm: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <SectionContent title={LL.STATUS_OF('MQTT')}>{content()}</SectionContent>;
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MqttStatusForm;
|
export default MqttStatusForm;
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ const WiFiSettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF(LL.NETWORK(1))}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{restarting ? <RestartMonitor /> : content()}
|
{restarting ? <RestartMonitor /> : content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ const NetworkStatusForm: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <SectionContent title={LL.STATUS_OF(LL.NETWORK(1))}>{content()}</SectionContent>;
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NetworkStatusForm;
|
export default NetworkStatusForm;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const WiFiNetworkScanner: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.NETWORK_SCANNER()}>
|
<SectionContent>
|
||||||
{renderNetworkScanner()}
|
{renderNetworkScanner()}
|
||||||
<ButtonRow>
|
<ButtonRow>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ const NTPSettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF('NTP')}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ const NTPStatusForm: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <SectionContent title={LL.STATUS_OF('NTP')}>{content()}</SectionContent>;
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default NTPStatusForm;
|
export default NTPStatusForm;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const OTASettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF('OTA')}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ const ManageUsersForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.MANAGE_USERS()}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const SecuritySettingsForm: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.SETTINGS_OF(LL.SECURITY(1))}>
|
<SectionContent>
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import AppsIcon from '@mui/icons-material/Apps';
|
import AppsIcon from '@mui/icons-material/Apps';
|
||||||
import BuildIcon from '@mui/icons-material/Build';
|
|
||||||
import DeveloperBoardIcon from '@mui/icons-material/DeveloperBoard';
|
import DeveloperBoardIcon from '@mui/icons-material/DeveloperBoard';
|
||||||
import DevicesIcon from '@mui/icons-material/Devices';
|
import DevicesIcon from '@mui/icons-material/Devices';
|
||||||
import FolderIcon from '@mui/icons-material/Folder';
|
import FolderIcon from '@mui/icons-material/Folder';
|
||||||
@@ -7,24 +6,25 @@ import MemoryIcon from '@mui/icons-material/Memory';
|
|||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
import SdCardAlertIcon from '@mui/icons-material/SdCardAlert';
|
import SdCardAlertIcon from '@mui/icons-material/SdCardAlert';
|
||||||
import SdStorageIcon from '@mui/icons-material/SdStorage';
|
import SdStorageIcon from '@mui/icons-material/SdStorage';
|
||||||
import TimerIcon from '@mui/icons-material/Timer';
|
|
||||||
import { Avatar, Box, Button, Divider, List, ListItem, ListItemAvatar, ListItemText } from '@mui/material';
|
import { Avatar, Box, Button, Divider, List, ListItem, ListItemAvatar, ListItemText } from '@mui/material';
|
||||||
|
|
||||||
import { useRequest } from 'alova';
|
import { useRequest } from 'alova';
|
||||||
import type { FC } from 'react';
|
import type { FC } from 'react';
|
||||||
|
|
||||||
import * as SystemApi from 'api/system';
|
import * as SystemApi from 'api/system';
|
||||||
import { ButtonRow, FormLoader, SectionContent } from 'components';
|
import { ButtonRow, FormLoader, SectionContent, useLayoutTitle } from 'components';
|
||||||
import { useI18nContext } from 'i18n/i18n-react';
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
|
|
||||||
function formatNumber(num: number) {
|
function formatNumber(num: number) {
|
||||||
return new Intl.NumberFormat().format(num);
|
return new Intl.NumberFormat().format(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
const SystemStatusForm: FC = () => {
|
const ESPSystemStatus: FC = () => {
|
||||||
const { LL } = useI18nContext();
|
const { LL } = useI18nContext();
|
||||||
|
|
||||||
const { data: data, send: loadData, error } = useRequest(SystemApi.readSystemStatus, { force: true });
|
useLayoutTitle(LL.STATUS_OF('ESP32'));
|
||||||
|
|
||||||
|
const { data: data, send: loadData, error } = useRequest(SystemApi.readESPSystemStatus, { force: true });
|
||||||
|
|
||||||
const content = () => {
|
const content = () => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -34,24 +34,6 @@ const SystemStatusForm: FC = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<List>
|
<List>
|
||||||
<ListItem>
|
|
||||||
<ListItemAvatar>
|
|
||||||
<Avatar sx={{ bgcolor: '#5f9a5f', color: 'white' }}>
|
|
||||||
<BuildIcon />
|
|
||||||
</Avatar>
|
|
||||||
</ListItemAvatar>
|
|
||||||
<ListItemText primary={LL.EMS_ESP_VER()} secondary={data.emsesp_version} />
|
|
||||||
</ListItem>
|
|
||||||
<Divider variant="inset" component="li" />
|
|
||||||
<ListItem>
|
|
||||||
<ListItemAvatar>
|
|
||||||
<Avatar sx={{ bgcolor: '#5f9a5f', color: 'white' }}>
|
|
||||||
<TimerIcon />
|
|
||||||
</Avatar>
|
|
||||||
</ListItemAvatar>
|
|
||||||
<ListItemText primary={LL.UPTIME()} secondary={data.uptime} />
|
|
||||||
</ListItem>
|
|
||||||
<Divider variant="inset" component="li" />
|
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemAvatar>
|
<ListItemAvatar>
|
||||||
<Avatar sx={{ bgcolor: '#5f9a5f', color: 'white' }}>
|
<Avatar sx={{ bgcolor: '#5f9a5f', color: 'white' }}>
|
||||||
@@ -151,7 +133,6 @@ const SystemStatusForm: FC = () => {
|
|||||||
secondary={formatNumber(data.fs_used) + ' KB / ' + formatNumber(data.fs_free) + ' KB'}
|
secondary={formatNumber(data.fs_used) + ' KB / ' + formatNumber(data.fs_free) + ' KB'}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<Divider variant="inset" component="li" />
|
|
||||||
</List>
|
</List>
|
||||||
<Box display="flex" flexWrap="wrap">
|
<Box display="flex" flexWrap="wrap">
|
||||||
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
||||||
@@ -166,7 +147,7 @@ const SystemStatusForm: FC = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <SectionContent title={LL.STATUS_OF(LL.SYSTEM(1))}>{content()}</SectionContent>;
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SystemStatusForm;
|
export default ESPSystemStatus;
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import { Tab } from '@mui/material';
|
import { Tab } from '@mui/material';
|
||||||
import { Navigate, Routes, Route } from 'react-router-dom';
|
import { Navigate, Routes, Route } from 'react-router-dom';
|
||||||
import SystemLog from './SystemLog';
|
import SystemLog from './SystemLog';
|
||||||
import SystemStatusForm from './SystemStatusForm';
|
import SystemStatus from './SystemStatus';
|
||||||
import type { FC } from 'react';
|
import type { FC } from 'react';
|
||||||
|
|
||||||
import { useRouterTab, RouterTabs, useLayoutTitle } from 'components';
|
import { useRouterTab, RouterTabs, useLayoutTitle } from 'components';
|
||||||
|
|
||||||
import { useI18nContext } from 'i18n/i18n-react';
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
import EMSStatus from 'project/EMSStatus';
|
import Activity from 'project/Activity';
|
||||||
|
|
||||||
const Status: FC = () => {
|
const Status: FC = () => {
|
||||||
const { LL } = useI18nContext();
|
const { LL } = useI18nContext();
|
||||||
@@ -20,12 +20,12 @@ const Status: FC = () => {
|
|||||||
<>
|
<>
|
||||||
<RouterTabs value={routerTab}>
|
<RouterTabs value={routerTab}>
|
||||||
<Tab value="status" label={LL.SYSTEM(1)} />
|
<Tab value="status" label={LL.SYSTEM(1)} />
|
||||||
<Tab value="emsesp-status" label="EMS-ESP" />
|
<Tab value="activity" label={LL.ACTIVITY()} />
|
||||||
<Tab value="log" label={LL.LOG_OF(LL.SYSTEM(2))} />
|
<Tab value="log" label={LL.LOG_OF('')} />
|
||||||
</RouterTabs>
|
</RouterTabs>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="status" element={<SystemStatusForm />} />
|
<Route path="status" element={<SystemStatus />} />
|
||||||
<Route path="emsesp-status" element={<EMSStatus />} />
|
<Route path="activity" element={<Activity />} />
|
||||||
<Route path="log" element={<SystemLog />} />
|
<Route path="log" element={<SystemLog />} />
|
||||||
<Route path="*" element={<Navigate replace to="status" />} />
|
<Route path="*" element={<Navigate replace to="status" />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ const SystemLog: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContent title={LL.LOG_OF(LL.SYSTEM(2))} id="log-window">
|
<SectionContent id="log-window">
|
||||||
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
{blocker ? <BlockNavigation blocker={blocker} /> : null}
|
||||||
{content()}
|
{content()}
|
||||||
</SectionContent>
|
</SectionContent>
|
||||||
|
|||||||
212
interface/src/framework/system/SystemStatus.tsx
Normal file
212
interface/src/framework/system/SystemStatus.tsx
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
import BuildIcon from '@mui/icons-material/Build';
|
||||||
|
import CancelIcon from '@mui/icons-material/Cancel';
|
||||||
|
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
|
||||||
|
import DirectionsBusIcon from '@mui/icons-material/DirectionsBus';
|
||||||
|
import PermScanWifiIcon from '@mui/icons-material/PermScanWifi';
|
||||||
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
|
import TimerIcon from '@mui/icons-material/Timer';
|
||||||
|
|
||||||
|
import {
|
||||||
|
Avatar,
|
||||||
|
Box,
|
||||||
|
Button,
|
||||||
|
Dialog,
|
||||||
|
DialogActions,
|
||||||
|
DialogContent,
|
||||||
|
DialogTitle,
|
||||||
|
Divider,
|
||||||
|
List,
|
||||||
|
ListItem,
|
||||||
|
ListItemAvatar,
|
||||||
|
ListItemText,
|
||||||
|
useTheme
|
||||||
|
} from '@mui/material';
|
||||||
|
|
||||||
|
import { useRequest } from 'alova';
|
||||||
|
import { useContext, type FC, useState } from 'react';
|
||||||
|
|
||||||
|
import { toast } from 'react-toastify';
|
||||||
|
import { dialogStyle } from 'CustomTheme';
|
||||||
|
import * as SystemApi from 'api/system';
|
||||||
|
import { FormLoader, SectionContent, useLayoutTitle } from 'components';
|
||||||
|
import { AuthenticatedContext } from 'contexts/authentication';
|
||||||
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
|
import * as EMSESP from 'project/api';
|
||||||
|
import { busConnectionStatus } from 'project/types';
|
||||||
|
|
||||||
|
const SystemStatus: FC = () => {
|
||||||
|
const { LL } = useI18nContext();
|
||||||
|
|
||||||
|
useLayoutTitle(LL.STATUS_OF(''));
|
||||||
|
|
||||||
|
const { me } = useContext(AuthenticatedContext);
|
||||||
|
|
||||||
|
const [confirmScan, setConfirmScan] = useState<boolean>(false);
|
||||||
|
|
||||||
|
const { data: data, send: loadData, error } = useRequest(SystemApi.readSystemStatus, { force: true });
|
||||||
|
|
||||||
|
const { send: scanDevices } = useRequest(EMSESP.scanDevices, {
|
||||||
|
immediate: false
|
||||||
|
});
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
|
const formatDurationSec = (duration_sec: number) => {
|
||||||
|
const days = Math.trunc((duration_sec * 1000) / 86400000);
|
||||||
|
const hours = Math.trunc((duration_sec * 1000) / 3600000) % 24;
|
||||||
|
const minutes = Math.trunc((duration_sec * 1000) / 60000) % 60;
|
||||||
|
const seconds = Math.trunc((duration_sec * 1000) / 1000) % 60;
|
||||||
|
|
||||||
|
let formatted = '';
|
||||||
|
if (days) {
|
||||||
|
formatted += LL.NUM_DAYS({ num: days }) + ' ';
|
||||||
|
}
|
||||||
|
if (hours) {
|
||||||
|
formatted += LL.NUM_HOURS({ num: hours }) + ' ';
|
||||||
|
}
|
||||||
|
if (minutes) {
|
||||||
|
formatted += LL.NUM_MINUTES({ num: minutes }) + ' ';
|
||||||
|
}
|
||||||
|
formatted += LL.NUM_SECONDS({ num: seconds });
|
||||||
|
return formatted;
|
||||||
|
};
|
||||||
|
|
||||||
|
const busStatus = () => {
|
||||||
|
if (data) {
|
||||||
|
switch (data.status) {
|
||||||
|
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
||||||
|
return LL.CONNECTED(0);
|
||||||
|
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
||||||
|
return LL.TX_ISSUES();
|
||||||
|
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
||||||
|
return LL.DISCONNECTED();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 'Unknown';
|
||||||
|
};
|
||||||
|
|
||||||
|
// export const isConnected = ({ status }: Status) => status !== busConnectionStatus.BUS_STATUS_OFFLINE;
|
||||||
|
|
||||||
|
const busStatusHighlight = () => {
|
||||||
|
switch (data.status) {
|
||||||
|
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
||||||
|
return theme.palette.warning.main;
|
||||||
|
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
||||||
|
return theme.palette.success.main;
|
||||||
|
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
||||||
|
return theme.palette.error.main;
|
||||||
|
default:
|
||||||
|
return theme.palette.warning.main;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const scan = async () => {
|
||||||
|
await scanDevices()
|
||||||
|
.then(() => {
|
||||||
|
toast.info(LL.SCANNING() + '...');
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
toast.error(err.message);
|
||||||
|
});
|
||||||
|
setConfirmScan(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderScanDialog = () => (
|
||||||
|
<Dialog sx={dialogStyle} open={confirmScan} onClose={() => setConfirmScan(false)}>
|
||||||
|
<DialogTitle>{LL.SCAN_DEVICES()}</DialogTitle>
|
||||||
|
<DialogContent dividers>{LL.EMS_SCAN()}</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<Button startIcon={<CancelIcon />} variant="outlined" onClick={() => setConfirmScan(false)} color="secondary">
|
||||||
|
{LL.CANCEL()}
|
||||||
|
</Button>
|
||||||
|
<Button startIcon={<PermScanWifiIcon />} variant="outlined" onClick={scan} color="primary">
|
||||||
|
{LL.SCAN()}
|
||||||
|
</Button>
|
||||||
|
</DialogActions>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
|
||||||
|
const content = () => {
|
||||||
|
if (!data) {
|
||||||
|
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<List>
|
||||||
|
<ListItem>
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar>
|
||||||
|
<BuildIcon />
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText primary={LL.EMS_ESP_VER()} secondary={data.emsesp_version} />
|
||||||
|
</ListItem>
|
||||||
|
<Divider variant="inset" component="li" />
|
||||||
|
|
||||||
|
<ListItem>
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar sx={{ bgcolor: '#5f9a5f', color: 'white' }}>
|
||||||
|
<TimerIcon />
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText primary={LL.UPTIME()} secondary={formatDurationSec(data.uptime)} />
|
||||||
|
</ListItem>
|
||||||
|
<Divider variant="inset" component="li" />
|
||||||
|
|
||||||
|
<ListItem>
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar sx={{ bgcolor: busStatusHighlight() }}>
|
||||||
|
<DirectionsBusIcon />
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText primary={LL.EMS_BUS_STATUS()} secondary={busStatus()} />
|
||||||
|
</ListItem>
|
||||||
|
<Divider variant="inset" component="li" />
|
||||||
|
|
||||||
|
<ListItem>
|
||||||
|
<ListItemAvatar>
|
||||||
|
<Avatar sx={{ bgcolor: theme.palette.success.main }}>
|
||||||
|
<DeviceHubIcon />
|
||||||
|
</Avatar>
|
||||||
|
</ListItemAvatar>
|
||||||
|
<ListItemText
|
||||||
|
primary={LL.ACTIVE_DEVICES()}
|
||||||
|
secondary={
|
||||||
|
LL.NUM_DEVICES({ num: data.num_devices }) +
|
||||||
|
', ' +
|
||||||
|
LL.NUM_TEMP_SENSORS({ num: data.num_sensors }) +
|
||||||
|
', ' +
|
||||||
|
LL.NUM_ANALOG_SENSORS({ num: data.num_analogs })
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{me.admin && (
|
||||||
|
<Button
|
||||||
|
startIcon={<PermScanWifiIcon />}
|
||||||
|
variant="outlined"
|
||||||
|
color="primary"
|
||||||
|
onClick={() => setConfirmScan(true)}
|
||||||
|
>
|
||||||
|
{LL.SCAN_DEVICES()}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</ListItem>
|
||||||
|
|
||||||
|
<Divider variant="inset" component="li" />
|
||||||
|
</List>
|
||||||
|
|
||||||
|
{renderScanDialog()}
|
||||||
|
|
||||||
|
<Box mt={2} display="flex" flexWrap="wrap">
|
||||||
|
<Button startIcon={<RefreshIcon />} variant="outlined" color="secondary" onClick={loadData}>
|
||||||
|
{LL.REFRESH()}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SystemStatus;
|
||||||
@@ -32,12 +32,13 @@ const UploadDownload: FC = () => {
|
|||||||
immediate: false
|
immediate: false
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data: data, send: loadData, error } = useRequest(SystemApi.readSystemStatus, { force: true });
|
const { data: data, send: loadData, error } = useRequest(SystemApi.readESPSystemStatus, { force: true });
|
||||||
|
|
||||||
const { data: latestVersion } = useRequest(SystemApi.getStableVersion, {
|
const { data: latestVersion } = useRequest(SystemApi.getStableVersion, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
force: true
|
force: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data: latestDevVersion } = useRequest(SystemApi.getDevVersion, {
|
const { data: latestDevVersion } = useRequest(SystemApi.getDevVersion, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
force: true
|
force: true
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const de: Translation = {
|
|||||||
FAIL: 'FEHLER',
|
FAIL: 'FEHLER',
|
||||||
QUALITY: 'QUALITÄT',
|
QUALITY: 'QUALITÄT',
|
||||||
SCAN_DEVICES: 'Nach neuen Geräten suchen',
|
SCAN_DEVICES: 'Nach neuen Geräten suchen',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS-Bus- und Aktivitätsstatus',
|
|
||||||
SCAN: 'Suche',
|
SCAN: 'Suche',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS-Telegramme empfangen (Rx)',
|
'EMS-Telegramme empfangen (Rx)',
|
||||||
@@ -322,7 +321,9 @@ const de: Translation = {
|
|||||||
ACTIVEHIGH: 'Aktiv Positiv',
|
ACTIVEHIGH: 'Aktiv Positiv',
|
||||||
ACTIVELOW: 'Aktiv Negativ',
|
ACTIVELOW: 'Aktiv Negativ',
|
||||||
UNCHANGED: 'Unverändert',
|
UNCHANGED: 'Unverändert',
|
||||||
ALWAYS: 'Immer'
|
ALWAYS: 'Immer',
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default de;
|
export default de;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const en: Translation = {
|
|||||||
FAIL: 'FAIL',
|
FAIL: 'FAIL',
|
||||||
QUALITY: 'QUALITY',
|
QUALITY: 'QUALITY',
|
||||||
SCAN_DEVICES: 'Scan for new devices',
|
SCAN_DEVICES: 'Scan for new devices',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS Bus & Activity Status',
|
|
||||||
SCAN: 'Scan',
|
SCAN: 'Scan',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS Telegrams Received (Rx)',
|
'EMS Telegrams Received (Rx)',
|
||||||
@@ -164,7 +163,7 @@ const en: Translation = {
|
|||||||
HELP_INFORMATION_1: 'Visit the online wiki to get instructions on how to configure EMS-ESP',
|
HELP_INFORMATION_1: 'Visit the online wiki to get instructions on how to configure EMS-ESP',
|
||||||
HELP_INFORMATION_2: 'For live community chat join our Discord server',
|
HELP_INFORMATION_2: 'For live community chat join our Discord server',
|
||||||
HELP_INFORMATION_3: 'To request a feature or report a bug',
|
HELP_INFORMATION_3: 'To request a feature or report a bug',
|
||||||
HELP_INFORMATION_4: 'Remember to download and attach your support information for a faster response when reporting an issue',
|
HELP_INFORMATION_4: 'Download and attach your support information for a faster response when reporting an issue',
|
||||||
HELP_INFORMATION_5: 'EMS-ESP is a free and open-source project. Please support its future development by giving it a star on Github!',
|
HELP_INFORMATION_5: 'EMS-ESP is a free and open-source project. Please support its future development by giving it a star on Github!',
|
||||||
UPLOAD: 'Upload',
|
UPLOAD: 'Upload',
|
||||||
DOWNLOAD: '{{D|d|d}}ownload',
|
DOWNLOAD: '{{D|d|d}}ownload',
|
||||||
@@ -187,7 +186,6 @@ const en: Translation = {
|
|||||||
RELEASE_IS: 'release is',
|
RELEASE_IS: 'release is',
|
||||||
RELEASE_NOTES: 'release notes',
|
RELEASE_NOTES: 'release notes',
|
||||||
EMS_ESP_VER: 'EMS-ESP Version',
|
EMS_ESP_VER: 'EMS-ESP Version',
|
||||||
PLATFORM: 'Device (Platform / SDK)',
|
|
||||||
UPTIME: 'System Uptime',
|
UPTIME: 'System Uptime',
|
||||||
HEAP: 'Heap (Free / Max Alloc)',
|
HEAP: 'Heap (Free / Max Alloc)',
|
||||||
PSRAM: 'PSRAM (Size / Free)',
|
PSRAM: 'PSRAM (Size / Free)',
|
||||||
@@ -323,7 +321,8 @@ const en: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High',
|
ACTIVEHIGH: 'Active High',
|
||||||
ACTIVELOW: 'Active Low',
|
ACTIVELOW: 'Active Low',
|
||||||
UNCHANGED: 'Unchanged',
|
UNCHANGED: 'Unchanged',
|
||||||
ALWAYS: 'Always'
|
ALWAYS: 'Always',
|
||||||
|
ACTIVITY: 'Activity'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default en;
|
export default en;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const fr: Translation = {
|
|||||||
FAIL: 'ÉCHEC',
|
FAIL: 'ÉCHEC',
|
||||||
QUALITY: 'QUALITÉ',
|
QUALITY: 'QUALITÉ',
|
||||||
SCAN_DEVICES: 'Rechercher de nouveaux appareils',
|
SCAN_DEVICES: 'Rechercher de nouveaux appareils',
|
||||||
EMS_BUS_STATUS_TITLE: 'Statut du bus et de l\'activité EMS',
|
|
||||||
SCAN: 'Scan',
|
SCAN: 'Scan',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'Télégrammes EMS reçus (Rx)',
|
'Télégrammes EMS reçus (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const fr: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default fr;
|
export default fr;
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ const it: Translation = {
|
|||||||
REMOVE: 'Elimina',
|
REMOVE: 'Elimina',
|
||||||
PROBLEM_UPDATING: 'Problema aggiornamento',
|
PROBLEM_UPDATING: 'Problema aggiornamento',
|
||||||
PROBLEM_LOADING: 'Problema caricamento',
|
PROBLEM_LOADING: 'Problema caricamento',
|
||||||
ACCESS_DENIED: 'Accesso Negato',
|
|
||||||
ANALOG_SENSOR: 'Sensore Analogico',
|
ANALOG_SENSOR: 'Sensore Analogico',
|
||||||
ANALOG_SENSORS: 'Sensori Analogici',
|
ANALOG_SENSORS: 'Sensori Analogici',
|
||||||
SETTINGS: 'Settings',
|
SETTINGS: 'Settings',
|
||||||
@@ -68,7 +67,6 @@ const it: Translation = {
|
|||||||
TEMP_SENSOR: 'Sensore Temperatura',
|
TEMP_SENSOR: 'Sensore Temperatura',
|
||||||
TEMP_SENSORS: 'Sensori Temperatura',
|
TEMP_SENSORS: 'Sensori Temperatura',
|
||||||
WRITE_CMD_SENT: 'Scrittura comando inviata',
|
WRITE_CMD_SENT: 'Scrittura comando inviata',
|
||||||
WRITE_CMD_FAILED: 'Scittura comando fallita',
|
|
||||||
EMS_BUS_WARNING: 'EMS bus disconnesso. Se questo avvertimento persiste dopo alcuni secondi prego verificare impostazioni scheda',
|
EMS_BUS_WARNING: 'EMS bus disconnesso. Se questo avvertimento persiste dopo alcuni secondi prego verificare impostazioni scheda',
|
||||||
EMS_BUS_SCANNING: 'Scansione dispositivi EMS ...',
|
EMS_BUS_SCANNING: 'Scansione dispositivi EMS ...',
|
||||||
CONNECTED: 'Connesso',
|
CONNECTED: 'Connesso',
|
||||||
@@ -82,7 +80,6 @@ const it: Translation = {
|
|||||||
FAIL: 'FALLITO',
|
FAIL: 'FALLITO',
|
||||||
QUALITY: 'QUALITÂ',
|
QUALITY: 'QUALITÂ',
|
||||||
SCAN_DEVICES: 'Scansione per nuovi dispositivi',
|
SCAN_DEVICES: 'Scansione per nuovi dispositivi',
|
||||||
EMS_BUS_STATUS_TITLE: 'Bus EMS & Stato Attività',
|
|
||||||
SCAN: 'Scansione',
|
SCAN: 'Scansione',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'Telegrammi EMS Ricevuti (Rx)',
|
'Telegrammi EMS Ricevuti (Rx)',
|
||||||
@@ -324,7 +321,8 @@ const it: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default it;
|
export default it;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const nl: Translation = {
|
|||||||
FAIL: 'MISLUKT',
|
FAIL: 'MISLUKT',
|
||||||
QUALITY: 'QUALITEIT',
|
QUALITY: 'QUALITEIT',
|
||||||
SCAN_DEVICES: 'Scannen naar nieuwe apparaten',
|
SCAN_DEVICES: 'Scannen naar nieuwe apparaten',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS Bus & Activiteitenstatus',
|
|
||||||
SCAN: 'Scan',
|
SCAN: 'Scan',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS Telegrammen ontvangen (Rx)',
|
'EMS Telegrammen ontvangen (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const nl: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nl;
|
export default nl;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const no: Translation = {
|
|||||||
FAIL: 'MISLYKKET',
|
FAIL: 'MISLYKKET',
|
||||||
QUALITY: 'KVALITET',
|
QUALITY: 'KVALITET',
|
||||||
SCAN_DEVICES: 'Søk etter nye enheter',
|
SCAN_DEVICES: 'Søk etter nye enheter',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS Buss & Aktivitet Status',
|
|
||||||
SCAN: 'Søk',
|
SCAN: 'Søk',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS Telegrammer Mottatt (Rx)',
|
'EMS Telegrammer Mottatt (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const no: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default no;
|
export default no;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const pl: BaseTranslation = {
|
|||||||
FAIL: 'Nieudane',
|
FAIL: 'Nieudane',
|
||||||
QUALITY: 'Jakość',
|
QUALITY: 'Jakość',
|
||||||
SCAN_DEVICES: 'Wyszukiwanie nowych urządzeń',
|
SCAN_DEVICES: 'Wyszukiwanie nowych urządzeń',
|
||||||
EMS_BUS_STATUS_TITLE: 'Aktywność',
|
|
||||||
SCAN: 'Skanuj',
|
SCAN: 'Skanuj',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS, telegramy odebrane (Rx)',
|
'EMS, telegramy odebrane (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const pl: BaseTranslation = {
|
|||||||
ACTIVEHIGH: 'Wyzwalany stanem wysokim',
|
ACTIVEHIGH: 'Wyzwalany stanem wysokim',
|
||||||
ACTIVELOW: 'Wyzwalany stanem niskim',
|
ACTIVELOW: 'Wyzwalany stanem niskim',
|
||||||
UNCHANGED: 'Zachowaj stan',
|
UNCHANGED: 'Zachowaj stan',
|
||||||
ALWAYS: 'Zawsze'
|
ALWAYS: 'Zawsze',
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default pl;
|
export default pl;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const sk: Translation = {
|
|||||||
FAIL: 'ZLYHANIE',
|
FAIL: 'ZLYHANIE',
|
||||||
QUALITY: 'KVALITA',
|
QUALITY: 'KVALITA',
|
||||||
SCAN_DEVICES: 'Scan pre nové zariadenia',
|
SCAN_DEVICES: 'Scan pre nové zariadenia',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS zbernica & stav aktivity',
|
|
||||||
SCAN: 'Scan',
|
SCAN: 'Scan',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS Telegramy prijaté (Rx)',
|
'EMS Telegramy prijaté (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const sk: Translation = {
|
|||||||
ACTIVEHIGH: 'Aktívny Vysoký',
|
ACTIVEHIGH: 'Aktívny Vysoký',
|
||||||
ACTIVELOW: 'Aktívny Nízky',
|
ACTIVELOW: 'Aktívny Nízky',
|
||||||
UNCHANGED: 'Nezmenené',
|
UNCHANGED: 'Nezmenené',
|
||||||
ALWAYS: 'Vždy'
|
ALWAYS: 'Vždy',
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default sk;
|
export default sk;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const sv: Translation = {
|
|||||||
FAIL: 'Misslyckades',
|
FAIL: 'Misslyckades',
|
||||||
QUALITY: 'Kvalitet',
|
QUALITY: 'Kvalitet',
|
||||||
SCAN_DEVICES: 'Sök efter nya enheter',
|
SCAN_DEVICES: 'Sök efter nya enheter',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS-buss & aktivitetsstatus',
|
|
||||||
SCAN: 'Sök',
|
SCAN: 'Sök',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS-telegram (Rx)',
|
'EMS-telegram (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const sv: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default sv;
|
export default sv;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const tr: Translation = {
|
|||||||
FAIL: 'HATA',
|
FAIL: 'HATA',
|
||||||
QUALITY: 'KALİTE',
|
QUALITY: 'KALİTE',
|
||||||
SCAN_DEVICES: 'Yeni cihaz taraması',
|
SCAN_DEVICES: 'Yeni cihaz taraması',
|
||||||
EMS_BUS_STATUS_TITLE: 'EMS Hattı ve Aktivite Durumu',
|
|
||||||
SCAN: 'Tara',
|
SCAN: 'Tara',
|
||||||
STATUS_NAMES: [
|
STATUS_NAMES: [
|
||||||
'EMS Telegramlar Alındı (Rx)',
|
'EMS Telegramlar Alındı (Rx)',
|
||||||
@@ -322,7 +321,8 @@ const tr: Translation = {
|
|||||||
ACTIVEHIGH: 'Active High', // TODO translate
|
ACTIVEHIGH: 'Active High', // TODO translate
|
||||||
ACTIVELOW: 'Active Low', // TODO translate
|
ACTIVELOW: 'Active Low', // TODO translate
|
||||||
UNCHANGED: 'Unchanged', // TODO translate
|
UNCHANGED: 'Unchanged', // TODO translate
|
||||||
ALWAYS: 'Always' // TODO translate
|
ALWAYS: 'Always', // TODO translate
|
||||||
|
ACTIVITY: 'Activity' // TODO translate
|
||||||
};
|
};
|
||||||
|
|
||||||
export default tr;
|
export default tr;
|
||||||
|
|||||||
128
interface/src/project/Activity.tsx
Normal file
128
interface/src/project/Activity.tsx
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
|
import { Box, Button } from '@mui/material';
|
||||||
|
import { Body, Cell, Header, HeaderCell, HeaderRow, Row, Table } from '@table-library/react-table-library/table';
|
||||||
|
import { useTheme as tableTheme } from '@table-library/react-table-library/theme';
|
||||||
|
import { useRequest } from 'alova';
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
|
import * as EMSESP from './api';
|
||||||
|
import type { Stat } from './types';
|
||||||
|
|
||||||
|
import type { Translation } from 'i18n/i18n-types';
|
||||||
|
import type { FC } from 'react';
|
||||||
|
import { FormLoader, SectionContent } from 'components';
|
||||||
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
|
|
||||||
|
const Activity: FC = () => {
|
||||||
|
const { data: data, send: loadData, error } = useRequest(EMSESP.readActivity);
|
||||||
|
|
||||||
|
const { LL } = useI18nContext();
|
||||||
|
|
||||||
|
const stats_theme = tableTheme({
|
||||||
|
Table: `
|
||||||
|
--data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) 90px 90px 80px;
|
||||||
|
`,
|
||||||
|
BaseRow: `
|
||||||
|
font-size: 14px;
|
||||||
|
`,
|
||||||
|
HeaderRow: `
|
||||||
|
text-transform: uppercase;
|
||||||
|
background-color: black;
|
||||||
|
color: #90CAF9;
|
||||||
|
|
||||||
|
.th {
|
||||||
|
height: 36px;
|
||||||
|
border-bottom: 1px solid #565656;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
Row: `
|
||||||
|
.td {
|
||||||
|
padding: 8px;
|
||||||
|
border-top: 1px solid #565656;
|
||||||
|
border-bottom: 1px solid #565656;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-of-type(odd) .td {
|
||||||
|
background-color: #303030;
|
||||||
|
}
|
||||||
|
&:nth-of-type(even) .td {
|
||||||
|
background-color: #1e1e1e;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
BaseCell: `
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const timer = setInterval(() => loadData(), 30000);
|
||||||
|
return () => {
|
||||||
|
clearInterval(timer);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const showName = (id: any) => {
|
||||||
|
const name: keyof Translation['STATUS_NAMES'] = id;
|
||||||
|
return LL.STATUS_NAMES[name]();
|
||||||
|
};
|
||||||
|
|
||||||
|
const showQuality = (stat: Stat) => {
|
||||||
|
if (stat.q === 0 || stat.s + stat.f === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (stat.q === 100) {
|
||||||
|
return <div style={{ color: '#00FF7F' }}>{stat.q}%</div>;
|
||||||
|
}
|
||||||
|
if (stat.q >= 95) {
|
||||||
|
return <div style={{ color: 'orange' }}>{stat.q}%</div>;
|
||||||
|
} else {
|
||||||
|
return <div style={{ color: 'red' }}>{stat.q}%</div>;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const content = () => {
|
||||||
|
if (!data) {
|
||||||
|
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Table data={{ nodes: data.stats }} theme={stats_theme} layout={{ custom: true }}>
|
||||||
|
{(tableList: any) => (
|
||||||
|
<>
|
||||||
|
<Header>
|
||||||
|
<HeaderRow>
|
||||||
|
<HeaderCell resize />
|
||||||
|
<HeaderCell stiff>{LL.SUCCESS()}</HeaderCell>
|
||||||
|
<HeaderCell stiff>{LL.FAIL()}</HeaderCell>
|
||||||
|
<HeaderCell stiff>{LL.QUALITY()}</HeaderCell>
|
||||||
|
</HeaderRow>
|
||||||
|
</Header>
|
||||||
|
<Body>
|
||||||
|
{tableList.map((stat: Stat) => (
|
||||||
|
<Row key={stat.id} item={stat}>
|
||||||
|
<Cell>{showName(stat.id)}</Cell>
|
||||||
|
<Cell stiff>{Intl.NumberFormat().format(stat.s)}</Cell>
|
||||||
|
<Cell stiff>{Intl.NumberFormat().format(stat.f)}</Cell>
|
||||||
|
<Cell stiff>{showQuality(stat)}</Cell>
|
||||||
|
</Row>
|
||||||
|
))}
|
||||||
|
</Body>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Table>
|
||||||
|
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
||||||
|
<Button startIcon={<RefreshIcon />} variant="outlined" color="secondary" onClick={loadData}>
|
||||||
|
{LL.REFRESH()}
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
return <SectionContent>{content()}</SectionContent>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Activity;
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
import CancelIcon from '@mui/icons-material/Cancel';
|
|
||||||
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
|
|
||||||
import DirectionsBusIcon from '@mui/icons-material/DirectionsBus';
|
|
||||||
import PermScanWifiIcon from '@mui/icons-material/PermScanWifi';
|
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
|
||||||
import {
|
|
||||||
Avatar,
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Dialog,
|
|
||||||
DialogActions,
|
|
||||||
DialogContent,
|
|
||||||
DialogTitle,
|
|
||||||
List,
|
|
||||||
ListItem,
|
|
||||||
ListItemAvatar,
|
|
||||||
ListItemText,
|
|
||||||
useTheme
|
|
||||||
} from '@mui/material';
|
|
||||||
import { Body, Cell, Header, HeaderCell, HeaderRow, Row, Table } from '@table-library/react-table-library/table';
|
|
||||||
import { useTheme as tableTheme } from '@table-library/react-table-library/theme';
|
|
||||||
import { useRequest } from 'alova';
|
|
||||||
import { useContext, useEffect, useState } from 'react';
|
|
||||||
import { toast } from 'react-toastify';
|
|
||||||
|
|
||||||
import * as EMSESP from './api';
|
|
||||||
import { busConnectionStatus } from './types';
|
|
||||||
import type { Stat, Status } from './types';
|
|
||||||
import type { Theme } from '@mui/material';
|
|
||||||
|
|
||||||
import type { Translation } from 'i18n/i18n-types';
|
|
||||||
import type { FC } from 'react';
|
|
||||||
import { dialogStyle } from 'CustomTheme';
|
|
||||||
import { ButtonRow, FormLoader, SectionContent } from 'components';
|
|
||||||
import { AuthenticatedContext } from 'contexts/authentication';
|
|
||||||
import { useI18nContext } from 'i18n/i18n-react';
|
|
||||||
|
|
||||||
export const isConnected = ({ status }: Status) => status !== busConnectionStatus.BUS_STATUS_OFFLINE;
|
|
||||||
|
|
||||||
const busStatusHighlight = ({ status }: Status, theme: Theme) => {
|
|
||||||
switch (status) {
|
|
||||||
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
|
||||||
return theme.palette.warning.main;
|
|
||||||
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
|
||||||
return theme.palette.success.main;
|
|
||||||
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
|
||||||
return theme.palette.error.main;
|
|
||||||
default:
|
|
||||||
return theme.palette.warning.main;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const showQuality = (stat: Stat) => {
|
|
||||||
if (stat.q === 0 || stat.s + stat.f === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (stat.q === 100) {
|
|
||||||
return <div style={{ color: '#00FF7F' }}>{stat.q}%</div>;
|
|
||||||
}
|
|
||||||
if (stat.q >= 95) {
|
|
||||||
return <div style={{ color: 'orange' }}>{stat.q}%</div>;
|
|
||||||
} else {
|
|
||||||
return <div style={{ color: 'red' }}>{stat.q}%</div>;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const EMSStatus: FC = () => {
|
|
||||||
const { data: data, send: loadData, error } = useRequest(EMSESP.readStatus);
|
|
||||||
|
|
||||||
const { LL } = useI18nContext();
|
|
||||||
|
|
||||||
const theme = useTheme();
|
|
||||||
const [confirmScan, setConfirmScan] = useState<boolean>(false);
|
|
||||||
|
|
||||||
const { me } = useContext(AuthenticatedContext);
|
|
||||||
|
|
||||||
const { send: scanDevices } = useRequest(EMSESP.scanDevices, {
|
|
||||||
immediate: false
|
|
||||||
});
|
|
||||||
|
|
||||||
const stats_theme = tableTheme({
|
|
||||||
Table: `
|
|
||||||
--data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) 90px 90px 80px;
|
|
||||||
`,
|
|
||||||
BaseRow: `
|
|
||||||
font-size: 14px;
|
|
||||||
`,
|
|
||||||
HeaderRow: `
|
|
||||||
text-transform: uppercase;
|
|
||||||
background-color: black;
|
|
||||||
color: #90CAF9;
|
|
||||||
|
|
||||||
.th {
|
|
||||||
height: 36px;
|
|
||||||
border-bottom: 1px solid #565656;
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
Row: `
|
|
||||||
.td {
|
|
||||||
padding: 8px;
|
|
||||||
border-top: 1px solid #565656;
|
|
||||||
border-bottom: 1px solid #565656;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(odd) .td {
|
|
||||||
background-color: #303030;
|
|
||||||
}
|
|
||||||
&:nth-of-type(even) .td {
|
|
||||||
background-color: #1e1e1e;
|
|
||||||
}
|
|
||||||
`,
|
|
||||||
BaseCell: `
|
|
||||||
&:not(:first-of-type) {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
`
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const timer = setInterval(() => loadData(), 30000);
|
|
||||||
return () => {
|
|
||||||
clearInterval(timer);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
const showName = (id: any) => {
|
|
||||||
const name: keyof Translation['STATUS_NAMES'] = id;
|
|
||||||
return LL.STATUS_NAMES[name]();
|
|
||||||
};
|
|
||||||
|
|
||||||
const formatDurationSec = (duration_sec: number) => {
|
|
||||||
const days = Math.trunc((duration_sec * 1000) / 86400000);
|
|
||||||
const hours = Math.trunc((duration_sec * 1000) / 3600000) % 24;
|
|
||||||
const minutes = Math.trunc((duration_sec * 1000) / 60000) % 60;
|
|
||||||
const seconds = Math.trunc((duration_sec * 1000) / 1000) % 60;
|
|
||||||
|
|
||||||
let formatted = '';
|
|
||||||
if (days) {
|
|
||||||
formatted += LL.NUM_DAYS({ num: days }) + ' ';
|
|
||||||
}
|
|
||||||
if (hours) {
|
|
||||||
formatted += LL.NUM_HOURS({ num: hours }) + ' ';
|
|
||||||
}
|
|
||||||
if (minutes) {
|
|
||||||
formatted += LL.NUM_MINUTES({ num: minutes }) + ' ';
|
|
||||||
}
|
|
||||||
formatted += LL.NUM_SECONDS({ num: seconds });
|
|
||||||
return formatted;
|
|
||||||
};
|
|
||||||
|
|
||||||
const busStatus = () => {
|
|
||||||
if (data) {
|
|
||||||
switch (data.status) {
|
|
||||||
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
|
||||||
return LL.CONNECTED(0) + ' (' + formatDurationSec(data.uptime) + ')';
|
|
||||||
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
|
||||||
return LL.TX_ISSUES();
|
|
||||||
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
|
||||||
return LL.DISCONNECTED();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 'Unknown';
|
|
||||||
};
|
|
||||||
|
|
||||||
const scan = async () => {
|
|
||||||
await scanDevices()
|
|
||||||
.then(() => {
|
|
||||||
toast.info(LL.SCANNING() + '...');
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
toast.error(err.message);
|
|
||||||
});
|
|
||||||
setConfirmScan(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const renderScanDialog = () => (
|
|
||||||
<Dialog sx={dialogStyle} open={confirmScan} onClose={() => setConfirmScan(false)}>
|
|
||||||
<DialogTitle>{LL.SCAN_DEVICES()}</DialogTitle>
|
|
||||||
<DialogContent dividers>{LL.EMS_SCAN()}</DialogContent>
|
|
||||||
<DialogActions>
|
|
||||||
<Button startIcon={<CancelIcon />} variant="outlined" onClick={() => setConfirmScan(false)} color="secondary">
|
|
||||||
{LL.CANCEL()}
|
|
||||||
</Button>
|
|
||||||
<Button startIcon={<PermScanWifiIcon />} variant="outlined" onClick={scan} color="primary">
|
|
||||||
{LL.SCAN()}
|
|
||||||
</Button>
|
|
||||||
</DialogActions>
|
|
||||||
</Dialog>
|
|
||||||
);
|
|
||||||
|
|
||||||
const content = () => {
|
|
||||||
if (!data) {
|
|
||||||
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<List>
|
|
||||||
<ListItem>
|
|
||||||
<ListItemAvatar>
|
|
||||||
<Avatar sx={{ bgcolor: busStatusHighlight(data, theme) }}>
|
|
||||||
<DirectionsBusIcon />
|
|
||||||
</Avatar>
|
|
||||||
</ListItemAvatar>
|
|
||||||
<ListItemText primary={LL.EMS_BUS_STATUS()} secondary={busStatus()} />
|
|
||||||
</ListItem>
|
|
||||||
<ListItem>
|
|
||||||
<ListItemAvatar>
|
|
||||||
<Avatar sx={{ bgcolor: theme.palette.success.main }}>
|
|
||||||
<DeviceHubIcon />
|
|
||||||
</Avatar>
|
|
||||||
</ListItemAvatar>
|
|
||||||
<ListItemText
|
|
||||||
primary={LL.ACTIVE_DEVICES()}
|
|
||||||
secondary={
|
|
||||||
LL.NUM_DEVICES({ num: data.num_devices }) +
|
|
||||||
', ' +
|
|
||||||
LL.NUM_TEMP_SENSORS({ num: data.num_sensors }) +
|
|
||||||
', ' +
|
|
||||||
LL.NUM_ANALOG_SENSORS({ num: data.num_analogs })
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</ListItem>
|
|
||||||
<Box m={3} />
|
|
||||||
<Table data={{ nodes: data.stats }} theme={stats_theme} layout={{ custom: true }}>
|
|
||||||
{(tableList: any) => (
|
|
||||||
<>
|
|
||||||
<Header>
|
|
||||||
<HeaderRow>
|
|
||||||
<HeaderCell resize />
|
|
||||||
<HeaderCell stiff>{LL.SUCCESS()}</HeaderCell>
|
|
||||||
<HeaderCell stiff>{LL.FAIL()}</HeaderCell>
|
|
||||||
<HeaderCell stiff>{LL.QUALITY()}</HeaderCell>
|
|
||||||
</HeaderRow>
|
|
||||||
</Header>
|
|
||||||
<Body>
|
|
||||||
{tableList.map((stat: Stat) => (
|
|
||||||
<Row key={stat.id} item={stat}>
|
|
||||||
<Cell>{showName(stat.id)}</Cell>
|
|
||||||
<Cell stiff>{Intl.NumberFormat().format(stat.s)}</Cell>
|
|
||||||
<Cell stiff>{Intl.NumberFormat().format(stat.f)}</Cell>
|
|
||||||
<Cell stiff>{showQuality(stat)}</Cell>
|
|
||||||
</Row>
|
|
||||||
))}
|
|
||||||
</Body>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Table>
|
|
||||||
</List>
|
|
||||||
{renderScanDialog()}
|
|
||||||
<Box display="flex" flexWrap="wrap">
|
|
||||||
<Box flexGrow={1} sx={{ '& button': { mt: 2 } }}>
|
|
||||||
<Button startIcon={<RefreshIcon />} variant="outlined" color="secondary" onClick={loadData}>
|
|
||||||
{LL.REFRESH()}
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
{me.admin && (
|
|
||||||
<Box flexWrap="nowrap" whiteSpace="nowrap">
|
|
||||||
<ButtonRow>
|
|
||||||
<Button
|
|
||||||
startIcon={<PermScanWifiIcon />}
|
|
||||||
variant="outlined"
|
|
||||||
color="primary"
|
|
||||||
onClick={() => setConfirmScan(true)}
|
|
||||||
>
|
|
||||||
{LL.SCAN_DEVICES()}
|
|
||||||
</Button>
|
|
||||||
</ButtonRow>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return <SectionContent title={LL.EMS_BUS_STATUS_TITLE()}>{content()}</SectionContent>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default EMSStatus;
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import type {
|
import type {
|
||||||
APIcall,
|
APIcall,
|
||||||
Settings,
|
Settings,
|
||||||
Status,
|
Activity,
|
||||||
CoreData,
|
CoreData,
|
||||||
Devices,
|
Devices,
|
||||||
DeviceEntity,
|
DeviceEntity,
|
||||||
@@ -25,7 +25,7 @@ export const readDeviceData = (id: number) =>
|
|||||||
});
|
});
|
||||||
export const writeDeviceValue = (data: any) => alovaInstance.Post('/rest/writeDeviceValue', data);
|
export const writeDeviceValue = (data: any) => alovaInstance.Post('/rest/writeDeviceValue', data);
|
||||||
|
|
||||||
// SettingsApplication
|
// Application Settings
|
||||||
export const readSettings = () => alovaInstance.Get<Settings>('/rest/settings');
|
export const readSettings = () => alovaInstance.Get<Settings>('/rest/settings');
|
||||||
export const writeSettings = (data: any) => alovaInstance.Post('/rest/settings', data);
|
export const writeSettings = (data: any) => alovaInstance.Post('/rest/settings', data);
|
||||||
export const getBoardProfile = (boardProfile: string) =>
|
export const getBoardProfile = (boardProfile: string) =>
|
||||||
@@ -33,17 +33,18 @@ export const getBoardProfile = (boardProfile: string) =>
|
|||||||
params: { boardProfile }
|
params: { boardProfile }
|
||||||
});
|
});
|
||||||
|
|
||||||
// DashboardSensors
|
// Sensors
|
||||||
export const readSensorData = () => alovaInstance.Get<SensorData>('/rest/sensorData');
|
export const readSensorData = () => alovaInstance.Get<SensorData>('/rest/sensorData');
|
||||||
export const writeTemperatureSensor = (ts: WriteTemperatureSensor) =>
|
export const writeTemperatureSensor = (ts: WriteTemperatureSensor) =>
|
||||||
alovaInstance.Post('/rest/writeTemperatureSensor', ts);
|
alovaInstance.Post('/rest/writeTemperatureSensor', ts);
|
||||||
export const writeAnalogSensor = (as: WriteAnalogSensor) => alovaInstance.Post('/rest/writeAnalogSensor', as);
|
export const writeAnalogSensor = (as: WriteAnalogSensor) => alovaInstance.Post('/rest/writeAnalogSensor', as);
|
||||||
|
|
||||||
// DashboardStatus
|
// Activity
|
||||||
export const readStatus = () => alovaInstance.Get<Status>('/rest/status');
|
export const readActivity = () => alovaInstance.Get<Activity>('/rest/activity');
|
||||||
|
|
||||||
export const scanDevices = () => alovaInstance.Post('/rest/scanDevices');
|
export const scanDevices = () => alovaInstance.Post('/rest/scanDevices');
|
||||||
|
|
||||||
// HelpInformation
|
// API, used in HelpInformation
|
||||||
export const API = (apiCall: APIcall) => alovaInstance.Post('/api', apiCall);
|
export const API = (apiCall: APIcall) => alovaInstance.Post('/api', apiCall);
|
||||||
|
|
||||||
// UploadFileForm
|
// UploadFileForm
|
||||||
|
|||||||
@@ -50,13 +50,7 @@ export interface Stat {
|
|||||||
q: number; // quality
|
q: number; // quality
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Status {
|
export interface Activity {
|
||||||
status: busConnectionStatus;
|
|
||||||
tx_mode: number;
|
|
||||||
uptime: number;
|
|
||||||
num_devices: number;
|
|
||||||
num_sensors: number;
|
|
||||||
num_analogs: number;
|
|
||||||
stats: Stat[];
|
stats: Stat[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export interface SystemStatus {
|
import type { busConnectionStatus } from 'project/types';
|
||||||
// TODO fix this next
|
|
||||||
|
export interface ESPSystemStatus {
|
||||||
emsesp_version: string;
|
emsesp_version: string;
|
||||||
esp_platform: string;
|
esp_platform: string;
|
||||||
max_alloc_heap: number;
|
max_alloc_heap: number;
|
||||||
@@ -17,13 +18,23 @@ export interface SystemStatus {
|
|||||||
app_free: number;
|
app_free: number;
|
||||||
fs_used: number;
|
fs_used: number;
|
||||||
fs_free: number;
|
fs_free: number;
|
||||||
uptime: string;
|
|
||||||
free_mem: number;
|
free_mem: number;
|
||||||
psram_size?: number;
|
psram_size?: number;
|
||||||
free_psram?: number;
|
free_psram?: number;
|
||||||
has_loader: boolean;
|
has_loader: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SystemStatus {
|
||||||
|
emsesp_version: string;
|
||||||
|
esp_platform: string;
|
||||||
|
status: busConnectionStatus;
|
||||||
|
tx_mode: number;
|
||||||
|
uptime: number;
|
||||||
|
num_devices: number;
|
||||||
|
num_sensors: number;
|
||||||
|
num_analogs: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface OTASettings {
|
export interface OTASettings {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
port: number;
|
port: number;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command === 'build' && mode === 'hosted') {
|
if (mode === 'hosted') {
|
||||||
return {
|
return {
|
||||||
plugins: [preact(), viteTsconfigPaths()],
|
plugins: [preact(), viteTsconfigPaths()],
|
||||||
build: {
|
build: {
|
||||||
@@ -38,8 +38,6 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// production build, both for hosted and building the firmware
|
|
||||||
if (command === 'build') {
|
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
preact(),
|
preact(),
|
||||||
@@ -81,7 +79,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
open: false,
|
open: false,
|
||||||
gzipSize: true,
|
gzipSize: true,
|
||||||
brotliSize: true,
|
brotliSize: true,
|
||||||
filename: 'analyse.html' // will be saved in project's root
|
filename: '../analyse.html' // will be saved in project's root
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -130,5 +128,4 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,6 +39,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/code-frame@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/code-frame@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@babel/highlight": "npm:^7.24.1"
|
||||||
|
picocolors: "npm:^1.0.0"
|
||||||
|
checksum: 10/71da2249ea5cea5f0cb4c6e0052e921574d16ae415c5b876123787d160abc98442a91701834c875363dadd75d200897aa278336c505335722298982f793bdf89
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/compat-data@npm:^7.23.5":
|
"@babel/compat-data@npm:^7.23.5":
|
||||||
version: 7.23.5
|
version: 7.23.5
|
||||||
resolution: "@babel/compat-data@npm:7.23.5"
|
resolution: "@babel/compat-data@npm:7.23.5"
|
||||||
@@ -46,7 +56,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@babel/core@npm:^7.22.1, @babel/core@npm:^7.24.0":
|
"@babel/core@npm:^7.22.1":
|
||||||
version: 7.24.0
|
version: 7.24.0
|
||||||
resolution: "@babel/core@npm:7.24.0"
|
resolution: "@babel/core@npm:7.24.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -69,6 +79,29 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/core@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/core@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@ampproject/remapping": "npm:^2.2.0"
|
||||||
|
"@babel/code-frame": "npm:^7.24.1"
|
||||||
|
"@babel/generator": "npm:^7.24.1"
|
||||||
|
"@babel/helper-compilation-targets": "npm:^7.23.6"
|
||||||
|
"@babel/helper-module-transforms": "npm:^7.23.3"
|
||||||
|
"@babel/helpers": "npm:^7.24.1"
|
||||||
|
"@babel/parser": "npm:^7.24.1"
|
||||||
|
"@babel/template": "npm:^7.24.0"
|
||||||
|
"@babel/traverse": "npm:^7.24.1"
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
convert-source-map: "npm:^2.0.0"
|
||||||
|
debug: "npm:^4.1.0"
|
||||||
|
gensync: "npm:^1.0.0-beta.2"
|
||||||
|
json5: "npm:^2.2.3"
|
||||||
|
semver: "npm:^6.3.1"
|
||||||
|
checksum: 10/f8c153acd619a5d17caee7aff052a2aa306ceda280ffc07182d7b5dd40c41c7511ae89d64bc23ec5555e4639fc9c87ceb7b4afc12252acab548ebb7654397680
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/generator@npm:^7.23.6":
|
"@babel/generator@npm:^7.23.6":
|
||||||
version: 7.23.6
|
version: 7.23.6
|
||||||
resolution: "@babel/generator@npm:7.23.6"
|
resolution: "@babel/generator@npm:7.23.6"
|
||||||
@@ -81,6 +114,18 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/generator@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/generator@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
"@jridgewell/gen-mapping": "npm:^0.3.5"
|
||||||
|
"@jridgewell/trace-mapping": "npm:^0.3.25"
|
||||||
|
jsesc: "npm:^2.5.1"
|
||||||
|
checksum: 10/c6160e9cd63d7ed7168dee27d827f9c46fab820c45861a5df56cd5c78047f7c3fc97c341e9ccfa1a6f97c87ec2563d9903380b5f92794e3540a6c5f99eb8f075
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/helper-annotate-as-pure@npm:^7.22.5":
|
"@babel/helper-annotate-as-pure@npm:^7.22.5":
|
||||||
version: 7.22.5
|
version: 7.22.5
|
||||||
resolution: "@babel/helper-annotate-as-pure@npm:7.22.5"
|
resolution: "@babel/helper-annotate-as-pure@npm:7.22.5"
|
||||||
@@ -210,6 +255,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/helpers@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/helpers@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@babel/template": "npm:^7.24.0"
|
||||||
|
"@babel/traverse": "npm:^7.24.1"
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
checksum: 10/82d3cdd3beafc4583f237515ef220bc205ced8b0540c6c6e191fc367a9589bd7304b8f9800d3d7574d4db9f079bd555979816b1874c86e53b3e7dd2032ad6c7c
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/highlight@npm:^7.23.4":
|
"@babel/highlight@npm:^7.23.4":
|
||||||
version: 7.23.4
|
version: 7.23.4
|
||||||
resolution: "@babel/highlight@npm:7.23.4"
|
resolution: "@babel/highlight@npm:7.23.4"
|
||||||
@@ -221,6 +277,18 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/highlight@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/highlight@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@babel/helper-validator-identifier": "npm:^7.22.20"
|
||||||
|
chalk: "npm:^2.4.2"
|
||||||
|
js-tokens: "npm:^4.0.0"
|
||||||
|
picocolors: "npm:^1.0.0"
|
||||||
|
checksum: 10/5d9ad31006f462d3863e9c73004bd46d94d2a4144b3fcc1c9945d8a82411d05477d47466a1121f1d1dea986780145bf934e8b2809c6f056b2203fe481b4d471d
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/parser@npm:^7.24.0":
|
"@babel/parser@npm:^7.24.0":
|
||||||
version: 7.24.0
|
version: 7.24.0
|
||||||
resolution: "@babel/parser@npm:7.24.0"
|
resolution: "@babel/parser@npm:7.24.0"
|
||||||
@@ -230,6 +298,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/parser@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/parser@npm:7.24.1"
|
||||||
|
bin:
|
||||||
|
parser: ./bin/babel-parser.js
|
||||||
|
checksum: 10/561d9454091e07ecfec3828ce79204c0fc9d24e17763f36181c6984392be4ca6b79c8225f2224fdb7b1b3b70940e243368c8f83ac77ec2dc20f46d3d06bd6795
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/plugin-syntax-jsx@npm:^7.23.3":
|
"@babel/plugin-syntax-jsx@npm:^7.23.3":
|
||||||
version: 7.23.3
|
version: 7.23.3
|
||||||
resolution: "@babel/plugin-syntax-jsx@npm:7.23.3"
|
resolution: "@babel/plugin-syntax-jsx@npm:7.23.3"
|
||||||
@@ -305,6 +382,24 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@babel/traverse@npm:^7.24.1":
|
||||||
|
version: 7.24.1
|
||||||
|
resolution: "@babel/traverse@npm:7.24.1"
|
||||||
|
dependencies:
|
||||||
|
"@babel/code-frame": "npm:^7.24.1"
|
||||||
|
"@babel/generator": "npm:^7.24.1"
|
||||||
|
"@babel/helper-environment-visitor": "npm:^7.22.20"
|
||||||
|
"@babel/helper-function-name": "npm:^7.23.0"
|
||||||
|
"@babel/helper-hoist-variables": "npm:^7.22.5"
|
||||||
|
"@babel/helper-split-export-declaration": "npm:^7.22.6"
|
||||||
|
"@babel/parser": "npm:^7.24.1"
|
||||||
|
"@babel/types": "npm:^7.24.0"
|
||||||
|
debug: "npm:^4.3.1"
|
||||||
|
globals: "npm:^11.1.0"
|
||||||
|
checksum: 10/b9b0173c286ef549e179f3725df3c4958069ad79fe5b9840adeb99692eb4a5a08db4e735c0f086aab52e7e08ec711cee9e7c06cb908d8035641d1382172308d3
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.24.0, @babel/types@npm:^7.8.3":
|
"@babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.6, @babel/types@npm:^7.24.0, @babel/types@npm:^7.8.3":
|
||||||
version: 7.24.0
|
version: 7.24.0
|
||||||
resolution: "@babel/types@npm:7.24.0"
|
resolution: "@babel/types@npm:7.24.0"
|
||||||
@@ -801,14 +896,14 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/base@npm:5.0.0-beta.39":
|
"@mui/base@npm:5.0.0-beta.40":
|
||||||
version: 5.0.0-beta.39
|
version: 5.0.0-beta.40
|
||||||
resolution: "@mui/base@npm:5.0.0-beta.39"
|
resolution: "@mui/base@npm:5.0.0-beta.40"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@floating-ui/react-dom": "npm:^2.0.8"
|
"@floating-ui/react-dom": "npm:^2.0.8"
|
||||||
"@mui/types": "npm:^7.2.13"
|
"@mui/types": "npm:^7.2.14"
|
||||||
"@mui/utils": "npm:^5.15.13"
|
"@mui/utils": "npm:^5.15.14"
|
||||||
"@popperjs/core": "npm:^2.11.8"
|
"@popperjs/core": "npm:^2.11.8"
|
||||||
clsx: "npm:^2.1.0"
|
clsx: "npm:^2.1.0"
|
||||||
prop-types: "npm:^15.8.1"
|
prop-types: "npm:^15.8.1"
|
||||||
@@ -819,20 +914,20 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/320aeedb6c32df9807e2581065e98c3dd0510dcd8666c1c4804fc2281fa42e4e2111152961ded0ba1c3b9dc320936ee73d1a0861c0985a0da86a7bd7bf8cbada
|
checksum: 10/ebee3d9e1136710dcb2af5828acc6bd8d54f6b124785d011585c2665a48dc66e35ccb344d5ebc7fd8bfd776cccb8ea434911f151a62bee193677ee9dc67fc7fc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/core-downloads-tracker@npm:^5.15.13":
|
"@mui/core-downloads-tracker@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/core-downloads-tracker@npm:5.15.13"
|
resolution: "@mui/core-downloads-tracker@npm:5.15.14"
|
||||||
checksum: 10/988e5c7ff9c185c603b6c5d533e6dbb305b5d334c3f2b4ebcc9e2a5fb7dea141ccb05f70aa4cbf972e2556a67a0d928c7bd3bf7ab5d41b139fd0532af64e2c65
|
checksum: 10/0a1c63d906af594d0a7fb63d1d574482b3916351ea8908e8621c8bfa16ac38cf4edb5a334f0e28084f583ac928b587cab6e031f992195e0a590186faba13b9a5
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/icons-material@npm:^5.15.13":
|
"@mui/icons-material@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/icons-material@npm:5.15.13"
|
resolution: "@mui/icons-material@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -842,20 +937,20 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/89e79ebe4a0ab8594934f4056034dcffe57cc7c4468717545d67310cb74626c38ea79a7129d16fbf265745ceca7e8c35d21c3f59a4519e0776f774f6ea228fd3
|
checksum: 10/a5033b67d4ff455f5fdd91fc51d26d967d634e861cde194b9dde02a8cc3f557d1b3f7e0b3175bc654b8e944f2118d46620485734ecd9d2ed4a6f748386447933
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/material@npm:^5.15.13":
|
"@mui/material@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/material@npm:5.15.13"
|
resolution: "@mui/material@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@mui/base": "npm:5.0.0-beta.39"
|
"@mui/base": "npm:5.0.0-beta.40"
|
||||||
"@mui/core-downloads-tracker": "npm:^5.15.13"
|
"@mui/core-downloads-tracker": "npm:^5.15.14"
|
||||||
"@mui/system": "npm:^5.15.13"
|
"@mui/system": "npm:^5.15.14"
|
||||||
"@mui/types": "npm:^7.2.13"
|
"@mui/types": "npm:^7.2.14"
|
||||||
"@mui/utils": "npm:^5.15.13"
|
"@mui/utils": "npm:^5.15.14"
|
||||||
"@types/react-transition-group": "npm:^4.4.10"
|
"@types/react-transition-group": "npm:^4.4.10"
|
||||||
clsx: "npm:^2.1.0"
|
clsx: "npm:^2.1.0"
|
||||||
csstype: "npm:^3.1.3"
|
csstype: "npm:^3.1.3"
|
||||||
@@ -875,16 +970,16 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/565e219d58f93bd8cdcc5e9d432046d6bfc3b2d81e3f1b8d4b93347f895f26d3f348a312fe2b943c41275fb3ea492e76d9651ce16f64e5773fe2be07309c67a2
|
checksum: 10/a2c3355b39b86472bf2debb84d6c032b1ea4ba691fbda0f25803f2702f9106130bb85a7d2757545ce97540fe185f07cf24574d5786a29df26baa298ff7db063b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/private-theming@npm:^5.15.13":
|
"@mui/private-theming@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/private-theming@npm:5.15.13"
|
resolution: "@mui/private-theming@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@mui/utils": "npm:^5.15.13"
|
"@mui/utils": "npm:^5.15.14"
|
||||||
prop-types: "npm:^15.8.1"
|
prop-types: "npm:^15.8.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@types/react": ^17.0.0 || ^18.0.0
|
"@types/react": ^17.0.0 || ^18.0.0
|
||||||
@@ -892,13 +987,13 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/677fa31f8caa1f3ae4b44806b2cf340b23eb9132baaca1421f615d1ef1aae5560a7c452b4f79e38bdb865a54306ba65c4ac95c1f4c0216f89217dd19fb320747
|
checksum: 10/6a14311ed53ee4adccfe0ba93275b43773d22fdd10c0d4ba680b9368fc0616a5e0f38f29d2080bcd7e4ed79123047e5f245c403d3fd822e960a97762be65218d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/styled-engine@npm:^5.15.11":
|
"@mui/styled-engine@npm:^5.15.14":
|
||||||
version: 5.15.11
|
version: 5.15.14
|
||||||
resolution: "@mui/styled-engine@npm:5.15.11"
|
resolution: "@mui/styled-engine@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@emotion/cache": "npm:^11.11.0"
|
"@emotion/cache": "npm:^11.11.0"
|
||||||
@@ -913,19 +1008,19 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
"@emotion/styled":
|
"@emotion/styled":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/fedbb9891abd633e5072d30aae7405cec9e5e22ac63c9e117c49ddb66e86ec7baaed58f934efc7847ea86cc856a8c9a9ec5a08cd0072a7850184321a968704ad
|
checksum: 10/2a5e03bb20502aef94cfb908898c50abb769192deb32d7f4237039683ce5266104cdc4055a7f0a8342aa62447d52b7439a4f2d0dda0fa6709c227c3621468cab
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/system@npm:^5.15.13":
|
"@mui/system@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/system@npm:5.15.13"
|
resolution: "@mui/system@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@mui/private-theming": "npm:^5.15.13"
|
"@mui/private-theming": "npm:^5.15.14"
|
||||||
"@mui/styled-engine": "npm:^5.15.11"
|
"@mui/styled-engine": "npm:^5.15.14"
|
||||||
"@mui/types": "npm:^7.2.13"
|
"@mui/types": "npm:^7.2.14"
|
||||||
"@mui/utils": "npm:^5.15.13"
|
"@mui/utils": "npm:^5.15.14"
|
||||||
clsx: "npm:^2.1.0"
|
clsx: "npm:^2.1.0"
|
||||||
csstype: "npm:^3.1.3"
|
csstype: "npm:^3.1.3"
|
||||||
prop-types: "npm:^15.8.1"
|
prop-types: "npm:^15.8.1"
|
||||||
@@ -941,25 +1036,25 @@ __metadata:
|
|||||||
optional: true
|
optional: true
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/678a741d872a4badba32f7b88d7db969af96cf3e029f984abd0f58e88e95203a1ee3f4110f970a015d15f7e9171d0dea57040cdb8419901236790df4900de017
|
checksum: 10/64a9eac1bebefad3042cce28a75d0af2828aa71acd4c32fb0267f5e68bc75b16a093b6fb30709db83ec32130f14f1d67c1c27457ef62733e54a9d04f9b027cee
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/types@npm:^7.2.13":
|
"@mui/types@npm:^7.2.14":
|
||||||
version: 7.2.13
|
version: 7.2.14
|
||||||
resolution: "@mui/types@npm:7.2.13"
|
resolution: "@mui/types@npm:7.2.14"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@types/react": ^17.0.0 || ^18.0.0
|
"@types/react": ^17.0.0 || ^18.0.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/a35bff025f715073329bd7cbe11ef4ce331ea377adffc0c5cd264bea47283590ce928d1fdbbc27506d1d462151325c81e71f2378ac4335feef3042010bbf3fcd
|
checksum: 10/b10cca8f63ea522be4f7c185acd1f4d031947e53824cbf9dc5649c165bcfa8a2749e83fd0bd1809b8e2698f58638ab2b4ce03550095989189d14434ea5c6c0b6
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mui/utils@npm:^5.15.13":
|
"@mui/utils@npm:^5.15.14":
|
||||||
version: 5.15.13
|
version: 5.15.14
|
||||||
resolution: "@mui/utils@npm:5.15.13"
|
resolution: "@mui/utils@npm:5.15.14"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": "npm:^7.23.9"
|
"@babel/runtime": "npm:^7.23.9"
|
||||||
"@types/prop-types": "npm:^15.7.11"
|
"@types/prop-types": "npm:^15.7.11"
|
||||||
@@ -971,7 +1066,7 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
"@types/react":
|
"@types/react":
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/16f78b87bb88f6e1131ac1ff426d4fda128d56bbbca53b98ae45ce45bf0bb826dba66cbff98b25d842225fd1a983c17ae83b43ead17c9add88789eb9514d065b
|
checksum: 10/b3cbe2d0aa7ec65969752dababc39fc6e0b8bb1a9cf8b9bac42ca40e3dd3eaa59b79765bd259019318acc7421d64b9f421bc67e776a581d7c9da6a1c0c50bfbc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1396,7 +1491,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:*, @types/node@npm:^20.11.28":
|
"@types/node@npm:*":
|
||||||
version: 20.11.28
|
version: 20.11.28
|
||||||
resolution: "@types/node@npm:20.11.28"
|
resolution: "@types/node@npm:20.11.28"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1405,6 +1500,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@types/node@npm:^20.11.30":
|
||||||
|
version: 20.11.30
|
||||||
|
resolution: "@types/node@npm:20.11.30"
|
||||||
|
dependencies:
|
||||||
|
undici-types: "npm:~5.26.4"
|
||||||
|
checksum: 10/78515bc768d2b878e2e06a1c20eb4f5840072b79b8d28ff3dd0a7feaaf48fd3a2ac03cfa5bc7564da82db5906b43e9ba0e5df9f43d870b7aae2942306e208815
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@types/parse-json@npm:^4.0.0":
|
"@types/parse-json@npm:^4.0.0":
|
||||||
version: 4.0.2
|
version: 4.0.2
|
||||||
resolution: "@types/parse-json@npm:4.0.2"
|
resolution: "@types/parse-json@npm:4.0.2"
|
||||||
@@ -1512,15 +1616,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@npm:^7.3.0":
|
"@typescript-eslint/eslint-plugin@npm:^7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/eslint-plugin@npm:7.3.0"
|
resolution: "@typescript-eslint/eslint-plugin@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/regexpp": "npm:^4.5.1"
|
"@eslint-community/regexpp": "npm:^4.5.1"
|
||||||
"@typescript-eslint/scope-manager": "npm:7.3.0"
|
"@typescript-eslint/scope-manager": "npm:7.3.1"
|
||||||
"@typescript-eslint/type-utils": "npm:7.3.0"
|
"@typescript-eslint/type-utils": "npm:7.3.1"
|
||||||
"@typescript-eslint/utils": "npm:7.3.0"
|
"@typescript-eslint/utils": "npm:7.3.1"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.3.0"
|
"@typescript-eslint/visitor-keys": "npm:7.3.1"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
graphemer: "npm:^1.4.0"
|
graphemer: "npm:^1.4.0"
|
||||||
ignore: "npm:^5.2.4"
|
ignore: "npm:^5.2.4"
|
||||||
@@ -1533,44 +1637,44 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/6728d30193446f1477c3b566fb33b762c95e531b385f1aeb4d5a28b488278e7a66e1efaa7de8ffea75eb470a99c78c9ffe022067b043bd4e3c936dd26d59df0b
|
checksum: 10/8ed276113a714d93ab3ababb1179e4785bd9378e6d97726519ea1d2ac502a94475e0be988c2ec427dcfc1e6950329d58da6e64131ee87028fce63493461cc51a
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/parser@npm:^7.3.0":
|
"@typescript-eslint/parser@npm:^7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/parser@npm:7.3.0"
|
resolution: "@typescript-eslint/parser@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/scope-manager": "npm:7.3.0"
|
"@typescript-eslint/scope-manager": "npm:7.3.1"
|
||||||
"@typescript-eslint/types": "npm:7.3.0"
|
"@typescript-eslint/types": "npm:7.3.1"
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.3.0"
|
"@typescript-eslint/typescript-estree": "npm:7.3.1"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.3.0"
|
"@typescript-eslint/visitor-keys": "npm:7.3.1"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.56.0
|
eslint: ^8.56.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/df06a4e8d734951bb6843797f04e315122be071bbc5cc7939c9a0e61480fa3045e363db8862cdc81ebf04abd594cc1cedf625ba33fc62918319c4bd2ba7fb5fc
|
checksum: 10/018326010fec1dcefd75809ccac5102a475bf1e052d824b898d707e7c0bf3e51e101164b410d1b2a513628985c96eb412538644d2005e26b99a22db6eb9402df
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@npm:7.3.0":
|
"@typescript-eslint/scope-manager@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/scope-manager@npm:7.3.0"
|
resolution: "@typescript-eslint/scope-manager@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.3.0"
|
"@typescript-eslint/types": "npm:7.3.1"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.3.0"
|
"@typescript-eslint/visitor-keys": "npm:7.3.1"
|
||||||
checksum: 10/380ac558032f396dd7cf8a38d91a462358bef559cb2d6fcbe6a15faf846923ec31e46054d48e18def609e7c955d14ca67790d578e7a08511815b876b4497d8ac
|
checksum: 10/7384d1f46d7f3678a1135a1ac0bd8b6dfa2f01e93b19e2510c7082766cf6983a1bf80b4ccf498651199a81d9f2bdb65101fd7a19226a723260514204d0c30b34
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/type-utils@npm:7.3.0":
|
"@typescript-eslint/type-utils@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/type-utils@npm:7.3.0"
|
resolution: "@typescript-eslint/type-utils@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.3.0"
|
"@typescript-eslint/typescript-estree": "npm:7.3.1"
|
||||||
"@typescript-eslint/utils": "npm:7.3.0"
|
"@typescript-eslint/utils": "npm:7.3.1"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
ts-api-utils: "npm:^1.0.1"
|
ts-api-utils: "npm:^1.0.1"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1578,23 +1682,23 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/361ac197924ebc0d8530e786b1573c557589d264d3988dbe25d301d71470bcf0168e694ab31dc8b8c7385c54b178e0005e4e7b17fa2a7e617a58a363ec3d84af
|
checksum: 10/fae9003a76a8f2a2a4bb88dc0f82c0a1ca0688633183fac391920e7124a12807aac84bb287a21f61e99523c15223d1c08e7680685ebf21d07429604cba6c420b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/types@npm:7.3.0":
|
"@typescript-eslint/types@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/types@npm:7.3.0"
|
resolution: "@typescript-eslint/types@npm:7.3.1"
|
||||||
checksum: 10/7e190be9e051268f582b1ad6482adc60c1d55aef59c9ed7d962df7dfb114f41ff0b95b984cf91a295cdac6b8f530f70f5768e926eeb606801d6f2ec3f772427b
|
checksum: 10/c9c8eae1cf937cececd99a253bd65eb71b40206e79cf917ad9c3b3ab80cc7ce5fefb2804f9fd2a70e7438951f0d1e63df3031fc61e3a08dfef5fde208a12e0ed
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@npm:7.3.0":
|
"@typescript-eslint/typescript-estree@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/typescript-estree@npm:7.3.0"
|
resolution: "@typescript-eslint/typescript-estree@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.3.0"
|
"@typescript-eslint/types": "npm:7.3.1"
|
||||||
"@typescript-eslint/visitor-keys": "npm:7.3.0"
|
"@typescript-eslint/visitor-keys": "npm:7.3.1"
|
||||||
debug: "npm:^4.3.4"
|
debug: "npm:^4.3.4"
|
||||||
globby: "npm:^11.1.0"
|
globby: "npm:^11.1.0"
|
||||||
is-glob: "npm:^4.0.3"
|
is-glob: "npm:^4.0.3"
|
||||||
@@ -1604,34 +1708,34 @@ __metadata:
|
|||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10/af3bf304401b184cd56d72aa95cc4f924ae33ae35206fa848c1ea3a2c647b03e05e8b19f42c14c5fdd67d4a47f4e9fcbc34c9b566d2fe3f93a7fd297c6241bbb
|
checksum: 10/363ad9864b56394b4000dff7c2b77d0ea52042c3c20e3b86c0f3c66044915632d9890255527c6f3a5ef056886dec72e38fbcfce49d4ad092c160440f54128230
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/utils@npm:7.3.0":
|
"@typescript-eslint/utils@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/utils@npm:7.3.0"
|
resolution: "@typescript-eslint/utils@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
"@eslint-community/eslint-utils": "npm:^4.4.0"
|
||||||
"@types/json-schema": "npm:^7.0.12"
|
"@types/json-schema": "npm:^7.0.12"
|
||||||
"@types/semver": "npm:^7.5.0"
|
"@types/semver": "npm:^7.5.0"
|
||||||
"@typescript-eslint/scope-manager": "npm:7.3.0"
|
"@typescript-eslint/scope-manager": "npm:7.3.1"
|
||||||
"@typescript-eslint/types": "npm:7.3.0"
|
"@typescript-eslint/types": "npm:7.3.1"
|
||||||
"@typescript-eslint/typescript-estree": "npm:7.3.0"
|
"@typescript-eslint/typescript-estree": "npm:7.3.1"
|
||||||
semver: "npm:^7.5.4"
|
semver: "npm:^7.5.4"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^8.56.0
|
eslint: ^8.56.0
|
||||||
checksum: 10/349b353fdf03ed8f627287136b0cbc1fe40c670e6bd59099a6cc8ea1e37f2cc12a4d0cdf84e3a635a4f44bab92bd9d84b2c4d16525130b34cc27484177ce19b8
|
checksum: 10/234d9d65fe5d0f4a31345bd8f5a6f2879a578b3a531a14c2b3edaa7fb587c71d26249f86c41857382c0405384dc104955c02b588b3cee6fc2734f1ae40aef07b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@npm:7.3.0":
|
"@typescript-eslint/visitor-keys@npm:7.3.1":
|
||||||
version: 7.3.0
|
version: 7.3.1
|
||||||
resolution: "@typescript-eslint/visitor-keys@npm:7.3.0"
|
resolution: "@typescript-eslint/visitor-keys@npm:7.3.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/types": "npm:7.3.0"
|
"@typescript-eslint/types": "npm:7.3.1"
|
||||||
eslint-visitor-keys: "npm:^3.4.1"
|
eslint-visitor-keys: "npm:^3.4.1"
|
||||||
checksum: 10/814d52a33eefddd32d522c9f8f3f9e163efb642e1fef5c57981bbf51382c5081451d01050e1a00d20cfbf60bfd8274a1eee4f393dbd3ec69dc5a9d36fea89269
|
checksum: 10/163a93597c1d696920a19b3c1627d02368bdd52059f811c0fadd680c38034bb6418ebefe99d8ce26e0dd44ae184f18fab186af775de1a8771256be1a7905c174
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1647,22 +1751,22 @@ __metadata:
|
|||||||
resolution: "EMS-ESP@workspace:."
|
resolution: "EMS-ESP@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@alova/adapter-xhr": "npm:^1.0.3"
|
"@alova/adapter-xhr": "npm:^1.0.3"
|
||||||
"@babel/core": "npm:^7.24.0"
|
"@babel/core": "npm:^7.24.1"
|
||||||
"@emotion/react": "npm:^11.11.4"
|
"@emotion/react": "npm:^11.11.4"
|
||||||
"@emotion/styled": "npm:^11.11.0"
|
"@emotion/styled": "npm:^11.11.0"
|
||||||
"@mui/icons-material": "npm:^5.15.13"
|
"@mui/icons-material": "npm:^5.15.14"
|
||||||
"@mui/material": "npm:^5.15.13"
|
"@mui/material": "npm:^5.15.14"
|
||||||
"@preact/compat": "npm:^17.1.2"
|
"@preact/compat": "npm:^17.1.2"
|
||||||
"@preact/preset-vite": "npm:^2.8.2"
|
"@preact/preset-vite": "npm:^2.8.2"
|
||||||
"@table-library/react-table-library": "npm:4.1.7"
|
"@table-library/react-table-library": "npm:4.1.7"
|
||||||
"@types/imagemin": "npm:^8.0.5"
|
"@types/imagemin": "npm:^8.0.5"
|
||||||
"@types/lodash-es": "npm:^4.17.12"
|
"@types/lodash-es": "npm:^4.17.12"
|
||||||
"@types/node": "npm:^20.11.28"
|
"@types/node": "npm:^20.11.30"
|
||||||
"@types/react": "npm:^18.2.67"
|
"@types/react": "npm:^18.2.67"
|
||||||
"@types/react-dom": "npm:^18.2.22"
|
"@types/react-dom": "npm:^18.2.22"
|
||||||
"@types/react-router-dom": "npm:^5.3.3"
|
"@types/react-router-dom": "npm:^5.3.3"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^7.3.0"
|
"@typescript-eslint/eslint-plugin": "npm:^7.3.1"
|
||||||
"@typescript-eslint/parser": "npm:^7.3.0"
|
"@typescript-eslint/parser": "npm:^7.3.1"
|
||||||
alova: "npm:^2.17.1"
|
alova: "npm:^2.17.1"
|
||||||
async-validator: "npm:^4.2.5"
|
async-validator: "npm:^4.2.5"
|
||||||
concurrently: "npm:^8.2.2"
|
concurrently: "npm:^8.2.2"
|
||||||
|
|||||||
@@ -362,16 +362,23 @@ const mqtt_status = {
|
|||||||
connect_count: 2
|
connect_count: 2
|
||||||
};
|
};
|
||||||
|
|
||||||
// SYSTEM
|
// STATUS
|
||||||
const VERIFY_AUTHORIZATION_ENDPOINT = REST_ENDPOINT_ROOT + 'verifyAuthorization';
|
|
||||||
const SYSTEM_STATUS_ENDPOINT = REST_ENDPOINT_ROOT + 'systemStatus';
|
const SYSTEM_STATUS_ENDPOINT = REST_ENDPOINT_ROOT + 'systemStatus';
|
||||||
|
const ACTIVITY_ENDPOINT = REST_ENDPOINT_ROOT + 'activity';
|
||||||
|
|
||||||
|
// SETTINGS
|
||||||
|
const ESPSYSTEM_STATUS_ENDPOINT = REST_ENDPOINT_ROOT + 'ESPSystemStatus';
|
||||||
const SECURITY_SETTINGS_ENDPOINT = REST_ENDPOINT_ROOT + 'securitySettings';
|
const SECURITY_SETTINGS_ENDPOINT = REST_ENDPOINT_ROOT + 'securitySettings';
|
||||||
const RESTART_ENDPOINT = REST_ENDPOINT_ROOT + 'restart';
|
const RESTART_ENDPOINT = REST_ENDPOINT_ROOT + 'restart';
|
||||||
const FACTORY_RESET_ENDPOINT = REST_ENDPOINT_ROOT + 'factoryReset';
|
const FACTORY_RESET_ENDPOINT = REST_ENDPOINT_ROOT + 'factoryReset';
|
||||||
const UPLOAD_FILE_ENDPOINT = REST_ENDPOINT_ROOT + 'uploadFile';
|
const UPLOAD_FILE_ENDPOINT = REST_ENDPOINT_ROOT + 'uploadFile';
|
||||||
|
|
||||||
|
// SYSTEM SIGNIN
|
||||||
|
const VERIFY_AUTHORIZATION_ENDPOINT = REST_ENDPOINT_ROOT + 'verifyAuthorization';
|
||||||
const SIGN_IN_ENDPOINT = REST_ENDPOINT_ROOT + 'signIn';
|
const SIGN_IN_ENDPOINT = REST_ENDPOINT_ROOT + 'signIn';
|
||||||
const GENERATE_TOKEN_ENDPOINT = REST_ENDPOINT_ROOT + 'generateToken';
|
const GENERATE_TOKEN_ENDPOINT = REST_ENDPOINT_ROOT + 'generateToken';
|
||||||
const system_status = {
|
|
||||||
|
const ESPsystem_status = {
|
||||||
emsesp_version: '3.6-demo',
|
emsesp_version: '3.6-demo',
|
||||||
esp_platform: 'ESP32',
|
esp_platform: 'ESP32',
|
||||||
cpu_type: 'ESP32-S3',
|
cpu_type: 'ESP32-S3',
|
||||||
@@ -390,10 +397,21 @@ const system_status = {
|
|||||||
partition: 'app0',
|
partition: 'app0',
|
||||||
app_used: 1863,
|
app_used: 1863,
|
||||||
app_free: 121,
|
app_free: 121,
|
||||||
uptime: '000+00:15:42.707',
|
|
||||||
arduino_version: 'ESP32 Arduino v2.0.14'
|
arduino_version: 'ESP32 Arduino v2.0.14'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const system_status = {
|
||||||
|
emsesp_version: '3.6-demo',
|
||||||
|
esp_platform: 'ESP32',
|
||||||
|
status: 0,
|
||||||
|
// status: 2,
|
||||||
|
tx_mode: 1,
|
||||||
|
uptime: 77186,
|
||||||
|
num_devices: 2,
|
||||||
|
num_sensors: 1,
|
||||||
|
num_analogs: 1
|
||||||
|
};
|
||||||
|
|
||||||
let security_settings = {
|
let security_settings = {
|
||||||
jwt_secret: 'naughty!',
|
jwt_secret: 'naughty!',
|
||||||
users: [
|
users: [
|
||||||
@@ -777,14 +795,7 @@ const emsesp_sensordata = {
|
|||||||
analog_enabled: true
|
analog_enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const status = {
|
const activity = {
|
||||||
status: 0,
|
|
||||||
// status: 2,
|
|
||||||
tx_mode: 1,
|
|
||||||
uptime: 77186,
|
|
||||||
num_devices: 2,
|
|
||||||
num_sensors: 1,
|
|
||||||
num_analogs: 1,
|
|
||||||
stats: [
|
stats: [
|
||||||
{ id: 0, s: 56506, f: 11, q: 100 },
|
{ id: 0, s: 56506, f: 11, q: 100 },
|
||||||
{ id: 1, s: 9026, f: 0, q: 100 },
|
{ id: 1, s: 9026, f: 0, q: 100 },
|
||||||
@@ -2374,9 +2385,11 @@ router
|
|||||||
return new Response('OK', { status: 200 });
|
return new Response('OK', { status: 200 });
|
||||||
});
|
});
|
||||||
|
|
||||||
// SYSTEM
|
// SYSTEM and SETTINGS
|
||||||
router
|
router
|
||||||
.get(SYSTEM_STATUS_ENDPOINT, () => new Response(JSON.stringify(system_status), { headers }))
|
.get(SYSTEM_STATUS_ENDPOINT, () => new Response(JSON.stringify(system_status), { headers }))
|
||||||
|
.get(ACTIVITY_ENDPOINT, () => new Response(JSON.stringify(activity), { headers }))
|
||||||
|
.get(ESPSYSTEM_STATUS_ENDPOINT, () => new Response(JSON.stringify(ESPsystem_status), { headers }))
|
||||||
.get(SECURITY_SETTINGS_ENDPOINT, () => new Response(JSON.stringify(security_settings), { headers }))
|
.get(SECURITY_SETTINGS_ENDPOINT, () => new Response(JSON.stringify(security_settings), { headers }))
|
||||||
.post(SECURITY_SETTINGS_ENDPOINT, async (request: any) => {
|
.post(SECURITY_SETTINGS_ENDPOINT, async (request: any) => {
|
||||||
security_settings = await request.json();
|
security_settings = await request.json();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
WebStatusService::WebStatusService(AsyncWebServer * server, SecurityManager * securityManager) {
|
WebStatusService::WebStatusService(AsyncWebServer * server, SecurityManager * securityManager) {
|
||||||
server->on(EMSESP_STATUS_SERVICE_PATH,
|
server->on(EMSESP_ACTIVITY_SERVICE_PATH,
|
||||||
HTTP_GET,
|
HTTP_GET,
|
||||||
securityManager->wrapRequest([this](AsyncWebServerRequest * request) { webStatusService(request); }, AuthenticationPredicates::IS_AUTHENTICATED));
|
securityManager->wrapRequest([this](AsyncWebServerRequest * request) { webStatusService(request); }, AuthenticationPredicates::IS_AUTHENTICATED));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#ifndef WebStatusService_h
|
#ifndef WebStatusService_h
|
||||||
#define WebStatusService_h
|
#define WebStatusService_h
|
||||||
|
|
||||||
#define EMSESP_STATUS_SERVICE_PATH "/rest/status"
|
#define EMSESP_ACTIVITY_SERVICE_PATH "/rest/activity"
|
||||||
|
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user