Skip to content

Commit

Permalink
chore: ran lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodallacqua-hpe committed Oct 31, 2024
1 parent 292be9f commit 4145fd4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion webui/react/src/components/ColumnPickerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const ColumnPickerTab: React.FC<ColumnTabProps> = ({
: [...new Set([...columnState, ...filteredColumns.map((col) => formatColumnKey(col))])];
const pinnedCount = allFilteredColumnsChecked
? // If uncheck something pinned, reduce the pinnedColumnsCount
newColumns.filter((col) => columnState.indexOf(col) < pinnedColumnsCount).length
newColumns.filter((col) => columnState.indexOf(col) < pinnedColumnsCount).length
: pinnedColumnsCount;

onVisibleColumnChange?.(newColumns, pinnedCount);
Expand Down
80 changes: 40 additions & 40 deletions webui/react/src/pages/FlatRuns/FlatRuns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
{
max: heatmap.max,
Expand All @@ -392,8 +392,8 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
undefined,
);
Expand All @@ -405,8 +405,8 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
break;
Expand All @@ -415,8 +415,8 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
break;
Expand All @@ -427,8 +427,8 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
columnDefKey,
currentColumn.displayName || currentColumn.column,
settings.columnWidths[columnDefKey] ??
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
defaultColumnWidths[columnDefKey as RunColumn] ??
MIN_COLUMN_WIDTH,
dataPath,
);
}
Expand All @@ -441,9 +441,9 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
settings.columnWidths[currentColumn.column],
heatmap && settings.heatmapOn && !settings.heatmapSkipped.includes(currentColumn.column)
? {
max: heatmap.max,
min: heatmap.min,
}
max: heatmap.max,
min: heatmap.min,
}
: undefined,
);
}
Expand Down Expand Up @@ -817,32 +817,32 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
? null
: !isPinned
? {
icon: <Icon decorative name="pin" />,
key: 'pin',
label: 'Pin column',
onClick: () => {
const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId);
newColumnsOrder.splice(settings.pinnedColumnsCount, 0, columnId);
handleColumnsOrderChange(
newColumnsOrder,
Math.min(settings.pinnedColumnsCount + 1, columnsIfLoaded.length),
);
},
}
icon: <Icon decorative name="pin" />,
key: 'pin',
label: 'Pin column',
onClick: () => {
const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId);
newColumnsOrder.splice(settings.pinnedColumnsCount, 0, columnId);
handleColumnsOrderChange(
newColumnsOrder,
Math.min(settings.pinnedColumnsCount + 1, columnsIfLoaded.length),
);
},
}
: {
disabled: settings.pinnedColumnsCount <= 1,
icon: <Icon decorative name="pin" />,
key: 'unpin',
label: 'Unpin column',
onClick: () => {
const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId);
newColumnsOrder.splice(settings.pinnedColumnsCount - 1, 0, columnId);
handleColumnsOrderChange(
newColumnsOrder,
Math.max(settings.pinnedColumnsCount - 1, 0),
);
disabled: settings.pinnedColumnsCount <= 1,
icon: <Icon decorative name="pin" />,
key: 'unpin',
label: 'Unpin column',
onClick: () => {
const newColumnsOrder = columnsIfLoaded.filter((c) => c !== columnId);
newColumnsOrder.splice(settings.pinnedColumnsCount - 1, 0, columnId);
handleColumnsOrderChange(
newColumnsOrder,
Math.max(settings.pinnedColumnsCount - 1, 0),
);
},
},
},
{
icon: <Icon decorative name="eye-close" />,
key: 'hide',
Expand Down Expand Up @@ -871,9 +871,9 @@ const FlatRuns: React.FC<Props> = ({ projectId, workspaceId, searchId }) => {
sortCount === 0
? []
: [
{ type: 'divider' as const },
...sortMenuItemsForColumn(column, sorts, handleSortChange),
];
{ type: 'divider' as const },
...sortMenuItemsForColumn(column, sorts, handleSortChange),
];
items.push(...sortMenuItems);
}

Expand Down

0 comments on commit 4145fd4

Please sign in to comment.