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
1,104 changes: 557 additions & 547 deletions src/Components/API/backend/project-echo-openapi.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Components/HMI/ui/public/admin/add-project.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
<span class="nav-text">Alerts</span>
</a>

<a class="nav-link" href="reboot.html">
<a class="nav-link" href="/admin/sensor_health/reboot.html">
<span class="nav-icon">⟲</span>
<span class="nav-text">Reboot</span>
</a>

<a class="nav-link" href="settings.html">
<a class="nav-link" href="/admin/sensor_health/settings.html">
<span class="nav-icon">⚙</span>
<span class="nav-text">Settings</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions src/Components/HMI/ui/public/admin/alerts.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
<span class="nav-text">Alerts</span>
</a>

<a class="nav-link" href="reboot.html">
<a class="nav-link" href="/admin/sensor_health/reboot.html">
<span class="nav-icon">⟲</span>
<span class="nav-text">Reboot</span>
</a>

<a class="nav-link" href="settings.html">
<a class="nav-link" href="/admin/sensor_health/settings.html">
<span class="nav-icon">⚙</span>
<span class="nav-text">Settings</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#sidebarnav a:hover{background:#F0F7F2;color:var(--ink)}
/* visible focus ring for accessibility */
#sidebarnav a:focus{outline:2px solid rgba(47,110,79,0.12);outline-offset:2px}
/* Submenu visuals: smaller font, muted color, inset by 20px */
#sidebarnav .first-level > li > a.sub-link{ display:block; padding-left:36px; font-size:13px; color:var(--muted); height:36px; line-height:36px; text-decoration:none; font-weight:500; }
#sidebarnav .first-level > li > a.sub-link:hover{ background:#F7FBF7; color:var(--ink); }
#sidebarnav .first-level > li > a.sub-link.active{ color:var(--primary); background:transparent; font-weight:600; }
</style>
<aside class="left-sidebar" aria-label="Admin sidebar">
<div>
Expand Down Expand Up @@ -68,11 +72,28 @@
<a href="/admin/admin-nodes.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Node Network</a>
</li>
<li>
<a href="/admin/sensor-health.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Sensor Health Management</a>
<a class="has-arrow" href="/admin/sensor-health.html" aria-expanded="false" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Sensor Health Management</a>
<ul class="collapse first-level" style="list-style:none;margin:0;padding:0;">
<li>
<a href="/admin/sensor-health.html" class="sub-link">Sensor Health</a>
</li>
<li>
<a href="/admin/sensor_health/alerts.html" class="sub-link">Alerts</a>
</li>
<li>
<a href="/admin/sensor_health/reboot.html" class="sub-link">Reboot</a>
</li>
<li>
<a href="/admin/sensor_health/settings.html" class="sub-link">Settings</a>
</li>
</ul>
</li>
<li>
<a href="/admin/notifications.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Notifications</a>
</li>
<li>
<a href="/admin/feedback.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Feedback</a>
</li>
<li>
<a href="/admin/hmi-data-insights.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Data Insights</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#sidebarnav a{transition:background .12s ease;color:var(--ink);display:block}
#sidebarnav a:hover{background:#F0F7F2;color:var(--ink)}
#sidebarnav a:focus{outline:2px solid rgba(47,110,79,0.12);outline-offset:2px}
/* Submenu visuals: smaller font, muted color, inset by 20px */
#sidebarnav .first-level > li > a.sub-link{ display:block; padding-left:36px; font-size:13px; color:var(--muted); height:36px; line-height:36px; text-decoration:none; font-weight:500; }
#sidebarnav .first-level > li > a.sub-link:hover{ background:#F7FBF7; color:var(--ink); }
#sidebarnav .first-level > li > a.sub-link.active{ color:var(--primary); background:transparent; font-weight:600; }
</style>
<aside class="left-sidebar" aria-label="Admin sidebar">
<div>
Expand Down Expand Up @@ -58,9 +62,29 @@
<li>
<a href="./admin-nodes" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Node Network</a>
</li>
<li>
<a class="has-arrow" href="/admin/sensor-health.html" aria-expanded="false" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Sensor Health Management</a>
<ul class="collapse first-level" style="list-style:none;margin:0;padding:0;">
<li>
<a href="/admin/sensor-health.html" class="sub-link">Sensor Health</a>
</li>
<li>
<a href="/admin/sensor_health/alerts.html" class="sub-link">Alerts</a>
</li>
<li>
<a href="/admin/sensor_health/reboot.html" class="sub-link">Reboot</a>
</li>
<li>
<a href="/admin/sensor_health/settings.html" class="sub-link">Settings</a>
</li>
</ul>
</li>
<li>
<a href="./notifications" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Notifications</a>
</li>
<li>
<a href="./feedback.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Feedback</a>
</li>
<li>
<a href="./hmi-data-insights.html" style="display:block;padding:0 16px;height:40px;line-height:40px;color:#1F2D23;text-decoration:none;font-weight:500;font-size:14px;">Data Insights</a>
</li>
Expand Down
37 changes: 29 additions & 8 deletions src/Components/HMI/ui/public/admin/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet"/>
<link type="text/css" rel="stylesheet" href="/admin/css/styles.min.css" />
<link rel="stylesheet" type="text/css" href="/admin/css/styles.min.css" />
<link rel="stylesheet" href="/admin/css/icons/tabler-icons/tabler-icons.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="/admin/js/app.min.js"></script>

<style>
:root{
Expand All @@ -35,8 +38,7 @@
color:var(--text);
}

/* Scoped container for feedback page content to avoid overriding global admin layout */
.feedback-content{ padding: 1.5rem; max-width: 1150px; margin: 0 auto; }
.feedback-page{ padding: 1.5rem; max-width: 1150px; margin: 0 auto; }
.card{
border-radius: var(--radius);
border: 1px solid var(--border);
Expand Down Expand Up @@ -174,10 +176,9 @@

.btn-primary{
border-radius: 14px;
background: linear-gradient(135deg, var(--echo-green, #2F6E4F), #376e53);
background: linear-gradient(135deg, #2F6E4F, #26583f);
border: none;
box-shadow: 0 10px 24px rgba(47,110,79,.18);
color: #ffffff;
box-shadow: 0 10px 24px rgba(47,110,79,.22);
}
.btn-outline-secondary{ border-radius: 14px; }
.btn-outline-danger{ border-radius: 14px; }
Expand Down Expand Up @@ -206,12 +207,17 @@
</head>

<body>
<div class="page-wrapper" id="main-wrapper" data-layout="vertical" data-navbarbg="skin6" data-sidebartype="full" data-sidebar-position="fixed" data-header-position="fixed">
<!-- Body Wrapper -->
<div class="page-wrapper" id="main-wrapper" data-layout="vertical" data-navbarbg="skin6" data-sidebartype="full"
data-sidebar-position="fixed" data-header-position="fixed">
<!-- Sidebar Start -->
<div id="sidebar"></div>
<!-- Sidebar End -->
<!-- Main wrapper -->
<div class="body-wrapper">
<div id="header"></div>
<div class="container-fluid">
<div class="feedback-content">
<div class="feedback-page">

<!-- TOP HERO -->
<div class="hero mb-4">
Expand Down Expand Up @@ -747,5 +753,20 @@ <h5 class="section-title mb-1">Submit feedback</h5>
});
</script>

</div>
</div>
<div id="footer"></div>
</div>
</div>

<script>
$(document).ready(function() {
// Load sidebar/header/footer components
$("#sidebar").load("/admin/component/sidebar-component.html", function() { $.getScript('/admin/js/sidebarmenu.js'); });
$("#header").load("/admin/component/header-component.html");
$("#footer").load("/admin/component/footer-component.html");
});
</script>

</body>
</html>
17 changes: 16 additions & 1 deletion src/Components/HMI/ui/public/admin/js/sidebarmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ $(function () {
}
});
$("#sidebarnav >li >a.has-arrow").on("click", function (e) {
e.preventDefault();
var href = $(this).attr('href') || '';
// prevent navigation for void or empty href so parent can still be a link
if (href === '' || href.indexOf('javascript:void(0)') === 0) {
e.preventDefault();
return;
}

// if the link points to the current page, prevent navigation so it toggles/collapses
try {
var linkUrl = new URL(href, window.location.origin);
if (linkUrl.pathname === window.location.pathname) {
e.preventDefault();
}
} catch (err) {
// ignore malformed URL
}
});
});
8 changes: 5 additions & 3 deletions src/Components/HMI/ui/public/admin/reboot.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<head>
<meta charset="UTF-8" />
<title>Reboot Sensors – Project Echo</title>

<!-- Redirect to integrated sensor_health page -->
<meta http-equiv="refresh" content="0;url=/admin/sensor_health/reboot.html" />
<script>window.location.replace('/admin/sensor_health/reboot.html');</script>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>
Expand Down Expand Up @@ -39,12 +41,12 @@
<span class="nav-text">Alerts</span>
</a>

<a class="nav-link" href="reboot.html">
<a class="nav-link" href="/admin/sensor_health/reboot.html">
<span class="nav-icon">⟲</span>
<span class="nav-text">Reboot</span>
</a>

<a class="nav-link" href="settings.html">
<a class="nav-link" href="/admin/sensor_health/settings.html">
<span class="nav-icon">⚙</span>
<span class="nav-text">Settings</span>
</a>
Expand Down
82 changes: 28 additions & 54 deletions src/Components/HMI/ui/public/admin/sensor-health.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,25 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Project Echo – Admin Dashboard</title>

<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
<script src="charts.js" defer></script>
<title>Sensor Health – Project Echo</title>

<link rel="stylesheet" type="text/css" href="/admin/css/styles.min.css" />
<link rel="stylesheet" href="/admin/css/icons/tabler-icons/tabler-icons.css" />
<link rel="stylesheet" href="/admin/sensor_health/style.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="/admin/js/app.min.js"></script>
<script src="/admin/sensor_health/script.js" defer></script>
<script src="/admin/sensor_health/charts.js" defer></script>
</head>
<body>
<div class="page-wrapper" id="main-wrapper" data-layout="vertical" data-navbarbg="skin6" data-sidebartype="full"
data-sidebar-position="fixed" data-header-position="fixed">
<div id="sidebar"></div>
<div class="body-wrapper">
<div id="header"></div>
<div class="container-fluid">
<div class="sensor-page">

<div class="layout">

<!-- SIDEBAR -->
<aside class="sidebar">
<div class="sidebar-brand">
<img src="icons/echo.svg" class="brand-logo" alt="Echo logo" />
</div>

<nav class="sidebar-menu">
<div class="nav-section">
<div class="nav-title">MENU</div>

<button class="nav-link" type="button" data-view="dashboard">
<span class="nav-icon">▦</span>
<span class="nav-text">Dashboard</span>
</button>

<!-- Accordion Parent -->
<button class="nav-link nav-accordion" type="button"
aria-expanded="false"
aria-controls="sensor-accordion"
data-accordion="sensor">
<span class="nav-icon">📡</span>
<span class="nav-text">Sensor Health Management</span>
<span class="nav-caret">▾</span>
</button>

<!-- Accordion Children (no page navigation) -->
<div class="nav-children" id="sensor-accordion">
<button class="nav-sublink" type="button" data-view="sensor-health">Sensor Health</button>
<button class="nav-sublink" type="button" data-view="alerts">Alerts</button>
<button class="nav-sublink" type="button" data-view="reboot">Reboot</button>
<button class="nav-sublink" type="button" data-view="settings">Settings</button>
<button class="nav-sublink" type="button" data-view="projects">Add a Project</button>
</div>
</div>
</nav>

<div class="sidebar-footer">
<span class="footer-dot"></span>
<span class="footer-text">ECHO</span>
</div>
</aside>

<!-- Mobile backdrop -->
<div class="mobile-backdrop" id="mobile-backdrop"></div>
Expand All @@ -63,8 +31,6 @@
<header class="page-header">
<div></div>
<div class="page-header-actions">
<button class="icon-button" id="menu-toggle" aria-label="Open menu">☰</button>
<button class="icon-button" id="theme-toggle" aria-label="Toggle theme">🌙</button>
</div>
</header>

Expand Down Expand Up @@ -179,10 +145,18 @@ <h4>Resources</h4>
</section>

</div><!-- END dashboard-shell -->
</div> <!-- END dashboard-shell -->
</div>
<div id="footer"></div>
</div>
</main>

</div>

</div>

<script>
$(document).ready(function() {
$("#sidebar").load("/admin/component/sidebar-component.html", function() { $.getScript('/admin/js/sidebarmenu.js'); });
$("#header").load("/admin/component/header-component.html");
$("#footer").load("/admin/component/footer-component.html");
});
</script>
</body>
</html>
Loading
Loading