Skip to content
Snippets Groups Projects
Commit 0fc003e2 authored by Max Frederiksen's avatar Max Frederiksen
Browse files

Put host log stream + IOC log stream in SimpleAccordion

parent c6e84c76
No related branches found
No related tags found
2 merge requests!542Prepare 4.1.0,!518CE-3050
Pipeline #195227 failed
...@@ -19,7 +19,8 @@ export function IOCLiveStatus({ ioc }) { ...@@ -19,7 +19,8 @@ export function IOCLiveStatus({ ioc }) {
const [state, setState] = useUrlState( const [state, setState] = useUrlState(
{ {
procserv_log_open: "true", procserv_log_open: "true",
records_open: "false" records_open: "false",
log_stream_open: "false"
}, },
{ navigateMode: "replace" } { navigateMode: "replace" }
); );
...@@ -81,15 +82,23 @@ export function IOCLiveStatus({ ioc }) { ...@@ -81,15 +82,23 @@ export function IOCLiveStatus({ ioc }) {
allowedRoles={["DeploymentToolAdmin", "DeploymentToolIntegrator"]} allowedRoles={["DeploymentToolAdmin", "DeploymentToolIntegrator"]}
renderNoAccess={() => <></>} renderNoAccess={() => <></>}
> >
<LokiContainer <SimpleAccordion
hostName={liveIOC.activeDeployment?.host.hostName} summary="IOC log stream"
iocName={ioc.namingName} expanded={deserialize(state.log_stream_open)}
isDeployed={isIocDeployed(ioc)} onChange={(_, expanded) =>
/> setState({ log_stream_open: serialize(expanded) })
}
>
<LokiContainer
hostName={liveIOC.activeDeployment?.host.hostName}
iocName={ioc.namingName}
isDeployed={isIocDeployed(ioc)}
/>
</SimpleAccordion>
<SimpleAccordion <SimpleAccordion
summary="Records" summary="Records"
expanded={deserialize(state.records_open)} expanded={deserialize(state.records_open)}
onChange={(event, expanded) => onChange={(_, expanded) =>
setState({ records_open: serialize(expanded) }) setState({ records_open: serialize(expanded) })
} }
> >
......
import { Box, Typography } from "@mui/material"; import { Box } from "@mui/material";
import { LokiPanel } from "./LokiPanel"; import { LokiPanel } from "./LokiPanel";
export function LokiContainer({ hostName, iocName, isDeployed }) { export function LokiContainer({ hostName, iocName, isDeployed }) {
...@@ -6,12 +6,6 @@ export function LokiContainer({ hostName, iocName, isDeployed }) { ...@@ -6,12 +6,6 @@ export function LokiContainer({ hostName, iocName, isDeployed }) {
<> <>
{hostName && ( {hostName && (
<Box sx={{ pt: 2 }}> <Box sx={{ pt: 2 }}>
<Typography
sx={{ my: 2.5 }}
variant="h3"
>
IOC log stream
</Typography>
<LokiPanel <LokiPanel
hostName={hostName} hostName={hostName}
isSyslog={false} isSyslog={false}
......
...@@ -37,6 +37,7 @@ export function HostDetailsView({ hostId, host, status }) { ...@@ -37,6 +37,7 @@ export function HostDetailsView({ hostId, host, status }) {
iocs_rows: 20, iocs_rows: 20,
iocs_page: 0, iocs_page: 0,
details_open: false, details_open: false,
log_stream_open: false,
job_log_open: false, job_log_open: false,
job_log_rows: 20, job_log_rows: 20,
job_log_page: 0 job_log_page: 0
...@@ -100,22 +101,31 @@ export function HostDetailsView({ hostId, host, status }) { ...@@ -100,22 +101,31 @@ export function HostDetailsView({ hostId, host, status }) {
<HostDetailsTable host={host} /> <HostDetailsTable host={host} />
</SimpleAccordion> </SimpleAccordion>
<Stack <SimpleAccordion
gap={2} summary={
sx={{ marginTop: "10px" }} <Typography
variant="h3"
component="h2"
>
Host log stream
</Typography>
}
expanded={deserialize(urlState.log_stream_open)}
onChange={(_, expanded) =>
setUrlState({ log_stream_open: serialize(expanded) })
}
> >
<Typography <Stack
variant="h3" gap={2}
component="h2" sx={{ marginTop: "10px" }}
> >
Host log stream <LokiPanel
</Typography> hostName={host.name}
<LokiPanel isSyslog
hostName={host.name} isDeployed
isSyslog />
isDeployed </Stack>
/> </SimpleAccordion>
</Stack>
</AccessControl> </AccessControl>
<KeyValueTable <KeyValueTable
obj={{ obj={{
......
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