ui: Run make format in ui directory.

This commit is contained in:
Orne Brocaar 2025-02-07 12:04:54 +00:00
parent 32e6a49e9e
commit d90fb695dd
7 changed files with 37 additions and 16 deletions

View File

@ -102,7 +102,13 @@ function ListDeviceProfiles(props: IProps) {
},
];
const getPage = (limit: number, offset: number, orderBy: string | void, orderByDesc: boolean | void, callbackFunc: GetPageCallbackFunc) => {
const getPage = (
limit: number,
offset: number,
orderBy: string | void,
orderByDesc: boolean | void,
callbackFunc: GetPageCallbackFunc,
) => {
const req = new ListDeviceProfilesRequest();
req.setTenantId(props.tenant.getId());
req.setLimit(limit);

View File

@ -219,7 +219,8 @@ function DeviceQueue(props: IProps) {
onFinish={onEnqueue}
onFinishFailed={onFinishFailed}
form={form}
initialValues={{ fPort: 1 }}>
initialValues={{ fPort: 1 }}
>
<Row>
<Space direction="horizontal" style={{ width: "100%" }} size="large">
<Form.Item name="confirmed" label="Confirmed" valuePropName="checked">
@ -232,21 +233,24 @@ function DeviceQueue(props: IProps) {
name="isEncrypted"
label="Is encrypted"
valuePropName="checked"
tooltip="Only enable this in case the payload that you would like to enqueue has already been encrypted. In this case you also must enter the downlink frame-counter which has been used for the encryption.">
tooltip="Only enable this in case the payload that you would like to enqueue has already been encrypted. In this case you also must enter the downlink frame-counter which has been used for the encryption."
>
<Switch onChange={setIsEncrypted} />
</Form.Item>
{isEncrypted && (
<Form.Item
name="fCntDown"
label="Downlink frame-counter used for encryption"
rules={[{ required: true, message: "Please enter a downlink frame-counter!" }]}>
rules={[{ required: true, message: "Please enter a downlink frame-counter!" }]}
>
<InputNumber min={0} />
</Form.Item>
)}
<Form.Item
name="expiresAt"
label="Expires at"
tooltip="If set, the queue-item will automatically expire at the given timestamp if it wasn't sent yet.">
tooltip="If set, the queue-item will automatically expire at the given timestamp if it wasn't sent yet."
>
<DatePicker showTime />
</Form.Item>
</Space>

View File

@ -90,7 +90,8 @@ function ListDevices(props: IProps) {
<Link
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/${
record.devEui
}`}>
}`}
>
{text}
</Link>
),
@ -240,7 +241,8 @@ function ListDevices(props: IProps) {
visible={mgModalVisible}
onOk={handleMgModalOk}
onCancel={hideMgModal}
okButtonProps={{ disabled: mgSelected === "" }}>
okButtonProps={{ disabled: mgSelected === "" }}
>
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<Select style={{ width: "100%" }} onChange={onMgSelected} placeholder="Select Multicast-group">
{mgOptions}
@ -252,7 +254,8 @@ function ListDevices(props: IProps) {
visible={relayModalVisible}
onOk={handleRelayModalOk}
onCancel={hideRelayModal}
okButtonProps={{ disabled: relaySelected === "" }}>
okButtonProps={{ disabled: relaySelected === "" }}
>
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<Select style={{ width: "100%" }} onChange={onRelaySelected} placeholder="Select Relay">
{relayOptions}
@ -263,7 +266,8 @@ function ListDevices(props: IProps) {
<Space direction="horizontal" style={{ float: "right" }}>
<Button type="primary">
<Link
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/create`}>
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/devices/create`}
>
Add device
</Link>
</Button>

View File

@ -221,7 +221,8 @@ function ListGateways(props: IProps) {
onOk={handleMgModalOk}
onCancel={hideMgModal}
okButtonProps={{ disabled: mgSelected === "" }}
bodyStyle={{ height: 300 }}>
bodyStyle={{ height: 300 }}
>
<Space direction="vertical" size="large" style={{ width: "100%" }}>
<TreeSelect
style={{ width: "100%" }}
@ -259,7 +260,8 @@ function ListGateways(props: IProps) {
placement="bottomRight"
overlay={menu}
trigger={["click"]}
disabled={selectedRowIds.length === 0}>
disabled={selectedRowIds.length === 0}
>
<Button>Selected gateways</Button>
</Dropdown>
</Space>

View File

@ -34,7 +34,8 @@ function ListMulticastGroups(props: IProps) {
<Link
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/multicast-groups/${
record.id
}`}>
}`}
>
{text}
</Link>
),
@ -82,7 +83,8 @@ function ListMulticastGroups(props: IProps) {
<Admin tenantId={props.application.getTenantId()} isDeviceAdmin>
<Button type="primary" style={{ float: "right" }}>
<Link
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/multicast-groups/create`}>
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/multicast-groups/create`}
>
Add multicast-group
</Link>
</Button>

View File

@ -141,7 +141,8 @@ function MulticastGroupQueue(props: IProps) {
onFinish={onEnqueue}
onFinishFailed={onFinishFailed}
form={form}
initialValues={{ fPort: 1 }}>
initialValues={{ fPort: 1 }}
>
<Row>
<Space direction="horizontal" style={{ width: "100%" }} size="large">
<Form.Item name="fPort" label="FPort">
@ -150,7 +151,8 @@ function MulticastGroupQueue(props: IProps) {
<Form.Item
name="expiresAt"
label="Expires at"
tooltip="If set, the queue-item will automatically expire at the given timestamp if it wasn't sent yet.">
tooltip="If set, the queue-item will automatically expire at the given timestamp if it wasn't sent yet."
>
<DatePicker showTime />
</Form.Item>
</Space>

View File

@ -24,7 +24,8 @@ function ListRelays(props: IProps) {
<Link
to={`/tenants/${props.application.getTenantId()}/applications/${props.application.getId()}/relays/${
record.devEui
}`}>
}`}
>
{text}
</Link>
),