mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Merge branch 'dev' into dev2
This commit is contained in:
@@ -19,7 +19,7 @@ const UploadFileForm: FC = () => {
|
||||
const { send: getSettings, onSuccess: onSuccessGetSettings } = useRequest(EMSESP.getSettings(), {
|
||||
immediate: false
|
||||
});
|
||||
const { send: getCustomizations, onSuccess: onSuccessgetCustomizations } = useRequest(EMSESP.getCustomizations(), {
|
||||
const { send: getCustomizations, onSuccess: onSuccessGetCustomizations } = useRequest(EMSESP.getCustomizations(), {
|
||||
immediate: false
|
||||
});
|
||||
const { send: getEntities, onSuccess: onSuccessGetEntities } = useRequest(EMSESP.getEntities(), {
|
||||
@@ -80,7 +80,7 @@ const UploadFileForm: FC = () => {
|
||||
onSuccessGetSettings((event) => {
|
||||
saveFile(event.data, 'settings.json');
|
||||
});
|
||||
onSuccessgetCustomizations((event) => {
|
||||
onSuccessGetCustomizations((event) => {
|
||||
saveFile(event.data, 'customizations.json');
|
||||
});
|
||||
onSuccessGetEntities((event) => {
|
||||
|
||||
@@ -317,7 +317,7 @@ const de: Translation = {
|
||||
SCHEDULE_TIMER_2: 'jede Minute',
|
||||
SCHEDULE_TIMER_3: 'jede Stunde',
|
||||
CUSTOM_ENTITIES: 'Individuelle Entitäten',
|
||||
ENTITIES_HELP_1: 'Abfrage von Werten auf dem EMS-Bus',
|
||||
ENTITIES_HELP_1: 'Abfrage von Werten auf dem EMS-Bus', // TODO translate
|
||||
ENTITIES_UPDATED: 'Entitäten gespeichert',
|
||||
WRITEABLE: 'Schreibbar',
|
||||
SHOWING: 'Anzeigen von',
|
||||
|
||||
@@ -318,7 +318,7 @@ const en: Translation = {
|
||||
SCHEDULE_TIMER_2: 'every minute',
|
||||
SCHEDULE_TIMER_3: 'every hour',
|
||||
CUSTOM_ENTITIES: 'Custom Entities',
|
||||
ENTITIES_HELP_1: 'Fetch custom entities from the EMS bus',
|
||||
ENTITIES_HELP_1: 'Define custom EMS entities or dynamic user variables',
|
||||
ENTITIES_UPDATED: 'Entities Updated',
|
||||
WRITEABLE: 'Writeable',
|
||||
SHOWING: 'Showing',
|
||||
|
||||
@@ -319,7 +319,7 @@ const it: Translation = {
|
||||
SCHEDULE_TIMER_2: 'Ogni minuto',
|
||||
SCHEDULE_TIMER_3: 'Ogni ora',
|
||||
CUSTOM_ENTITIES: 'Entità personalizzate',
|
||||
ENTITIES_HELP_1: 'Recupera entità personalizzate dal BUS EMS',
|
||||
ENTITIES_HELP_1: 'Recupera entità personalizzate dal BUS EMS', // TODO translate
|
||||
ENTITIES_UPDATED: 'Entità aggiornate',
|
||||
WRITEABLE: 'Scrivibile',
|
||||
SHOWING: 'Visualizza',
|
||||
|
||||
@@ -317,7 +317,7 @@ const nl: Translation = {
|
||||
SCHEDULE_TIMER_2: 'elke minuut',
|
||||
SCHEDULE_TIMER_3: 'elke huur',
|
||||
CUSTOM_ENTITIES: 'Aangepaste Entiteiten',
|
||||
ENTITIES_HELP_1: 'Aangepaste entiteiten ophalen uit de EMS-bus',
|
||||
ENTITIES_HELP_1: 'Aangepaste entiteiten ophalen uit de EMS-bus', // TODO translate
|
||||
ENTITIES_UPDATED: 'Entiteiten bijgewerkt',
|
||||
WRITEABLE: 'Beschrijfbare',
|
||||
SHOWING: 'Tonen',
|
||||
|
||||
@@ -317,20 +317,20 @@ const pl: BaseTranslation = {
|
||||
SCHEDULE_TIMER_2: 'co minutę',
|
||||
SCHEDULE_TIMER_3: 'co godzinę',
|
||||
CUSTOM_ENTITIES: '{{N|n|}}iestandardowe{{|j|}} encj{{e|i|}}',
|
||||
ENTITIES_HELP_1: 'Zdefiniuj niestandardowe encje dla magistrali EMS.',
|
||||
ENTITIES_HELP_1: 'Zdefiniuj niestandardowe encje dla magistrali EMS.', // TODO translate
|
||||
ENTITIES_UPDATED: 'Niestandardowe encje zostały uaktualnione.',
|
||||
WRITEABLE: 'Zapisywalna',
|
||||
SHOWING: 'Wyświetlane',
|
||||
SEARCH: 'Szukaj',
|
||||
CERT: 'Certyfikat główny TLS (pozostaw puste dla TLS-insecure)',
|
||||
ENABLE_TLS: 'Włącz wsparcie dla TLS',
|
||||
ON: 'włączony',
|
||||
ON: 'włączony',
|
||||
OFF: 'wyłączony',
|
||||
POLARITY: 'Typ przekaźnika',
|
||||
ACTIVEHIGH: 'Wyzwalany stanem wysokim',
|
||||
ACTIVELOW: 'Wyzwalany stanem niskim',
|
||||
UNCHANGED: 'Zachowaj stan',
|
||||
ALWAYS: 'Zawsze'
|
||||
ACTIVEHIGH: 'Wyzwalany stanem wysokim',
|
||||
ACTIVELOW: 'Wyzwalany stanem niskim',
|
||||
UNCHANGED: 'Zachowaj stan',
|
||||
ALWAYS: 'Zawsze'
|
||||
};
|
||||
|
||||
export default pl;
|
||||
|
||||
@@ -316,7 +316,7 @@ const sk: Translation = {
|
||||
SCHEDULE_TIMER_2: 'každú minútu',
|
||||
SCHEDULE_TIMER_3: 'každú hodinu',
|
||||
CUSTOM_ENTITIES: 'Vlastné entity',
|
||||
ENTITIES_HELP_1: 'Získavanie vlastných entít zo zbernice EMS',
|
||||
ENTITIES_HELP_1: 'Získavanie vlastných entít zo zbernice EMS', // TODO translate
|
||||
ENTITIES_UPDATED: 'Aktualizované entity',
|
||||
WRITEABLE: 'Zapísateľný',
|
||||
SHOWING: 'Zobrazenie',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import AddIcon from '@mui/icons-material/Add';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||
import EditOutlinedIcon from '@mui/icons-material/EditOutlined';
|
||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||
import WarningIcon from '@mui/icons-material/Warning';
|
||||
import { Button, Typography, Box } from '@mui/material';
|
||||
import { Table, Header, HeaderRow, HeaderCell, Body, Row, Cell } from '@table-library/react-table-library/table';
|
||||
|
||||
@@ -27,7 +27,7 @@ import { BlockFormControlLabel, ValidatedTextField } from 'components';
|
||||
|
||||
import { useI18nContext } from 'i18n/i18n-react';
|
||||
|
||||
import { updateValue } from 'utils';
|
||||
import { numberValue, updateValue } from 'utils';
|
||||
import { validate } from 'validators';
|
||||
|
||||
type SettingsCustomEntitiesDialogProps = {
|
||||
@@ -130,7 +130,7 @@ const SettingsCustomEntitiesDialog = ({
|
||||
<Grid item xs={4}>
|
||||
<TextField
|
||||
name="value"
|
||||
label={LL.STARTVALUE()}
|
||||
label={LL.DEFAULT(0) + ' ' + LL.VALUE(1)}
|
||||
value={editItem.value}
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
@@ -214,7 +214,7 @@ const SettingsCustomEntitiesDialog = ({
|
||||
<TextField
|
||||
name="factor"
|
||||
label={LL.FACTOR()}
|
||||
value={editItem.factor}
|
||||
value={numberValue(editItem.factor)}
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
fullWidth
|
||||
|
||||
@@ -20,7 +20,7 @@ export const readCoreData = () => alovaInstance.Get<CoreData>(`/rest/coreData`);
|
||||
export const readDeviceData = (id: number) =>
|
||||
alovaInstance.Get<DeviceData>('/rest/deviceData', {
|
||||
// alovaInstance.Get<DeviceData>(`/rest/deviceData/${id}`, {
|
||||
params: { id }, // TODO replace later
|
||||
params: { id }, // TODO replace later with id
|
||||
responseType: 'arraybuffer' // uses msgpack
|
||||
});
|
||||
export const writeDeviceValue = (data: any) => alovaInstance.Post('/rest/writeDeviceValue', data);
|
||||
@@ -56,7 +56,7 @@ export const getSchedule = () => alovaInstance.Get('/rest/getSchedule');
|
||||
export const readDeviceEntities = (id: number) =>
|
||||
// alovaInstance.Get<DeviceEntity[]>(`/rest/deviceEntities/${id}`, {
|
||||
alovaInstance.Get<DeviceEntity[]>(`/rest/deviceEntities`, {
|
||||
params: { id }, // TODO replace later
|
||||
params: { id }, // TODO replace later with id
|
||||
responseType: 'arraybuffer',
|
||||
transformData(data: any) {
|
||||
return data.map((de: DeviceEntity) => ({ ...de, o_m: de.m, o_cn: de.cn, o_mi: de.mi, o_ma: de.ma }));
|
||||
|
||||
@@ -395,6 +395,7 @@ export const enum DeviceValueType {
|
||||
}
|
||||
|
||||
export const DeviceValueTypeNames = [
|
||||
//
|
||||
'BOOL',
|
||||
'INT',
|
||||
'UINT',
|
||||
|
||||
Reference in New Issue
Block a user