mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-27 15:41:57 -06:00
Additional Changes to Ansible Logic
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user