service monitoring
This commit is contained in:
@@ -248,6 +248,19 @@ export default function ServiceMonitoring() {
|
|||||||
};
|
};
|
||||||
}, [corporateValue]);
|
}, [corporateValue]);
|
||||||
|
|
||||||
|
const clearCodeHtml = (text:any) => {
|
||||||
|
return new DOMParser().parseFromString(text, 'text/html').documentElement.textContent
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderHTML = (data:string) => {
|
||||||
|
return (
|
||||||
|
<div style={{marginLeft: 20}}
|
||||||
|
dangerouslySetInnerHTML={{__html: data}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page title="Service Monitoring">
|
<Page title="Service Monitoring">
|
||||||
<Grid container spacing={3} paddingX={2} sx={{ marginBottom: 5, marginTop: 1 }}>
|
<Grid container spacing={3} paddingX={2} sx={{ marginBottom: 5, marginTop: 1 }}>
|
||||||
@@ -977,7 +990,7 @@ export default function ServiceMonitoring() {
|
|||||||
<Typography variant="h6">Subject</Typography>
|
<Typography variant="h6">Subject</Typography>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.subject
|
{dailyMonitoring.subject
|
||||||
? dailyMonitoring.subject
|
? clearCodeHtml(dailyMonitoring.subject)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -989,7 +1002,7 @@ export default function ServiceMonitoring() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.object
|
{dailyMonitoring.object
|
||||||
? dailyMonitoring.object
|
? clearCodeHtml(dailyMonitoring.object)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -1087,7 +1100,7 @@ export default function ServiceMonitoring() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Typography variant="inherit">
|
<Typography variant="inherit">
|
||||||
{dailyMonitoring.analysis
|
{dailyMonitoring.analysis
|
||||||
? dailyMonitoring.analysis
|
? clearCodeHtml(dailyMonitoring.analysis)
|
||||||
: '-'}
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -1106,7 +1119,7 @@ export default function ServiceMonitoring() {
|
|||||||
{dailyMonitoring.plans.length > 0 ? (
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
dailyMonitoring.plans.map((plan, planIndex) =>
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
plan.type === 1 ? (
|
plan.type === 1 ? (
|
||||||
<li key={planIndex}>{plan.plan}</li>
|
<li key={planIndex}>{renderHTML(plan.plan)}</li>
|
||||||
) : null
|
) : null
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
@@ -1133,7 +1146,7 @@ export default function ServiceMonitoring() {
|
|||||||
{dailyMonitoring.plans.length > 0 ? (
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
dailyMonitoring.plans.map((plan, planIndex) =>
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
plan.type === 2 ? (
|
plan.type === 2 ? (
|
||||||
<li key={planIndex}>{plan.plan}</li>
|
<li key={planIndex}>{renderHTML(plan.plan)}</li>
|
||||||
) : null
|
) : null
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user