MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / showNetworkSubtab

Function showNetworkSubtab

web/scripts/ragnar_modern.js:1199–1225  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1197 if (selectedBtn) {
1198 selectedBtn.classList.add('bg-Ragnar-600');
1199 selectedBtn.classList.remove('text-gray-300', 'hover:text-white', 'hover:bg-gray-700');
1200 }
1201
1202 loadTabData(tabName);
1203
1204 if (tabName === 'config') {
1205 try { refreshSensingInstallCard(); syncRusenseTabToggle(); syncTerminalToggle(); } catch (e) { /* ignore */ }
1206 }
1207
1208 const mobileMenu = document.getElementById('mobile-menu');
1209 if (mobileMenu) {
1210 mobileMenu.classList.add('hidden');
1211 }
1212}
1213
1214function _setSubtabActive(btn, active) {
1215 if (!btn) return;
1216 btn.classList.toggle('bg-Ragnar-600', active);
1217 btn.classList.toggle('text-white', active);
1218 btn.classList.toggle('text-slate-400', !active);
1219 btn.classList.toggle('hover:bg-slate-700', !active);
1220 btn.classList.toggle('hover:text-white', !active);
1221}
1222
1223function showNetworkSubtab(name) {
1224 const views = {
1225 hosts: 'net-sub-hosts', archive: 'net-sub-archive', map: 'net-sub-map',
1226 diagnostics: 'net-sub-diagnostics', switch: 'net-sub-switch', interfaces: 'net-sub-interfaces',
1227 wifi: 'net-sub-wifi'
1228 };

Callers 1

showTabFunction · 0.70

Calls 10

loadLldpFunction · 0.85
loadNetworkIdentityFunction · 0.85
loadInterfacesFunction · 0.85
populateMtrSourcesFunction · 0.85
_setSubtabActiveFunction · 0.70
loadAllNetworksDataFunction · 0.70
loadNetworkMapFunction · 0.70
loadNetworkDataFunction · 0.70
keysMethod · 0.45

Tested by

no test coverage detected