Skip to content

Commit e21ff84

Browse files
committed
Merge branch 'develop' of https://github.com/devtron-labs/dashboard into fix/ai-fixes
2 parents ce779fb + e484c3c commit e21ff84

File tree

52 files changed

+1375
-1579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1375
-1579
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.22.8-beta-5",
7+
"@devtron-labs/devtron-fe-common-lib": "1.22.8-beta-10",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/NodeViewGroupList.tsx

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMemo } from 'react'
1+
import { useCallback, useMemo } from 'react'
22
import { generatePath, Link, useHistory } from 'react-router-dom'
33

44
import {
@@ -237,46 +237,49 @@ const NodeViewGroupListWrapper = ({
237237

238238
const NodeViewGroupList = ({ nodeViewGroupType }: { nodeViewGroupType: NodeViewGroupType }) => {
239239
const { push } = useHistory()
240-
const getRows: TableProps<NodeViewGroupRowType, FiltersTypeEnum.URL, {}>['getRows'] = async (
241-
{
242-
searchKey,
243-
offset,
244-
pageSize,
245-
sortBy,
246-
sortOrder,
247-
errorType,
248-
autoscalerType,
249-
schedulableType,
250-
}: Record<NodeViewGroupListFiltersTypeEnum, string> & Parameters<TableProps['getRows']>[0],
251-
abortSignal,
252-
) => {
253-
const response = await getNodeViewGroupList({
254-
searchKey,
255-
groupBy: nodeViewGroupType,
256-
offset,
257-
pageSize,
258-
sortBy,
259-
sortOrder,
260-
...(nodeViewGroupType === NodeViewGroupType.NODE_ERRORS && errorType !== 'ALL'
261-
? { errorType: errorType as NodeErrorsKeys }
262-
: {}),
263-
...(nodeViewGroupType === NodeViewGroupType.AUTOSCALER_MANAGED && autoscalerType !== 'ALL'
264-
? { autoscalerType: autoscalerType as AutoscalerTypes }
265-
: {}),
266-
...(nodeViewGroupType === NodeViewGroupType.NODE_SCHEDULING && schedulableType !== 'ALL'
267-
? { schedulableType: schedulableType as NodeSchedulingKeys }
268-
: {}),
240+
const getRows: TableProps<NodeViewGroupRowType, FiltersTypeEnum.URL, {}>['getRows'] = useCallback(
241+
async (
242+
{
243+
searchKey,
244+
offset,
245+
pageSize,
246+
sortBy,
247+
sortOrder,
248+
errorType,
249+
autoscalerType,
250+
schedulableType,
251+
}: Record<NodeViewGroupListFiltersTypeEnum, string> & Parameters<TableProps['getRows']>[0],
269252
abortSignal,
270-
})
253+
) => {
254+
const response = await getNodeViewGroupList({
255+
searchKey,
256+
groupBy: nodeViewGroupType,
257+
offset,
258+
pageSize,
259+
sortBy,
260+
sortOrder,
261+
...(nodeViewGroupType === NodeViewGroupType.NODE_ERRORS && errorType !== 'ALL'
262+
? { errorType: errorType as NodeErrorsKeys }
263+
: {}),
264+
...(nodeViewGroupType === NodeViewGroupType.AUTOSCALER_MANAGED && autoscalerType !== 'ALL'
265+
? { autoscalerType: autoscalerType as AutoscalerTypes }
266+
: {}),
267+
...(nodeViewGroupType === NodeViewGroupType.NODE_SCHEDULING && schedulableType !== 'ALL'
268+
? { schedulableType: schedulableType as NodeSchedulingKeys }
269+
: {}),
270+
abortSignal,
271+
})
271272

272-
return {
273-
rows: (response.result?.nodeList || []).map((node) => ({
274-
id: `${node.nodeName}-${node.clusterName}`,
275-
data: node,
276-
})),
277-
totalRows: response.result?.totalCount || 0,
278-
}
279-
}
273+
return {
274+
rows: (response.result?.nodeList || []).map((node) => ({
275+
id: `${node.nodeName}-${node.clusterName}`,
276+
data: node,
277+
})),
278+
totalRows: response.result?.totalCount || 0,
279+
}
280+
},
281+
[],
282+
)
280283

281284
const clearFilters = () => {
282285
push({ search: '' })
@@ -311,7 +314,7 @@ const NodeViewGroupList = ({ nodeViewGroupType }: { nodeViewGroupType: NodeViewG
311314
}}
312315
paginationVariant={PaginationEnum.PAGINATED}
313316
filtersVariant={FiltersTypeEnum.URL}
314-
filter={() => true}
317+
filter={null}
315318
additionalFilterProps={{
316319
initialSortKey: 'nodeName',
317320
parseSearchParams: (searchParams) => ({

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ import deleteOverrideEmptyStateImage from '@Images/no-artifact.webp'
7373
import { importComponentFromFELibrary } from '@Components/common'
7474
import { getModuleInfo } from '@Components/v2/devtronStackManager/DevtronStackManager.service'
7575
import { APP_COMPOSE_STAGE, getAppComposeURL } from '@Config/routes'
76+
import { CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP } from '@Pages/Shared/ConfigMapSecret/constants'
7677

7778
import BaseConfigurationNavigation from '../BaseConfigurationNavigation'
7879
import CompareConfigView from '../CompareConfigView'
@@ -2031,16 +2032,14 @@ const DeploymentTemplate = ({
20312032
const renderValuesView = () => (
20322033
<div className="flexbox-col flex-grow-1 dc__overflow-auto">
20332034
{window._env_.ENABLE_SCOPED_VARIABLES && (
2034-
<div className="app-config-variable-widget-position">
2035-
<FloatingVariablesSuggestions
2036-
zIndex={100}
2037-
appId={appId}
2038-
hideObjectVariables={false}
2039-
{...(envId && { envId })}
2040-
{...(clusterId && { clusterId })}
2041-
isTemplateView={isTemplateView}
2042-
/>
2043-
</div>
2035+
<FloatingVariablesSuggestions
2036+
appId={appId}
2037+
hideObjectVariables={false}
2038+
{...(envId && { envId })}
2039+
{...(clusterId && { clusterId })}
2040+
isTemplateView={isTemplateView}
2041+
boundaryGap={CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP}
2042+
/>
20442043
)}
20452044

20462045
{renderEditorComponent()}

src/Pages/ChartStore/ChartDetails/ChartDetailsDeployments.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useMemo, useState } from 'react'
17+
import { useCallback, useMemo, useState } from 'react'
1818
import { useParams } from 'react-router-dom'
1919

2020
import {
@@ -80,8 +80,10 @@ export const ChartDetailsDeployments = ({ chartIcon }: ChartDetailsDeploymentsPr
8080
)
8181

8282
// HANDLERS
83-
const filter: DeploymentsTableProps['filter'] = (rowData, filterData) =>
84-
rowData.data.appName.includes(filterData.searchKey.toLowerCase())
83+
const filter: DeploymentsTableProps['filter'] = useCallback(
84+
(rowData, filterData) => rowData.data.appName.includes(filterData.searchKey.toLowerCase()),
85+
[],
86+
)
8587

8688
const handleCloseDeleteConfirmationModal = () => setIsOpenDeleteConfirmationModal(false)
8789

src/Pages/ChartStore/ChartDetails/ChartDetailsPresetValues.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useMemo, useState } from 'react'
17+
import { useCallback, useMemo, useState } from 'react'
1818
import { generatePath, useRouteMatch } from 'react-router-dom'
1919

2020
import {
@@ -104,8 +104,10 @@ export const ChartDetailsPresetValues = () => {
104104
setDeletePresetValue(null)
105105
}
106106

107-
const filter: PresetValuesTableProps['filter'] = (rowData, filterData) =>
108-
rowData.data.name.includes(filterData.searchKey.toLowerCase())
107+
const filter: PresetValuesTableProps['filter'] = useCallback(
108+
(rowData, filterData) => rowData.data.name.includes(filterData.searchKey.toLowerCase()),
109+
[],
110+
)
109111

110112
return (
111113
<div className="mh-500 flexbox-col bg__primary border__primary br-4 w-100 dc__overflow-auto">

src/Pages/GlobalConfigurations/Authorization/Shared/components/BulkSelection/BulkSelectionActionWidget.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const BulkSelectionActionWidget = ({
6767
positionVariant={DraggablePositionVariant.PARENT_BOTTOM_CENTER}
6868
parentRef={parentRef}
6969
zIndex="calc(var(--modal-index) - 1)"
70-
layoutFixDelta={67}
7170
>
7271
<div className="flex dc__gap-8 pt-12 pb-12 pr-12 pl-8 bulk-selection-widget br-8">
7372
<DraggableButton dragClassName="drag-selector" />

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ const ClusterList = () => {
333333
filtersVariant={FiltersTypeEnum.STATE}
334334
paginationVariant={PaginationEnum.NOT_PAGINATED}
335335
emptyStateConfig={null}
336-
filter={() => true}
336+
filter={null}
337337
additionalFilterProps={{
338338
initialSortKey: 'clusterName',
339339
}}

src/Pages/Shared/ConfigMapSecret/ConfigMapSecretContainer.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import { ConfigMapSecretForm } from './ConfigMapSecretForm'
8080
import { ConfigMapSecretNullState } from './ConfigMapSecretNullState'
8181
import { ConfigMapSecretProtected } from './ConfigMapSecretProtected'
8282
import {
83+
CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP,
8384
CM_SECRET_COMPONENT_NAME,
8485
CONFIG_MAP_SECRET_DATA_KEYS,
8586
CONFIG_MAP_SECRET_REQUIRED_FIELD_ERROR,
@@ -1292,15 +1293,13 @@ export const ConfigMapSecretContainer = ({
12921293
/>
12931294
)}
12941295
{window._env_.ENABLE_SCOPED_VARIABLES && (
1295-
<div className="app-config-variable-widget-position">
1296-
<FloatingVariablesSuggestions
1297-
zIndex={100}
1298-
appId={appId}
1299-
envId={envId}
1300-
clusterId={clusterId}
1301-
isTemplateView={isTemplateView}
1302-
/>
1303-
</div>
1296+
<FloatingVariablesSuggestions
1297+
appId={appId}
1298+
envId={envId}
1299+
clusterId={clusterId}
1300+
isTemplateView={isTemplateView}
1301+
boundaryGap={CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP}
1302+
/>
13041303
)}
13051304
</div>
13061305
</>

src/Pages/Shared/ConfigMapSecret/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,5 @@ export const EXTERNAL_CODE_EDITOR_RADIO_STATE = Object.values(CODE_EDITOR_RADIO_
230230
label: value,
231231
value,
232232
}))
233+
234+
export const CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP = { x: 32, y: 90 }

0 commit comments

Comments
 (0)