Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync develop with main #2233

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ const BaseResourceListContent = ({
{headers.map((columnName) =>
columnName === 'name' ? (
<div
key={resourceData.id as string}
key={`${resourceData.id}-${columnName}`}
className={`flexbox dc__align-items-center dc__gap-4 dc__content-space dc__visible-hover dc__visible-hover--parent ${shouldShowRedirectionAndActions ? '' : 'pr-8'}`}
data-testid="created-resource-name"
>
Expand Down Expand Up @@ -505,7 +505,7 @@ const BaseResourceListContent = ({
</div>
) : (
<div
key={resourceData.id as string}
key={`${resourceData.id}-${columnName}`}
className={`flexbox dc__align-items-center ${
columnName === 'status'
? ` app-summary__status-name ${getStatusClass(String(resourceData[columnName]))}`
Expand Down Expand Up @@ -639,7 +639,6 @@ const BaseResourceListContent = ({
<BulkSelection showPagination={showPaginatedView} />
)}
<SortableTableHeaderCell
key={columnName}
showTippyOnTruncate
title={columnName}
triggerSorting={triggerSortingHandler(columnName)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export const K8SResourceList = ({
}
// NOTE: for namespaced resource name+namespace will be unique
// while for non-namespaced resources name will be unique
result.data = result.data.map((data) => ({ id: `${data.name}-${data.namespace}`, ...data }))
result.data = result.data.map((data, index) => ({
id: `${selectedResource?.gvk?.Kind}-${data.name}-${data.namespace}-${index}`,
...data,
}))
return result
}, [_resourceList])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ const ResourceList = () => {
const handleResourceClick = (e, shouldOverrideSelectedResourceKind: boolean) => {
const { name, tab, namespace: currentNamespace, origin, kind: kindFromResource } = e.currentTarget.dataset
const lowercaseKindFromResource = shouldOverrideSelectedResourceKind ? kindFromResource.toLowerCase() : null
const _group: string =
let _group: string =
(shouldOverrideSelectedResourceKind
? lowercaseKindToResourceGroupMap[lowercaseKindFromResource]?.gvk?.Group?.toLowerCase()
: selectedResource?.gvk.Group.toLowerCase()) || K8S_EMPTY_GROUP
Expand All @@ -371,6 +371,9 @@ const ResourceList = () => {
if (origin === 'event') {
const [_kind, _resourceName] = name.split('/')
const eventKind = shouldOverrideSelectedResourceKind ? lowercaseKindFromResource : _kind
// For event, we should read the group for kind from the resource group map else fallback to empty group
_group = lowercaseKindToResourceGroupMap[eventKind]?.gvk?.Group || K8S_EMPTY_GROUP

resourceParam = `${eventKind}/${_group}/${_resourceName}`
kind = eventKind
resourceName = _resourceName
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/list-new/list.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,6 @@ export const getFilterChipConfig = (
case AppListConstants.AppType.FLUX_APPS:
return { cluster, namespace, templateType }
default:
return filterConfig
return { ...filterConfig, templateType: [] }
}
}
Loading
Loading