Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ function XATableLayout({
<IndeterminateCheckbox {...row.getToggleRowSelectedProps()} />
</div>
),
width: 40
width: 40,

// disableResizing (not hideResizer) is required here: it sets
// canResize = false, so useFlexLayout excludes this column from
// flex sizing and it stays exactly 40px wide.
disableResizing: true
Comment thread
dhavaljrajpara marked this conversation as resolved.
Resolved
};
if (rowSelectOp && rowSelectOp.position === "first") {
cols.push(selectionCol, ...columns);
Expand Down Expand Up @@ -345,23 +350,39 @@ function XATableLayout({
column.toggleSortBy(!column.isSortedDesc)
}
>
{columnResizable && !column.disableResizing && (
<>
<div
className="fa fa-expand"
aria-hidden="true"
{...column.getResizerProps([
{ className: "resizer" }
])}
onClick={(event) => event.stopPropagation()}
/>
<i
className="fa fa-expand resizeable-icon"
aria-hidden="true"
{...column.getResizerProps()}
/>
</>
)}
{/*
Show the resize handle on a column only if:
- the table has columnResizable turned on, and
- the column does not have disableResizing or hideResizer.

Use disableResizing when the column must keep a fixed
width (example: the checkbox column).

Use hideResizer when you just want to hide the handle on
a column, but still let it share the table space like
normal. Without this, the one column we want to resize
would take all the extra space and dragging would
seem to do nothing.
*/}
{columnResizable &&
Comment thread
dhavaljrajpara marked this conversation as resolved.
Resolved
!column.disableResizing &&
!column.hideResizer && (
<>
<div
className="fa fa-expand"
aria-hidden="true"
{...column.getResizerProps([
{ className: "resizer" }
])}
onClick={(event) => event.stopPropagation()}
/>
<i
className="fa fa-expand resizeable-icon"
aria-hidden="true"
{...column.getResizerProps()}
/>
</>
)}

{column.render("Header")}
{columnSort && column.isSorted && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1662,11 +1662,12 @@ header {

.resizeable-icon {
position: absolute;
bottom: 0;
bottom: 3px;
font-size: 10px;
cursor: se-resize;
right: 0;
right: 3px;
transform: rotate(90deg);
z-index: 1;
}

.show-more {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,7 @@ function AccessLogs() {
);
},
width: 90,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Policy Version",
Expand All @@ -421,9 +420,8 @@ function AccessLogs() {
);
},
width: 110,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Event Time",
Expand All @@ -432,8 +430,7 @@ function AccessLogs() {
return dateFormat(rawValue.value, "mm/dd/yyyy h:MM:ss TT");
},
width: 170,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Application",
Expand All @@ -448,9 +445,8 @@ function AccessLogs() {
} else return "--";
},
width: 100,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "User",
Expand All @@ -464,9 +460,7 @@ function AccessLogs() {
);
} else return "--";
},
width: 120,
disableResizing: true,
getResizerProps: () => {}
minWidth: 120
},
{
Header: "Service (Name / Type)",
Expand All @@ -486,9 +480,8 @@ function AccessLogs() {
</div>
</div>
),
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Resource (Name / Type)",
Expand Down Expand Up @@ -542,8 +535,7 @@ function AccessLogs() {
} else return "--";
},
width: 130,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Permission",
Expand All @@ -558,8 +550,7 @@ function AccessLogs() {
);
},
width: 100,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Result",
Expand All @@ -579,9 +570,8 @@ function AccessLogs() {
);
},
width: 100,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Access Enforcer",
Expand All @@ -596,8 +586,7 @@ function AccessLogs() {
} else return "--";
},
width: 120,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Agent Host Name",
Expand All @@ -612,9 +601,8 @@ function AccessLogs() {
} else return <div className="text-center">--</div>;
},
width: 150,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Client IP",
Expand All @@ -629,14 +617,13 @@ function AccessLogs() {
} else return "--";
},
width: 110,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Cluster Name",
accessor: "clusterName",
width: 100,
disableResizing: true,
hideResizer: true,
disableSortBy: true,
Cell: (rawValue) => {
if (!isEmpty(rawValue?.value)) {
Expand All @@ -648,8 +635,7 @@ function AccessLogs() {
} else {
return <div className="text-center">--</div>;
}
},
getResizerProps: () => {}
}
},
{
Header: "Zone Name",
Expand All @@ -670,16 +656,14 @@ function AccessLogs() {
} else return <div className="text-center">--</div>;
},
width: 100,
disableResizing: true,
getResizerProps: () => {}
hideResizer: true
},
{
Header: "Event Count",
accessor: "eventCount",
width: 100,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Tags",
Expand Down Expand Up @@ -709,9 +693,8 @@ function AccessLogs() {
return <AccessMoreLess Data={tags} />;
},
width: 140,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Datasets",
Expand All @@ -726,9 +709,8 @@ function AccessLogs() {
return <AccessMoreLess Data={Datasets} />;
},
width: 140,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
},
{
Header: "Projects",
Expand All @@ -743,9 +725,8 @@ function AccessLogs() {
return <AccessMoreLess Data={Projects} />;
},
width: 140,
disableResizing: true,
disableSortBy: true,
getResizerProps: () => {}
hideResizer: true,
disableSortBy: true
}
],
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ function UserListing() {
{
Header: "User Name",
accessor: "name",
minWidth: 180,
Cell: (rawValue) => {
if (rawValue.value) {
return (
Expand Down Expand Up @@ -375,7 +376,8 @@ function UserListing() {
</div>
);
} else return <div className="text-center">--</div>;
}
},
hideResizer: true
},
{
Header: "Role",
Expand All @@ -391,7 +393,8 @@ function UserListing() {
}
return <div className="textt-center">--</div>;
},
width: 70
width: 70,
hideResizer: true
},
{
Header: "User Source",
Expand All @@ -406,7 +409,8 @@ function UserListing() {
);
} else return "--";
},
width: 70
width: 70,
hideResizer: true
},
{
Header: "Sync Source",
Expand All @@ -420,7 +424,8 @@ function UserListing() {
<div className="text-center">--</div>
);
},
width: 100
width: 100,
hideResizer: true
},
{
Header: "Groups",
Expand All @@ -444,7 +449,8 @@ function UserListing() {
} else {
return "--";
}
}
},
hideResizer: true
},
{
Header: "Visibility",
Expand All @@ -469,7 +475,8 @@ function UserListing() {
);
} else return <div className="text-center">--</div>;
},
width: 70
width: 70,
hideResizer: true
},
{
Header: "Sync Details",
Expand All @@ -496,7 +503,8 @@ function UserListing() {
return <div className="text-center">--</div>;
}
},
width: 80
width: 80,
hideResizer: true
}
],
[]
Expand Down Expand Up @@ -672,6 +680,7 @@ function UserListing() {
currentpageSize={state.currentPageSize}
pagination
loading={state.loader}
columnResizable={true}
rowSelectOp={
(isSystemAdmin() || isKeyAdmin()) && {
position: "first",
Expand Down