|
|
@ -1,11 +1,21 @@
|
|
|
|
import { Box, Clock, LayoutGrid, Layers } from 'lucide-react';
|
|
|
|
import { Box, Clock, LayoutGrid, Layers, Puzzle } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
|
|
import { isBE } from '../portainer/feature-flags/feature-flags.service';
|
|
|
|
import { isBE } from '../portainer/feature-flags/feature-flags.service';
|
|
|
|
|
|
|
|
import { useSettings } from '../portainer/settings/queries';
|
|
|
|
|
|
|
|
|
|
|
|
import { SidebarItem } from './SidebarItem';
|
|
|
|
import { SidebarItem } from './SidebarItem';
|
|
|
|
import { SidebarSection } from './SidebarSection';
|
|
|
|
import { SidebarSection } from './SidebarSection';
|
|
|
|
|
|
|
|
|
|
|
|
export function EdgeComputeSidebar() {
|
|
|
|
export function EdgeComputeSidebar() {
|
|
|
|
|
|
|
|
// this sidebar is rendered only for admins, so we can safely assume that settingsQuery will succeed
|
|
|
|
|
|
|
|
const settingsQuery = useSettings();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!settingsQuery.data || !settingsQuery.data.EnableEdgeComputeFeatures) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const settings = settingsQuery.data;
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<SidebarSection title="Edge compute">
|
|
|
|
<SidebarSection title="Edge compute">
|
|
|
|
<SidebarItem
|
|
|
|
<SidebarItem
|
|
|
@ -27,6 +37,14 @@ export function EdgeComputeSidebar() {
|
|
|
|
data-cy="portainerSidebar-edgeJobs"
|
|
|
|
data-cy="portainerSidebar-edgeJobs"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{isBE && (
|
|
|
|
{isBE && (
|
|
|
|
|
|
|
|
<SidebarItem
|
|
|
|
|
|
|
|
to="edge.configurations"
|
|
|
|
|
|
|
|
label="Edge Configurations"
|
|
|
|
|
|
|
|
icon={Puzzle}
|
|
|
|
|
|
|
|
data-cy="portainerSidebar-edgeConfigurations"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{isBE && !settings.TrustOnFirstConnect && (
|
|
|
|
<SidebarItem
|
|
|
|
<SidebarItem
|
|
|
|
to="edge.devices.waiting-room"
|
|
|
|
to="edge.devices.waiting-room"
|
|
|
|
label="Waiting Room"
|
|
|
|
label="Waiting Room"
|
|
|
|