Additional Changes to Ansible Logic

This commit is contained in:
2025-10-11 18:58:55 -06:00
parent c0f47075d6
commit 8cae44539c
9 changed files with 596 additions and 146 deletions

View File

@@ -35,7 +35,9 @@ import Login from "./Login.jsx";
import SiteList from "./Sites/Site_List";
import DeviceList from "./Devices/Device_List";
import DeviceDetails from "./Devices/Device_Details";
import AgentDevices from "./Devices/Agent_Devices.jsx";
import SSHDevices from "./Devices/SSH_Devices.jsx";
import WinRMDevices from "./Devices/WinRM_Devices.jsx";
import AssemblyList from "./Assemblies/Assembly_List";
import AssemblyEditor from "./Assemblies/Assembly_Editor";
import ScheduledJobsList from "./Scheduling/Scheduled_Jobs_List";
@@ -160,8 +162,8 @@ const LOCAL_STORAGE_KEY = "borealis_persistent_state";
items.push({ label: "Site List", page: "sites" });
break;
case "devices":
items.push({ label: "Inventory", page: "devices" });
items.push({ label: "Devices", page: "devices" });
items.push({ label: "Device List", page: "devices" });
break;
case "device_details":
items.push({ label: "Devices", page: "devices" });
@@ -203,14 +205,21 @@ const LOCAL_STORAGE_KEY = "borealis_persistent_state";
items.push({ label: "Automation", page: "jobs" });
items.push({ label: "Community Content", page: "community" });
break;
case "devices":
case "agent_devices":
items.push({ label: "Inventory", page: "devices" });
items.push({ label: "Devices", page: "devices" });
items.push({ label: "Agent Devices", page: "agent_devices" });
break;
case "ssh_devices":
items.push({ label: "Inventory", page: "devices" });
items.push({ label: "Devices", page: "devices" });
items.push({ label: "SSH Devices", page: "ssh_devices" });
break;
case "winrm_devices":
items.push({ label: "Inventory", page: "devices" });
items.push({ label: "Devices", page: "devices" });
items.push({ label: "WinRM Devices", page: "winrm_devices" });
break;
case "access_credentials":
items.push({ label: "Access Management", page: "access_credentials" });
items.push({ label: "Credentials", page: "access_credentials" });
@@ -565,7 +574,13 @@ const LOCAL_STORAGE_KEY = "borealis_persistent_state";
const isAdmin = (String(userRole || '').toLowerCase() === 'admin');
useEffect(() => {
if (!isAdmin && (currentPage === 'server_info' || currentPage === 'access_credentials' || currentPage === 'access_users' || currentPage === 'ssh_devices')) {
const requiresAdmin = currentPage === 'server_info'
|| currentPage === 'access_credentials'
|| currentPage === 'access_users'
|| currentPage === 'ssh_devices'
|| currentPage === 'winrm_devices'
|| currentPage === 'agent_devices';
if (!isAdmin && requiresAdmin) {
setNotAuthorizedOpen(true);
setCurrentPage('devices');
}
@@ -593,8 +608,19 @@ const LOCAL_STORAGE_KEY = "borealis_persistent_state";
}}
/>
);
case "agent_devices":
return (
<AgentDevices
onSelectDevice={(d) => {
setSelectedDevice(d);
setCurrentPage("device_details");
}}
/>
);
case "ssh_devices":
return <SSHDevices />;
case "winrm_devices":
return <WinRMDevices />;
case "device_details":
return (