From c0ef9193c4548b02507a843b77f8d0dbb9539610 Mon Sep 17 00:00:00 2001 From: Darya Plotnytska Date: Wed, 22 Nov 2023 17:26:56 +0100 Subject: [PATCH 1/3] console: Add request --- .../default-gateway-visibility.js | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js index ce1703ca42..1591346e9b 100644 --- a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js +++ b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js @@ -19,12 +19,16 @@ import { useSelector, useDispatch } from 'react-redux' import toast from '@ttn-lw/components/toast' import Message from '@ttn-lw/lib/components/message' +import RequireRequest from '@ttn-lw/lib/components/require-request' import GatewayVisibilityForm from '@console/components/gateway-visibility-form' import attachPromise from '@ttn-lw/lib/store/actions/attach-promise' -import { setHomeNetworkDefaultGatewayVisibility } from '@console/store/actions/packet-broker' +import { + getHomeNetworkDefaultGatewayVisibility, + setHomeNetworkDefaultGatewayVisibility, +} from '@console/store/actions/packet-broker' import { selectHomeNetworkDefaultGatewayVisibility } from '@console/store/selectors/packet-broker' @@ -55,18 +59,20 @@ const DefaultGatewayVisibilityView = () => { ) return ( - - - - + + + + + + ) } From 58833317b1773249505441b8748910ddedd5cadc Mon Sep 17 00:00:00 2001 From: Darya Plotnytska Date: Thu, 23 Nov 2023 09:21:47 +0100 Subject: [PATCH 2/3] console: Make request in admin-packet-broker.js --- .../admin-packet-broker.js | 30 +++++++++++------ .../default-gateway-visibility.js | 32 ++++++++----------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js b/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js index 04d50bcd99..e0932994db 100644 --- a/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js +++ b/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js @@ -30,12 +30,17 @@ import Notification from '@ttn-lw/components/notification' import Message from '@ttn-lw/lib/components/message' import GenericNotFound from '@ttn-lw/lib/components/full-view-error/not-found' +import RequireRequest from '@ttn-lw/lib/components/require-request' import sharedMessages from '@ttn-lw/lib/shared-messages' import { isNotEnabledError } from '@console/lib/packet-broker/utils' -import { registerPacketBroker, deregisterPacketBroker } from '@console/store/actions/packet-broker' +import { + registerPacketBroker, + deregisterPacketBroker, + getHomeNetworkDefaultGatewayVisibility, +} from '@console/store/actions/packet-broker' import { selectRegistered, @@ -219,15 +224,20 @@ const PacketBroker = () => { /> - - - - - - } /> - - - + + + + + + + } /> + + + + )} diff --git a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js index 1591346e9b..ce1703ca42 100644 --- a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js +++ b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js @@ -19,16 +19,12 @@ import { useSelector, useDispatch } from 'react-redux' import toast from '@ttn-lw/components/toast' import Message from '@ttn-lw/lib/components/message' -import RequireRequest from '@ttn-lw/lib/components/require-request' import GatewayVisibilityForm from '@console/components/gateway-visibility-form' import attachPromise from '@ttn-lw/lib/store/actions/attach-promise' -import { - getHomeNetworkDefaultGatewayVisibility, - setHomeNetworkDefaultGatewayVisibility, -} from '@console/store/actions/packet-broker' +import { setHomeNetworkDefaultGatewayVisibility } from '@console/store/actions/packet-broker' import { selectHomeNetworkDefaultGatewayVisibility } from '@console/store/selectors/packet-broker' @@ -59,20 +55,18 @@ const DefaultGatewayVisibilityView = () => { ) return ( - - - - - - + + + + ) } From 2c585998e49a832a0c67505f50e9c5199885cfe7 Mon Sep 17 00:00:00 2001 From: Darya Plotnytska Date: Thu, 23 Nov 2023 10:59:43 +0100 Subject: [PATCH 3/3] Revert "console: Make request in admin-packet-broker.js" This reverts commit 58833317b1773249505441b8748910ddedd5cadc. --- .../admin-packet-broker.js | 30 ++++++----------- .../default-gateway-visibility.js | 32 +++++++++++-------- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js b/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js index e0932994db..04d50bcd99 100644 --- a/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js +++ b/pkg/webui/console/views/admin-packet-broker/admin-packet-broker.js @@ -30,17 +30,12 @@ import Notification from '@ttn-lw/components/notification' import Message from '@ttn-lw/lib/components/message' import GenericNotFound from '@ttn-lw/lib/components/full-view-error/not-found' -import RequireRequest from '@ttn-lw/lib/components/require-request' import sharedMessages from '@ttn-lw/lib/shared-messages' import { isNotEnabledError } from '@console/lib/packet-broker/utils' -import { - registerPacketBroker, - deregisterPacketBroker, - getHomeNetworkDefaultGatewayVisibility, -} from '@console/store/actions/packet-broker' +import { registerPacketBroker, deregisterPacketBroker } from '@console/store/actions/packet-broker' import { selectRegistered, @@ -224,20 +219,15 @@ const PacketBroker = () => { /> - - - - - - - } /> - - - - + + + + + + } /> + + + )} diff --git a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js index ce1703ca42..1591346e9b 100644 --- a/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js +++ b/pkg/webui/console/views/admin-packet-broker/default-gateway-visibility.js @@ -19,12 +19,16 @@ import { useSelector, useDispatch } from 'react-redux' import toast from '@ttn-lw/components/toast' import Message from '@ttn-lw/lib/components/message' +import RequireRequest from '@ttn-lw/lib/components/require-request' import GatewayVisibilityForm from '@console/components/gateway-visibility-form' import attachPromise from '@ttn-lw/lib/store/actions/attach-promise' -import { setHomeNetworkDefaultGatewayVisibility } from '@console/store/actions/packet-broker' +import { + getHomeNetworkDefaultGatewayVisibility, + setHomeNetworkDefaultGatewayVisibility, +} from '@console/store/actions/packet-broker' import { selectHomeNetworkDefaultGatewayVisibility } from '@console/store/selectors/packet-broker' @@ -55,18 +59,20 @@ const DefaultGatewayVisibilityView = () => { ) return ( - - - - + + + + + + ) }