<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } ?> <div class="nc-panel" id="nc-panel"> <div class="nc-panel-empty" id="nc-empty">Select a node to begin</div><?php foreach ($nodeMap as $code => $node): $role = $node['role']; $services = $serviceMap[$role] ?? ['sshd']; $dbNodeId = $node['db_id'] ?? $role; ?> <div class="nc-pane" id="nc-pane-<?= UI::e($code) ?>" style="display:none"> <div class="nc-panel-hdr"> <div> <div class="nc-panel-title"> <span class="nc-dot<?= ($node['status'] ?? '') === 'online' ? 'up' : '' ?>" id="nc-pdot-<?= UI::e($code) ?>"></span><?= UI::e($code) ?>&mdash;<?= UI::e($node['name']) ?> </div> <div class="nc-panel-meta"> <span>IP:<?= UI::e($node['ip']) ?></span> <span>WG:<?= UI::e($node['wg']) ?></span> <span>OS:<?= UI::e($node['os']) ?></span> <span><?= UI::e($node['provider']) ?>&middot;<?= UI::e($node['loc']) ?></span> </div> </div> </div> <div class="nc-section"> <div class="nc-section-label">Services</div> <div class="nc-svc-row" id="nc-svcs-<?= UI::e($code) ?>"><?php foreach ($services as $svc): ?> <span class="nc-svc" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-svc="<?= UI::e($svc) ?>" data-nc="picksvc"><?= UI::e($svc) ?></span><?php endforeach; ?> </div> </div> <div class="nc-section"> <div class="nc-section-label">Service Actions</div> <div class="nc-acts"> <button class="nc-act ok" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="service_status">Status</button> <button class="nc-act" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="service_restart">Restart</button> <button class="nc-act" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="service_start">Start</button> <button class="nc-act warn" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="service_stop">Stop</button> <button class="nc-act" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="logs_tail">Logs</button> </div> </div> <div class="nc-section"> <div class="nc-section-label">System Probes</div> <div class="nc-probes"> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="uptime">Uptime</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="disk">Disk</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="memory">Memory</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="ports">Ports</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="who">Sessions</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="wg_status">WireGuard</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="fw_status">Firewall</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="processes">Top</button> <button class="nc-prb" data-nc="exec" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="kernel_audit">Kernel</button> <button class="nc-prb" style="color:#ffd54f" data-nc="exec-confirm" data-code="<?= UI::e($code) ?>" data-node="<?= UI::e($dbNodeId) ?>" data-cmd="kernel_harden" data-confirm="Harden kernel on<?= UI::e($node['name']) ?>?">Harden</button> </div> </div> <div class="nc-section"> <div class="nc-section-label">Output</div> <div class="nc-term" id="nc-term-<?= UI::e($code) ?>"></div> </div> </div><?php endforeach; ?> </div>