mirror of
https://github.com/meshtastic/web.git
synced 2026-04-24 16:00:32 -04:00
Start moduleConfig & general import cleanup
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Select } from "@app/components/form/Select.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Select } from "@components/form/Select.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { AudioValidation } from "@app/validation/moduleConfig/audio.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -15,14 +11,9 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const Audio = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<AudioValidation>({
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } = useForm<AudioValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.audio,
|
||||
resolver: classValidatorResolver(AudioValidation)
|
||||
});
|
||||
@@ -32,34 +23,14 @@ export const Audio = (): JSX.Element => {
|
||||
}, [reset, moduleConfig.audio]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "audio",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "audio",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Audio Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "audio",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Select } from "@app/components/form/Select.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Select } from "@components/form/Select.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { CannedMessageValidation } from "@app/validation/moduleConfig/cannedMessage.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -15,7 +11,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const CannedMessage = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
@@ -23,6 +19,7 @@ export const CannedMessage = (): JSX.Element => {
|
||||
reset,
|
||||
control
|
||||
} = useForm<CannedMessageValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.cannedMessage,
|
||||
resolver: classValidatorResolver(CannedMessageValidation)
|
||||
});
|
||||
@@ -38,34 +35,14 @@ export const CannedMessage = (): JSX.Element => {
|
||||
}, [reset, moduleConfig.cannedMessage]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "cannedMessage",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "cannedMessage",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Canned Message Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "cannedMessage",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { ExternalNotificationValidation } from "@app/validation/moduleConfig/externalNotification.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -13,50 +9,26 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const ExternalNotification = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors, isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<ExternalNotificationValidation>({
|
||||
defaultValues: moduleConfig.externalNotification,
|
||||
resolver: classValidatorResolver(ExternalNotificationValidation)
|
||||
});
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } =
|
||||
useForm<ExternalNotificationValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.externalNotification,
|
||||
resolver: classValidatorResolver(ExternalNotificationValidation)
|
||||
});
|
||||
useEffect(() => {
|
||||
reset(moduleConfig.externalNotification);
|
||||
}, [reset, moduleConfig.externalNotification]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "externalNotification",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "externalNotification",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved External Notification Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "externalNotification",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const moduleEnabled = useWatch({
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { MQTTValidation } from "@app/validation/moduleConfig/mqtt.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -13,7 +9,7 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const MQTT = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
@@ -21,6 +17,7 @@ export const MQTT = (): JSX.Element => {
|
||||
reset,
|
||||
control
|
||||
} = useForm<MQTTValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.mqtt,
|
||||
resolver: classValidatorResolver(MQTTValidation)
|
||||
});
|
||||
@@ -36,34 +33,14 @@ export const MQTT = (): JSX.Element => {
|
||||
}, [reset, moduleConfig.mqtt]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "mqtt",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "mqtt",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved MQTT Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "mqtt",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -82,7 +59,7 @@ export const MQTT = (): JSX.Element => {
|
||||
/>
|
||||
<Input
|
||||
label="MQTT Server Address"
|
||||
//description="Description"
|
||||
description="Description"
|
||||
disabled={!moduleEnabled}
|
||||
{...register("address")}
|
||||
/>
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -13,51 +9,27 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const RangeTest = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors, isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<RangeTestValidation>({
|
||||
defaultValues: moduleConfig.rangeTest,
|
||||
resolver: classValidatorResolver(RangeTestValidation)
|
||||
});
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } =
|
||||
useForm<RangeTestValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.rangeTest,
|
||||
resolver: classValidatorResolver(RangeTestValidation)
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
reset(moduleConfig.rangeTest);
|
||||
}, [reset, moduleConfig.rangeTest]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "rangeTest",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "rangeTest",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Range Test Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "rangeTest",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const moduleEnabled = useWatch({
|
||||
@@ -67,9 +39,7 @@ export const RangeTest = (): JSX.Element => {
|
||||
});
|
||||
|
||||
return (
|
||||
<Form
|
||||
onSubmit={onSubmit}
|
||||
>
|
||||
<Form onSubmit={onSubmit}>
|
||||
<Controller
|
||||
name="enabled"
|
||||
control={control}
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { SerialValidation } from "@app/validation/moduleConfig/serial.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import { renderOptions } from "@app/core/utils/selectEnumOptions";
|
||||
import { Select } from "@app/components/form/Select";
|
||||
import { renderOptions } from "@core/utils/selectEnumOptions";
|
||||
import { Select } from "@components/form/Select";
|
||||
|
||||
export const Serial = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors, isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<SerialValidation>({
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } = useForm<SerialValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.serial,
|
||||
resolver: classValidatorResolver(SerialValidation)
|
||||
});
|
||||
@@ -32,34 +23,14 @@ export const Serial = (): JSX.Element => {
|
||||
}, [reset, moduleConfig.serial]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "serial",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "serial",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Serial Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "serial",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const moduleEnabled = useWatch({
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm, useWatch } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { StoreForwardValidation } from "@app/validation/moduleConfig/storeForward.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -13,51 +9,27 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const StoreForward = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors, isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<StoreForwardValidation>({
|
||||
defaultValues: moduleConfig.storeForward,
|
||||
resolver: classValidatorResolver(StoreForwardValidation)
|
||||
});
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } =
|
||||
useForm<StoreForwardValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.storeForward,
|
||||
resolver: classValidatorResolver(StoreForwardValidation)
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
reset(moduleConfig.storeForward);
|
||||
}, [reset, moduleConfig.storeForward]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "storeForward",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "storeForward",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Store & Forward Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "storeForward",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
const moduleEnabled = useWatch({
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
|
||||
import { Input } from "@app/components/form/Input.js";
|
||||
import { Toggle } from "@app/components/form/Toggle.js";
|
||||
import { Input } from "@components/form/Input.js";
|
||||
import { Toggle } from "@components/form/Toggle.js";
|
||||
import { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js";
|
||||
import { Form } from "@components/form/Form";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
@@ -13,51 +9,27 @@ import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export const Telemetry = (): JSX.Element => {
|
||||
const { moduleConfig, connection, setModuleConfig } = useDevice();
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors, isDirty },
|
||||
reset,
|
||||
control
|
||||
} = useForm<TelemetryValidation>({
|
||||
defaultValues: moduleConfig.telemetry,
|
||||
resolver: classValidatorResolver(TelemetryValidation)
|
||||
});
|
||||
const { moduleConfig, setWorkingModuleConfig } = useDevice();
|
||||
const { register, handleSubmit, reset, control } =
|
||||
useForm<TelemetryValidation>({
|
||||
mode: "onChange",
|
||||
defaultValues: moduleConfig.telemetry,
|
||||
resolver: classValidatorResolver(TelemetryValidation)
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
reset(moduleConfig.telemetry);
|
||||
}, [reset, moduleConfig.telemetry]);
|
||||
|
||||
const onSubmit = handleSubmit((data) => {
|
||||
if (connection) {
|
||||
void toast.promise(
|
||||
connection
|
||||
.setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "telemetry",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
.then(() =>
|
||||
setModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "telemetry",
|
||||
value: data
|
||||
}
|
||||
})
|
||||
)
|
||||
),
|
||||
{
|
||||
loading: "Saving...",
|
||||
success: "Saved Telemetry Config, Restarting Node",
|
||||
error: "No response received"
|
||||
setWorkingModuleConfig(
|
||||
new Protobuf.ModuleConfig({
|
||||
payloadVariant: {
|
||||
case: "telemetry",
|
||||
value: data
|
||||
}
|
||||
);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user