Fleet UI: (Unreleased) fix logic with versions in left header, update css (#25370)

This commit is contained in:
RachelElysia
2025-01-13 16:03:56 -08:00
committed by GitHub
parent b902509e3a
commit ffb8098f5a
2 changed files with 4 additions and 26 deletions
@@ -195,17 +195,12 @@ const SoftwareTable = ({
const hasData = tableData && tableData.length > 0;
const hasQuery = query !== "";
const hasSoftwareFilter = softwareFilter !== "allSoftware";
const hasVersionFilter = showVersions;
const vulnFilterDetails = getVulnFilterRenderDetails(vulnFilters);
const hasVulnFilters = vulnFilterDetails.filterCount > 0;
const showFilterHeaders =
isSoftwareEnabled &&
(hasData ||
hasQuery ||
hasSoftwareFilter ||
hasVersionFilter ||
hasVulnFilters);
(hasData || hasQuery || hasSoftwareFilter || hasVulnFilters);
const handleShowVersionsToggle = () => {
const queryParams: Record<string, string | number | boolean | undefined> = {
@@ -268,8 +263,6 @@ const SoftwareTable = ({
};
const renderSoftwareCount = () => {
if (!tableData || !data) return null;
return (
<>
<TableCount name="items" count={data?.count} />
@@ -21,24 +21,9 @@
}
.table-container {
&__header {
flex-direction: column-reverse; // Search bar on top
@media (min-width: $table-controls-break) {
flex-direction: row;
}
}
&__header-left {
flex-direction: row; // Filter dropdown aligned with count
.controls {
.form-field--dropdown {
margin: 0;
}
.form-field {
width: initial; // Negate form-field styling on slider
}
&__results-count {
.form-field--slider {
align-self: center;
}
}