Add infrastrucutre/details route
This commit is contained in:
1 parent
a5cd115180
commit
93d96b99a4
1 file changed
+7
@@ -39,6 +39,7 @@ import { getAppSettings } from "./Features/Settings/settingsSlice";
|
|||||||
import { logger } from "./Utils/Logger"; // Import the logger
|
import { logger } from "./Utils/Logger"; // Import the logger
|
||||||
import { networkService } from "./main";
|
import { networkService } from "./main";
|
||||||
import { Infrastructure } from "./Pages/Infrastructure";
|
import { Infrastructure } from "./Pages/Infrastructure";
|
||||||
|
import InfrastructureDetails from "./Pages/Infrastructure/details";
|
||||||
function App() {
|
function App() {
|
||||||
const AdminCheckedRegister = withAdminCheck(Register);
|
const AdminCheckedRegister = withAdminCheck(Register);
|
||||||
const MonitorsWithAdminProp = withAdminProp(Monitors);
|
const MonitorsWithAdminProp = withAdminProp(Monitors);
|
||||||
@@ -48,6 +49,7 @@ function App() {
|
|||||||
const MaintenanceWithAdminProp = withAdminProp(Maintenance);
|
const MaintenanceWithAdminProp = withAdminProp(Maintenance);
|
||||||
const SettingsWithAdminProp = withAdminProp(Settings);
|
const SettingsWithAdminProp = withAdminProp(Settings);
|
||||||
const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings);
|
const AdvancedSettingsWithAdminProp = withAdminProp(AdvancedSettings);
|
||||||
|
const InfrastructureDetailsWithAdminProp = withAdminProp(InfrastructureDetails);
|
||||||
const mode = useSelector((state) => state.ui.mode);
|
const mode = useSelector((state) => state.ui.mode);
|
||||||
const { authToken } = useSelector((state) => state.auth);
|
const { authToken } = useSelector((state) => state.auth);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@@ -128,6 +130,11 @@ function App() {
|
|||||||
element={<ProtectedRoute Component={Infrastructure} />}
|
element={<ProtectedRoute Component={Infrastructure} />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Route
|
||||||
|
path="infrastructure/:monitorId"
|
||||||
|
element={<ProtectedRoute Component={InfrastructureDetailsWithAdminProp} />}
|
||||||
|
/>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="incidents/:monitorId?"
|
path="incidents/:monitorId?"
|
||||||
element={<ProtectedRoute Component={Incidents} />}
|
element={<ProtectedRoute Component={Incidents} />}
|
||||||
|
|||||||
Reference in new issue
Block a user