Skip to content

Commit 004cbce

Browse files
committed
fix: Hide Applications tab when offline or unsupported
The Applications tab is now rendered only when the device is online and supports container management. This aligns the tab with the behavior of other tabs and avoids confusing users when containers are unavailable or the device lacks the required capabilities. Signed-off-by: Omar <omar.brbutovic@secomind.com>
1 parent cabf949 commit 004cbce

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/components/DeviceTabs/ApplicationsTab.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of Edgehog.
33
*
4-
* Copyright 2025 SECO Mind Srl
4+
* Copyright 2025 - 2026 SECO Mind Srl
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -42,6 +42,7 @@ const DEVICE_DEPLOYED_APPLICATIONS_FRAGMENT = graphql`
4242
device(id: $id) {
4343
id
4444
online
45+
capabilities
4546
systemModel {
4647
name
4748
}
@@ -76,7 +77,7 @@ const DeviceApplicationsTab = ({ deviceRef }: DeviceApplicationsTabProps) => {
7677
};
7778
}, [handleRefetch]);
7879

79-
if (!device) {
80+
if (!device || !device.capabilities.includes("CONTAINER_MANAGEMENT")) {
8081
return null;
8182
}
8283

0 commit comments

Comments
 (0)