Skip to content
Snippets Groups Projects
Commit 40c13b4e authored by Domonkos Gulyas's avatar Domonkos Gulyas
Browse files

CE-1929 Add description to record overview table

parent bbe12bc7
No related branches found
No related tags found
2 merge requests!407CE-2141: 3.0.0,!309CE-1929 Add description to record overview table
Pipeline #154867 passed
...@@ -7,8 +7,9 @@ import { useRedirect } from "../../hooks/Redirect"; ...@@ -7,8 +7,9 @@ import { useRedirect } from "../../hooks/Redirect";
const recordsColumns = [ const recordsColumns = [
{ id: "bulb", label: "Status", width: "5ch", textAlign: "center" }, { id: "bulb", label: "Status", width: "5ch", textAlign: "center" },
{ id: "name", label: "Record", width: "15ch" }, { id: "name", label: "Record", width: "15ch" },
{ id: "iocName", label: "IOC name", width: "15ch" }, { id: "description", label: "Description", width: "15ch" },
{ id: "hostName", label: "Host", width: "15ch" } { id: "iocName", label: "IOC name", width: "10ch" },
{ id: "hostName", label: "Host", width: "10ch" }
]; ];
const iocDetailsColumns = [ const iocDetailsColumns = [
...@@ -17,6 +18,32 @@ const iocDetailsColumns = [ ...@@ -17,6 +18,32 @@ const iocDetailsColumns = [
{ id: "iocVersion", label: "Version", width: "15ch" } { id: "iocVersion", label: "Version", width: "15ch" }
]; ];
function createRecordDescription(description) {
return (
<>
{description ? (
<Tooltip
title={description}
arrow
enterDelay={400}
>
<Typography
style={{
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
}}
>
{description}
</Typography>
</Tooltip>
) : (
"---"
)}
</>
);
}
export function createRecordsRow(record) { export function createRecordsRow(record) {
return { return {
id: record.name, id: record.name,
...@@ -31,6 +58,7 @@ export function createRecordsRow(record) { ...@@ -31,6 +58,7 @@ export function createRecordsRow(record) {
</Grid> </Grid>
), ),
name: record.name, name: record.name,
description: createRecordDescription(record.description),
iocName: record.iocName, iocName: record.iocName,
hostName: record.hostName hostName: record.hostName
}; };
......
...@@ -60,6 +60,7 @@ export function RecordDetailsView() { ...@@ -60,6 +60,7 @@ export function RecordDetailsView() {
) : ( ) : (
record?.iocName record?.iocName
), ),
Description: record?.description,
Version: record?.iocVersion, Version: record?.iocVersion,
Host: record.hostCSentryId ? ( Host: record.hostCSentryId ? (
<Typography> <Typography>
......
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