From 96482764cca6d5d53b7df9d1f61976e82fc7bccb Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Mon, 2 May 2022 11:03:01 +0100 Subject: [PATCH] Re-run formatter to format latest UI changes. --- ui/src/components/Menu.tsx | 41 ++++++++++++++----- ui/src/index.css | 2 +- .../integrations/HttpIntegrationForm.tsx | 2 +- .../device-profiles/CreateDeviceProfile.tsx | 2 +- .../device-profiles/DeviceProfileForm.tsx | 21 ++++++---- ui/src/views/devices/DeviceForm.tsx | 4 +- ui/src/views/gateways/GatewayForm.tsx | 2 +- ui/src/views/users/Login.tsx | 1 - ui/yarn.lock | 12 +----- 9 files changed, 49 insertions(+), 38 deletions(-) diff --git a/ui/src/components/Menu.tsx b/ui/src/components/Menu.tsx index 887c52ea..66a1772f 100644 --- a/ui/src/components/Menu.tsx +++ b/ui/src/components/Menu.tsx @@ -23,7 +23,6 @@ import Autocomplete, { OptionCallbackFunc, OptionsCallbackFunc } from "../compon import TenantStore from "../stores/TenantStore"; import SessionStore from "../stores/SessionStore"; - interface IState { tenantId: string; selectedKey: string; @@ -160,10 +159,10 @@ class SideMenu extends Component { label: "Network Server", icon: , children: [ - {key: "ns-dashboard", icon: , label: Dashboard}, - {key: "ns-tenants", icon: , label: Tenants}, - {key: "ns-users", icon: , label: Users}, - {key: "ns-api-keys", icon: , label: API keys}, + { key: "ns-dashboard", icon: , label: Dashboard }, + { key: "ns-tenants", icon: , label: Tenants }, + { key: "ns-users", icon: , label: Users }, + { key: "ns-api-keys", icon: , label: API keys }, ], }); } @@ -174,12 +173,32 @@ class SideMenu extends Component { label: "Tenant", icon: , children: [ - {key: "tenant-dashboard", icon: , label: Dashboard}, - {key: "tenant-users", icon: , label: Users}, - {key: "tenant-api-keys", icon: , label: API keys}, - {key: "tenant-device-profiles", icon: , label: Device profiles}, - {key: "tenant-gateways", icon: , label: Gateways}, - {key: "tenant-applications", icon: , label: Applications}, + { + key: "tenant-dashboard", + icon: , + label: Dashboard, + }, + { key: "tenant-users", icon: , label: Users }, + { + key: "tenant-api-keys", + icon: , + label: API keys, + }, + { + key: "tenant-device-profiles", + icon: , + label: Device profiles, + }, + { + key: "tenant-gateways", + icon: , + label: Gateways, + }, + { + key: "tenant-applications", + icon: , + label: Applications, + }, ], }); } diff --git a/ui/src/index.css b/ui/src/index.css index 0d771316..dfaffc20 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -108,5 +108,5 @@ pre { } .CodeMirror { - height: 600px; + height: 600px; } diff --git a/ui/src/views/applications/integrations/HttpIntegrationForm.tsx b/ui/src/views/applications/integrations/HttpIntegrationForm.tsx index 24a5af9d..5407da29 100644 --- a/ui/src/views/applications/integrations/HttpIntegrationForm.tsx +++ b/ui/src/views/applications/integrations/HttpIntegrationForm.tsx @@ -53,7 +53,7 @@ class HttpIntegrationForm extends Component { {(fields, { add, remove }) => ( <> - {fields.map(( {key, name, ...restField} ) => ( + {fields.map(({ key, name, ...restField }) => ( { label="Expected uplink interval (secs)" tooltip="The expected interval in seconds in which the device sends uplink messages. This is used to determine if a device is active or inactive." name="uplinkInterval" - rules={[{required: true, message: "Please enter an uplink interval!"}]} + rules={[{ required: true, message: "Please enter an uplink interval!" }]} > @@ -228,7 +228,7 @@ class DeviceProfileForm extends Component { tooltip="Frequency to initiate an End-Device status request (request/day). Set to 0 to disable." name="deviceStatusReqInterval" > - + @@ -326,18 +326,21 @@ class DeviceProfileForm extends Component { JavaScript functions - {this.state.payloadCodecRuntime === CodecRuntime.JS && } + {this.state.payloadCodecRuntime === CodecRuntime.JS && ( + + )} {(fields, { add, remove }) => ( <> - {fields.map(( {key, name, ...restField} ) => ( + {fields.map(({ key, name, ...restField }) => ( { {(fields, { add, remove }) => ( <> - {fields.map(( {key, name, ...restField} ) => ( + {fields.map(({ key, name, ...restField }) => ( { {(fields, { add, remove }) => ( <> - {fields.map(( {key, name, ...restField} ) => ( + {fields.map(({ key, name, ...restField }) => ( { {(fields, { add, remove }) => ( <> - {fields.map(( {key, name, ...restField} ) => ( + {fields.map(({ key, name, ...restField }) => ( { if (this.props.location.search === "") { InternalStore.settings((resp: SettingsResponse) => { - console.log("SDF"); this.setState({ loaded: true, oidcEnabled: resp.getOpenidConnect()!.getEnabled(), diff --git a/ui/yarn.lock b/ui/yarn.lock index 720ce4d6..197b3d63 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -5789,11 +5789,6 @@ grpc-web@^1.2.1: resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.2.1.tgz#860051d705bf5baa7b81fcbd14030060bf16b7b9" integrity sha512-ibBaJPzfMVuLPgaST9w0kZl60s+SnkPBQp6QKdpEr85tpc1gXW2QDqSne9xiyiym0logDfdUSm4aX5h9YBA2mw== -grpc-web@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.3.1.tgz#6d8affe75a103790b7ad570824e765a1d6a418e4" - integrity sha512-VxyYEAGsatecAFY3xieRDzsuhm92yQBsJD7fd5Z3MY150hZWPwkrUWetzJ0QK5W0uym4+VedPQrei38wk0eIjQ== - gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -8481,11 +8476,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - prettier@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" @@ -8505,7 +8495,7 @@ pretty-error@^4.0.0: renderkid "^3.0.0" pretty-format@^26.0.0, pretty-format@^26.6.2: - version "26.6.2" + version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== dependencies: