Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
223a708
feat: NodeListSearchFilter - improve node search functionality with S…
RohitRaj011 Jul 16, 2025
35647a5
Merge branch 'develop' of github.com:devtron-labs/dashboard into feat…
RohitRaj011 Jul 16, 2025
9f9b8c9
fix: update iteration over NODE_SEARCH_KEYS to use Object.values for …
RohitRaj011 Jul 16, 2025
257a408
fix: enhance keyboard navigation by focusing select picker after cust…
RohitRaj011 Jul 16, 2025
9b4f61c
feat: enhance NodeListSearchFilter with improved placeholder and keyb…
RohitRaj011 Jul 17, 2025
0e85959
fix: update NodeListSearchFilter and ResourceFilterOptions for improv…
RohitRaj011 Jul 17, 2025
0a4d245
fix: ResourceFilterOptions - update eventType size
RohitRaj011 Jul 18, 2025
26508ec
Merge branch 'develop' of github.com:devtron-labs/dashboard into feat…
RohitRaj011 Jul 18, 2025
534e9da
feat: NodeListSearchFilter - keydown navigation + code optimization
RohitRaj011 Jul 21, 2025
f5c1147
chore: add flag for canary rollout
arunjaindev Jul 21, 2025
ceb8082
chore: version bump
arunjaindev Jul 22, 2025
7c72afd
Merge pull request #2844 from devtron-labs/feat/canary-rollout-progress
arunjaindev Jul 22, 2025
3780546
feat: NodeListSearchFilter - integrate GroupedFilterSelectPicker
RohitRaj011 Jul 22, 2025
5c1020b
Merge branch 'hotfix-v0.39.0' of https://github.com/devtron-labs/dash…
arunjaindev Jul 22, 2025
2aa59f1
Merge pull request #2845 from devtron-labs/feat/sync-canary-progress
arunjaindev Jul 22, 2025
694dce9
feat: NodeListSearchFilter - move K8s version to GroupedFilterSelectP…
RohitRaj011 Jul 22, 2025
2a1b3ae
refactor: NodeListSearchFilter - search filter fix, style updates
RohitRaj011 Jul 23, 2025
4ba547c
fix: ConfigMapSecret - fix incorrect error state
RohitRaj011 Jul 24, 2025
1111aaa
fix: Permissions - Job workflows endpoint
RohitRaj011 Jul 24, 2025
633aa8b
Merge pull request #2849 from devtron-labs/fix/cm-secret-incorrect-er…
RohitRaj011 Jul 24, 2025
53747f5
refactor: style update
RohitRaj011 Jul 25, 2025
a5dda2c
Merge branch 'main' of github.com:devtron-labs/dashboard into feat/no…
RohitRaj011 Jul 25, 2025
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ FEATURE_INFRA_PROVISION_INFO_BLOCK_HIDE=false
FEATURE_GROUPED_APP_LIST_FILTERS_ENABLE=false
FEATURE_FLUX_DEPLOYMENTS_ENABLE=false
FEATURE_LINK_EXTERNAL_FLUX_ENABLE=false
FEATURE_CANARY_ROLLOUT_PROGRESS_ENABLE=true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.18.0-pre-0",
"@devtron-labs/devtron-fe-common-lib": "1.18.1-pre-0",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const AppOrJobSelector = ({
_permission.entityName.filter((option) => option.value !== SELECT_ALL_VALUE).map((app) => app.label) ??
[]
const { appIdWorkflowNamesMapping } = await getUserAccessAllWorkflows({
appIds: jobNames,
appNames: jobNames,
options: { abortControllerRef },
})
const workflowOptions = getWorkflowOptions(appIdWorkflowNamesMapping)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ const AppPermissions = () => {
async function setAllWorkflows(jobOptions) {
const jobNames = jobOptions.filter((job) => job.value !== SELECT_ALL_VALUE).map((job) => job.label)
try {
const result = await getUserAccessAllWorkflows(jobNames)
const result = await getUserAccessAllWorkflows({ appNames: jobNames })

const workflowOptions = getWorkflowOptions(result?.appIdWorkflowNamesMapping)
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ export const getUserAccessClusterList = () =>
payload: { entity: EntityTypes.CLUSTER },
})

export const getUserAccessAllWorkflows = ({ appIds, options }: GetUserAccessAllWorkflowsParams) =>
export const getUserAccessAllWorkflows = ({ appNames, options }: GetUserAccessAllWorkflowsParams) =>
getUserResourceOptions<AppIdWorkflowNamesMapping>({
kind: UserAccessResourceKind.JOBS,
payload: { entity: EntityTypes.JOB, appIds },
kind: UserAccessResourceKind.WORKFLOW,
payload: { entity: EntityTypes.JOB, appNames },
options,
})

Expand Down
3 changes: 2 additions & 1 deletion src/Pages/GlobalConfigurations/Authorization/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export interface GetUserPermissionResourcesPayload
accessType?: ACCESS_TYPE_MAP.DEVTRON_APPS | ACCESS_TYPE_MAP.HELM_APPS
teamIds?: number[]
appIds?: string[]
appNames?: string[]
}

export interface GetUserResourceOptionsProps {
Expand All @@ -356,5 +357,5 @@ export interface GetUserResourceOptionsProps {
}

export interface GetUserAccessAllWorkflowsParams
extends Pick<GetUserPermissionResourcesPayload, 'appIds'>,
extends Pick<GetUserPermissionResourcesPayload, 'appNames'>,
Pick<GetUserResourceOptionsProps, 'options'> {}
21 changes: 12 additions & 9 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,6 @@ export const ConfigMapSecretContainer = ({
}
}, [configMapSecretResLoading, configMapSecretRes])

// CONFIGMAP/SECRET DELETED
const configHasBeenDeleted = useMemo(
() =>
!configMapSecretResLoading && configMapSecretRes
? !configMapSecretData && !inheritedConfigMapSecretData && !draftData
: null,
[configMapSecretResLoading, configMapSecretRes],
)

// CONFIGMAP/SECRET ERROR
const configMapSecretResErr = useMemo(
() =>
Expand All @@ -348,6 +339,18 @@ export const ConfigMapSecretContainer = ({
[configMapSecretResLoading, configMapSecretRes],
)

// CONFIGMAP/SECRET DELETED
const configHasBeenDeleted = useMemo(
() =>
!configMapSecretResLoading &&
configMapSecretRes &&
!configMapSecretResErr &&
!configMapSecretData &&
!inheritedConfigMapSecretData &&
!draftData,
[configMapSecretResLoading, configMapSecretRes, configMapSecretResErr],
)

// ASYNC CALL - CONFIGMAP/SECRET RESOLVED DATA
const [resolvedScopeVariablesResLoading, resolvedScopeVariablesRes, reloadResolvedScopeVariablesResErr] = useAsync(
() =>
Expand Down
18 changes: 1 addition & 17 deletions src/components/ResourceBrowser/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,29 +325,13 @@ export const NODE_LIST_HEADERS_TO_KEY_MAP: Record<(typeof NODE_LIST_HEADERS)[num
unschedulable: 'unschedulable',
} as const

export const NODE_SEARCH_KEY_OPTIONS = [
{ value: NODE_SEARCH_KEYS.NAME, label: 'Name' },
{ value: NODE_SEARCH_KEYS.LABEL, label: 'Label' },
{ value: NODE_SEARCH_KEYS.NODE_GROUP, label: 'Node group' },
] as const

export const DEFAULT_NODE_K8S_VERSION = {
label: 'K8s version: Any',
value: 'K8s version: Any',
}

export const NODE_SEARCH_KEY_PLACEHOLDER: Record<NODE_SEARCH_KEYS, string> = {
[NODE_SEARCH_KEYS.NAME]: 'Search by node name Eg. ip-172-31-2-152.us-east-2.compute.internal',
[NODE_SEARCH_KEYS.LABEL]: 'Search by key=value Eg. environment=production, tier=frontend',
[NODE_SEARCH_KEYS.NODE_GROUP]: 'Search by node group name Eg. mainnode',
}
export const NODE_LIST_HEADER_KEYS_TO_SEARCH = Object.values(NODE_LIST_HEADERS_TO_KEY_MAP)

export const NODE_SEARCH_KEYS_TO_OBJECT_KEYS: Record<
NODE_SEARCH_KEYS,
(typeof NODE_LIST_HEADERS_TO_KEY_MAP)[keyof typeof NODE_LIST_HEADERS_TO_KEY_MAP]
> = {
[NODE_SEARCH_KEYS.LABEL]: 'labels',
[NODE_SEARCH_KEYS.NAME]: 'name',
[NODE_SEARCH_KEYS.NODE_GROUP]: 'nodeGroup',
}

Expand Down
11 changes: 7 additions & 4 deletions src/components/ResourceBrowser/ResourceBrowser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@
.resource-list-container {
.node-listing-search-container {
display: grid;
grid-template-columns: auto 160px 1px 180px;
grid-template-columns: 1fr auto 1px 180px;
column-gap: 8px;

&__shortcut-key {
right: 10px;
top: 6px;
.grouped-filter-select-picker {
width: 350px;
> .dc__mxw-250 {
max-width: 350px;
}
}
}

Expand All @@ -92,6 +94,7 @@
.cluster-terminal-hidden {
visibility: hidden;
height: 0;

.terminal-action-strip {
display: none;
}
Expand Down
13 changes: 10 additions & 3 deletions src/components/ResourceBrowser/ResourceList/K8SResourceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
updateManifestResourceHelmApps,
} from '@Components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.api'

import { NODE_LIST_HEADERS_TO_KEY_MAP } from '../Constants'
import { NODE_LIST_HEADER_KEYS_TO_SEARCH, NODE_LIST_HEADERS_TO_KEY_MAP } from '../Constants'
import { getResourceData } from '../ResourceBrowser.service'
import { K8SResourceListType } from '../Types'
import K8sResourceListTableCellComponent from './K8sResourceListTableCellComponent'
Expand Down Expand Up @@ -88,6 +88,7 @@ const K8SResourceListViewWrapper = ({
updateSearchParams,
eventType = 'warning',
filteredRows,
rows,
...restProps
}: K8SResourceListViewWrapperProps) => (
<div className="flexbox-col flex-grow-1 resource-list-container dc__overflow-hidden border__primary--left">
Expand All @@ -97,6 +98,9 @@ const K8SResourceListViewWrapper = ({
setVisibleColumns={setVisibleColumns}
allColumns={allColumns}
searchParams={restProps}
rows={rows}
searchKey={searchKey}
handleSearch={handleSearch}
/>
) : (
<ResourceFilterOptions
Expand Down Expand Up @@ -218,15 +222,18 @@ export const K8SResourceList = ({
)

const tableFilter: K8sResourceListTableProps['filter'] = (row, filterData) => {
let nodeFilters = true

if (isNodeListing) {
return isItemASearchMatchForNodeListing(row.data, filterData)
nodeFilters = isItemASearchMatchForNodeListing(row.data, filterData)
}

const isSearchMatch =
!filterData.searchKey ||
Object.entries(row.data).some(
([key, value]) =>
key !== 'id' &&
(!isNodeListing || NODE_LIST_HEADER_KEYS_TO_SEARCH.includes(key)) &&
value !== null &&
value !== undefined &&
String(value).toLowerCase().includes(filterData.searchKey.toLowerCase()),
Expand All @@ -239,7 +246,7 @@ export const K8SResourceList = ({
)
}

return isSearchMatch
return isSearchMatch && nodeFilters
}

const getDefaultSortKey = () => {
Expand Down
Loading