-
+
diff --git a/pkg/webui/console/views/gateway/index.js b/pkg/webui/console/views/gateway/index.js
index 9e9eb5139a..f4d71bde09 100644
--- a/pkg/webui/console/views/gateway/index.js
+++ b/pkg/webui/console/views/gateway/index.js
@@ -83,7 +83,9 @@ const Gateway = () => {
const hasGateway = Boolean(gateway)
return (
-
{hasGateway && }
+
+ {hasGateway && }
+
)
}
diff --git a/pkg/webui/console/views/organization-overview/index.js b/pkg/webui/console/views/organization-overview/index.js
index 4fbbf2080d..1692c54e19 100644
--- a/pkg/webui/console/views/organization-overview/index.js
+++ b/pkg/webui/console/views/organization-overview/index.js
@@ -62,7 +62,7 @@ const Overview = () => {
diff --git a/pkg/webui/lib/hooks/use-debounce.js b/pkg/webui/lib/hooks/use-debounce.js
index 2063954aa0..1a897ebe1d 100644
--- a/pkg/webui/lib/hooks/use-debounce.js
+++ b/pkg/webui/lib/hooks/use-debounce.js
@@ -25,7 +25,7 @@ const useDebounce = (value, delay = 350, sideEffects) => {
const timer = setTimeout(() => {
setDebouncedValue(value)
if (sideEffects) {
- sideEffects()
+ sideEffects(value)
}
}, delay)
diff --git a/pkg/webui/lib/selectors/id.js b/pkg/webui/lib/selectors/id.js
index f4ca289014..34b259693b 100644
--- a/pkg/webui/lib/selectors/id.js
+++ b/pkg/webui/lib/selectors/id.js
@@ -17,7 +17,8 @@ import getByPath from '../get-by-path'
export const getApplicationId = (application = {}) =>
getByPath(application, 'application_id') ||
getByPath(application, 'application_ids.application_id') ||
- getByPath(application, 'ids.application_id')
+ getByPath(application, 'ids.application_id') ||
+ getByPath(application, 'ids.application_ids.application_id')
export const getDeviceId = (device = {}) =>
getByPath(device, 'device_id') ||
@@ -34,6 +35,15 @@ export const extractDeviceIdFromCombinedId = combinedId => {
}
return combinedId
}
+export const extractApplicationIdFromCombinedId = combinedId => {
+ if (typeof combinedId === 'string') {
+ const parts = combinedId.split('/')
+ if (parts.length === 2) {
+ return parts[0]
+ }
+ }
+ return combinedId
+}
export const getCombinedDeviceId = (device = {}) => {
const appId =
getByPath(device, 'ids.application_ids.application_id') ||
@@ -60,11 +70,11 @@ export const getOrganizationId = (organization = {}) =>
const idSelectors = [
getApplicationId,
- getCollaboratorId,
- getApiKeyId,
getGatewayId,
getDeviceId,
getOrganizationId,
+ getCollaboratorId,
+ getApiKeyId,
]
export const getEntityId = entity => {
diff --git a/pkg/webui/lib/shared-messages.js b/pkg/webui/lib/shared-messages.js
index efe278f441..e44f64a295 100644
--- a/pkg/webui/lib/shared-messages.js
+++ b/pkg/webui/lib/shared-messages.js
@@ -97,6 +97,7 @@ export default defineMessages({
backToOverview: 'Back to overview',
beaconFrequency: 'Beacon frequency',
bearerMyAuthToken: 'Bearer my-auth-token',
+ bookmarks: 'Bookmarks',
brand: 'Brand',
cancel: 'Cancel',
changeLocation: 'Change location settings',
@@ -472,6 +473,7 @@ export default defineMessages({
'Configure gateway delay (minimum: {minimumValue}ms, default: {defaultValue}ms)',
scheduleDownlinkLateDescription: 'Enable server-side buffer of downlink messages',
search: 'Search',
+ searching: 'Searching…',
secondInterval: '{count, plural, one {every second} other {every {count} seconds}}',
seconds: 'seconds',
secondsAbbreviated: 'sec',
diff --git a/pkg/webui/locales/en.json b/pkg/webui/locales/en.json
index 7f85b65598..f8b436f5e5 100644
--- a/pkg/webui/locales/en.json
+++ b/pkg/webui/locales/en.json
@@ -178,6 +178,14 @@
"components.safe-inspector.index.toggleVisibility": "Toggle visibility",
"components.safe-inspector.index.arrayFormatting": "Toggle array formatting",
"components.safe-inspector.index.byteOrder": "Switch byte order",
+ "components.search-panel.index.noResultsFound": "No results found",
+ "components.search-panel.index.noResultsSuggestion": "Try searching for IDs names, attributes, EUIs or descriptions of:",
+ "components.search-panel.index.devices": "End devices of your{lineBreak}bookmarked applications",
+ "components.search-panel.index.searchingEntities": "Searching applications, gateways, organizations, bookmarks",
+ "components.search-panel.index.instructions": "Use {arrowKeys} to choose, {enter} to select",
+ "components.search-panel.index.fetchingTopEntities": "Fetching top entities…",
+ "components.search-panel.index.noTopEntities": "Seems like you haven’t interacted with any entities yet",
+ "components.search-panel.index.noTopEntitiesSuggestion": "Once you created or interacted with entities, they will show up here and you can use this panel to quickly search and navigate to them.",
"components.status.index.good": "good",
"components.status.index.bad": "bad",
"components.status.index.mediocre": "mediocre",
@@ -1126,6 +1134,7 @@
"lib.shared-messages.backToOverview": "Back to overview",
"lib.shared-messages.beaconFrequency": "Beacon frequency",
"lib.shared-messages.bearerMyAuthToken": "Bearer my-auth-token",
+ "lib.shared-messages.bookmarks": "Bookmarks",
"lib.shared-messages.brand": "Brand",
"lib.shared-messages.cancel": "Cancel",
"lib.shared-messages.changeLocation": "Change location settings",
@@ -1474,6 +1483,7 @@
"lib.shared-messages.scheduleAnyTimeDescription": "Configure gateway delay (minimum: {minimumValue}ms, default: {defaultValue}ms)",
"lib.shared-messages.scheduleDownlinkLateDescription": "Enable server-side buffer of downlink messages",
"lib.shared-messages.search": "Search",
+ "lib.shared-messages.searching": "Searching…",
"lib.shared-messages.secondInterval": "{count, plural, one {every second} other {every {count} seconds}}",
"lib.shared-messages.seconds": "seconds",
"lib.shared-messages.secondsAbbreviated": "sec",
diff --git a/pkg/webui/locales/ja.json b/pkg/webui/locales/ja.json
index 318edb32fd..c2ed0e5fec 100644
--- a/pkg/webui/locales/ja.json
+++ b/pkg/webui/locales/ja.json
@@ -178,6 +178,14 @@
"components.safe-inspector.index.toggleVisibility": "切り替え表示",
"components.safe-inspector.index.arrayFormatting": "配列フォーマットの切り替え",
"components.safe-inspector.index.byteOrder": "バイト順の切り替え",
+ "components.search-panel.index.noResultsFound": "",
+ "components.search-panel.index.noResultsSuggestion": "",
+ "components.search-panel.index.devices": "",
+ "components.search-panel.index.searchingEntities": "",
+ "components.search-panel.index.instructions": "",
+ "components.search-panel.index.fetchingTopEntities": "",
+ "components.search-panel.index.noTopEntities": "",
+ "components.search-panel.index.noTopEntitiesSuggestion": "",
"components.status.index.good": "good",
"components.status.index.bad": "bad",
"components.status.index.mediocre": "普通",
@@ -1126,6 +1134,7 @@
"lib.shared-messages.backToOverview": "概要に戻る",
"lib.shared-messages.beaconFrequency": "ビーコン周波数",
"lib.shared-messages.bearerMyAuthToken": "私の認証トークン",
+ "lib.shared-messages.bookmarks": "",
"lib.shared-messages.brand": "ブランド",
"lib.shared-messages.cancel": "キャンセル",
"lib.shared-messages.changeLocation": "場所の設定を変更",
@@ -1474,6 +1483,7 @@
"lib.shared-messages.scheduleAnyTimeDescription": "ゲートウェイ遅延の設定 (最小値: {minimumValue}ms, デフォルト値: {defaultValue}ms)",
"lib.shared-messages.scheduleDownlinkLateDescription": "ダウンリンクメッセージのサーバ側バッファを有効にします",
"lib.shared-messages.search": "検索",
+ "lib.shared-messages.searching": "",
"lib.shared-messages.secondInterval": "",
"lib.shared-messages.seconds": "秒",
"lib.shared-messages.secondsAbbreviated": "sec",
diff --git a/pkg/webui/styles/main.styl b/pkg/webui/styles/main.styl
index 20629514a5..ecb530ab78 100644
--- a/pkg/webui/styles/main.styl
+++ b/pkg/webui/styles/main.styl
@@ -28,6 +28,7 @@ body
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
background: var(--c-bg-neutral-min)
+ scrollbar-color: var(--c-border-neutral-normal) var(--c-bg-neutral-min)
:global(#app)
height: 100%
diff --git a/pkg/webui/styles/variables/tokens.styl b/pkg/webui/styles/variables/tokens.styl
index a69896ea78..6a402b2ec8 100644
--- a/pkg/webui/styles/variables/tokens.styl
+++ b/pkg/webui/styles/variables/tokens.styl
@@ -164,6 +164,7 @@ $tokens = {
'box-warning-normal': 0 0 3px 2px rgba(219, 118, 0,.2), // Shadow for focused inputs and other elements that have errors.
'box-panel-normal': 0px 1px 5px 0px rgba(0, 0, 0, .09),
'box-button-normal': 0 1px 2px 0 rgba(0, 0, 0, .05),
+ 'box-modal-normal': 0px 4px 35px 0px rgba(0, 0, 0, .25),
},
},