Skip to content
Snippets Groups Projects
Commit 97090b54 authored by Johanna Szepanski's avatar Johanna Szepanski
Browse files

updated routes affected by the host details route change

parent a6aa8da9
No related branches found
No related tags found
2 merge requests!497CE-2790: Prepare for 4.0.0,!492CE-2887: Modify host endpoints
...@@ -48,7 +48,7 @@ export function IOCLiveStatus({ ioc }) { ...@@ -48,7 +48,7 @@ export function IOCLiveStatus({ ioc }) {
<Typography> <Typography>
{ioc.activeDeployment?.host.hostId ? ( {ioc.activeDeployment?.host.hostId ? (
<InternalLink <InternalLink
to={`/hosts/${ioc.activeDeployment?.host.hostId}`} to={`/hosts/${ioc.activeDeployment?.host.hostId}/${ioc.activeDeployment?.host.fqdn}`}
label={`Host details, ${ioc.activeDeployment?.host.fqdn}`} label={`Host details, ${ioc.activeDeployment?.host.fqdn}`}
> >
{ioc.activeDeployment?.host.fqdn} {ioc.activeDeployment?.host.fqdn}
......
...@@ -73,7 +73,7 @@ function createHostLink(host) { ...@@ -73,7 +73,7 @@ function createHostLink(host) {
if (host?.hostId) { if (host?.hostId) {
return ( return (
<InternalLink <InternalLink
to={`/hosts/${host?.hostId}`} to={`/hosts/${host?.hostId}/${host.fqdn}`}
label={`Host details, ${host?.hostName}`} label={`Host details, ${host?.hostName}`}
width="100%" width="100%"
> >
......
...@@ -35,7 +35,7 @@ const calculateHostText = (operation) => { ...@@ -35,7 +35,7 @@ const calculateHostText = (operation) => {
if (operation.host.hostId && operation.host.externalIdValid) { if (operation.host.hostId && operation.host.externalIdValid) {
return ( return (
<InternalLink <InternalLink
to={`/hosts/${operation.host.hostId}`} to={`/hosts/${operation.host.hostId}/${operation.host.fqdn}`}
label={`Host Details, ${operation.host.fqdn}`} label={`Host Details, ${operation.host.fqdn}`}
> >
{operation.host.fqdn} {operation.host.fqdn}
......
...@@ -7,7 +7,7 @@ export const JobHostColumn = ({ job }) => { ...@@ -7,7 +7,7 @@ export const JobHostColumn = ({ job }) => {
return ( return (
<Stack> <Stack>
<InternalLink <InternalLink
to={`/hosts/${job?.host?.hostId}`} to={`/hosts/${job?.host?.hostId}/${job?.host?.fqdn}`}
label={`Host details, ${job.host?.hostName}`} label={`Host details, ${job.host?.hostName}`}
> >
{job.host.hostName} {job.host.hostName}
......
...@@ -22,7 +22,7 @@ export function createRow(host) { ...@@ -22,7 +22,7 @@ export function createRow(host) {
status: <HostStatus hostId={host.hostId} />, status: <HostStatus hostId={host.hostId} />,
hostName: ( hostName: (
<InternalLink <InternalLink
to={`/hosts/${host.hostId}`} to={`/hosts/${host.hostId}/${host.fqdn}`}
label={`Host details, ${host.name}`} label={`Host details, ${host.name}`}
width="100%" width="100%"
> >
......
...@@ -28,7 +28,7 @@ function createHostLink(fqdn, hostInfo) { ...@@ -28,7 +28,7 @@ function createHostLink(fqdn, hostInfo) {
if (hostInfo) { if (hostInfo) {
return ( return (
<InternalLink <InternalLink
to={`/hosts/${hostInfo.hostId}`} to={`/hosts/${hostInfo.hostId}/${fqdn}`}
label={`Record host details, ${fqdn}}`} label={`Record host details, ${fqdn}}`}
width="100%" width="100%"
> >
......
...@@ -5,12 +5,15 @@ import { HostDetailsContainer } from "./HostDetailsContainer"; ...@@ -5,12 +5,15 @@ import { HostDetailsContainer } from "./HostDetailsContainer";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
export function HostDetailsAccessControl() { export function HostDetailsAccessControl() {
const { id } = useParams(); const { id, fqdn } = useParams();
return ( return (
<RootPaper data-testid="host-details-container"> <RootPaper data-testid="host-details-container">
<AccessControl allowedRoles={[]}> <AccessControl allowedRoles={[]}>
<HostDetailsContainer hostId={id} /> <HostDetailsContainer
hostId={id}
hostFqdn={fqdn}
/>
</AccessControl> </AccessControl>
</RootPaper> </RootPaper>
); );
......
...@@ -100,7 +100,7 @@ export function RecordDetailsView() { ...@@ -100,7 +100,7 @@ export function RecordDetailsView() {
Host: record.hostId ? ( Host: record.hostId ? (
<Typography> <Typography>
<InternalLink <InternalLink
to={`/hosts/${record.hostId}`} to={`/hosts/${record.hostId}/${record?.hostName}`}
label={`Host details, ${record?.hostName}`} label={`Host details, ${record?.hostName}`}
> >
{record?.hostName} {record?.hostName}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment