Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/AppFooter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { CFooter, CBadge } from '@coreui/react'
import CIcon from '@coreui/icons-react'
import { cilAnimal, cilCheckCircle } from '@coreui/icons'
import { cilShieldAlt, cilCheckCircle } from '@coreui/icons'
import { useNavigation } from '../hooks/useNavigation'

const AppFooter = () => {
Expand Down Expand Up @@ -40,14 +40,14 @@ const AppFooter = () => {
const getStatusIcon = () => {
switch (securityStatus.status) {
case 'secure': return cilCheckCircle
default: return cilAnimal
default: return cilShieldAlt
}
}

return (
<CFooter className="px-4">
<div className="d-flex align-items-center">
<CIcon icon={cilAnimal} className="me-2" />
<CIcon icon={cilShieldAlt} className="me-2" />
<span className="me-2">CyberSec Dashboard</span>
<span className="text-muted">&copy; 2025 Security Operations.</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const AppHeader = () => {
case 'good': return cilCheckCircle
case 'warning': return cilTriangle
case 'critical': return cilWarning
default: return cilAnimal
default: return cilShieldAlt
}
}

Expand Down Expand Up @@ -288,7 +288,7 @@ const AppHeader = () => {
<div className="d-flex align-items-center gap-3">
<small className="text-muted">Security Overview:</small>
<div className="d-flex align-items-center gap-1">
<CIcon icon={cilAnimal} size="sm" />
<CIcon icon={cilShieldAlt} size="sm" />
<small>{securityMetrics.totalAssets} Assets</small>
</div>
<div className="d-flex align-items-center gap-1">
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
CBadge
} from '@coreui/react'
import CIcon from '@coreui/icons-react'
import { cilAnimal, cilBug } from '@coreui/icons'
import { cilShieldAlt, cilBug } from '@coreui/icons'
import { AppSidebarNav } from './AppSidebarNav'
import { getNavigation } from '../_nav'
import { useNavigation } from '../hooks/useNavigation'
Expand Down Expand Up @@ -60,7 +60,7 @@ const AppSidebar = () => {
>
<CSidebarHeader className="border-bottom">
<CSidebarBrand to="/" className="d-flex align-items-center">
<CIcon icon={cilAnimal} height={32} className="me-2" />
<CIcon icon={cilShieldAlt} height={32} className="me-2" />
<div className="sidebar-brand-full">
<div className="fw-bold text-light">CyberSec</div>
<small className="text-light-emphasis">Dashboard</small>
Expand Down
74 changes: 0 additions & 74 deletions src/components/AppSidebarNav.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,3 @@
/*import React from 'react'
import { NavLink } from 'react-router-dom'
import PropTypes from 'prop-types'

import SimpleBar from 'simplebar-react'
import 'simplebar-react/dist/simplebar.min.css'

import { CBadge, CNavLink, CSidebarNav } from '@coreui/react'

export const AppSidebarNav = ({ items }) => {
const navLink = (name, icon, badge, indent = false) => {
return (
<>
{icon
? icon
: indent && (
<span className="nav-icon">
<span className="nav-icon-bullet"></span>
</span>
)}
{name && name}
{badge && (
<CBadge color={badge.color} className="ms-auto" size="sm">
{badge.text}
</CBadge>
)}
</>
)
}

const navItem = (item, index, indent = false) => {
const { component, name, badge, icon, ...rest } = item
const Component = component
return (
<Component as="div" key={index}>
{rest.to || rest.href ? (
<CNavLink
{...(rest.to && { as: NavLink })}
{...(rest.href && { target: '_blank', rel: 'noopener noreferrer' })}
{...rest}
>
{navLink(name, icon, badge, indent)}
</CNavLink>
) : (
navLink(name, icon, badge, indent)
)}
</Component>
)
}

const navGroup = (item, index) => {
const { component, name, icon, items, to, ...rest } = item
const Component = component
return (
<Component compact as="div" key={index} toggler={navLink(name, icon)} {...rest}>
{items?.map((item, index) =>
item.items ? navGroup(item, index) : navItem(item, index, true),
)}
</Component>
)
}

return (
<CSidebarNav as={SimpleBar}>
{items &&
items.map((item, index) => (item.items ? navGroup(item, index) : navItem(item, index)))}
</CSidebarNav>
)
}

AppSidebarNav.propTypes = {
items: PropTypes.arrayOf(PropTypes.any).isRequired,
}*/

import React from 'react'
import { NavLink } from 'react-router-dom'
import PropTypes from 'prop-types'
Expand Down
18 changes: 1 addition & 17 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,4 @@ const routes = [
{ path: '/widgets', name: 'Widgets', element: Widgets },
]

export default routes

/*
import React from 'react'
import { Navigate } from 'react-router-dom'

// Lazy loading components
const Overview = React.lazy(() => import('./views/overview/Overview'))
const DeviceView = React.lazy(() => import('./views/devices/DeviceView'))

const routes = [
{ path: '/', exact: true, name: 'Home', element: <Navigate to="/overview" replace /> },
{ path: '/overview', name: 'Overview', element: <Overview /> },
{ path: '/device/:id', name: 'Device', element: <DeviceView /> },
]

export default routes*/
export default routes
Loading