Almost all sections with mock data
This commit is contained in:
@@ -67,13 +67,13 @@ const menuConfig: SidebarMenuSection[] = [
|
||||
items: [
|
||||
{
|
||||
label: 'LibreNMS',
|
||||
href: '/configuracion',
|
||||
href: '/librenms',
|
||||
icon: <Network className="w-5 h-5" />,
|
||||
badge: { type: 'green', value: 'OK' },
|
||||
},
|
||||
{
|
||||
label: 'Headwind MDM',
|
||||
href: '/configuracion',
|
||||
href: '/headwind',
|
||||
icon: <Smartphone className="w-5 h-5" />,
|
||||
badge: { type: 'blue', value: 12 },
|
||||
},
|
||||
@@ -102,11 +102,12 @@ const menuConfig: SidebarMenuSection[] = [
|
||||
interface SidebarProps {
|
||||
activeAlertsCount?: number
|
||||
devicesCount?: number
|
||||
sessionsCount?: number
|
||||
open?: boolean
|
||||
onClose?: () => void
|
||||
}
|
||||
|
||||
export default function Sidebar({ activeAlertsCount, devicesCount, open = false, onClose }: SidebarProps) {
|
||||
export default function Sidebar({ activeAlertsCount, devicesCount, sessionsCount, open = false, onClose }: SidebarProps) {
|
||||
const pathname = usePathname()
|
||||
|
||||
const isActive = (href: string) => {
|
||||
@@ -122,6 +123,10 @@ export default function Sidebar({ activeAlertsCount, devicesCount, open = false,
|
||||
if (item.href === '/devices' && devicesCount !== undefined) {
|
||||
return { type: 'red', value: devicesCount }
|
||||
}
|
||||
if (item.href === '/sesiones' && sessionsCount !== undefined) {
|
||||
if (sessionsCount === 0) return undefined
|
||||
return { type: 'red', value: sessionsCount }
|
||||
}
|
||||
return item.badge
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user