-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add vulnerability reports UI (#1663)
Co-authored-by: michaeljguarino <[email protected]>
- Loading branch information
1 parent
c7e982f
commit 17b7a7b
Showing
49 changed files
with
2,217 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.4.54 | ||
v0.4.55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
assets/src/components/kubernetes/common/NamespaceMultiSelect.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { ListBoxItem, NamespaceIcon, Select } from '@pluralsh/design-system' | ||
import { | ||
FilterFooter, | ||
FilterTrigger, | ||
} from 'components/cd/services/service/component/Components' | ||
|
||
export function NamespaceMultiSelect({ | ||
allNamespaces, | ||
selectedNamespaces, | ||
setSelectedNamespaces, | ||
}: { | ||
allNamespaces: string[] | ||
selectedNamespaces: string[] | ||
setSelectedNamespaces: (selectedNamespaces: string[]) => void | ||
}) { | ||
const allSelected = | ||
Array.from(selectedNamespaces).length >= allNamespaces.length | ||
const sortedSelectedNamespaces = Array.from(selectedNamespaces).sort() | ||
|
||
return ( | ||
<Select | ||
label="All namespaces" | ||
triggerButton={ | ||
<FilterTrigger $width={280}> | ||
{sortedSelectedNamespaces.length === 0 | ||
? 'Select namespaces' | ||
: allSelected | ||
? 'All namespaces' | ||
: sortedSelectedNamespaces.join(', ')} | ||
</FilterTrigger> | ||
} | ||
selectionMode="multiple" | ||
selectedKeys={selectedNamespaces} | ||
onSelectionChange={(keys) => { | ||
setSelectedNamespaces(Array.from(keys) as string[]) | ||
}} | ||
placement="right" | ||
dropdownFooterFixed={ | ||
<FilterFooter | ||
allSelected={allSelected} | ||
onClick={() => | ||
setSelectedNamespaces(allSelected ? [] : allNamespaces) | ||
} | ||
/> | ||
} | ||
> | ||
{allNamespaces.map((namespace) => ( | ||
<ListBoxItem | ||
key={namespace} | ||
leftContent={<NamespaceIcon />} | ||
label={namespace} | ||
/> | ||
))} | ||
</Select> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.