From c6e7b2966c8f6de807ad140bcf245229e833ec78 Mon Sep 17 00:00:00 2001 From: AbhishekA1509 Date: Mon, 11 May 2026 16:52:59 +0530 Subject: [PATCH 1/2] feat: migrate to biome --- .eslintignore | 324 --- .eslintrc.js | 165 -- .lintstagedrc | 2 +- .prettierrc.js | 23 - .vscode/settings.json | 25 +- biome.json | 193 ++ package.json | 19 +- src/App.tsx | 10 +- .../ApplicationManagementRouter.tsx | 5 +- .../Configurations/ConfigurationsRouter.tsx | 4 +- .../BuildDeploymentMetrics/DoraMetrics.tsx | 6 +- .../PipelineTriggerInsights.tsx | 4 +- .../TriggerBuildTimeChart.tsx | 4 +- .../BuildDeploymentMetrics/tooltipUtils.tsx | 4 +- .../Overview/Overview.tsx | 4 +- .../Overview/constants.ts | 4 +- .../Overview/services.ts | 8 +- .../ApplicationManagement/Overview/utils.ts | 6 +- .../InfrastructureManagementRouter.tsx | 4 +- .../Overview/AtAGlance.tsx | 4 +- .../Overview/ClusterAndNodes/utils.tsx | 4 +- .../Overview/Overview.tsx | 4 +- .../Overview/service.ts | 4 +- .../Overview/utils.ts | 5 +- .../AutoBlockedDeployments.tsx | 4 +- .../DeploymentSecurityStatus/utils.tsx | 6 +- .../SeverityInsights/VulnerabilityTrend.tsx | 8 +- .../Overview/SeverityInsights/utils.tsx | 6 +- .../SecurityCenter/Overview/services.ts | 6 +- .../SecurityCenter/Overview/utils.ts | 6 +- .../CDPipelineDeploymentAppType.tsx | 6 +- .../CreateCICDPipeline/CDStepperContent.tsx | 12 +- .../CreateCICDPipeline/CIStepperContent.tsx | 6 +- .../ConfigureWebhookWrapper.tsx | 4 +- .../CreateCICDPipeline/CreateCICDPipeline.tsx | 16 +- .../CreateCICDPipeline/service.ts | 4 +- .../CreateCICDPipeline/utils.ts | 4 +- .../App/CreateAppModal/AppClone/types.ts | 4 +- .../AppClone/useDevtronCloneList.tsx | 4 +- .../CreateAppModal/ApplicationInfoForm.tsx | 10 +- .../CloneApplicationSelectionList.tsx | 8 +- .../CreateAppModal.component.tsx | 17 +- .../App/CreateAppModal/HeaderSection.tsx | 4 +- .../App/CreateAppModal/ProjectSelector.tsx | 4 +- .../CreateAppModal/UpdateTemplateConfig.tsx | 8 +- .../App/CreateAppModal/Workflow/Workflow.tsx | 6 +- .../App/CreateAppModal/Workflow/types.ts | 4 +- .../App/CreateAppModal/Workflow/utils.tsx | 19 +- src/Pages/App/CreateAppModal/service.ts | 4 +- src/Pages/App/CreateAppModal/types.ts | 4 +- src/Pages/App/CreateAppModal/utils.tsx | 6 +- .../ExternalFlux/ExternalFluxAppDetails.tsx | 4 +- .../ExternalFluxAppDetailsRoute.tsx | 4 +- .../App/Details/ExternalFlux/service.tsx | 2 +- .../AppConfigurations/AppConfig.service.ts | 2 +- .../Details/AppConfigurations/AppConfig.tsx | 10 +- .../AppConfigurations/AppConfig.types.ts | 5 +- .../AppConfigurations/AppConfig.utils.ts | 7 +- .../MainContent/AppComposeRouter.tsx | 9 +- .../MainContent/CompareConfigView.tsx | 6 +- .../MainContent/ConfigDryRun.tsx | 12 +- .../MainContent/ConfigHeader.tsx | 4 +- .../MainContent/ConfigToolbar.tsx | 10 +- .../DeploymentConfigCompare.tsx | 15 +- .../DeploymentConfigCompareWrapper.tsx | 4 +- .../DeploymentConfigCompare/service.utils.ts | 2 +- .../DeploymentConfigCompare/utils.ts | 12 +- .../DeploymentTemplate/DTChartSelector.tsx | 8 +- .../DeleteOverrideDialog.tsx | 4 +- .../DeploymentTemplate/DeploymentTemplate.tsx | 22 +- .../DeploymentTemplateCTA.tsx | 4 +- .../DeploymentTemplateForm.tsx | 8 +- .../DeploymentTemplateOptionsHeader.tsx | 2 +- .../GUIView/GUIView.component.tsx | 11 +- .../MainContent/DeploymentTemplate/service.ts | 8 +- .../MainContent/DeploymentTemplate/types.ts | 3 +- .../MainContent/DeploymentTemplate/utils.tsx | 4 +- .../MainContent/NoOverrideEmptyState.tsx | 3 +- .../MainContent/SelectMergeStrategy.tsx | 4 +- .../AppConfigurations/MainContent/utils.tsx | 12 +- .../Navigation/EnvConfigurationsNav.tsx | 21 +- .../Navigation/EnvironmentOverrideRouter.tsx | 7 +- .../Navigation/Navigation.helper.tsx | 6 +- .../AppConfigurations/Navigation/constants.ts | 3 +- src/Pages/Applications/DevtronApps/service.ts | 6 +- .../ChartStore/ChartDetails/ChartDetails.tsx | 8 +- .../ChartDetails/ChartDetailsAbout.tsx | 2 +- .../ChartDetails/ChartDetailsDeploy.tsx | 6 +- .../ChartDetails/ChartDetailsDeployments.tsx | 5 +- .../ChartDetails/ChartDetailsPresetValues.tsx | 5 +- .../ChartDetailsTableComponents.tsx | 12 +- src/Pages/ChartStore/ChartDetails/services.ts | 4 +- src/Pages/ChartStore/ChartDetails/types.ts | 6 +- .../Authorization/APITokens/APITokenList.tsx | 11 +- .../APITokens/ApiTokens.component.tsx | 2 +- .../APITokens/CreateAPIToken.tsx | 10 +- .../APITokens/DeleteAPITokenModal.tsx | 4 +- .../Authorization/APITokens/EditAPIToken.tsx | 9 +- .../Authorization/APITokens/GenerateModal.tsx | 2 +- .../Authorization/APITokens/apiToken.utils.ts | 4 +- .../AddEdit/PermissionGroupForm.tsx | 8 +- .../List/PermissionGroupRow.tsx | 8 +- .../SSOLoginServices/AutoAssign/service.ts | 4 +- .../SSOLoginServices/SSOLogin.component.tsx | 30 +- .../Authorization/SSOLoginServices/index.ts | 2 +- .../SSOLoginServices/ssoConfig.types.tsx | 4 +- .../AppPermissions/DirectPermission.tsx | 2 +- .../AppPermissions/RoleSelector.tsx | 5 +- .../AppPermissions/roleSelectorHelpers.tsx | 5 +- .../Shared/components/AppPermissions/utils.ts | 2 +- .../BulkSelectionClearConfirmationModal.tsx | 4 +- .../ChartPermission.component.tsx | 2 +- .../K8sObjectPermissions/K8sListItemCard.tsx | 9 +- .../K8sPermissions.component.tsx | 3 +- .../PermissionConfigurationForm.component.tsx | 6 +- .../PermissionConfigurationFormProvider.tsx | 2 +- ...UserPermissionGroupsSelector.component.tsx | 2 +- .../Authorization/UserAndGroupPermissions.tsx | 4 +- .../UserPermissions/AddEdit/UserForm.tsx | 8 +- .../UserPermissions/DeleteUserPermission.tsx | 4 +- .../List/ExportConfigurationDialog.tsx | 2 +- .../List/UserPermissionList.component.tsx | 2 +- .../List/UserPermissionRow.tsx | 14 +- .../UserPermissions/List/constants.ts | 4 +- .../Authorization/authorization.service.ts | 10 +- .../Authorization/constants.ts | 2 +- .../Authorization/utils.ts | 10 +- .../BuildInfra/ProfileForm.tsx | 1 + .../ClusterEnvironmentDrawer.tsx | 12 +- .../ClusterEnvironmentDrawer/schema.ts | 1 + .../ClusterEnvironmentDrawer/utils.ts | 4 +- .../ClusterForm/ClusterConfigurations.tsx | 11 +- .../ClusterForm/ClusterForm.tsx | 9 +- .../ConnectClusterViaKubeconfig.tsx | 6 +- .../ClusterForm/KubeConfigEditor.tsx | 7 +- .../ClusterForm/utils.tsx | 5 +- .../ClusterInfoStepsModal.tsx | 17 +- .../ClusterList.components.tsx | 10 +- .../ClustersAndEnvironments/ClusterList.tsx | 28 +- .../CreateCluster/CreateCluster.component.tsx | 4 +- .../DeleteClusterConfirmationModal.tsx | 6 +- .../EditClusterDrawerContent.tsx | 4 +- .../EnvironmentDeleteComponent.tsx | 4 +- .../EnvironmentList.tsx | 16 +- .../cluster.service.ts | 4 +- .../ClustersAndEnvironments/cluster.type.ts | 1 + .../ClustersAndEnvironments/cluster.util.tsx | 3 +- .../ClustersAndEnvironments/index.ts | 6 +- .../DeploymentChartsRouter.component.tsx | 4 +- .../List/DeploymentChartsList.component.tsx | 11 +- .../List/DeploymentChartsListHeader.tsx | 4 +- .../List/DownloadChartButton.tsx | 8 +- .../DeploymentCharts/List/UploadButton.tsx | 4 +- .../List/UploadChartModal.tsx | 8 +- .../DeploymentCharts/List/service.tsx | 4 +- .../OfflinePipelineModalAppView.tsx | 5 +- src/Pages/License/ActivateLicense.tsx | 2 +- .../Detail/Configurations/Configurations.tsx | 9 +- .../AddEditCluster/AddClusterButton.tsx | 3 +- .../Shared/CommandBar/CommandBarBackdrop.tsx | 5 +- src/Pages/Shared/CommandBar/CommandGroup.tsx | 3 + src/Pages/Shared/CommandBar/service.ts | 7 +- src/Pages/Shared/CommandBar/types.ts | 4 +- src/Pages/Shared/CommandBar/utils.tsx | 24 +- .../ConfigMapSecret.service.ts | 10 +- .../ConfigMapSecret.wrapper.tsx | 4 +- .../ConfigMapSecretContainer.tsx | 11 +- .../ConfigMapSecret/ConfigMapSecretData.tsx | 14 +- .../ConfigMapSecretDeleteModal.tsx | 6 +- .../ConfigMapSecret/ConfigMapSecretDryRun.tsx | 9 +- .../ConfigMapSecret/ConfigMapSecretForm.tsx | 19 +- .../ConfigMapSecretNullState.tsx | 3 +- .../ConfigMapSecretProtected.tsx | 5 +- src/Pages/Shared/ConfigMapSecret/utils.ts | 11 +- .../EnvironmentOverride.tsx | 5 +- .../EnvironmentOverviewTable.component.tsx | 8 +- .../LinkedCIDetailsModal/LinkedCIAppList.tsx | 2 +- .../UpgradeToEnterpriseDialog.tsx | 2 +- src/components/AppSelector/AppSelector.tsx | 2 +- .../AppSelector/AppSelectorUtil.tsx | 2 +- src/components/AppSelector/ChartSelector.tsx | 11 +- .../ApplicationGroup/AppGroup.service.ts | 32 +- .../ApplicationGroup/AppGroup.types.ts | 7 +- .../ApplicationGroup/AppGroup.utils.ts | 30 +- .../AppGroupAppFilter.components.tsx | 19 +- .../ApplicationGroup/AppGroupAppFilter.tsx | 4 +- .../ApplicationGroup/AppGroupDetailsRoute.tsx | 35 +- .../ApplicationGroup/AppGroupRoute.tsx | 2 +- src/components/ApplicationGroup/Constants.ts | 24 +- .../ApplicationGroup/CreateAppGroup.tsx | 18 +- .../Details/EnvCDDetails/EnvCDDetails.tsx | 39 +- .../__mock__/EnvCDDetails.mock.ts | 123 - .../Details/EnvCIDetails/EnvCIDetails.tsx | 33 +- .../__mock__/EnvCIDetails.mock.ts | 330 --- .../EnvironmentConfig/ApplicationRoutes.tsx | 3 +- .../Details/EnvironmentConfig/EnvConfig.tsx | 9 +- .../__mock__/EnvConfig.mock.ts | 81 - .../AllExpandableDropdown.tsx | 1 + .../EnvironmentOverview.tsx | 31 +- .../EnvironmentOverview/HibernateModal.tsx | 6 +- .../HibernateStatusListDrawer.tsx | 62 +- .../HibernateStatusRow.tsx | 12 +- .../RestartStatusListDrawer.tsx | 8 +- .../RestartWorkloadModal.tsx | 2 +- .../__mock__/EnvironmentOverview.mock.ts | 136 -- .../Details/EnvironmentOverview/service.ts | 5 +- .../Details/TriggerView/EnvTriggerView.tsx | 23 +- .../TriggerView/TriggerModalTableRow.tsx | 4 +- .../Details/TriggerView/utils.ts | 4 +- .../ApplicationGroup/EnvSelector.tsx | 2 +- .../List/EnvironmentListView.tsx | 1 + .../List/__mocks__/EnvironmentList.mock.ts | 272 --- .../CIPipelineN/AdvancedConfigOptions.tsx | 22 +- src/components/CIPipelineN/Build.tsx | 25 +- src/components/CIPipelineN/CIPipeline.tsx | 96 +- .../CIPipelineN/ConditionContainer.tsx | 4 +- .../ConditionDataTable.component.tsx | 8 +- .../CIPipelineN/ConditionDataTable/types.ts | 2 + .../CIPipelineN/ConditionDataTable/utils.ts | 7 +- .../CreatePluginFormContent.tsx | 12 +- .../CreatePluginModal.component.tsx | 17 +- .../CIPipelineN/CreatePluginModal/service.tsx | 6 +- .../CIPipelineN/CreatePluginModal/utils.tsx | 8 +- .../CIPipelineN/CustomImageTags.tsx | 19 +- .../CIPipelineN/CustomScriptCard.tsx | 4 +- .../CIPipelineN/EnvironmentList.tsx | 11 +- src/components/CIPipelineN/MountFromHost.tsx | 8 +- src/components/CIPipelineN/MultiplsPort.tsx | 24 +- .../CIPipelineN/OutputDirectoryPath.tsx | 28 +- .../PluginDetailHeader/CreatePluginButton.tsx | 8 +- .../PluginDetailHeader.component.tsx | 10 +- .../PluginVersionSelect.tsx | 6 +- src/components/CIPipelineN/PreBuild.tsx | 29 +- src/components/CIPipelineN/Sidebar.tsx | 44 +- .../CIPipelineN/TaskDetailComponent.tsx | 34 +- src/components/CIPipelineN/TaskList.tsx | 33 +- src/components/CIPipelineN/TaskTitle.tsx | 8 +- .../CIPipelineN/TaskTypeDetailComponent.tsx | 59 +- .../CIPipelineN/VariableContainer.tsx | 19 +- .../VariableDataTable/ValueConfigOverlay.tsx | 14 +- .../VariableConfigOverlay.tsx | 2 +- .../VariableDataTable.component.tsx | 155 +- .../VariableDataTablePopupMenu.tsx | 4 +- .../CIPipelineN/VariableDataTable/types.ts | 2 + .../CIPipelineN/VariableDataTable/utils.tsx | 13 +- .../VariableDataTable/validations.ts | 8 +- .../CIPipelineN/ciPipeline.utils.tsx | 2 +- src/components/ClusterNodes/ClusterEvents.tsx | 8 +- .../ClusterNodes/ClusterList/ClusterList.tsx | 4 +- .../ClusterList/ClusterListRow.tsx | 10 +- .../ClusterList/ClusterListView.tsx | 26 +- .../ClusterList/ClusterSelectionBody.tsx | 5 +- .../ClusterNodes/ClusterManifest.tsx | 18 +- .../ClusterNodes/ClusterOverview.tsx | 8 +- .../ClusterNodes/ClusterTerminal.tsx | 9 +- .../NodeActions/CordonNodeModal.tsx | 2 +- .../NodeActions/DeleteNodeModal.tsx | 4 +- .../ClusterNodes/NodeActions/utils.ts | 6 +- src/components/ClusterNodes/NodeDetails.tsx | 82 +- .../__mocks__/ClusterManifest.mock.ts | 295 --- .../__mocks__/clusterAbout.mock.tsx | 56 - .../ClusterNodes/clusterNodes.service.tsx | 7 +- src/components/ClusterNodes/types.ts | 4 +- .../Jobs/ExpandedRow/ExpandedRow.tsx | 8 +- src/components/Jobs/JobDetails/JobDetails.tsx | 2 +- src/components/Jobs/JobsEmptyState.tsx | 7 +- src/components/Jobs/Service.ts | 16 +- src/components/Jobs/Utils.ts | 16 +- src/components/Navigation/NavGroup.tsx | 1 + src/components/Navigation/Navigation.tsx | 11 +- src/components/Navigation/constants.ts | 4 +- .../ClusterInstallationStatus.tsx | 6 +- src/components/ResourceBrowser/Constants.ts | 4 +- .../ResourceBrowser.service.tsx | 16 +- .../ResourceBrowser/ResourceBrowser.tsx | 3 +- .../ResourceBrowser/ResourceBrowserRouter.tsx | 4 +- .../ResourceList/AdminTerminal.tsx | 2 +- .../ResourceList/ClusterSelector.tsx | 5 +- .../ClusterUpgradeCompatibilityInfo.tsx | 5 +- ...adeCompatibilityInfoTableCellComponent.tsx | 6 +- .../ResourceList/ConnectingToClusterState.tsx | 1 + .../ResourceList/CreateResource.tsx | 6 +- .../ResourceList/K8SResourceList.tsx | 17 +- .../K8sResourceListTableCellComponent.tsx | 13 +- .../ResourceList/NodeActionsMenu.tsx | 6 +- .../NodeDetailComponentWrapper.tsx | 4 +- .../ResourceList/NodeDetailWrapper.tsx | 6 +- .../ResourceList/NodeListSearchFilter.tsx | 6 +- .../ResourceBrowserActionMenu.tsx | 15 +- .../ResourceList/ResourceFilterOptions.tsx | 6 +- .../ResourceList/ResourceList.component.tsx | 6 +- .../ResourceList/ResourceList.tsx | 15 +- .../ResourceBrowser/ResourceList/Sidebar.tsx | 4 +- .../ResourceBrowser/ResourceList/constants.ts | 4 +- .../ResourceBrowser/ResourceList/types.ts | 8 +- .../ResourceBrowser/ResourceList/utils.tsx | 8 +- src/components/ResourceBrowser/Types.ts | 4 +- src/components/ResourceBrowser/Utils.tsx | 10 +- src/components/app/LogFilter.ts | 12 +- .../app/Overview/EnvironmentList.tsx | 27 +- src/components/app/Overview/Overview.tsx | 60 +- .../app/Overview/TagChipsContainer.tsx | 8 +- src/components/app/Overview/utils.tsx | 10 +- src/components/app/ResponsiveDrawer.tsx | 11 +- src/components/app/WebWorker.ts | 1 + .../app/details/AboutAppInfoModal.tsx | 11 +- .../app/details/AboutTagEditModal.tsx | 28 +- src/components/app/details/AppHeader.tsx | 20 +- .../appDetails/AppDetails.components.tsx | 1 + .../app/details/appDetails/AppDetails.tsx | 11 +- .../app/details/appDetails/AppMetrics.tsx | 58 +- .../app/details/appDetails/AppStatusCard.tsx | 38 +- .../details/appDetails/DeployedCommitCard.tsx | 3 +- .../appDetails/DeploymentStatusCard.tsx | 11 +- .../app/details/appDetails/GraphsModal.tsx | 19 +- .../app/details/appDetails/HibernateModal.tsx | 8 +- .../app/details/appDetails/IssuesCard.tsx | 26 +- .../details/appDetails/IssuesListingModal.tsx | 5 +- .../details/appDetails/LastUpdatedCard.tsx | 5 +- .../appDetails/SecurityVulnerabilityCard.tsx | 4 +- .../app/details/appDetails/SourceInfo.tsx | 268 +- .../app/details/appDetails/types.ts | 2 +- .../app/details/appDetails/utils.tsx | 28 +- .../app/details/cIDetails/CIDetails.tsx | 107 +- .../app/details/cIDetails/SecurityTab.tsx | 4 +- .../app/details/cIDetails/cIDetails.util.tsx | 16 +- .../app/details/cdDetails/CDDetails.tsx | 15 +- .../cicdHistory/History.components.tsx | 11 +- src/components/app/details/main.tsx | 34 +- .../app/details/metrics/BenchmarkModal.tsx | 11 +- .../app/details/metrics/DeploymentMetrics.tsx | 15 +- .../app/details/metrics/DeploymentTable.tsx | 12 +- .../details/metrics/DeploymentTableModal.tsx | 8 +- .../metrics/deploymentMetrics.service.ts | 6 +- .../metrics/deploymentMetrics.util.tsx | 9 +- .../details/triggerView/BranchRegexModal.tsx | 10 +- .../BuildImageModal/BuildImageModal.tsx | 9 +- .../BuildImageModal/BulkBuildImageModal.tsx | 27 +- .../BuildImageModal/GitInfoMaterial.tsx | 13 +- .../BuildImageModal/TriggerBuildSidebar.tsx | 11 +- .../triggerView/BuildImageModal/service.ts | 6 +- .../triggerView/BuildImageModal/types.ts | 8 +- .../triggerView/BuildImageModal/utils.ts | 20 +- .../app/details/triggerView/CDMaterial.tsx | 6 +- .../triggerView/CiWebhookDebuggingModal.tsx | 8 +- .../DeployImageModal/BulkDeployEmptyState.tsx | 5 +- .../DeployImageModal/BulkDeployModal.tsx | 29 +- .../DeployImageModal/BulkTriggerSidebar.tsx | 10 +- .../DeployImageModal/DeployImageContent.tsx | 10 +- .../DeployImageModal/DeployImageModal.tsx | 15 +- .../DeployImageModal/ImageSelectionCTA.tsx | 4 +- .../MaterialListEmptyState.tsx | 3 +- .../DeployImageModal/RuntimeParamsSidebar.tsx | 4 +- .../triggerView/DeployImageModal/service.ts | 6 +- .../triggerView/DeployImageModal/types.ts | 4 +- .../triggerView/DeployImageModal/utils.tsx | 28 +- .../triggerView/EmptyStateCIMaterial.tsx | 21 +- .../details/triggerView/MaterialSource.tsx | 8 +- .../PipelineConfigDiff/PipelineConfigDiff.tsx | 3 +- .../PipelineConfigDiffStatusTile.tsx | 4 +- .../usePipelineDeploymentConfig.ts | 7 +- .../triggerView/PipelineConfigDiff/utils.tsx | 2 +- .../triggerView/TriggerView.service.ts | 9 +- .../app/details/triggerView/TriggerView.tsx | 8 +- .../details/triggerView/TriggerView.utils.tsx | 8 +- .../triggerView/__mocks__/workflow.mock.ts | 2 +- .../details/triggerView/ciWebhook.service.ts | 6 +- .../app/details/triggerView/types.ts | 8 +- .../details/triggerView/workflow.service.ts | 45 +- .../details/triggerView/workflow/Workflow.tsx | 42 +- .../workflow/nodes/TriggerExternalCINode.tsx | 6 +- .../workflow/nodes/TriggerLinkedCINode.tsx | 14 +- .../triggerView/workflow/nodes/staticNode.tsx | 7 +- .../workflow/nodes/triggerCDNode.tsx | 33 +- .../workflow/nodes/triggerCINode.tsx | 15 +- .../workflow/nodes/triggerPrePostCDNode.tsx | 15 +- .../workflow/nodes/workflow.utils.tsx | 1 + src/components/app/grepSSEworker.ts | 11 +- src/components/app/list-new/AppList.tsx | 11 +- .../app/list-new/AppListComponents.tsx | 4 +- src/components/app/list-new/AppListService.ts | 20 +- src/components/app/list-new/AppListType.ts | 6 +- .../app/list-new/GenericAppList.tsx | 117 +- src/components/app/list-new/HelmAppList.tsx | 73 +- src/components/app/list-new/list.utils.ts | 10 +- src/components/app/list/CellComponent.tsx | 4 +- .../app/list/DevtronAppListContainer.tsx | 10 +- src/components/app/list/NameCellComponent.tsx | 6 +- src/components/app/list/TriggerUrl.tsx | 17 +- src/components/app/list/appList.modal.ts | 3 + src/components/app/service.ts | 25 +- src/components/app/types.ts | 3 +- src/components/bulkEdits/BulkEdits.tsx | 64 +- src/components/bulkEdits/bulkedit.utils.tsx | 115 +- .../bulkEdits/bulkedits.service.tsx | 4 +- src/components/cdPipeline/BuildCD.tsx | 65 +- src/components/cdPipeline/CDPipeline.tsx | 105 +- .../MigrateToDevtron.component.tsx | 2 +- .../MigrateToDevtronValidationFactory.tsx | 13 +- .../cdPipeline/MigrateToDevtron/constants.tsx | 4 +- .../cdPipeline/MigrateToDevtron/service.tsx | 14 +- .../cdPipeline/MigrateToDevtron/utils.tsx | 4 +- .../cdPipeline/cdPipeline.service.ts | 57 +- src/components/cdPipeline/cdpipeline.util.tsx | 15 +- src/components/cdPipeline/constants.ts | 2 +- src/components/chartRepo/ChartRepo.tsx | 51 +- .../chartRepo/chartRepo.service.tsx | 7 +- src/components/charts/AdvancedConfig.tsx | 28 +- src/components/charts/ChartCard.tsx | 5 +- .../charts/ChartGroupAdvanceDeploy.tsx | 40 +- src/components/charts/ChartGroupCard.tsx | 4 +- .../charts/ChartGroupDeployments.tsx | 29 +- src/components/charts/ChartGroupDetails.tsx | 54 +- src/components/charts/ChartGroupUpdate.tsx | 42 +- src/components/charts/ChartHeaderFilters.tsx | 15 +- .../charts/ChartSourceAccordion.tsx | 10 +- src/components/charts/Charts.tsx | 4 + src/components/charts/MultiChartSummary.tsx | 12 +- .../charts/chartValues/ChartValues.tsx | 26 +- src/components/charts/charts.helper.ts | 1 + src/components/charts/charts.service.ts | 19 +- src/components/charts/charts.types.tsx | 2 +- src/components/charts/charts.util.tsx | 11 +- .../dialogs/ValuesYamlConfirmDialog.tsx | 5 +- .../charts/list/ChartCardSkeleton.tsx | 2 +- src/components/charts/list/ChartGroup.tsx | 25 +- .../charts/list/ChartListPopUpRow.tsx | 12 +- src/components/charts/list/ChartsList.tsx | 6 +- src/components/charts/list/DiscoverCharts.tsx | 13 +- .../charts/modal/ChartGroupBasicDeploy.tsx | 27 +- .../charts/modal/CreateChartGroup.tsx | 26 +- src/components/charts/useChartGroup.ts | 24 +- src/components/checkList/AllChartsCheck.tsx | 4 +- src/components/checkList/AllCheckModal.tsx | 5 +- src/components/checkList/ChartCheckList.tsx | 5 +- src/components/checkList/CustomAppDeploy.tsx | 11 +- .../checkList/GlobalAllCheckModal.tsx | 4 +- src/components/checkList/GlobalChartCheck.tsx | 4 +- src/components/checkList/SampleAppDeploy.tsx | 4 +- src/components/checkList/checklist.service.ts | 18 - src/components/ciConfig/BuildContext.tsx | 1 + src/components/ciConfig/CIAdvancedConfig.tsx | 11 +- src/components/ciConfig/CIBuildConfigDiff.tsx | 6 +- .../ciConfig/CIBuildpackBuildOptions.tsx | 30 +- src/components/ciConfig/CIConfig.tsx | 35 +- src/components/ciConfig/CIConfig.utils.ts | 5 +- src/components/ciConfig/CIConfigDiffView.tsx | 39 +- src/components/ciConfig/CIConfigForm.tsx | 38 +- .../ciConfig/CIContainerRegistryConfig.tsx | 15 +- .../ciConfig/CICreateDockerfileOption.tsx | 8 +- .../ciConfig/CIDockerFileConfig.tsx | 22 +- .../ciConfig/CISelfDockerBuildOption.tsx | 3 +- .../CreateDockerFileLanguageOptions.tsx | 6 +- .../ciConfig/TargetPlatformSelector.tsx | 9 +- src/components/ciConfig/service.tsx | 15 +- src/components/ciConfig/types.tsx | 6 +- src/components/ciConfig/utils.tsx | 4 +- .../ciPipeline/ConfigureWebhook.tsx | 6 +- .../ciPipeline/LinkedCIPipelineEdit.tsx | 34 +- .../ciPipeline/LinkedCIPipelineView.tsx | 47 +- .../Webhook/WebhookDetailsModal.tsx | 80 +- src/components/ciPipeline/Webhook/types.ts | 1 + .../ciPipeline/Webhook/webhook.service.ts | 19 +- .../ciPipeline/Webhook/webhook.utils.ts | 1 - .../ciPipeline/WebhookSelectorCondition.tsx | 4 +- .../ciPipeline/ciPipeline.service.ts | 33 +- src/components/ciPipeline/types.ts | 6 +- src/components/ciPipeline/validationRules.ts | 15 +- src/components/common/Banner/utils.tsx | 2 +- src/components/common/Carousel/Carousel.tsx | 1 + .../common/ContentCard/ContentCard.tsx | 63 +- .../DeploymentTypeIcon/DeploymentTypeIcon.tsx | 4 +- .../common/DeploymentTypeIcon/index.tsx | 3 +- .../common/DeprecatedUpdateWarn.tsx | 1 + .../common/DynamicTabs/DynamicTabs.timer.tsx | 2 +- .../common/DynamicTabs/DynamicTabs.tsx | 8 +- src/components/common/DynamicTabs/types.ts | 2 +- src/components/common/DynamicTabs/useTabs.ts | 10 +- .../common/GitTabs/GitProviderTab.tsx | 6 +- .../common/GitTabs/GitProviderTabIcons.tsx | 6 +- .../common/HiddenInput/HiddenInput.tsx | 1 - src/components/common/List/List.tsx | 2 + src/components/common/Select/Select.tsx | 5 +- src/components/common/SidePanel/SidePanel.tsx | 2 +- .../common/SidePanel/SidePanelContent.tsx | 1 + .../SidePanel/SidePanelDocumentation.tsx | 1 + .../SidePanel/SidePanelHeaderActions.tsx | 1 + src/components/common/SidePanel/types.ts | 1 + src/components/common/SidePanel/utils.tsx | 2 +- .../TLSConnectionForm/TLSInputField.tsx | 4 +- .../common/eaEmptyState/EAEmptyState.tsx | 5 +- .../common/edge/rectangularEdge.tsx | 17 +- src/components/common/errorBoundary.tsx | 11 +- .../common/formFields/Typeahead.tsx | 2 + .../common/formFields/Widgets/Widgets.tsx | 3 +- src/components/common/helpers/Helpers.tsx | 46 +- .../common/helpers/compareVersion.ts | 3 - src/components/common/helpers/time.ts | 9 +- src/components/common/helpers/utils.tsx | 14 +- src/components/common/helpers/workflowURL.ts | 6 +- src/components/common/hooks/FileReader.ts | 9 +- .../common/hooks/useOnline/service.ts | 4 +- .../useVersionUpdateReload.tsx | 13 +- src/components/common/index.ts | 2 +- src/components/common/lineChart/lineChart.css | 50 - src/components/common/lineChart/lineChart.tsx | 246 -- src/components/common/lineChart/types.tsx | 39 - .../navigation/NavRoutes.components.tsx | 2 +- .../common/navigation/NavigationRoutes.tsx | 39 +- src/components/dockerRegistry/Docker.tsx | 127 +- .../dockerRegistry/ManageRegistry.tsx | 34 +- src/components/dockerRegistry/service.tsx | 7 +- .../external-apps/ExternalAppService.ts | 18 +- .../externalArgoApps/ExternalArgoApp.tsx | 8 +- .../ExternalArgoAppDetail.tsx | 23 +- .../externalLinks/AddLinkButton.tsx | 4 +- .../externalLinks/ExternalLinkList.tsx | 9 +- .../externalLinks/ExternalLinks.component.tsx | 47 +- .../externalLinks/ExternalLinks.tsx | 6 +- .../externalLinks/ExternalLinks.type.ts | 4 +- .../externalLinks/ExternalLinks.utils.tsx | 17 +- .../ExternalLinksCRUD/AddExternalLink.tsx | 42 +- .../ExternalLinksCRUD/ConfigureLinkAction.tsx | 23 +- .../ExternalLinksCRUD/IdentifierSelector.tsx | 6 +- src/components/gitOps/GitOpsConfiguration.tsx | 89 +- .../gitOps/UpdateConfirmationDialog.tsx | 6 +- .../gitOps/UserGitRepConfiguration.tsx | 8 +- src/components/gitOps/UserGitRepo.tsx | 9 +- src/components/gitOps/constants.ts | 4 +- src/components/gitOps/gitops.service.tsx | 3 +- src/components/gitOps/gitops.type.ts | 4 +- .../gitProvider/AddGitHostConfigModal.tsx | 13 +- src/components/gitProvider/GitProvider.tsx | 79 +- .../gitProvider/gitProvider.service.tsx | 7 +- .../gitProvider/gitProvider.util.tsx | 3 +- .../GlobalConfiguration.tsx | 133 +- .../GlobalConfigurationProvider.tsx | 3 +- src/components/hostURL/HostURL.tsx | 19 +- src/components/hyperion/EnvironmentSelect.tsx | 5 + src/components/login/Login.tsx | 8 +- src/components/login/LoginForm.tsx | 6 +- src/components/material/MaterialForm.tsx | 2 +- src/components/material/MaterialList.tsx | 10 +- src/components/material/MaterialView.tsx | 64 +- src/components/material/material.service.ts | 2 +- src/components/material/utils.ts | 4 +- .../notifications/AddConfigurationButton.tsx | 4 +- .../notifications/AddNotification.tsx | 74 +- .../ConfigurationDrawerModal.tsx | 4 +- .../notifications/ConfigurationTab.tsx | 1 - .../notifications/DefaultCheckbox.tsx | 2 +- .../notifications/ModifyRecipientPopUp.tsx | 6 +- .../notifications/ModifyRecipientsModal.tsx | 36 +- .../notifications/NotificationTab.tsx | 37 +- .../notifications/Notifications.tsx | 19 +- .../notifications/SMTPConfigurationTable.tsx | 4 +- .../notifications/SlackConfigModal.tsx | 3 +- .../notifications/SlackConfigurationTable.tsx | 4 +- .../WebhookConfigDynamicDataTable.tsx | 4 +- .../notifications/WebhookConfigModal.tsx | 4 +- .../WebhookConfigurationTable.tsx | 4 +- src/components/notifications/constants.ts | 3 + .../notifications/notifications.service.ts | 27 +- .../notifications/notifications.util.tsx | 21 +- src/components/notifications/types.tsx | 7 +- .../onboardingGuide/GuideCommonHeader.tsx | 1 + .../onboardingGuide/OnboardingGuide.tsx | 15 +- .../onboardingGuide/onboarding.utils.ts | 1 - src/components/project/Project.tsx | 8 +- src/components/project/ProjectList.tsx | 15 +- src/components/scopedVariables/Descriptor.tsx | 11 +- .../scopedVariables/SavedVariables.tsx | 18 +- .../scopedVariables/ScopedVariables.tsx | 8 +- .../scopedVariables/ScopedVariablesEditor.tsx | 30 +- .../scopedVariables/ScopedVariablesLoader.tsx | 3 +- .../scopedVariables/UploadScopedVariables.tsx | 16 +- .../scopedVariables/VariablesList.tsx | 9 +- src/components/scopedVariables/service.ts | 2 +- src/components/scopedVariables/utils.tsx | 24 +- src/components/security/AddCveModal.tsx | 8 +- src/components/security/DeleteCVEModal.tsx | 5 +- src/components/security/Security.tsx | 6 +- src/components/security/SecurityPolicyApp.tsx | 17 +- .../security/SecurityPolicyCluster.tsx | 16 +- .../security/SecurityPolicyEdit.tsx | 46 +- .../security/SecurityPolicyEnvironment.tsx | 14 +- .../security/SecurityPolicyGlobal.tsx | 2 + .../SecurityScansTableWrapper.tsx | 8 +- .../security/SecurityScansTab/types.tsx | 10 +- .../security/SecurityScansTab/utils.tsx | 4 +- .../Vulnerabilities/CVEList/CVEList.tsx | 3 +- .../CVEList/CVEListTableCellComponents.tsx | 2 + .../CVEList/CVEListTableWrapper.tsx | 6 +- .../Vulnerabilities/CVEList/constants.ts | 1 + .../Vulnerabilities/CVEList/service.ts | 12 +- .../Vulnerabilities/VulnerabilitySummary.tsx | 2 +- .../security/Vulnerabilities/services.ts | 4 +- src/components/security/security.service.ts | 2 +- src/components/util/KeyValueFileInput.tsx | 8 +- .../v2/HelmAppOverview/HelmAppOverview.tsx | 4 +- .../v2/appDetails/AppDetails.component.tsx | 15 +- .../appDetails/NodeDetailComponentWrapper.tsx | 8 +- .../v2/appDetails/NodeTreeDetailTab.tsx | 16 +- .../v2/appDetails/ReleaseStatusEmptyState.tsx | 1 - .../v2/appDetails/SyncError.component.tsx | 20 +- .../v2/appDetails/appDetails.api.ts | 5 +- .../v2/appDetails/appDetails.type.ts | 12 +- .../appDetails/ea/EAAppDetail.component.tsx | 43 +- src/components/v2/appDetails/index.store.ts | 1 + .../k8Resource/K8Resource.component.tsx | 12 +- .../nodeDetail/DeleteEphemeralButton.tsx | 4 +- .../nodeDetail/EphemeralContainerDrawer.tsx | 51 +- .../nodeDetail/NodeDetail.component.tsx | 24 +- .../nodeDetail/NodeDetailTabs/CopyToast.tsx | 1 + .../CustomLogsModal/CustomLogsModal.tsx | 27 +- .../NodeDetailTabs/Events.component.tsx | 3 +- .../nodeDetail/NodeDetailTabs/EventsTable.tsx | 16 +- .../NodeDetailTabs/LogViewer.component.tsx | 4 +- .../NodeDetailTabs/Logs.component.tsx | 20 +- .../NodeDetailTabs/Manifest.component.tsx | 17 +- .../NodeDetailTabs/Terminal.component.tsx | 34 +- .../nodeDetail/NodeDetailTabs/node.type.ts | 4 +- .../NodeDetailTabs/terminal/Terminal.tsx | 9 +- .../terminal/TerminalWrapper.component.tsx | 3 +- .../NodeDetailTabs/terminal/terminal.type.ts | 2 +- .../terminal/terminal.utils.tsx | 6 +- .../k8Resource/nodeDetail/nodeDetail.api.ts | 39 +- .../k8Resource/nodeDetail/nodeDetail.util.tsx | 16 +- .../k8Resource/nodeType/Node.component.tsx | 8 +- .../nodeType/NodeDelete.component.tsx | 2 +- .../nodeType/NodeTree.component.tsx | 23 +- .../k8Resource/nodeType/useNodeTreeReducer.ts | 2 + .../EnvironmentSelector.component.tsx | 47 +- .../environmentStatus/ChartUsedCard.tsx | 9 +- .../ConfigStatusModal.component.tsx | 72 - .../EnvironmentStatus.component.tsx | 35 +- .../HelmAppConfigApplyStatusCard.tsx | 4 +- .../environmentStatus/NotesDrawer.tsx | 12 +- .../rotatePods/RotatePodsModal.component.tsx | 27 +- .../rotatePods/RotateResponseModal.tsx | 30 +- .../ScaleWorkloadsModal.component.tsx | 126 +- .../ChartDeploymentHistory.component.tsx | 67 +- .../DockerListModal.tsx | 7 +- .../chartDeploymentHistory.service.ts | 1 + .../v2/common/ReactSelect.utils.tsx | 11 +- .../v2/common/ReactSelectCustomization.tsx | 3 +- src/components/v2/common/message.ui.tsx | 1 + .../devtronStackManager/AboutDevtronView.tsx | 12 +- .../DevtronStackManager.component.tsx | 68 +- .../DevtronStackManager.service.tsx | 8 +- .../DevtronStackManager.tsx | 25 +- .../DevtronStackManager.utils.ts | 15 +- .../SuccessModalComponent.tsx | 4 +- .../v2/headers/ChartHeader.component.tsx | 21 +- .../v2/headers/EAHeader.component.tsx | 3 + src/components/v2/index.tsx | 18 +- src/components/v2/utils/tabUtils/useTab.ts | 8 +- src/components/v2/utils/useSharedState.ts | 4 +- .../v2/values/ChartValues.component.tsx | 4 +- .../chartValuesDiff/ChartRepoSelector.tsx | 22 +- .../chartValuesDiff/ChartValuesEditor.tsx | 30 +- .../chartValuesDiff/ChartValuesGUIView.tsx | 6 +- .../ChartValuesView.component.tsx | 59 +- .../ChartValuesView.reducer.ts | 1 + .../chartValuesDiff/ChartValuesView.tsx | 150 +- .../chartValuesDiff/DeleteChartDialog.tsx | 3 +- .../chartValuesDiff/ProjectUpdateModal.tsx | 20 +- .../v2/values/common/chartValues.api.ts | 23 +- .../workflowEditor/CDSuccessModal.tsx | 2 +- .../workflowEditor/CreateWorkflow.tsx | 32 +- .../workflowEditor/EmptyWorkflow.tsx | 24 +- .../NoGitOpsConfiguredWarning.tsx | 13 +- .../workflowEditor/PipelineSelect.tsx | 10 +- src/components/workflowEditor/Workflow.tsx | 55 +- .../workflowEditor/nodes/CDNode.tsx | 20 +- .../workflowEditor/nodes/CINode.tsx | 18 +- .../workflowEditor/nodes/StaticNode.tsx | 7 +- .../workflowEditor/nodes/WebhookNode.tsx | 14 +- .../workflowEditor/nodes/WebhookTippyCard.tsx | 7 +- src/components/workflowEditor/nodes/types.ts | 1 + src/components/workflowEditor/service.ts | 2 +- src/components/workflowEditor/types.ts | 3 +- .../workflowEditor/workflowEditor.tsx | 80 +- src/config/constantMessaging.ts | 2 +- src/config/constants.ts | 100 +- src/config/routes.ts | 3 +- src/config/utils.tsx | 4 +- src/index.tsx | 11 +- src/services/fetchWithFullRoute.ts | 7 +- src/services/service.ts | 44 +- src/services/service.types.ts | 9 +- src/util/Subject.ts | 9 - yarn.lock | 2154 ++--------------- 693 files changed, 5630 insertions(+), 8588 deletions(-) delete mode 100755 .eslintignore delete mode 100644 .eslintrc.js delete mode 100644 .prettierrc.js create mode 100644 biome.json delete mode 100644 src/components/ApplicationGroup/Details/EnvCDDetails/__mock__/EnvCDDetails.mock.ts delete mode 100644 src/components/ApplicationGroup/Details/EnvCIDetails/__mock__/EnvCIDetails.mock.ts delete mode 100644 src/components/ApplicationGroup/Details/EnvironmentConfig/__mock__/EnvConfig.mock.ts delete mode 100644 src/components/ApplicationGroup/Details/EnvironmentOverview/__mock__/EnvironmentOverview.mock.ts delete mode 100644 src/components/ApplicationGroup/List/__mocks__/EnvironmentList.mock.ts delete mode 100644 src/components/ClusterNodes/__mocks__/ClusterManifest.mock.ts delete mode 100644 src/components/ClusterNodes/__mocks__/clusterAbout.mock.tsx delete mode 100644 src/components/checkList/checklist.service.ts delete mode 100644 src/components/common/lineChart/lineChart.css delete mode 100644 src/components/common/lineChart/lineChart.tsx delete mode 100644 src/components/common/lineChart/types.tsx delete mode 100644 src/components/v2/appDetails/sourceInfo/environmentStatus/ConfigStatusModal.component.tsx diff --git a/.eslintignore b/.eslintignore deleted file mode 100755 index 4c62c958c8..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,324 +0,0 @@ -.eslintrc.js -vite.config.mts -scripts/ - -# The following files have eslint errors/warnings -src/components/AppSelector/ChartSelector.tsx -src/components/ApplicationGroup/AppGroup.service.ts -src/components/ApplicationGroup/AppGroup.utils.ts -src/components/ApplicationGroup/AppGroupAppFilter.components.tsx -src/components/ApplicationGroup/AppGroupDetailsRoute.tsx -src/components/ApplicationGroup/Constants.ts -src/components/ApplicationGroup/CreateAppGroup.tsx -src/components/ApplicationGroup/Details/EnvCDDetails/EnvCDDetails.tsx -src/components/ApplicationGroup/Details/EnvCIDetails/EnvCIDetails.tsx -src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateModal.tsx -src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateStatusListDrawer.tsx -src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateStatusRow.tsx -src/components/ApplicationGroup/Details/TriggerView/BulkCDTrigger.tsx -src/components/ApplicationGroup/Details/TriggerView/BulkCITrigger.tsx -src/components/ApplicationGroup/Details/TriggerView/EnvTriggerView.tsx -src/components/ApplicationGroup/SearchBar.tsx -src/components/CIPipelineN/AdvancedConfigOptions.tsx -src/components/CIPipelineN/Build.tsx -src/components/CIPipelineN/CIPipeline.tsx -src/components/CIPipelineN/CustomImageTags.tsx -src/components/CIPipelineN/CustomInputOutputVariables.tsx -src/components/CIPipelineN/CustomInputVariableSelect.tsx -src/components/CIPipelineN/EnvironmentList.tsx -src/components/CIPipelineN/InputPluginSelect.tsx -src/components/CIPipelineN/MultiplsPort.tsx -src/components/CIPipelineN/OutputDirectoryPath.tsx -src/components/CIPipelineN/PreBuild.tsx -src/components/CIPipelineN/Sidebar.tsx -src/components/CIPipelineN/TaskDetailComponent.tsx -src/components/CIPipelineN/TaskList.tsx -src/components/CIPipelineN/TaskTypeDetailComponent.tsx -src/components/CIPipelineN/VariableContainer.tsx -src/components/CIPipelineN/ciPipeline.utils.tsx -src/components/ClusterNodes/ClusterEvents.tsx -src/components/ClusterNodes/ClusterManifest.tsx -src/components/ClusterNodes/ClusterNodeEmptyStates.tsx -src/components/ClusterNodes/NodeDetails.tsx -src/components/Jobs/ExpandedRow/ExpandedRow.tsx -src/components/Jobs/JobDetails/JobDetails.tsx -src/components/Jobs/JobsEmptyState.tsx -src/components/Jobs/Service.ts -src/components/Jobs/Utils.ts -src/components/LogViewer/LogViewer.tsx -src/components/app/LogFilter.ts -src/components/app/Overview/EnvironmentList.tsx -src/components/app/Overview/Overview.tsx -src/components/app/Overview/TagChipsContainer.tsx -src/components/app/Overview/utils.tsx -src/components/app/ResourceTreeNodes.tsx -src/components/app/ResponsiveDrawer.tsx -src/components/app/WebWorker.ts -src/components/app/create/CreateApp.tsx -src/components/app/create/validationRules.ts -src/components/app/details/AboutTagEditModal.tsx -src/components/app/details/appDetails/AppMetrics.tsx -src/components/app/details/appDetails/AppStatusCard.tsx -src/components/app/details/appDetails/DeploymentStatusDetailModal.tsx -src/components/app/details/appDetails/GraphsModal.tsx -src/components/app/details/appDetails/IssuesCard.tsx -src/components/app/details/appDetails/SourceInfo.tsx -src/components/app/details/appDetails/index.tsx -src/components/app/details/appDetails/utils.tsx -src/components/app/details/cIDetails/CIDetails.tsx -src/components/app/details/cIDetails/cIDetails.util.tsx -src/components/app/details/cdDetails/CDDetails.tsx -src/components/app/details/cicdHistory/History.components.tsx -src/components/app/details/main.tsx -src/components/app/details/metrics/BenchmarkModal.tsx -src/components/app/details/metrics/DeploymentTable.tsx -src/components/app/details/metrics/DeploymentTableModal.tsx -src/components/app/details/metrics/deploymentMetrics.service.ts -src/components/app/details/metrics/deploymentMetrics.util.tsx -src/components/app/details/testViewer/List.tsx -src/components/app/details/testViewer/TestRunDetails.tsx -src/components/app/details/testViewer/TestRunList.tsx -src/components/app/details/triggerView/EmptyStateCIMaterial.tsx -src/components/app/details/triggerView/MaterialSource.tsx -src/components/app/details/triggerView/ciWebhook.service.ts -src/components/app/details/triggerView/config.ts -src/components/app/details/triggerView/workflow.service.ts -src/components/app/details/triggerView/workflow/Workflow.tsx -src/components/app/details/triggerView/workflow/nodes/TriggerExternalCINode.tsx -src/components/app/details/triggerView/workflow/nodes/TriggerLinkedCINode.tsx -src/components/app/details/triggerView/workflow/nodes/staticNode.tsx -src/components/app/details/triggerView/workflow/nodes/triggerCDNode.tsx -src/components/app/details/triggerView/workflow/nodes/triggerCINode.tsx -src/components/app/details/triggerView/workflow/nodes/triggerPrePostCDNode.tsx -src/components/app/details/triggerView/workflow/nodes/workflow.utils.tsx -src/components/app/grepSSEworker.ts -src/components/app/list-new/AppListService.ts -src/components/app/list-new/GenericAppList.tsx -src/components/app/list-new/HelmAppList.tsx -src/components/app/list/TriggerUrl.tsx -src/components/app/list/appList.modal.ts -src/components/app/list/emptyView/Empty.tsx -src/components/app/list/expandedRow/ExpandedRow.tsx -src/components/bulkEdits/bulkedit.utils.tsx -src/components/cdPipeline/BuildCD.tsx -src/components/cdPipeline/CDPipeline.tsx -src/components/cdPipeline/cdPipeline.service.ts -src/components/cdPipeline/cdpipeline.util.tsx -src/components/cdPipeline/validationRules.ts -src/components/chartRepo/ChartRepo.tsx -src/components/chartRepo/chartRepo.service.tsx -src/components/charts/AdvancedConfig.tsx -src/components/charts/ChartGroupAdvanceDeploy.tsx -src/components/charts/ChartGroupDeployments.tsx -src/components/charts/ChartGroupDetails.tsx -src/components/charts/ChartGroupUpdate.tsx -src/components/charts/ChartHeaderFilters.tsx -src/components/charts/MultiChartSummary.tsx -src/components/charts/chartValues/ChartValues.tsx -src/components/charts/charts.service.ts -src/components/charts/charts.util.tsx -src/components/charts/dialogs/ValuesYamlConfirmDialog.tsx -src/components/charts/list/ChartGroup.tsx -src/components/charts/list/ChartListPopUpRow.tsx -src/components/charts/list/DeployedChartFilters.tsx -src/components/charts/list/DiscoverCharts.tsx -src/components/charts/modal/ChartGroupBasicDeploy.tsx -src/components/charts/modal/CreateChartGroup.tsx -src/components/charts/useChartGroup.ts -src/components/checkList/AllChartsCheck.tsx -src/components/checkList/AllCheckModal.tsx -src/components/checkList/AppCheckList.tsx -src/components/checkList/ChartCheckList.tsx -src/components/checkList/CustomAppDeploy.tsx -src/components/checkList/GlobalAllCheckModal.tsx -src/components/checkList/GlobalChartCheck.tsx -src/components/checkList/SampleAppDeploy.tsx -src/components/checkList/checklist.service.ts -src/components/ciConfig/CIAdvancedConfig.tsx -src/components/ciConfig/CIBuildConfigDiff.tsx -src/components/ciConfig/CIBuildpackBuildOptions.tsx -src/components/ciConfig/CIConfig.tsx -src/components/ciConfig/CIConfig.utils.ts -src/components/ciConfig/CIConfigDiffView.tsx -src/components/ciConfig/CIConfigForm.tsx -src/components/ciConfig/CIContainerRegistryConfig.tsx -src/components/ciConfig/CICreateDockerfileOption.tsx -src/components/ciConfig/CIDockerFileConfig.tsx -src/components/ciConfig/TargetPlatformSelector.tsx -src/components/ciConfig/service.tsx -src/components/ciPipeline/CIPipelineAdvanced.tsx -src/components/ciPipeline/ConfigureWebhook.tsx -src/components/ciPipeline/ExternalCIPipeline.tsx -src/components/ciPipeline/LinkedCIPipelineEdit.tsx -src/components/ciPipeline/LinkedCIPipelineView.tsx -src/components/ciPipeline/Webhook/WebhookDetailsModal.tsx -src/components/ciPipeline/Webhook/webhook.service.ts -src/components/ciPipeline/Webhook/webhook.utils.ts -src/components/ciPipeline/WebhookSelectorCondition.tsx -src/components/ciPipeline/ciPipeline.service.ts -src/components/ciPipeline/validationRules.ts -src/components/cluster/Cluster.tsx -src/components/cluster/ClusterComponentModal.tsx -src/components/cluster/ClusterInfoStepsModal.tsx -src/components/cluster/ClusterInstallStatus.tsx -src/components/cluster/UseNameListDropdown.tsx -src/components/cluster/cluster.service.ts -src/components/cluster/cluster.util.ts -src/components/command/Command.tsx -src/components/command/CommandErrorBoundary.tsx -src/components/command/command.util.ts -src/components/common/Accordian/Accordian.tsx -src/components/common/AppDetailsEmptyState.tsx -src/components/common/Carousel/Carousel.tsx -src/components/common/ContentCard/ContentCard.tsx -src/components/common/Contexts/AppContext.ts -src/components/common/DatePickers/Calender.tsx -src/components/common/DatePickers/DayPickerRangeController.tsx -src/components/common/DeprecatedUpdateWarn.tsx -src/components/common/Description/GenericDescription.tsx -src/components/common/HiddenInput/HiddenInput.tsx -src/components/common/List/List.tsx -src/components/common/MultiSelect/MultiSelect.tsx -src/components/common/Select/Select.tsx -src/components/common/ValidateForm/ValidateForm.tsx -src/components/common/eaEmptyState/EAEmptyState.tsx -src/components/common/edge/rectangularEdge.tsx -src/components/common/edge/straightEdge.tsx -src/components/common/errorBoundary.tsx -src/components/common/formFields/CopyButton.tsx -src/components/common/formFields/Typeahead.tsx -src/components/common/helpers/Helpers.tsx -src/components/common/helpers/compareVersion.ts -src/components/common/helpers/isSubset.ts -src/components/common/helpers/time.ts -src/components/common/helpers/utils.tsx -src/components/common/helpers/workflowURL.ts -src/components/common/hooks/FileReader.ts -src/components/common/icons/Icons.tsx -src/components/common/lineChart/lineChart.tsx -src/components/common/navigation/Navigation.tsx -src/components/dockerRegistry/Docker.tsx -src/components/dockerRegistry/ManageRegistry.tsx -src/components/dockerRegistry/service.tsx -src/components/external-apps/ExternalAppService.ts -src/components/externalArgoApps/ExternalArgoApp.tsx -src/components/externalArgoApps/ExternalArgoAppDetail.tsx -src/components/externalLinks/ExternalLinks.component.tsx -src/components/externalLinks/ExternalLinksCRUD/AddExternalLink.tsx -src/components/externalLinks/ExternalLinksCRUD/ConfigureLinkAction.tsx -src/components/externalLinks/ExternalLinksCRUD/DeleteExternalLinkDialog.tsx -src/components/externalLinks/ExternalLinksCRUD/IdentifierSelector.tsx -src/components/externalLinks/ExternalLinksFilters.tsx -src/components/gitOps/GitOpsConfiguration.tsx -src/components/gitOps/UserGitRepConfiguration.tsx -src/components/gitOps/UserGitRepo.tsx -src/components/gitOps/gitops.service.tsx -src/components/gitOps/gitops.type.ts -src/components/gitProvider/AddGitHostConfigModal.tsx -src/components/gitProvider/GitProvider.tsx -src/components/gitProvider/gitProvider.service.tsx -src/components/gitProvider/gitProvider.util.tsx -src/components/globalConfigurations/GlobalConfiguration.tsx -src/components/globalConfigurations/GlobalConfigurationProvider.tsx -src/components/hostURL/HostURL.tsx -src/components/hyperion/EnvironmentSelect.tsx -src/components/material/MaterialView.tsx -src/components/notifications/AddNotification.tsx -src/components/notifications/ModifyRecipientsModal.tsx -src/components/notifications/NotificationTab.tsx -src/components/notifications/Notifications.tsx -src/components/notifications/notifications.service.ts -src/components/notifications/notifications.util.tsx -src/components/onboardingGuide/GuideCommonHeader.tsx -src/components/onboardingGuide/OnboardingGuide.tsx -src/components/onboardingGuide/onboarding.utils.ts -src/components/project/ProjectList.tsx -src/components/scopedVariables/Descriptor.tsx -src/components/scopedVariables/DescriptorSearchBar.tsx -src/components/scopedVariables/SavedVariables.tsx -src/components/scopedVariables/ScopedVariables.tsx -src/components/scopedVariables/ScopedVariablesEditor.tsx -src/components/scopedVariables/ScopedVariablesLoader.tsx -src/components/scopedVariables/UploadScopedVariables.tsx -src/components/scopedVariables/VariablesList.tsx -src/components/scopedVariables/utils.tsx -src/components/security/AddCveModal.tsx -src/components/security/DeleteCVEModal.tsx -src/components/security/SecurityPolicyApp.tsx -src/components/security/SecurityPolicyCluster.tsx -src/components/security/SecurityPolicyEdit.tsx -src/components/security/SecurityPolicyEnvironment.tsx -src/components/security/SecurityPolicyGlobal.tsx -src/components/security/UpdateSeverityModal.tsx -src/components/security/security.util.tsx -src/components/terminal/TerminalWrapper.tsx -src/components/util/KeyValueFileInput.tsx -src/components/v2/appDetails/ReleaseStatusEmptyState.tsx -src/components/v2/appDetails/SyncError.component.tsx -src/components/v2/appDetails/appDetails.api.ts -src/components/v2/appDetails/ea/EAAppDetail.component.tsx -src/components/v2/appDetails/k8Resource/FilterResource.tsx -src/components/v2/appDetails/k8Resource/nodeDetail/EphemeralContainerDrawer.tsx -src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/CustomLogsModal/CustomLogsModal.tsx -src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Terminal.component.tsx -src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/TerminalWrapper.component.tsx -src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/constants.ts -src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/terminal.type.ts -src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.api.ts -src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.util.tsx -src/components/v2/appDetails/k8Resource/nodeType/NodeTree.component.tsx -src/components/v2/appDetails/k8Resource/nodeType/PodTabSection.tsx -src/components/v2/appDetails/k8Resource/nodeType/nodeType.util.ts -src/components/v2/appDetails/k8Resource/nodeType/useNodeTreeReducer.ts -src/components/v2/appDetails/sourceInfo/EnvironmentSelector.component.tsx -src/components/v2/appDetails/sourceInfo/environmentStatus/AppStatusDetailModal.tsx -src/components/v2/appDetails/sourceInfo/environmentStatus/ConfigStatusModal.component.tsx -src/components/v2/appDetails/sourceInfo/environmentStatus/EnvironmentStatus.component.tsx -src/components/v2/appDetails/sourceInfo/environmentStatus/NotesDrawer.tsx -src/components/v2/appDetails/sourceInfo/rotatePods/RotatePodsModal.component.tsx -src/components/v2/appDetails/sourceInfo/rotatePods/RotateResponseModal.tsx -src/components/v2/appDetails/sourceInfo/scaleWorkloads/ScaleWorkloadsModal.component.tsx -src/components/v2/chartDeploymentHistory/ChartDeploymentHistory.component.tsx -src/components/v2/chartDeploymentHistory/DockerListModal.tsx -src/components/v2/chartDeploymentHistory/chartDeploymentHistory.service.ts -src/components/v2/common/ReactSelect.utils.tsx -src/components/v2/common/ReactSelectCustomization.tsx -src/components/v2/devtronStackManager/AboutDevtronView.tsx -src/components/v2/devtronStackManager/DevtronStackManager.component.tsx -src/components/v2/devtronStackManager/DevtronStackManager.service.tsx -src/components/v2/devtronStackManager/DevtronStackManager.tsx -src/components/v2/devtronStackManager/DevtronStackManager.utils.ts -src/components/v2/headers/ChartHeader.component.tsx -src/components/v2/headers/EAHeader.component.tsx -src/components/v2/index.tsx -src/components/v2/utils/tabUtils/useTab.ts -src/components/v2/utils/useSharedState.ts -src/components/v2/values/ChartValues.component.tsx -src/components/v2/values/chartValuesDiff/ChartRepoSelector.tsx -src/components/v2/values/chartValuesDiff/ChartValuesEditor.tsx -src/components/v2/values/chartValuesDiff/ChartValuesView.component.tsx -src/components/v2/values/chartValuesDiff/ChartValuesView.reducer.ts -src/components/v2/values/chartValuesDiff/ChartValuesView.tsx -src/components/v2/values/chartValuesDiff/ProjectUpdateModal.tsx -src/components/v2/values/common/chartValues.api.ts -src/components/workflowEditor/CreateWorkflow.tsx -src/components/workflowEditor/DeprecatedWarningModal.tsx -src/components/workflowEditor/EmptyWorkflow.tsx -src/components/workflowEditor/NoGitOpsConfiguredWarning.tsx -src/components/workflowEditor/PipelineSelect.tsx -src/components/workflowEditor/Workflow.tsx -src/components/workflowEditor/nodes/CDNode.tsx -src/components/workflowEditor/nodes/CINode.tsx -src/components/workflowEditor/nodes/StaticNode.tsx -src/components/workflowEditor/nodes/WebhookNode.tsx -src/components/workflowEditor/nodes/WebhookTippyCard.tsx -src/components/workflowEditor/workflowEditor.tsx -src/config/constants.ts -src/config/routes.ts -src/config/utils.ts -src/services/fetchWithFullRoute.ts -src/services/service.ts -src/services/service.types.ts -src/util/MurmurHash3.ts -src/util/Subject.ts -src/util/Util.ts diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index b68044fd52..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2024. Devtron Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const tsconfigPath = require('./tsconfig.json') - -module.exports = { - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint', 'react', 'prettier', 'import', 'simple-import-sort', '@tanstack/query'], - env: { - browser: true, - es2021: true, - }, - parserOptions: { - ecmaVersion: 2021, - sourceType: 'module', - ecmaFeatures: { - jsx: true, - }, - project: ['./tsconfig.json'], - }, - globals: { - JSX: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:@typescript-eslint/eslint-recommended', - 'airbnb', - 'airbnb/hooks', - 'prettier', - 'plugin:@tanstack/query/recommended', - ], - rules: { - 'prettier/prettier': ['error'], - 'linebreak-style': ['error', 'unix'], - 'no-console': 'warn', - 'no-var': 'error', - 'no-duplicate-imports': 'error', - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': 'warn', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-member-accessibility': 'off', - // Since we are using typescript, we can disable the no-unused-vars rule for enum,etc - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'error', - 'react/jsx-filename-extension': [ - 'error', - { - extensions: ['tsx'], - }, - ], - 'react/jsx-props-no-spreading': 'off', - 'react/prefer-stateless-function': 'off', - 'jsx-a11y/click-events-have-key-events': 'off', - 'jsx-a11y/no-static-element-interactions': 'off', - 'jsx-a11y/no-noninteractive-element-interactions': 'off', - 'no-underscore-dangle': 'off', - 'import/no-extraneous-dependencies': [ - 'warn', - { - devDependencies: true, - }, - ], - 'import/no-named-as-default-member': 'off', - 'no-plusplus': [ - 'error', - { - allowForLoopAfterthoughts: true, - }, - ], - // Since we dont use prop-types, we can disable this rule - 'react/require-default-props': 'off', - 'react-hooks/exhaustive-deps': 'off', - 'react/function-component-definition': [ - 'warn', - { - namedComponents: 'arrow-function', - unnamedComponents: 'arrow-function', - }, - ], - 'react/jsx-uses-react': 'off', - 'react/react-in-jsx-scope': 'off', - // additional rules: - '@typescript-eslint/no-floating-promises': 'error', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'warn', - 'ignorePackages', - { - js: 'never', - jsx: 'never', - ts: 'never', - tsx: 'never', - }, - ], - // Re-add this while resolving ESLint issues - 'import/no-cycle': 'off', - 'import/prefer-default-export': 'off', - 'no-restricted-exports': 'off', - 'import/named': 'off', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'error', - 'simple-import-sort/imports': [ - 'error', - { - groups: [ - // Packages `react` related packages and external packages. - ['^react', '^@?\\w'], - // Devtron packages - ['^@devtron-labs'], - // Internal packages. - [...Object.keys(tsconfigPath.compilerOptions.paths).map((alias) => alias.replace('/*', ''))], - // Side effect imports. - ['^\\u0000'], - // Put same-folder imports, `..` and `.` last. Other relative imports. - ['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], - // Style imports. - ['^.+\\.?(css|scss)$'], - ], - }, - ], - 'simple-import-sort/exports': 'error', - }, - overrides: [ - { - files: ['*.ts', '*.tsx'], - rules: { - 'no-undef': 'off', - }, - }, - ], - settings: { - react: { - version: 'detect', - }, - 'import/parsers': { - '@typescript-eslint/parser': ['.ts', '.tsx'], - }, - 'import/resolver': { - typescript: { - alwaysTryTypes: true, - }, - node: { - moduleDirectory: ['src', 'node_modules'], - extensions: ['.js', '.jsx', '.ts', '.tsx'], - }, - }, - 'import/ignore': ['\\.png$', '\\.jpg$', '\\.svg$'], - }, - ignorePatterns: ['.eslintrc.cjs', 'vite.config.mts'], -} diff --git a/.lintstagedrc b/.lintstagedrc index 55dd1e0bc3..36836b94c4 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,5 +1,5 @@ { "*.{js,jsx,ts,tsx}": [ - "eslint" + "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true" ] } diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index add3e92e76..0000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2024. Devtron Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -module.exports = { - semi: false, - trailingComma: 'all', - singleQuote: true, - printWidth: 120, - tabWidth: 4, -} diff --git a/.vscode/settings.json b/.vscode/settings.json index f37193fb91..75dc6b982d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,24 +1,21 @@ { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "biomejs.biome", "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "biomejs.biome" }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "biomejs.biome" }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "biomejs.biome" }, - "editor.formatOnSave": false, - "editor.codeActionsOnSave": [ - "source.fixAll.eslint" - ], - "eslint.validate": [ - "typescript", - "typescriptreact" - ], - "prettier.requireConfig": true, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.biome": "explicit" + }, + "prettier.enable": false, + "eslint.enable": false, "[scss]": { "editor.defaultFormatter": "vscode.css-language-features" - }, + } } diff --git a/biome.json b/biome.json new file mode 100644 index 0000000000..be35b2b9cd --- /dev/null +++ b/biome.json @@ -0,0 +1,193 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.4.11/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "includes": [ + "src/**/*.{ts,tsx,js,jsx}", + "!src/components/app/details/appDetails/AppMetrics.tsx", + "!src/components/app/details/appDetails/GraphsModal.tsx", + "!src/components/app/details/appDetails/IssuesCard.tsx", + "!src/components/app/details/appDetails/utils.tsx", + "!src/components/app/details/main.tsx", + "!src/components/app/details/metrics/deploymentMetrics.service.ts", + "!src/components/app/details/metrics/deploymentMetrics.util.tsx", + "!src/components/app/details/metrics/DeploymentTable.tsx", + "!src/components/app/details/triggerView/MaterialSource.tsx", + "!src/components/app/details/triggerView/workflow.service.ts", + "!src/components/app/details/triggerView/workflow/nodes/triggerCINode.tsx", + "!src/components/app/details/triggerView/workflow/nodes/triggerPrePostCDNode.tsx", + "!src/components/app/grepSSEworker.ts", + "!src/components/app/list/TriggerUrl.tsx", + "!src/components/ApplicationGroup/AppGroup.utils.ts", + "!src/components/ApplicationGroup/AppGroupAppFilter.components.tsx", + "!src/components/ApplicationGroup/AppGroupDetailsRoute.tsx", + "!src/components/ApplicationGroup/CreateAppGroup.tsx", + "!src/components/ApplicationGroup/Details/EnvironmentOverview/HibernateModal.tsx", + "!src/components/ApplicationGroup/Details/EnvironmentOverview/RestartWorkloadModal.tsx", + "!src/components/ApplicationGroup/Details/TriggerView/EnvTriggerView.tsx", + "!src/components/bulkEdits/bulkedit.utils.tsx", + "!src/components/cdPipeline/BuildCD.tsx", + "!src/components/cdPipeline/cdPipeline.service.ts", + "!src/components/cdPipeline/CDPipeline.tsx", + "!src/components/chartRepo/ChartRepo.tsx", + "!src/components/charts/AdvancedConfig.tsx", + "!src/components/charts/ChartGroupUpdate.tsx", + "!src/components/charts/charts.service.ts", + "!src/components/charts/charts.types.tsx", + "!src/components/charts/list/DiscoverCharts.tsx", + "!src/components/charts/modal/ChartGroupBasicDeploy.tsx", + "!src/components/charts/MultiChartSummary.tsx", + "!src/components/charts/useChartGroup.ts", + "!src/components/ciConfig/CIBuildpackBuildOptions.tsx", + "!src/components/ciConfig/CIConfig.utils.ts", + "!src/components/ciConfig/CIConfigForm.tsx", + "!src/components/ciConfig/CIDockerFileConfig.tsx", + "!src/components/ciPipeline/ciPipeline.service.ts", + "!src/components/ciPipeline/ConfigureWebhook.tsx", + "!src/components/ciPipeline/Webhook/WebhookDetailsModal.tsx", + "!src/components/CIPipelineN/TaskList.tsx", + "!src/components/ClusterNodes/ClusterManifest.tsx", + "!src/components/ClusterNodes/ClusterOverview.tsx", + "!src/components/ClusterNodes/ClusterTerminal.tsx", + "!src/components/ClusterNodes/NodeDetails.tsx", + "!src/components/common/Carousel/Carousel.tsx", + "!src/components/common/formFields/Typeahead.tsx", + "!src/components/common/helpers/Helpers.tsx", + "!src/components/common/icons/Icons.tsx", + "!src/components/common/Select/Select.tsx", + "!src/components/dockerRegistry/Docker.tsx", + "!src/components/dockerRegistry/ManageRegistry.tsx", + "!src/components/externalLinks/ExternalLinks.component.tsx", + "!src/components/externalLinks/ExternalLinksCRUD/AddExternalLink.tsx", + "!src/components/externalLinks/ExternalLinksCRUD/IdentifierSelector.tsx", + "!src/components/gitOps/GitOpsConfiguration.tsx", + "!src/components/gitProvider/GitProvider.tsx", + "!src/components/gitProvider/gitProvider.util.tsx", + "!src/components/material/MaterialView.tsx", + "!src/components/notifications/AddNotification.tsx", + "!src/components/notifications/notifications.service.ts", + "!src/components/notifications/notifications.util.tsx", + "!src/components/notifications/NotificationTab.tsx", + "!src/components/project/ProjectList.tsx", + "!src/components/security/AddCveModal.tsx", + "!src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.api.ts", + "!src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetail.component.tsx", + "!src/components/v2/appDetails/k8Resource/nodeDetail/nodeDetail.util.tsx", + "!src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/CustomLogsModal/CustomLogsModal.tsx", + "!src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/Logs.component.tsx", + "!src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/terminal/terminal.utils.tsx", + "!src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx", + "!src/components/v2/appDetails/SyncError.component.tsx", + "!src/components/v2/chartDeploymentHistory/ChartDeploymentHistory.component.tsx", + "!src/components/v2/common/ReactSelectCustomization.tsx", + "!src/components/v2/devtronStackManager/DevtronStackManager.component.tsx", + "!src/components/v2/devtronStackManager/DevtronStackManager.tsx", + "!src/components/v2/values/chartValuesDiff/ChartRepoSelector.tsx", + "!src/components/v2/values/chartValuesDiff/ChartValuesEditor.tsx", + "!src/components/v2/values/chartValuesDiff/ChartValuesView.tsx", + "!src/components/workflowEditor/PipelineSelect.tsx", + "!src/components/workflowEditor/Workflow.tsx", + "!src/components/workflowEditor/workflowEditor.tsx", + "!src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/NodeViewGroupList.tsx", + "!src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx", + "!src/Pages/GlobalConfigurations/Authorization/Shared/components/AppPermissions/AppPermissionDetail.tsx", + "!src/Pages/GlobalConfigurations/Authorization/Shared/components/AppPermissions/AppPermissions.component.tsx", + "!src/Pages/GlobalConfigurations/Authorization/Shared/components/K8sObjectPermissions/K8sPermissionModal.tsx", + "!src/Pages/GlobalConfigurations/Authorization/SSOLoginServices/SSOLogin.component.tsx", + "!src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterForm/ConnectClusterViaKubeconfig.tsx", + "!src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterList.components.tsx", + "!src/util/MurmurHash3.ts" + ] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 4, + "lineWidth": 120 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": "error", + "noUndeclaredVariables": "error", + "useExhaustiveDependencies": "off", + "noConstantMathMinMaxClamp": "error", + "noUnusedImports": "error", + "noUnusedFunctionParameters": "error" + }, + "style": { + "useConst": "error", + "useSelfClosingElements": "error", + "noNonNullAssertion": "off", + "noYodaExpression": "error", + "useFragmentSyntax": "error", + "useImportType": "off", + "useLiteralEnumMembers": "off" + }, + "suspicious": { + "useAwait": "error", + "noConsole": "error", + "noShadowRestrictedNames": "error", + "noExplicitAny": "off", + "noVar": "error", + "noArrayIndexKey": "error", + "noEvolvingTypes": "error" + }, + "a11y": { + "noStaticElementInteractions": "error", + "noNoninteractiveElementInteractions": "error", + "useKeyWithClickEvents": "error", + "useButtonType": "error", + "noLabelWithoutControl": "error", + "noAutofocus": "off" + }, + "complexity": { + "useLiteralKeys": "off" + } + } + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "semicolons": "asNeeded", + "trailingCommas": "all" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": { + "level": "on", + "options": { + "groups": [ + [ + ":URL:", + ":NODE:", + ":BUN:", + ":PACKAGE_WITH_PROTOCOL:", + ":PACKAGE:", + "!@devtron-labs", + "!@devtron-labs/**" + ], + ":BLANK_LINE:", + ["@devtron-labs", "@devtron-labs/**"], + ":BLANK_LINE:", + ["@Images", "@Images/**", "@Shared", "@Shared/**", "@Pages", "@Pages/**"], + ":BLANK_LINE:", + [":PATH:", "!**/*.css", "!**/*.scss"], + ":BLANK_LINE:", + ["**/*.css", "**/*.scss"] + ] + } + } + } + } + } +} diff --git a/package.json b/package.json index bb5bb8e629..e4bb3e539c 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ }, "scripts": { "prepare": "husky install", - "lint": "tsc --noEmit && eslint 'src/**/*.{js,jsx,ts,tsx}' --max-warnings 0", - "lint-fix": "eslint 'src/**/*.{js,jsx,ts,tsx}' --fix", + "lint": "tsc --noEmit && biome check src/", + "lint-fix": "biome check --write src/", "start": "vite --open", "dev": "node scripts/secrets-mgr.js", "build": "NODE_OPTIONS=--max_old_space_size=8192 vite build", @@ -57,35 +57,22 @@ "not op_mini all" ], "devDependencies": { + "@biomejs/biome": "2.4.11", "@playwright/test": "^1.32.1", "@sentry/cli": "^2.2.0", - "@tanstack/eslint-plugin-query": "^5.91.4", "@types/node": "^25.5.0", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@types/react-transition-group": "^4.4.4", "@types/recompose": "^0.30.10", - "@typescript-eslint/eslint-plugin": "8.3.0", - "@typescript-eslint/parser": "8.3.0", "@vitejs/plugin-react": "6.0.1", "env-cmd": "10.1.0", - "eslint": "^8.57.1", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-prettier": "^5.1.2", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-simple-import-sort": "^12.1.1", "husky": "^7.0.4", "json-schema": "^0.4.0", "lint-staged": "12.5.0", "mock-socket": "^9.2.1", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", - "prettier": "^3.1.1", "react-draggable": "^4.4.5", "sass": "^1.69.7", "sharp": "^0.33.5", diff --git a/src/App.tsx b/src/App.tsx index cb994283c4..e424abe89a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,13 +31,14 @@ import { useUserEmail, } from '@devtron-labs/devtron-fe-common-lib' -import { useVersionUpdateReload } from '@Components/common/hooks/useVersionUpdate' -import { VersionUpdateProps } from '@Components/common/hooks/useVersionUpdate/types' import ActivateLicense from '@Pages/License/ActivateLicense' import { ErrorBoundary, getApprovalModalTypeFromURL, importComponentFromFELibrary } from './components/common' import { validateToken } from './services/service' +import { useVersionUpdateReload } from '@Components/common/hooks/useVersionUpdate' +import { VersionUpdateProps } from '@Components/common/hooks/useVersionUpdate/types' + import './css/application.scss' const NavigationRoutes = lazy(() => import('./components/common/navigation/NavigationRoutes')) @@ -56,10 +57,7 @@ const App = () => { const navigate = useNavigate() const isDirectApprovalNotification = - location.pathname && - location.pathname.includes('approve') && - location.search && - location.search.includes(`?token=${approvalToken}`) + location.pathname?.includes('approve') && location.search?.includes(`?token=${approvalToken}`) const customThemeClassName = location.pathname.startsWith(ROUTER_URLS.NETWORK_STATUS_INTERFACE.ROOT) ? 'custom-theme-override' : '' diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/ApplicationManagementRouter.tsx b/src/Pages-Devtron-2.0/ApplicationManagement/ApplicationManagementRouter.tsx index 3876803fc0..1196595f03 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/ApplicationManagementRouter.tsx +++ b/src/Pages-Devtron-2.0/ApplicationManagement/ApplicationManagementRouter.tsx @@ -3,14 +3,15 @@ import { Navigate, Route, Routes } from 'react-router-dom' import { BASE_ROUTES } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' -import { DevtronAppRouter } from '@Components/common/navigation/NavRoutes.components' import AppConfig from '@Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig' import { OffendingPipelineModalAppView } from '@Pages/GlobalConfigurations/PluginPolicy/OffendingPipelineModal' import { Configurations } from './Configurations' import { ApplicationManagementOverview } from './Overview' +import { importComponentFromFELibrary } from '@Components/common' +import { DevtronAppRouter } from '@Components/common/navigation/NavRoutes.components' + const BulkEdit = lazy(() => import('@Components/bulkEdits/BulkEdits')) const AppGroupRoute = lazy(() => import('@Components/ApplicationGroup/AppGroupRoute')) diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Configurations/ConfigurationsRouter.tsx b/src/Pages-Devtron-2.0/ApplicationManagement/Configurations/ConfigurationsRouter.tsx index 07e3628b79..cb25b78145 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Configurations/ConfigurationsRouter.tsx +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Configurations/ConfigurationsRouter.tsx @@ -103,7 +103,7 @@ export const Configurations = () => { /> } /> - {...serverMode === SERVER_MODE.FULL && window._env_.ENABLE_SCOPED_VARIABLES + {...(serverMode === SERVER_MODE.FULL && window._env_.ENABLE_SCOPED_VARIABLES ? [ { element={} />, ] - : []} + : [])} { const { appTheme } = useTheme() const performanceLevels = Object.values(PerformanceLevel) diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/PipelineTriggerInsights.tsx b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/PipelineTriggerInsights.tsx index f393434ecf..bd2d47279e 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/PipelineTriggerInsights.tsx +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/PipelineTriggerInsights.tsx @@ -19,8 +19,6 @@ import { useStateFilters, } from '@devtron-labs/devtron-fe-common-lib' -import { SORT_ORDER_OPTIONS, TIME_WINDOW, TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' - import { DEFAULT_TIME_WINDOW } from '../constants' import { SectionLoadingCard } from '../Overview.components' import { useGetPipelineInsights } from '../services' @@ -28,6 +26,8 @@ import { PipelineType } from '../types' import { MIN_X_AXIS_VALUE } from './constants' import { getPipelineInsightsChartTooltip } from './tooltipUtils' +import { SORT_ORDER_OPTIONS, TIME_WINDOW, TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' + const PipelineTriggerInsights = () => { const [selectedWindowOption, setSelectedWindowOption] = useState(DEFAULT_TIME_WINDOW) const [pipelineType, setPipelineType] = useState(PipelineType.BUILD) diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/TriggerBuildTimeChart.tsx b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/TriggerBuildTimeChart.tsx index ca09873eb6..358fc63ffe 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/TriggerBuildTimeChart.tsx +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/BuildDeploymentMetrics/TriggerBuildTimeChart.tsx @@ -11,8 +11,6 @@ import { SelectPickerVariantType, } from '@devtron-labs/devtron-fe-common-lib' -import { TIME_WINDOW, TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' - import { DEFAULT_TIME_WINDOW } from '../constants' import { ChartHeaderTab, SectionLoadingCard } from '../Overview.components' import { useGetBuildDeploymentActivity, useGetBuildDeploymentActivityDetailed } from '../services' @@ -21,6 +19,8 @@ import { parseMinutesInDayHourUnit } from '../utils' import { getAvgBuildTimeTooltip, getBuildDeploymentTriggerTooltip } from './tooltipUtils' import { NoBuildDeploymentTriggeredProps } from './types' +import { TIME_WINDOW, TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' + const NoBuildDeploymentTriggered = ({ isDeploymentTriggerChart }: NoBuildDeploymentTriggeredProps) => (
(Object.entries(DORA_METRICS_LABEL_MAP) as [PerformanceLevel, string][]).find(([, value]) => value === label)?.[0] diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/Overview.tsx b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/Overview.tsx index 6ca98465ee..d3cdc3f3ff 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/Overview.tsx +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/Overview.tsx @@ -1,10 +1,10 @@ -import { importComponentFromFELibrary } from '@Components/common' - import { BuildDeploymentMetrics } from './BuildDeploymentMetrics' import Glance from './Glance' import OverviewPageHeader from './OverviewPageHeader' import WorkflowOverview from './WorkflowOverview' +import { importComponentFromFELibrary } from '@Components/common' + import './styles.scss' const BestPractices = importComponentFromFELibrary('BestPractices', null, 'function') diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/constants.ts b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/constants.ts index 937af34427..582d53eb31 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/constants.ts +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/constants.ts @@ -1,9 +1,9 @@ import { getUrlWithSearchParams, MetricsInfoCardProps, ROUTER_URLS } from '@devtron-labs/devtron-fe-common-lib' -import { TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' - import { GlanceMetricKeys, WorkflowOverviewMetricKeys } from './types' +import { TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' + export const GLANCE_METRICS_CARDS_CONFIG: Record< GlanceMetricKeys, Omit diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/services.ts b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/services.ts index a31b48a5c9..66b69eca86 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/services.ts +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/services.ts @@ -1,8 +1,5 @@ import { get, getUrlWithSearchParams, MetricsInfoCardProps, useQuery } from '@devtron-labs/devtron-fe-common-lib' -import { Routes } from '@Config/constants' -import { RelativeTimeWindow, TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' - import { GLANCE_METRICS_CARDS_CONFIG, WORKFLOW_OVERVIEW_METRICS_CARDS_CONFIG } from './constants' import { AppOverviewDoraMetricsDTO, @@ -26,6 +23,9 @@ import { parseTimestampAccToWindow, } from './utils' +import { Routes } from '@Config/constants' +import { RelativeTimeWindow, TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' + export const useGetGlanceConfig = () => useQuery({ queryKey: ['glanceConfig'], @@ -120,7 +120,7 @@ export const useGetBuildDeploymentActivityDetailed = ( ), select: ({ result }) => { const triggerTrend = getActivityKindTrendFromResult(activityKind, result) - const parsedResult = triggerTrend.map((item) => ({ + const parsedResult = triggerTrend.map((item) => ({ ...item, timestampLabel: parseTimestampAccToWindow(item?.timestamp ?? '', timeWindow), })) diff --git a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/utils.ts b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/utils.ts index 735d1c1693..f5f441d1f6 100644 --- a/src/Pages-Devtron-2.0/ApplicationManagement/Overview/utils.ts +++ b/src/Pages-Devtron-2.0/ApplicationManagement/Overview/utils.ts @@ -2,8 +2,6 @@ import moment from 'moment' import { isNullOrUndefined } from '@devtron-labs/devtron-fe-common-lib' -import { TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' - import { BuildDeploymentActivityDetailedDTO, BuildDeploymentTriggerTrend, @@ -12,6 +10,8 @@ import { MetricValueDTO, } from './types' +import { TIME_WINDOW } from '@PagesDevtron2.0/Shared/types' + export const getValueStringFromMetricItem = (item: MetricValueDTO): string => { const { total, percentage } = item ?? { total: 0, percentage: 0 } @@ -71,7 +71,9 @@ export const getValueStringForDoraMetric = (overallAverage: DoraMetricAverage): export const parseTimestampAccToWindow = (timestamp: string, timeWindow: TIME_WINDOW) => { const momentObj = moment(timestamp).local() + // biome-ignore lint/suspicious/noEvolvingTypes: On switching to const the return type becomes string | string[] which causes type errors in components consuming this function let hour = null + // biome-ignore lint/suspicious/noEvolvingTypes: On switching to const the return type becomes string | string[] which causes type errors in components consuming this function let date = null switch (timeWindow) { case TIME_WINDOW.TODAY: diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/InfrastructureManagementRouter.tsx b/src/Pages-Devtron-2.0/InfrastructureManagement/InfrastructureManagementRouter.tsx index 9de872b010..88095e65c7 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/InfrastructureManagementRouter.tsx +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/InfrastructureManagementRouter.tsx @@ -3,12 +3,12 @@ import { Route, Routes } from 'react-router-dom' import { BASE_ROUTES } from '@devtron-labs/devtron-fe-common-lib' +import { InfraOverview } from './Overview' + import { importComponentFromFELibrary } from '@Components/common' import { InfraAppsRouter } from '@Components/common/navigation/NavRoutes.components' import ResourceBrowserRouter from '@Components/ResourceBrowser/ResourceBrowserRouter' -import { InfraOverview } from './Overview' - const Charts = lazy(() => import('@Components/charts/Charts')) const ResourceWatcherRouter = importComponentFromFELibrary('ResourceWatcherRouter') diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/AtAGlance.tsx b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/AtAGlance.tsx index c50c87b62a..b54e48c52d 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/AtAGlance.tsx +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/AtAGlance.tsx @@ -13,12 +13,12 @@ import { useQueryClient, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' - import { INFRA_OVERVIEW_QUERY_KEY } from './constants' import { refreshInfraOverviewCache } from './service' import { GlanceMetricsKeys, InfraOverviewAtAGlanceProps } from './types' +import { importComponentFromFELibrary } from '@Components/common' + const INFRA_OVERVIEW_QUERY_KEYS = importComponentFromFELibrary('INFRA_OVERVIEW_QUERY_KEYS', null, 'function') const InfrastructureManagementAtAGlance = ({ diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/utils.tsx b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/utils.tsx index d5c9c97ef8..7c66ef863b 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/utils.tsx +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/ClusterAndNodes/utils.tsx @@ -12,8 +12,6 @@ import { useTheme, } from '@devtron-labs/devtron-fe-common-lib' -import { ChartTooltip } from '@PagesDevtron2.0/Shared' - import { AutoscalerTypes, ClusterCapacityDistribution, @@ -34,6 +32,8 @@ import { } from './constants' import { AutoscalerTypeFilters, ClusterCapacitySortKeys, NodeErrorsFilters, NodeSchedulingTypeFilters } from './types' +import { ChartTooltip } from '@PagesDevtron2.0/Shared' + const AllocatedResource = ({ label, value }: SelectPickerOptionType) => (
{label} diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.tsx b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.tsx index fed864f38f..b31acf31b5 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.tsx +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/Overview.tsx @@ -9,14 +9,14 @@ import { ROUTER_URLS, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' - import InfrastructureManagementAtAGlance from './AtAGlance' import { ClusterAndNodes } from './ClusterAndNodes' import OverviewPageHeader from './OverviewPageHeader' import { useGetInfraOverview } from './service' import { getClusterListingUrl } from './utils' +import { importComponentFromFELibrary } from '@Components/common' + import './styles.scss' const ActionsAndInsights = importComponentFromFELibrary('ActionsAndInsights', null, 'function') diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/service.ts b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/service.ts index e5b996be3e..9603371666 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/service.ts +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/service.ts @@ -1,7 +1,5 @@ import { APIOptions, get, getUrlWithSearchParams, useQuery } from '@devtron-labs/devtron-fe-common-lib' -import { Routes } from '@Config/constants' - import { INFRA_OVERVIEW_QUERY_KEY } from './constants' import { ClusterDistributionKeys, @@ -20,6 +18,8 @@ import { getReachableClusterCount, } from './utils' +import { Routes } from '@Config/constants' + export const useGetInfraOverview = () => useQuery({ queryKey: [INFRA_OVERVIEW_QUERY_KEY], diff --git a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/utils.ts b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/utils.ts index 9b10a309d4..dc04ed8822 100644 --- a/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/utils.ts +++ b/src/Pages-Devtron-2.0/InfrastructureManagement/Overview/utils.ts @@ -33,7 +33,7 @@ export const getInfraGlanceConfig = (result: InfraOverviewDTO) => redirectionLink: ROUTER_URLS.RESOURCE_BROWSER.ROOT, metricValue: (key === GlanceMetricsKeys.REACHABLE_CLUSTERS ? getReachableClusterCount(result) - : result?.[key]?.value ?? 0 + : (result?.[key]?.value ?? 0) ).toLocaleString(), metricUnit: key === GlanceMetricsKeys.REACHABLE_CLUSTERS ? undefined : result?.[key]?.unit, valueOutOf: @@ -49,6 +49,7 @@ export const getClusterNodeHealthConfig = ( } => ({ [ClusterNodeHealthStatusKeys.CLUSTER_STATUS_BREAKDOWN]: Object.values(ClusterStatusKeys).reduce( (acc, key) => ({ + // biome-ignore lint/performance/noAccumulatingSpread: Legacy ...acc, [key]: result?.clusterStatusBreakdown?.[key] ?? 0, }), @@ -56,6 +57,7 @@ export const getClusterNodeHealthConfig = ( ), [ClusterNodeHealthStatusKeys.NODE_ERRORS_BREAKDOWN]: Object.values(NodeErrorsKeys).reduce( (acc, key) => ({ + // biome-ignore lint/performance/noAccumulatingSpread: Legacy ...acc, [key]: result?.nodeErrorBreakdown?.errorCounts?.[key] ?? 0, }), @@ -63,6 +65,7 @@ export const getClusterNodeHealthConfig = ( ), [ClusterNodeHealthStatusKeys.NODE_SCHEDULING_BREAKDOWN]: Object.values(NodeSchedulingKeys).reduce( (acc, key) => ({ + // biome-ignore lint/performance/noAccumulatingSpread: Legacy ...acc, [key]: result?.nodeSchedulingBreakdown?.[key] ?? 0, }), diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/AutoBlockedDeployments.tsx b/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/AutoBlockedDeployments.tsx index 83c452c87d..32fc65d919 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/AutoBlockedDeployments.tsx +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/AutoBlockedDeployments.tsx @@ -9,11 +9,11 @@ import { SelectPickerVariantType, } from '@devtron-labs/devtron-fe-common-lib' -import { RELATIVE_TIME_WINDOW_SELECT_OPTIONS, RelativeTimeWindow } from '@PagesDevtron2.0/Shared' - import { useGetAutoBlockedDeploymentTrend } from '../services' import { getBlockedDeploymentChartTooltip } from './utils' +import { RELATIVE_TIME_WINDOW_SELECT_OPTIONS, RelativeTimeWindow } from '@PagesDevtron2.0/Shared' + const AutoBlockedDeployments = () => { const [timeRange, setTimeRange] = useState(RelativeTimeWindow.LAST_30_DAYS) diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/utils.tsx b/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/utils.tsx index 93d861bf88..a0d3cf917c 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/utils.tsx +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/DeploymentSecurityStatus/utils.tsx @@ -1,12 +1,12 @@ import { ChartProps } from '@devtron-labs/devtron-fe-common-lib' +import { BlockedDeploymentTrend } from '../types' +import { COVERAGE_CHART_COLORS } from './CoverageMetrics' + import { ChartTooltip } from '@PagesDevtron2.0/Shared' import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' import { parseTimestampToDate } from '@PagesDevtron2.0/Shared/utils' -import { BlockedDeploymentTrend } from '../types' -import { COVERAGE_CHART_COLORS } from './CoverageMetrics' - export const getBlockedDeploymentChartTooltip: ( data: BlockedDeploymentTrend, timeRange: RelativeTimeWindow, diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/VulnerabilityTrend.tsx b/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/VulnerabilityTrend.tsx index fb6a966639..078d42fd57 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/VulnerabilityTrend.tsx +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/VulnerabilityTrend.tsx @@ -6,19 +6,19 @@ import { GenericSectionErrorState, getSelectPickerOptionByValue, ProdNonProdSelectValueTypes, + SEVERITY_LABEL_MAP, SelectPicker, SelectPickerOptionType, SelectPickerVariantType, - SEVERITY_LABEL_MAP, } from '@devtron-labs/devtron-fe-common-lib' -import { RELATIVE_TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' -import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' - import { SEVERITY_CHART_COLOR_MAP, SEVERITY_ORDER } from '../constants' import { useGetVulnerabilityTrend } from '../services' import { getVulnerabilityTrendTooltip } from './utils' +import { RELATIVE_TIME_WINDOW_SELECT_OPTIONS } from '@PagesDevtron2.0/Shared' +import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' + const VulnerabilityTrend = ({ prodNonProdValue }: { prodNonProdValue: ProdNonProdSelectValueTypes }) => { const [timeRange, setTimeRange] = useState(RelativeTimeWindow.LAST_30_DAYS) diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/utils.tsx b/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/utils.tsx index 6bbff6a753..896ee0dfec 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/utils.tsx +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/SeverityInsights/utils.tsx @@ -1,12 +1,12 @@ import { ChartColorKey, ChartProps, SEVERITY_LABEL_MAP } from '@devtron-labs/devtron-fe-common-lib' +import { SEVERITY_ORDER } from '../constants' +import { VulnerabilityTrend } from '../types' + import { ChartColorIndicator, ChartTooltip } from '@PagesDevtron2.0/Shared/components' import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' import { parseTimestampToDate } from '@PagesDevtron2.0/Shared/utils' -import { SEVERITY_ORDER } from '../constants' -import { VulnerabilityTrend } from '../types' - export const getSeverityDistributionTooltip: ( title: string, xAxisLabels: string[], diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/services.ts b/src/Pages-Devtron-2.0/SecurityCenter/Overview/services.ts index 53ff74dd5d..5e2322d216 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/services.ts +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/services.ts @@ -6,9 +6,6 @@ import { useQuery, } from '@devtron-labs/devtron-fe-common-lib' -import { Routes } from '@Config/constants' -import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' - import { SECURITY_AT_A_GLANCE_CARDS_CONFIG, SECURITY_OVERVIEW_QUERY_KEYS } from './constants' import { BlockedDeploymentTrend, @@ -30,6 +27,9 @@ import { parseSeverityDistributionDatasets, } from './utils' +import { Routes } from '@Config/constants' +import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' + export const useGetSecurityGlanceMetrics = () => useQuery({ queryKey: [SECURITY_OVERVIEW_QUERY_KEYS.SECURITY_GLANCE], diff --git a/src/Pages-Devtron-2.0/SecurityCenter/Overview/utils.ts b/src/Pages-Devtron-2.0/SecurityCenter/Overview/utils.ts index 457324eb4f..a1d7d56148 100644 --- a/src/Pages-Devtron-2.0/SecurityCenter/Overview/utils.ts +++ b/src/Pages-Devtron-2.0/SecurityCenter/Overview/utils.ts @@ -2,17 +2,17 @@ import dayjs from 'dayjs' import { ChartColorKey, - Severity, SEVERITY_LABEL_MAP, + Severity, SimpleDataset, SimpleDatasetForPie, } from '@devtron-labs/devtron-fe-common-lib' -import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' - import { SEVERITY_CHART_COLOR_MAP, SEVERITY_ORDER } from './constants' import { SecurityGlanceMetricKeys, SeverityAgeDistribution, SeverityDistribution } from './types' +import { RelativeTimeWindow } from '@PagesDevtron2.0/Shared/types' + // Sort and return only non-zero values export const parseSeverityDistribution = (severityDistribution: SeverityDistribution) => { if (!severityDistribution) { diff --git a/src/Pages/App/Configurations/WorkflowEditor/CDPipelineDeploymentAppType/CDPipelineDeploymentAppType.tsx b/src/Pages/App/Configurations/WorkflowEditor/CDPipelineDeploymentAppType/CDPipelineDeploymentAppType.tsx index 13aaef28a7..b74b192bb4 100644 --- a/src/Pages/App/Configurations/WorkflowEditor/CDPipelineDeploymentAppType/CDPipelineDeploymentAppType.tsx +++ b/src/Pages/App/Configurations/WorkflowEditor/CDPipelineDeploymentAppType/CDPipelineDeploymentAppType.tsx @@ -16,10 +16,10 @@ import { DeploymentAppTypes } from '@devtron-labs/devtron-fe-common-lib' -import { DeploymentAppRadioGroup } from '@Components/v2/values/chartValuesDiff/ChartValuesView.component' - import { CDPipelineDeploymentAppTypeProps } from './types' +import { DeploymentAppRadioGroup } from '@Components/v2/values/chartValuesDiff/ChartValuesView.component' + export const CDPipelineDeploymentAppType = ({ isVirtualEnvironment, allowedDeploymentTypes, @@ -38,7 +38,7 @@ export const CDPipelineDeploymentAppType = ({ // Want to show this when gitops module is installed, does not matter if it is configured or not (!noGitOpsModuleInstalledAndConfigured || isGitOpsInstalledButNotConfigured) && (
- {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} + {/** biome-ignore lint/a11y/noLabelWithoutControl: Legacy */} ( diff --git a/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/service.ts b/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/service.ts index 115e004a0b..ccb97d272b 100644 --- a/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/service.ts +++ b/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/service.ts @@ -25,13 +25,13 @@ import { YAMLStringify, } from '@devtron-labs/devtron-fe-common-lib' +import { CreateCICDPipelineData } from './types' + import { getCDPipelineNameSuggestion, getDeploymentStrategyList } from '@Components/cdPipeline/cdPipeline.service' import { GeneratedHelmPush } from '@Components/cdPipeline/cdPipeline.types' import { getInitData } from '@Components/ciPipeline/ciPipeline.service' import { sortObjectArrayAlphabetically } from '@Components/common' -import { CreateCICDPipelineData } from './types' - const getSavedStrategies = (strategies: DeploymentStrategy[]): SavedDeploymentStrategy[] => { if (strategies.length > 0) { const allStrategies = strategies.reduce((acc, strategy) => { diff --git a/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/utils.ts b/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/utils.ts index 399cffb78e..8824c18b89 100644 --- a/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/utils.ts +++ b/src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/utils.ts @@ -22,13 +22,13 @@ import { TriggerType, } from '@devtron-labs/devtron-fe-common-lib' +import { CreateCICDPipelineData, CreateCICDPipelineFormError } from './types' + import { GeneratedHelmPush } from '@Components/cdPipeline/cdPipeline.types' import { ValidationRules } from '@Components/ciPipeline/validationRules' import { createClusterEnvGroup, getDeploymentAppType } from '@Components/common' import { ENV_ALREADY_EXIST_ERROR } from '@Config/constants' -import { CreateCICDPipelineData, CreateCICDPipelineFormError } from './types' - export const getCiCdPipelineDefaultState = (): CreateCICDPipelineData => ({ ci: { name: '', diff --git a/src/Pages/App/CreateAppModal/AppClone/types.ts b/src/Pages/App/CreateAppModal/AppClone/types.ts index e489b45091..c62a21a61a 100644 --- a/src/Pages/App/CreateAppModal/AppClone/types.ts +++ b/src/Pages/App/CreateAppModal/AppClone/types.ts @@ -16,10 +16,10 @@ import { BaseAppMetaData, GenericInfoCardListingProps } from '@devtron-labs/devtron-fe-common-lib' -import { APP_TYPE } from '@Config/constants' - import { SidebarProps } from '../types' +import { APP_TYPE } from '@Config/constants' + export interface AppCloneListProps extends Pick { handleCloneAppClick: ({ appId, appName }: BaseAppMetaData) => void isJobView?: boolean diff --git a/src/Pages/App/CreateAppModal/AppClone/useDevtronCloneList.tsx b/src/Pages/App/CreateAppModal/AppClone/useDevtronCloneList.tsx index b5cebd4329..0ba433f3a1 100644 --- a/src/Pages/App/CreateAppModal/AppClone/useDevtronCloneList.tsx +++ b/src/Pages/App/CreateAppModal/AppClone/useDevtronCloneList.tsx @@ -21,11 +21,11 @@ import { useEffect, useRef, useState } from 'react' import { getIsRequestAborted, showError, useAsync } from '@devtron-labs/devtron-fe-common-lib' -import { APP_TYPE } from '@Config/constants' - import { fetchDevtronCloneList } from '../service' import { DevtronAppCloneListProps } from './types' +import { APP_TYPE } from '@Config/constants' + export const useDevtronCloneList = ({ handleCloneAppClick, isJobView, searchKey }: DevtronAppCloneListProps) => { const cloneListAbortControllerRef = useRef(new AbortController()) const [isLoadingMore, setIsLoadingMore] = useState(false) diff --git a/src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx b/src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx index 322ddf6b34..215d0d81ac 100644 --- a/src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx +++ b/src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx @@ -18,11 +18,6 @@ import { ChangeEvent } from 'react' import { CustomInput, TagsContainer, Textarea } from '@devtron-labs/devtron-fe-common-lib' -import ICCaretLeftSmall from '@Icons/ic-caret-left-small.svg?react' -import { importComponentFromFELibrary } from '@Components/common' -import { APP_TYPE } from '@Config/constants' -import { getAppIconWithBackground } from '@Config/utils' - import ProjectSelector from './ProjectSelector' import { ApplicationInfoFormProps, @@ -32,6 +27,11 @@ import { ProjectSelectorProps, } from './types' +import { importComponentFromFELibrary } from '@Components/common' +import { APP_TYPE } from '@Config/constants' +import { getAppIconWithBackground } from '@Config/utils' +import ICCaretLeftSmall from '@Icons/ic-caret-left-small.svg?react' + const MandatoryTagsContainer = importComponentFromFELibrary('MandatoryTagsContainer', null, 'function') const ApplicationInfoForm = ({ diff --git a/src/Pages/App/CreateAppModal/CloneApplicationSelectionList.tsx b/src/Pages/App/CreateAppModal/CloneApplicationSelectionList.tsx index 37090c51b4..e906226266 100644 --- a/src/Pages/App/CreateAppModal/CloneApplicationSelectionList.tsx +++ b/src/Pages/App/CreateAppModal/CloneApplicationSelectionList.tsx @@ -24,10 +24,6 @@ import { Progressing, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' -import { APP_TYPE } from '@Config/constants' -import { getAppIconWithBackground } from '@Config/utils' - import { AppCloneList } from './AppClone' import ApplicationInfoForm from './ApplicationInfoForm' import { @@ -38,6 +34,10 @@ import { } from './types' import UpdateTemplateConfig from './UpdateTemplateConfig' +import { importComponentFromFELibrary } from '@Components/common' +import { APP_TYPE } from '@Config/constants' +import { getAppIconWithBackground } from '@Config/utils' + const TemplateList = importComponentFromFELibrary('TemplateList', null, 'function') export const CloneApplicationSelectionList = ({ diff --git a/src/Pages/App/CreateAppModal/CreateAppModal.component.tsx b/src/Pages/App/CreateAppModal/CreateAppModal.component.tsx index 53915aa4ef..47bb2e393e 100644 --- a/src/Pages/App/CreateAppModal/CreateAppModal.component.tsx +++ b/src/Pages/App/CreateAppModal/CreateAppModal.component.tsx @@ -28,19 +28,12 @@ import { validateTagValue, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' -import { saveHostURLConfiguration } from '@Components/hostURL/hosturl.service' -import { createJob } from '@Components/Jobs/Service' -import { REQUIRED_FIELDS_MISSING } from '@Config/constants' -import { APP_COMPOSE_STAGE, getAppComposeURL } from '@Config/routes' -import { getHostURLConfiguration } from '@Services/service' - import ApplicationInfoForm from './ApplicationInfoForm' import { CloneApplicationSelectionList } from './CloneApplicationSelectionList' import { createAppInitialFormErrorState, createAppInitialFormState, PROJECT_SELECT_INPUT_ID } from './constants' import HeaderSection from './HeaderSection' -import { createApp } from './service' import Sidebar from './Sidebar' +import { createApp } from './service' import { ApplicationInfoFormProps, CreateAppFormErrorStateType, @@ -51,6 +44,13 @@ import { } from './types' import { getCreateMethodConfig, getNoItemSelectToastText, validateFormField } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import { saveHostURLConfiguration } from '@Components/hostURL/hosturl.service' +import { createJob } from '@Components/Jobs/Service' +import { REQUIRED_FIELDS_MISSING } from '@Config/constants' +import { APP_COMPOSE_STAGE, getAppComposeURL } from '@Config/routes' +import { getHostURLConfiguration } from '@Services/service' + import './styles.scss' const createDevtronAppUsingTemplate = importComponentFromFELibrary('createDevtronAppUsingTemplate', null, 'function') @@ -87,6 +87,7 @@ const CreateAppModal = ({ isJobView, handleClose }: CreateAppModalProps) => { updatedFormErrorState.name = validateFormField('name', formState.name) updatedFormErrorState.description = validateFormField('description', formState.description) + // biome-ignore lint/suspicious/noEvolvingTypes: Legacy const labelTags = [] updatedFormErrorState.tags = {} let invalidLabels = false diff --git a/src/Pages/App/CreateAppModal/HeaderSection.tsx b/src/Pages/App/CreateAppModal/HeaderSection.tsx index 4fb0d8800e..08833c8178 100644 --- a/src/Pages/App/CreateAppModal/HeaderSection.tsx +++ b/src/Pages/App/CreateAppModal/HeaderSection.tsx @@ -16,10 +16,10 @@ import { Button, ButtonStyleType, ButtonVariantType, ComponentSizeType } from '@devtron-labs/devtron-fe-common-lib' -import ICClose from '@Icons/ic-close.svg?react' - import { HeaderSectionProps } from './types' +import ICClose from '@Icons/ic-close.svg?react' + const HeaderSection = ({ isJobView, handleClose, isCloseDisabled }: HeaderSectionProps) => (

Create {isJobView ? 'Job' : 'Devtron Application'}

diff --git a/src/Pages/App/CreateAppModal/ProjectSelector.tsx b/src/Pages/App/CreateAppModal/ProjectSelector.tsx index 9fb4c7a952..6d9ae5b30a 100644 --- a/src/Pages/App/CreateAppModal/ProjectSelector.tsx +++ b/src/Pages/App/CreateAppModal/ProjectSelector.tsx @@ -22,11 +22,11 @@ import { useGetResourceKindsOptions, } from '@devtron-labs/devtron-fe-common-lib' -import ICFolderColor from '@Icons/ic-folder-color.svg?react' - import { PROJECT_SELECT_INPUT_ID } from './constants' import { CreateAppFormStateType, ProjectSelectorProps } from './types' +import ICFolderColor from '@Icons/ic-folder-color.svg?react' + const ProjectSelector = ({ selectedProjectId, handleProjectIdChange, error }: ProjectSelectorProps) => { const { isResourcesOptionsLoading, resourcesOptionsMap, resourcesOptionsError, refetchResourcesOptions } = useGetResourceKindsOptions({ diff --git a/src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx b/src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx index 5ddebbf14a..47b2e7668c 100644 --- a/src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx +++ b/src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx @@ -16,14 +16,14 @@ import { noop } from '@devtron-labs/devtron-fe-common-lib' +import { CreateAppFormStateActionType, UpdateTemplateConfigProps } from './types' +import { Workflow, WorkflowProps } from './Workflow' + import CIConfig from '@Components/ciConfig/CIConfig' import { CIConfigProps } from '@Components/ciConfig/types' import { DockerConfigOverrideKeys } from '@Components/ciPipeline/types' -import { MaterialListProps } from '@Components/material/material.types' import MaterialList from '@Components/material/MaterialList' - -import { CreateAppFormStateActionType, UpdateTemplateConfigProps } from './types' -import { Workflow, WorkflowProps } from './Workflow' +import { MaterialListProps } from '@Components/material/material.types' const parentState: CIConfigProps['parentState'] = { loadingState: null, diff --git a/src/Pages/App/CreateAppModal/Workflow/Workflow.tsx b/src/Pages/App/CreateAppModal/Workflow/Workflow.tsx index 7eff40a6e7..bdf6b5ea61 100644 --- a/src/Pages/App/CreateAppModal/Workflow/Workflow.tsx +++ b/src/Pages/App/CreateAppModal/Workflow/Workflow.tsx @@ -27,9 +27,6 @@ import { useAsync, } from '@devtron-labs/devtron-fe-common-lib' -import { getCreateWorkflows } from '@Components/app/details/triggerView/workflow.service' -import { getEnvironmentListMin } from '@Services/service' - import { HandleNodeUpdateActionProps, NodeUpdateActionType, WorkflowProps } from './types' import { getCDNodeIcon, @@ -40,6 +37,9 @@ import { getWorkflowLinkedCDNodes, } from './utils' +import { getCreateWorkflows } from '@Components/app/details/triggerView/workflow.service' +import { getEnvironmentListMin } from '@Services/service' + export const Workflow = ({ templateId, onChange, workflowIdToErrorMessageMap }: WorkflowProps) => { // STATES const [nodes, setNodes] = useState>({}) diff --git a/src/Pages/App/CreateAppModal/Workflow/types.ts b/src/Pages/App/CreateAppModal/Workflow/types.ts index 71c718c019..d8bfb28d0a 100644 --- a/src/Pages/App/CreateAppModal/Workflow/types.ts +++ b/src/Pages/App/CreateAppModal/Workflow/types.ts @@ -16,11 +16,11 @@ import { CommonNodeAttr, SelectPickerOptionType, WorkflowType } from '@devtron-labs/devtron-fe-common-lib' +import { CreateAppFormErrorStateType, CreateAppFormStateType } from '../types' + import { EnvironmentListMinType } from '@Components/app/types' import { createClusterEnvGroup } from '@Components/common' -import { CreateAppFormErrorStateType, CreateAppFormStateType } from '../types' - export interface WorkflowProps { templateId: string onChange?: ( diff --git a/src/Pages/App/CreateAppModal/Workflow/utils.tsx b/src/Pages/App/CreateAppModal/Workflow/utils.tsx index 955bc57b36..20b4d51bcf 100644 --- a/src/Pages/App/CreateAppModal/Workflow/utils.tsx +++ b/src/Pages/App/CreateAppModal/Workflow/utils.tsx @@ -18,14 +18,22 @@ import { GroupBase } from 'react-select' import { CommonNodeAttr, - getSelectPickerOptionByValue, GitProviderIcon, GraphVisualizerEdge, GraphVisualizerNode, + getSelectPickerOptionByValue, SelectPickerOptionType, WorkflowType, } from '@devtron-labs/devtron-fe-common-lib' +import { + CDNodeEnvironmentSelectPickerOptionType, + ConvertWorkflowNodesToGraphVisualizerNodesProps, + GetWorkflowGraphVisualizerNodesProps, + NodeUpdateActionType, +} from './types' + +import { createClusterEnvGroup } from '@Components/common' import ICCD from '@Icons/ic-CD.svg?react' import ICCi from '@Icons/ic-CI.svg?react' import ICCIWebhook from '@Icons/ic-CIWebhook.svg?react' @@ -35,14 +43,6 @@ import ICLinkedCD from '@Icons/ic-linked-cd.svg?react' import ICNodeBuildLinked from '@Icons/ic-node-build-linked.svg?react' import ICPaperRocket from '@Icons/ic-paper-rocket.svg?react' import ICWarning from '@Icons/ic-warning.svg?react' -import { createClusterEnvGroup } from '@Components/common' - -import { - CDNodeEnvironmentSelectPickerOptionType, - ConvertWorkflowNodesToGraphVisualizerNodesProps, - GetWorkflowGraphVisualizerNodesProps, - NodeUpdateActionType, -} from './types' const getWorkflowCDNodeEnvironments = ( environmentListOptions: ConvertWorkflowNodesToGraphVisualizerNodesProps['environmentListOptions'], @@ -310,6 +310,7 @@ export const getValidatedNodes = (nodes: Record) const validatedNodes = nodes const workflowIdToErrorMessageMap: Record = {} + // biome-ignore lint/complexity/noFlatMapIdentity: Legacy const cdNodesWithDuplicateEnv = Array.from(getEnvironmentCDNodesMap(validatedNodes).values()) .filter((cdNodes) => cdNodes.length > 1) .flatMap((node) => node) diff --git a/src/Pages/App/CreateAppModal/service.ts b/src/Pages/App/CreateAppModal/service.ts index fc9968ab64..62e517d785 100644 --- a/src/Pages/App/CreateAppModal/service.ts +++ b/src/Pages/App/CreateAppModal/service.ts @@ -16,13 +16,13 @@ import { abortPreviousRequests, post } from '@devtron-labs/devtron-fe-common-lib' +import { CloneListResponse, CloneListTypes } from './AppClone/types' + import { getJobs } from '@Components/Jobs/Service' import { APP_TYPE, Routes } from '@Config/constants' import { getAppIconWithBackground } from '@Config/utils' import { getAppListMin } from '@Services/service' -import { CloneListResponse, CloneListTypes } from './AppClone/types' - export const createApp = (request) => post(Routes.APP, request) export const fetchDevtronCloneList = async ({ diff --git a/src/Pages/App/CreateAppModal/types.ts b/src/Pages/App/CreateAppModal/types.ts index 7dff59f886..92d9f9701b 100644 --- a/src/Pages/App/CreateAppModal/types.ts +++ b/src/Pages/App/CreateAppModal/types.ts @@ -25,11 +25,11 @@ import { TagsTableColumnsType, } from '@devtron-labs/devtron-fe-common-lib' +import { getCreateMethodConfig } from './utils' + import { CIConfigProps } from '@Components/ciConfig/types' import { GitMaterialType } from '@Components/material/material.types' -import { getCreateMethodConfig } from './utils' - interface CreateAppWorkflowConfigType { cd: { pipelineId: number diff --git a/src/Pages/App/CreateAppModal/utils.tsx b/src/Pages/App/CreateAppModal/utils.tsx index 61d69459dc..88720ef8ed 100644 --- a/src/Pages/App/CreateAppModal/utils.tsx +++ b/src/Pages/App/CreateAppModal/utils.tsx @@ -18,15 +18,15 @@ import { Icon, IconsProps, SelectPickerOptionType, + ValidationResponseType, validateAppName, validateDescription, - ValidationResponseType, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' - import { CreateAppFormStateType, CreateAppModalProps, CreationMethodType } from './types' +import { importComponentFromFELibrary } from '@Components/common' + const isFELibAvailable: boolean = importComponentFromFELibrary('isFELibAvailable', null, 'function') export const validateProject = (projectId: CreateAppFormStateType['projectId']): ValidationResponseType => { diff --git a/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx b/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx index f53f6c35c5..b0e73df15d 100644 --- a/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx +++ b/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx @@ -18,9 +18,9 @@ import { useEffect, useRef, useState } from 'react' import { useParams } from 'react-router-dom' import { - abortPreviousRequests, AIAgentContextSourceType, AppType, + abortPreviousRequests, DeploymentAppTypes, ERROR_STATUS_CODE, ErrorScreenManager, @@ -39,7 +39,7 @@ import { getExternalFluxCDAppDetails } from './service' import { ExternalFluxAppDetailParams } from './types' import { getAppStatus } from './utils' -let initTimer = null +let initTimer: ReturnType = null const ExternalFluxAppDetails = () => { const { clusterId, appName, namespace, templateType } = useParams() diff --git a/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetailsRoute.tsx b/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetailsRoute.tsx index 1fef5d0388..b5c1ef38ff 100644 --- a/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetailsRoute.tsx +++ b/src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetailsRoute.tsx @@ -19,10 +19,10 @@ import { Navigate, Route, Routes } from 'react-router-dom' import { AppListConstants, Progressing, ROUTER_URLS } from '@devtron-labs/devtron-fe-common-lib' -import { URLS } from '@Config/routes' - import EAHeaderComponent from '../../../../components/v2/headers/EAHeader.component' +import { URLS } from '@Config/routes' + const ExternalFluxAppDetails = lazy(() => import('./ExternalFluxAppDetails')) const ExternalFluxAppDetailsRoute = () => ( diff --git a/src/Pages/App/Details/ExternalFlux/service.tsx b/src/Pages/App/Details/ExternalFlux/service.tsx index 4d58b93bcd..032c884a10 100644 --- a/src/Pages/App/Details/ExternalFlux/service.tsx +++ b/src/Pages/App/Details/ExternalFlux/service.tsx @@ -19,7 +19,7 @@ import { get, getUrlWithSearchParams } from '@devtron-labs/devtron-fe-common-lib import { Routes } from '../../../../config' import { GetExternalFluxCDAppDetailsParamsType } from './types' -export const getExternalFluxCDAppDetails = async ({ +export const getExternalFluxCDAppDetails = ({ clusterId, namespace, appName, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.service.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.service.ts index 45fb097a16..1a2f19afdc 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.service.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.service.ts @@ -16,9 +16,9 @@ import { AppConfigProps, + ROUTES as CommonRoutes, get, getUrlWithSearchParams, - ROUTES as CommonRoutes, trash, } from '@devtron-labs/devtron-fe-common-lib' diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.tsx index ab34e30a35..0c7ad38fb9 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/AppConfig.tsx @@ -19,6 +19,7 @@ import { generatePath, useLocation, useNavigate, useParams } from 'react-router- import { AppConfigProps, + URLS as CommonURLS, ConfirmationModal, ConfirmationModalVariantType, ErrorScreenManager, @@ -30,11 +31,9 @@ import { showError, ToastManager, ToastVariantType, - URLS as CommonURLS, useAsync, } from '@devtron-labs/devtron-fe-common-lib' -import { DeleteComponentsName } from '@Config/constantMessaging' import { ApplicationDeletionInfo } from '@Pages/Shared/ApplicationDeletionInfo/ApplicationDeletionInfo' import { importComponentFromFELibrary } from '../../../../../components/common' @@ -44,8 +43,6 @@ import { getUserRole } from '../../../../GlobalConfigurations/Authorization/auth import { UserRoleType } from '../../../../GlobalConfigurations/Authorization/constants' import { getAppConfigStatus, getEnvConfig } from '../../service' import { AppConfigStatusItemType } from '../../service.types' -import AppComposeRouter from './MainContent/AppComposeRouter' -import { AppNavigation } from './Navigation/AppNavigation' import { ENV_CONFIG_PATH_REG } from './AppConfig.constants' import { deleteApp } from './AppConfig.service' import { @@ -57,6 +54,10 @@ import { } from './AppConfig.types' import { getNavItems, isCDPipelineCreated, isCIPipelineCreated, isUnlocked } from './AppConfig.utils' import { AppConfigurationProvider } from './AppConfiguration.provider' +import AppComposeRouter from './MainContent/AppComposeRouter' +import { AppNavigation } from './Navigation/AppNavigation' + +import { DeleteComponentsName } from '@Config/constantMessaging' import './appConfig.scss' @@ -543,6 +544,7 @@ const AppConfig = ({ appName, resourceKind, filteredEnvIds, isTemplateView }: Ap fetchEnvConfig={fetchEnvConfig} isTemplateView={isTemplateView} > + {/** biome-ignore lint/complexity/noUselessFragments: Keeping to due to type of children in parent */} <>
stage === STAGE_NAME.CI_PIPELINE || @@ -322,6 +322,7 @@ export const isCDPipelineCreated = (responseArr: AppConfigStatusItemType[]) => { export const transformEnvConfig = ({ resourceConfig }: EnvConfigDTO) => { const updatedEnvConfig = resourceConfig.reduce( (acc, curr) => ({ + // biome-ignore lint/performance/noAccumulatingSpread: Legacy ...acc, deploymentTemplate: curr.type === ConfigResourceType.DeploymentTemplate ? curr : acc.deploymentTemplate, configmaps: curr.type === ConfigResourceType.ConfigMap ? [...acc.configmaps, curr] : acc.configmaps, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/AppComposeRouter.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/AppComposeRouter.tsx index 0b02ac9bf5..af32de6dae 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/AppComposeRouter.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/AppComposeRouter.tsx @@ -26,16 +26,17 @@ import { Progressing, } from '@devtron-labs/devtron-fe-common-lib' -import Next from '@Icons/ic-arrow-forward.svg?react' -import { ErrorBoundary, useAppContext } from '@Components/common' -import ExternalLinks from '@Components/externalLinks/ExternalLinks' -import { DEPLOYMENT_CONFIGURATION_RESOURCE_TYPE_ROUTE, URLS } from '@Config/index' import { ConfigMapSecretWrapper } from '@Pages/Shared/ConfigMapSecret/ConfigMapSecret.wrapper' import { NextButtonProps, STAGE_NAME } from '../AppConfig.types' import { useAppConfigurationContext } from '../AppConfiguration.provider' import { DeploymentConfigCompareWrapper } from './DeploymentConfigCompare' +import { ErrorBoundary, useAppContext } from '@Components/common' +import ExternalLinks from '@Components/externalLinks/ExternalLinks' +import { DEPLOYMENT_CONFIGURATION_RESOURCE_TYPE_ROUTE, URLS } from '@Config/index' +import Next from '@Icons/ic-arrow-forward.svg?react' + import '../appConfig.scss' const MaterialList = lazy(() => import('@Components/material/MaterialList')) diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/CompareConfigView.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/CompareConfigView.tsx index b0df1ea5e4..1c2b757828 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/CompareConfigView.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/CompareConfigView.tsx @@ -16,12 +16,12 @@ import { DeploymentHistoryDiffView, ErrorScreenManager } from '@devtron-labs/devtron-fe-common-lib' -import ICFileEdit from '@Icons/ic-file-edit.svg?react' -import { importComponentFromFELibrary } from '@Components/common' - import { CompareConfigViewProps } from './types' import { getCompareViewHistoryDiffConfigProps } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import ICFileEdit from '@Icons/ic-file-edit.svg?react' + const CompareFromApprovalSelector = importComponentFromFELibrary('CompareFromApprovalSelector', null, 'function') const CompareConfigView = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigDryRun.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigDryRun.tsx index 4f67b572f2..8461cf34cb 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigDryRun.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigDryRun.tsx @@ -17,8 +17,8 @@ import { useParams } from 'react-router-dom' import { - abortPreviousRequests, APIResponseHandler, + abortPreviousRequests, BaseURLParams, CodeEditor, DryRunEditorMode, @@ -30,15 +30,15 @@ import { useAsync, } from '@devtron-labs/devtron-fe-common-lib' -// FIXME: Placeholder icon since no sense of git merge icon as of now -import ICFileCode from '@Icons/ic-file-code.svg?react' -import ICFilePlay from '@Icons/ic-file-play.svg?react' -import { importComponentFromFELibrary } from '@Components/common' - import NoPublishedVersionEmptyState from './NoPublishedVersionEmptyState' import SelectMergeStrategy from './SelectMergeStrategy' import { ConfigDryRunProps } from './types' +import { importComponentFromFELibrary } from '@Components/common' +// FIXME: Placeholder icon since no sense of git merge icon as of now +import ICFileCode from '@Icons/ic-file-code.svg?react' +import ICFilePlay from '@Icons/ic-file-play.svg?react' + const DryRunEditorModeSelect = importComponentFromFELibrary('DryRunEditorModeSelect', null, 'function') const ConfigDryRun = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigHeader.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigHeader.tsx index 00fdf97e35..8e513f0b9e 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigHeader.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigHeader.tsx @@ -21,11 +21,11 @@ import { InvalidYAMLTippyWrapper, } from '@devtron-labs/devtron-fe-common-lib' -import ICErrorExclamation from '@Icons/ic-error-exclamation.svg?react' - import { ConfigHeaderProps, ConfigHeaderTabProps } from './types' import { getConfigHeaderTabConfig } from './utils' +import ICErrorExclamation from '@Icons/ic-error-exclamation.svg?react' + import './ConfigHeader.scss' const ConfigHeaderTab = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigToolbar.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigToolbar.tsx index 8a6d1a8c74..521d33fa2e 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigToolbar.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/ConfigToolbar.tsx @@ -32,16 +32,16 @@ import { ToggleResolveScopedVariables, } from '@devtron-labs/devtron-fe-common-lib' -import ICBookOpen from '@Icons/ic-book-open.svg?react' -import ICInfoOutlineGrey from '@Icons/ic-info-outline-grey.svg?react' -import ICMore from '@Icons/ic-more-option.svg?react' -import { importComponentFromFELibrary } from '@Components/common' - import BaseConfigurationNavigation from './BaseConfigurationNavigation' import SelectMergeStrategy from './SelectMergeStrategy' import { ConfigToolbarProps } from './types' import { PopupMenuItem } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import ICBookOpen from '@Icons/ic-book-open.svg?react' +import ICInfoOutlineGrey from '@Icons/ic-info-outline-grey.svg?react' +import ICMore from '@Icons/ic-more-option.svg?react' + const ProtectionViewTabGroup = importComponentFromFELibrary('ProtectionViewTabGroup', null, 'function') const MergePatchWithTemplateCheckbox = importComponentFromFELibrary('MergePatchWithTemplateCheckbox', null, 'function') const ConfigApproversInfoTippy = importComponentFromFELibrary('ConfigApproversInfoTippy', null, 'function') diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompare.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompare.tsx index 8a1ef46a86..c63fe04319 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompare.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompare.tsx @@ -38,7 +38,6 @@ import { } from '@devtron-labs/devtron-fe-common-lib' import { deploymentConfigDiffTabs, getDeploymentConfigDiffTabs } from '@Pages/Shared' -import { getChartReferencesForAppAndEnv, getTemplateOptions } from '@Services/service' import { BASE_CONFIGURATIONS } from '../../AppConfig.constants' import { @@ -64,6 +63,8 @@ import { parseCompareWithSearchParams, } from './utils' +import { getChartReferencesForAppAndEnv, getTemplateOptions } from '@Services/service' + export const DeploymentConfigCompare = ({ environments, appName, @@ -548,10 +549,10 @@ export const DeploymentConfigCompare = ({ type: 'string', text: compareTo || BASE_CONFIGURATIONS.name, }, - ...(((currentEnvOptions?.previousDeployments.length || + ...((((currentEnvOptions?.previousDeployments.length || appOrEnvIdToResourceApprovalConfigurationMap?.[getIdentifierForApprovalConfig(false)] ?.isApprovalApplicable) ?? - isBaseConfigProtected + isBaseConfigProtected) ? [ { id: `environment-config-type-selector-current`, @@ -591,16 +592,16 @@ export const DeploymentConfigCompare = ({ const _compareWithManifestChartRefId = chartRefId ?? (currentSearchParams.has('compareWithIdentifierId') && _isManifestView - ? compareEnvOptions.previousDeployments.find( + ? (compareEnvOptions.previousDeployments.find( (prev) => prev.wfrId === Number(currentSearchParams.get('compareWithIdentifierId')), - )?.chartRefId ?? null + )?.chartRefId ?? null) : null) const _manifestChartRefId = currentSearchParams.has('identifierId') && _isManifestView - ? currentEnvOptions.previousDeployments.find( + ? (currentEnvOptions.previousDeployments.find( (prev) => prev.wfrId === Number(currentSearchParams.get('identifierId')), - )?.chartRefId ?? null + )?.chartRefId ?? null) : null if (identifierId) { diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompareWrapper.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompareWrapper.tsx index 7a2447c63b..c1ecc74985 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompareWrapper.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/DeploymentConfigCompareWrapper.tsx @@ -19,12 +19,12 @@ import { generatePath, useLocation, useParams } from 'react-router-dom' import { EnvResourceType } from '@devtron-labs/devtron-fe-common-lib' -import { URLS } from '@Config/routes' - import { DeploymentConfigCompareProps, DeploymentConfigParams } from '../../AppConfig.types' import { DeploymentConfigCompare } from './DeploymentConfigCompare' import { DeploymentConfigCompareWrapperProps } from './types' +import { URLS } from '@Config/routes' + const DeploymentConfigCompareWrapper = ({ routePath, baseGoBackURL, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/service.utils.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/service.utils.ts index cf2c23e595..318f8f38bd 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/service.utils.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/service.utils.ts @@ -17,9 +17,9 @@ import { AppEnvDeploymentConfigDTO, AppEnvDeploymentConfigType, + GetDeploymentManifestProps, getAppEnvDeploymentConfig, getDeploymentManifest, - GetDeploymentManifestProps, ResolvedDeploymentTemplateDTO, ResponseType, TemplateListType, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/utils.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/utils.ts index c3369c123b..2f1e3f923f 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/utils.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentConfigCompare/utils.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { GroupBase, OptionsOrGroups } from 'react-select' import moment from 'moment' +import { GroupBase, OptionsOrGroups } from 'react-select' import { AppEnvDeploymentConfigDTO, @@ -25,8 +25,6 @@ import { YAMLStringify, } from '@devtron-labs/devtron-fe-common-lib' -import { Moment12HourFormat } from '@Config/constants' - import { BASE_CONFIGURATIONS } from '../../AppConfig.constants' import { AppEnvDeploymentConfigQueryParams, @@ -37,6 +35,8 @@ import { } from '../../AppConfig.types' import { SetIdentifierIdBasedOnConfigurationProps } from './types' +import { Moment12HourFormat } from '@Config/constants' + export const getPreviousDeploymentOptionValue = (identifierId: number, pipelineId?: number, chartRefId?: number) => { if (identifierId && pipelineId) { return `${AppEnvDeploymentConfigType.PREVIOUS_DEPLOYMENTS}-${identifierId}-${pipelineId}${chartRefId ? `-${chartRefId}` : ''}` @@ -295,7 +295,7 @@ export const getManifestRequestValues = (config: AppEnvDeploymentConfigDTO): { d null return { - data: _data ? YAMLStringify(_data) ?? '' : '', + data: _data ? (YAMLStringify(_data) ?? '') : '', chartRefId: getDraftConfigChartRefId(config), } } @@ -339,8 +339,8 @@ export const getIdentifierIdBasedOnConfiguration = ({ previousDeployments, }: SetIdentifierIdBasedOnConfigurationProps) => { const _identifierId = isManifestView - ? previousDeployments.find((prev) => prev.wfrId === identifierId)?.deploymentTemplateHistoryId ?? null - : previousDeployments.find((prev) => prev.deploymentTemplateHistoryId === identifierId)?.wfrId ?? null + ? (previousDeployments.find((prev) => prev.wfrId === identifierId)?.deploymentTemplateHistoryId ?? null) + : (previousDeployments.find((prev) => prev.deploymentTemplateHistoryId === identifierId)?.wfrId ?? null) return String(_identifierId) } diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx index b1661bcf6d..673082cd6d 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DTChartSelector.tsx @@ -32,13 +32,13 @@ import { versionComparatorBySortOrder, } from '@devtron-labs/devtron-fe-common-lib' -import Dropdown from '@Icons/ic-chevron-down.svg?react' -import { sortObjectArrayAlphabetically } from '@Components/common' -import { DEPLOYMENT } from '@Config/constants' - import { CHART_DOCUMENTATION_LINK, CHART_TYPE_TAB, CHART_TYPE_TAB_KEYS } from './constants' import { ChartSelectorDropdownProps, DTChartSelectorProps } from './types' +import { sortObjectArrayAlphabetically } from '@Components/common' +import { DEPLOYMENT } from '@Config/constants' +import Dropdown from '@Icons/ic-chevron-down.svg?react' + const LoadingShimmer = () =>
const ChartSelectorDropdown = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeleteOverrideDialog.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeleteOverrideDialog.tsx index cb1969b1dd..b4af77ddea 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeleteOverrideDialog.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeleteOverrideDialog.tsx @@ -24,11 +24,11 @@ import { showError, } from '@devtron-labs/devtron-fe-common-lib' -import { DeleteComponentsName } from '@Config/constantMessaging' - import { deleteOverrideDeploymentTemplate } from './service' import { DeleteOverrideDialogProps } from './types' +import { DeleteComponentsName } from '@Config/constantMessaging' + const DeleteOverrideDialog = ({ environmentConfigId, handleReload, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx index feeec87bf7..9ec4de6ad9 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx @@ -20,9 +20,9 @@ import { useParams } from 'react-router-dom' import YAML from 'yaml' import { - abortPreviousRequests, API_STATUS_CODES, AppConfigProps, + abortPreviousRequests, BASE_CONFIGURATION_ENV_ID, BaseURLParams, Button, @@ -41,8 +41,8 @@ import { DryRunEditorMode, ErrorScreenManager, FloatingVariablesSuggestions, - GenericEmptyState, GET_RESOLVED_DEPLOYMENT_TEMPLATE_EMPTY_RESPONSE, + GenericEmptyState, getIsRequestAborted, getResolvedDeploymentTemplate, logExceptionToSentry, @@ -67,12 +67,7 @@ import { YAMLStringify, } from '@devtron-labs/devtron-fe-common-lib' -import ICClose from '@Icons/ic-close.svg?react' -import ICInfoOutlineGrey from '@Icons/ic-info-outline-grey.svg?react' import deleteOverrideEmptyStateImage from '@Images/no-artifact.webp' -import { importComponentFromFELibrary } from '@Components/common' -import { getModuleInfo } from '@Components/v2/devtronStackManager/DevtronStackManager.service' -import { APP_COMPOSE_STAGE, getAppComposeURL } from '@Config/routes' import { CM_CS_DEPLOYMENT_CONFIG_FLOATING_WIDGET_BOUNDARY_GAP } from '@Pages/Shared/ConfigMapSecret/constants' import BaseConfigurationNavigation from '../BaseConfigurationNavigation' @@ -135,6 +130,12 @@ import { parseDeploymentTemplateParams, } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import { getModuleInfo } from '@Components/v2/devtronStackManager/DevtronStackManager.service' +import { APP_COMPOSE_STAGE, getAppComposeURL } from '@Config/routes' +import ICClose from '@Icons/ic-close.svg?react' +import ICInfoOutlineGrey from '@Icons/ic-info-outline-grey.svg?react' + import './DeploymentTemplate.scss' const getDraftByResourceName = importComponentFromFELibrary('getDraftByResourceName', null, 'function') @@ -1152,9 +1153,10 @@ const DeploymentTemplate = ({ * * @param skipReadmeAndSchema - true only while doing handleSave */ - const prepareDataToSave = ({ skipReadmeAndSchema = false, fromDeleteOverride = false } = {}): - | UpdateBaseDTPayloadType - | UpdateEnvironmentDTPayloadType => { + const prepareDataToSave = ({ + skipReadmeAndSchema = false, + fromDeleteOverride = false, + } = {}): UpdateBaseDTPayloadType | UpdateEnvironmentDTPayloadType => { if (!envId) { return getUpdateBaseDeploymentTemplatePayload({ state, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateCTA.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateCTA.tsx index 9bbc0db020..b831c9693f 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateCTA.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateCTA.tsx @@ -24,10 +24,10 @@ import { InvalidYAMLTippyWrapper, } from '@devtron-labs/devtron-fe-common-lib' -import ICArrowRight from '@Icons/ic-arrow-right.svg?react' - import { DeploymentTemplateCTAProps } from './types' +import ICArrowRight from '@Icons/ic-arrow-right.svg?react' + // For protect we will have a separate component const DeploymentTemplateCTA = ({ isLoading, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateForm.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateForm.tsx index 99545a6cab..a84a4ad955 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateForm.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateForm.tsx @@ -26,16 +26,16 @@ import { SelectPickerOptionType, } from '@devtron-labs/devtron-fe-common-lib' -import ICBookOpen from '@Icons/ic-book-open.svg?react' -import ICPencil from '@Icons/ic-pencil.svg?react' -import { importComponentFromFELibrary } from '@Components/common' - import { MERGE_STRATEGY_OPTIONS } from '../constants' import { APPLICATION_METRICS_DROPDOWN_OPTIONS, DEPLOYMENT_TEMPLATE_LABELS_KEYS } from './constants' import { GUIView as DeploymentTemplateGUIView } from './GUIView' import { DeploymentTemplateFormProps } from './types' import { getEditorSchemaURIFromChartNameAndVersion } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import ICBookOpen from '@Icons/ic-book-open.svg?react' +import ICPencil from '@Icons/ic-pencil.svg?react' + const ExpressEditDiffEditor = importComponentFromFELibrary('ExpressEditDiffEditor', null, 'function') const DeploymentTemplateForm = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateOptionsHeader.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateOptionsHeader.tsx index 9780b22981..6be13e75c5 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateOptionsHeader.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplateOptionsHeader.tsx @@ -15,8 +15,8 @@ */ import { - ComponentSizeType, CONFIGURATION_TYPE_OPTIONS, + ComponentSizeType, ConfigurationType, InvalidYAMLTippyWrapper, SegmentedControl, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/GUIView/GUIView.component.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/GUIView/GUIView.component.tsx index 64d7c910a8..3db184c31f 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/GUIView/GUIView.component.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/GUIView/GUIView.component.tsx @@ -14,13 +14,13 @@ * limitations under the License. */ -import { useEffect, useMemo, useRef, useState } from 'react' import { JSONPath } from 'jsonpath-plus' +import { useEffect, useMemo, useRef, useState } from 'react' import YAML from 'yaml' import { - flatMapOfJSONPaths, FormProps, + flatMapOfJSONPaths, GenericEmptyState, GUIViewError, HIDE_SUBMIT_BUTTON_UI_SCHEMA, @@ -31,15 +31,16 @@ import { ToastVariantType, } from '@devtron-labs/devtron-fe-common-lib' -import ICArrow from '@Icons/ic-arrow-forward.svg?react' -import ICWarningY5 from '@Icons/ic-warning-y5.svg?react' import EmptyFolderImage from '@Images/empty-folder.webp' -import { importComponentFromFELibrary } from '@Components/common' import { DEPLOYMENT_TEMPLATE_LABELS_KEYS, GUI_VIEW_TEXTS } from '../constants' import { GUIViewProps, GUIViewState } from './types' import { GUIInfoBlock } from './utils' +import { importComponentFromFELibrary } from '@Components/common' +import ICArrow from '@Icons/ic-arrow-forward.svg?react' +import ICWarningY5 from '@Icons/ic-warning-y5.svg?react' + const makeObjectFromJsonPathArray = importComponentFromFELibrary('makeObjectFromJsonPathArray', null, 'function') const ConfigurableGUIViewPanel = importComponentFromFELibrary('ConfigurableGUIViewPanel', null, 'function') const ConfigurableGUIViewModel = importComponentFromFELibrary('ConfigurableGUIViewModel', null, 'function') diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/service.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/service.ts index 327c151b0d..991cca91f1 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/service.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/service.ts @@ -18,9 +18,9 @@ import { APIOptions, AppConfigProps, BaseURLParams, + GetTemplateAPIRouteType, get, getTemplateAPIRoute, - GetTemplateAPIRouteType, getUrlWithSearchParams, post, put, @@ -29,9 +29,6 @@ import { versionComparatorBySortOrder, } from '@devtron-labs/devtron-fe-common-lib' -import { Routes } from '@Config/constants' -import { getChartReferencesForAppAndEnv } from '@Services/service' - import { DeploymentTemplateConfigDTO, EnvironmentOverrideDeploymentTemplateDTO, @@ -41,6 +38,9 @@ import { } from './types' import { addGUISchemaIfAbsent } from './utils' +import { Routes } from '@Config/constants' +import { getChartReferencesForAppAndEnv } from '@Services/service' + export const updateBaseDeploymentTemplate = ( request: UpdateBaseDTPayloadType, abortSignal: AbortSignal, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/types.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/types.ts index de04f6be2e..c686ffe4c8 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/types.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/types.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { SyntheticEvent } from 'react' import { Operation } from 'fast-json-patch' +import { SyntheticEvent } from 'react' import { AppConfigProps, @@ -325,6 +325,7 @@ export interface ChartSelectorDropdownProps isUnSet: boolean selectChart: ( selectedChart: DeploymentChartVersionType, + // biome-ignore lint/suspicious/noConfusingVoidType: Legacy ) => void | React.Dispatch> } diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/utils.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/utils.tsx index 33c296c568..ed3f3198b0 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/utils.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/utils.tsx @@ -28,8 +28,6 @@ import { YAMLStringify, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' - import { DEFAULT_MERGE_STRATEGY } from '../constants' import { CompareConfigViewProps, EnvOverrideEditorCommonStateType } from '../types' import { CHART_NAME_TO_DOC_SEGMENT, PROTECT_BASE_DEPLOYMENT_TEMPLATE_IDENTIFIER_DTO } from './constants' @@ -51,6 +49,8 @@ import { UpdateEnvironmentDTPayloadType, } from './types' +import { importComponentFromFELibrary } from '@Components/common' + const removeLockedKeysFromYaml = importComponentFromFELibrary('removeLockedKeysFromYaml', null, 'function') const reapplyRemovedLockedKeysToYaml = importComponentFromFELibrary('reapplyRemovedLockedKeysToYaml', null, 'function') diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/NoOverrideEmptyState.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/NoOverrideEmptyState.tsx index eb3c571729..395b306fac 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/NoOverrideEmptyState.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/NoOverrideEmptyState.tsx @@ -23,11 +23,12 @@ import { ImageType, } from '@devtron-labs/devtron-fe-common-lib' -import ICAdd from '@Icons/ic-add.svg?react' import cmCsEmptyState from '@Images/cm-cs-empty-state.png' import { NoOverrideEmptyStateProps } from './types' +import ICAdd from '@Icons/ic-add.svg?react' + import './NoOverrideEmptyState.scss' const getNoOverrideEmptyStateTitle = ({ diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx index f26c98f8c9..d033d5b209 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/SelectMergeStrategy.tsx @@ -27,11 +27,11 @@ import { Tooltip, } from '@devtron-labs/devtron-fe-common-lib' -import { importComponentFromFELibrary } from '@Components/common' - import { MERGE_STRATEGY_OPTIONS } from './constants' import { SelectMergeStrategyProps } from './types' +import { importComponentFromFELibrary } from '@Components/common' + const PatchStrategyTooltipInfo = importComponentFromFELibrary('PatchStrategyTooltipInfo', null, 'function') const isFELibAvailable = importComponentFromFELibrary('isFELibAvailable', false, 'function') diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/utils.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/utils.tsx index 91ead71ea9..95f8115e18 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/utils.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/utils.tsx @@ -22,12 +22,6 @@ import { Tooltip, } from '@devtron-labs/devtron-fe-common-lib' -import ICArrowSquareIn from '@Icons/ic-arrow-square-in.svg?react' -import ICDeleteInteractive from '@Icons/ic-delete-interactive.svg?react' -import ICFileCode from '@Icons/ic-file-code.svg?react' -import ICFilePlay from '@Icons/ic-file-play.svg?react' -import { importComponentFromFELibrary } from '@Components/common' - import { CompareConfigViewEditorConfigType, ConfigHeaderTabConfigType, @@ -35,6 +29,12 @@ import { GetConfigToolbarPopupConfigProps, } from './types' +import { importComponentFromFELibrary } from '@Components/common' +import ICArrowSquareIn from '@Icons/ic-arrow-square-in.svg?react' +import ICDeleteInteractive from '@Icons/ic-delete-interactive.svg?react' +import ICFileCode from '@Icons/ic-file-code.svg?react' +import ICFilePlay from '@Icons/ic-file-play.svg?react' + const getToggleViewLockedKeysPopupButtonConfig = importComponentFromFELibrary( 'getToggleViewLockedKeysPopupButtonConfig', null, diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx index 56119d25f0..7f1266757d 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ +import Tippy from '@tippyjs/react' import { Dispatch, MouseEvent, useEffect, useMemo, useState } from 'react' import ReactGA from 'react-ga4' import { generatePath, NavLink, useLocation, useNavigate, useParams } from 'react-router-dom' import { GroupBase, OptionsOrGroups } from 'react-select' -import Tippy from '@tippyjs/react' import { BASE_CONFIGURATION_ENV_ID, @@ -27,30 +27,31 @@ import { ButtonVariantType, CollapsibleList, CollapsibleListConfig, + URLS as CommonURLS, ComponentSizeType, EnvResourceType, getSelectPickerOptionByValue, SelectPicker, SelectPickerOptionType, SelectPickerVariantType, - URLS as CommonURLS, useMainContext, } from '@devtron-labs/devtron-fe-common-lib' -import ICAdd from '@Icons/ic-add.svg?react' -import ICArrowsLeftRight from '@Icons/ic-arrows-left-right.svg?react' -import ICBack from '@Icons/ic-caret-left-small.svg?react' -import ICFileCode from '@Icons/ic-file-code.svg?react' -import ICLocked from '@Icons/ic-locked.svg?react' -import { useAppContext } from '@Components/common' -import { DEPLOYMENT_CONFIGURATION_RESOURCE_TYPE_ROUTE } from '@Config/constants' -import { URLS } from '@Config/routes' import { ResourceConfigState } from '@Pages/Applications/DevtronApps/service.types' import { BASE_CONFIGURATIONS } from '../AppConfig.constants' import { EnvConfigObjectKey, EnvConfigRouteParams, EnvConfigType, EnvConfigurationsNavProps } from '../AppConfig.types' import { getEnvConfiguration, getNavigationPath, getUnnamedIconConfig } from './Navigation.helper' +import { useAppContext } from '@Components/common' +import { DEPLOYMENT_CONFIGURATION_RESOURCE_TYPE_ROUTE } from '@Config/constants' +import { URLS } from '@Config/routes' +import ICAdd from '@Icons/ic-add.svg?react' +import ICArrowsLeftRight from '@Icons/ic-arrows-left-right.svg?react' +import ICBack from '@Icons/ic-caret-left-small.svg?react' +import ICFileCode from '@Icons/ic-file-code.svg?react' +import ICLocked from '@Icons/ic-locked.svg?react' + // LOADING SHIMMER const ShimmerText = ({ width }: { width: string }) => (
diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx index 41d85eb8d9..20cd9fe9a8 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvironmentOverrideRouter.tsx @@ -38,8 +38,6 @@ import { ToastVariantType, } from '@devtron-labs/devtron-fe-common-lib' -import ICStamp from '@Icons/ic-stamp.svg?react' - import Add from '../../../../../../assets/icons/ic-add.svg?react' import { createClusterEnvGroup, usePrevious } from '../../../../../../components/common' import { URLS } from '../../../../../../config' @@ -48,6 +46,8 @@ import { AppConfigState, JobEnvOverrideRouteProps } from '../AppConfig.types' import { useAppConfigurationContext } from '../AppConfiguration.provider' import { renderNavItem } from './Navigation.helper' +import ICStamp from '@Icons/ic-stamp.svg?react' + const EnvOverridesHelpNote = () => (
Environment overrides allow you to manage environment specific configurations after you’ve created deployment @@ -131,7 +131,7 @@ const JobEnvOverrideRoute = ({ envOverride, ciPipelines, reload, isEnvProtected const showDeleteDialog = (pipeline): JSX.Element => { const workFlows = workflowsRes?.workflows - let workFlow + let workFlow: (typeof workFlows)[number]['tree'][number] | undefined if (pipeline) { workFlows?.forEach((workflow) => { workflow.tree.forEach((ciPipeline) => { @@ -229,6 +229,7 @@ const EnvironmentOverrideRouter = ({ getEnvironmentListMinPublic(), getCIConfig(Number(appId), isTemplateView), ]) + // biome-ignore lint/suspicious/noEvolvingTypes: Legacy const list = [] envListMinRes?.forEach((env) => { if (env.cluster_name !== 'default_cluster' && env.isClusterCdActive) { diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/Navigation.helper.tsx b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/Navigation.helper.tsx index 37d9333a3b..c06e73ad49 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/Navigation.helper.tsx +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/Navigation.helper.tsx @@ -25,8 +25,6 @@ import { ResourceIdToResourceApprovalPolicyConfigMapType, } from '@devtron-labs/devtron-fe-common-lib' -import Lock from '@Icons/ic-locked.svg?react' -import ICStamp from '@Icons/ic-stamp.svg?react' import { ResourceConfigStage, ResourceConfigState } from '@Pages/Applications/DevtronApps/service.types' import { @@ -38,6 +36,9 @@ import { } from '../AppConfig.types' import { RESOURCE_CONFIG_STATE_TO_ICON_CONFIG_MAP } from './constants' +import Lock from '@Icons/ic-locked.svg?react' +import ICStamp from '@Icons/ic-stamp.svg?react' + const renderNavItemIcon = (isLocked: boolean, isApprovalPolicyConfigured: boolean, dataTestId: string) => { if (isLocked) { return @@ -141,6 +142,7 @@ export const getEnvConfiguration = ( } => Object.keys(envConfig).reduce( (acc, curr) => ({ + // biome-ignore lint/performance/noAccumulatingSpread: Legacy ...acc, [curr]: curr === EnvConfigObjectKey.DeploymentTemplate diff --git a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/constants.ts b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/constants.ts index 2382ce0551..9d98af2cc0 100644 --- a/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/constants.ts +++ b/src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/constants.ts @@ -16,10 +16,11 @@ import { CollapsibleListItem } from '@devtron-labs/devtron-fe-common-lib' +import { ResourceConfigState } from '@Pages/Applications/DevtronApps/service.types' + import ICCheckCircleDots from '@Icons/ic-check-circle-dots.svg?react' import ICFileEdit from '@Icons/ic-file-edit.svg?react' import ICStamp from '@Icons/ic-stamp.svg?react' -import { ResourceConfigState } from '@Pages/Applications/DevtronApps/service.types' export const RESOURCE_CONFIG_STATE_TO_ICON_CONFIG_MAP: Record< ResourceConfigState, diff --git a/src/Pages/Applications/DevtronApps/service.ts b/src/Pages/Applications/DevtronApps/service.ts index 62bd6d2792..fc2bbee402 100644 --- a/src/Pages/Applications/DevtronApps/service.ts +++ b/src/Pages/Applications/DevtronApps/service.ts @@ -33,9 +33,9 @@ import { AppConfigProps, + GetTemplateAPIRouteType, get, getTemplateAPIRoute, - GetTemplateAPIRouteType, getUrlWithSearchParams, noop, ResourceKindType, @@ -43,12 +43,12 @@ import { showError, } from '@devtron-labs/devtron-fe-common-lib' -import { Routes } from '@Config/constants' - import { DEFAULT_LANDING_STAGE, EnvConfigType } from './Details/AppConfigurations/AppConfig.types' import { transformEnvConfig } from './Details/AppConfigurations/AppConfig.utils' import { AppConfigStatusItemType } from './service.types' +import { Routes } from '@Config/constants' + export const getAppConfigStatus = ( appId: number, resourceKind: ResourceKindType, diff --git a/src/Pages/ChartStore/ChartDetails/ChartDetails.tsx b/src/Pages/ChartStore/ChartDetails/ChartDetails.tsx index 67ecbe64db..49be83ad31 100644 --- a/src/Pages/ChartStore/ChartDetails/ChartDetails.tsx +++ b/src/Pages/ChartStore/ChartDetails/ChartDetails.tsx @@ -35,10 +35,6 @@ import { useUrlFilters, } from '@devtron-labs/devtron-fe-common-lib' -import { ChartSelector } from '@Components/AppSelector' -import { getChartSelectAPI } from '@Components/charts/charts.util' -import { URLS } from '@Config/routes' - import { ChartDetailsAbout } from './ChartDetailsAbout' import { ChartDetailsDeploy } from './ChartDetailsDeploy' import { ChartDetailsDeployments } from './ChartDetailsDeployments' @@ -49,6 +45,10 @@ import { fetchChartDetails, fetchChartVersions } from './services' import { ChartDetailsRouteParams, ChartDetailsSearchParams, ChartDetailsSegment } from './types' import { chartSelectorFilterOption, chartSelectorFormatOptionLabel, parseChartDetailsSearchParams } from './utils' +import { ChartSelector } from '@Components/AppSelector' +import { getChartSelectAPI } from '@Components/charts/charts.util' +import { URLS } from '@Config/routes' + import './chartDetails.scss' const pathPattern = `${ROUTER_URLS.CHART_STORE}${URLS.CHART}/:chartId` diff --git a/src/Pages/ChartStore/ChartDetails/ChartDetailsAbout.tsx b/src/Pages/ChartStore/ChartDetails/ChartDetailsAbout.tsx index abc8a0892d..a9f9334535 100644 --- a/src/Pages/ChartStore/ChartDetails/ChartDetailsAbout.tsx +++ b/src/Pages/ChartStore/ChartDetails/ChartDetailsAbout.tsx @@ -14,8 +14,8 @@ * limitations under the License. */ -import { useMemo } from 'react' import moment from 'moment' +import { useMemo } from 'react' import { Button, diff --git a/src/Pages/ChartStore/ChartDetails/ChartDetailsDeploy.tsx b/src/Pages/ChartStore/ChartDetails/ChartDetailsDeploy.tsx index 72763ff68d..0cd8527ce1 100644 --- a/src/Pages/ChartStore/ChartDetails/ChartDetailsDeploy.tsx +++ b/src/Pages/ChartStore/ChartDetails/ChartDetailsDeploy.tsx @@ -19,12 +19,12 @@ import { useParams } from 'react-router-dom' import { APIResponseHandler, useAsync } from '@devtron-labs/devtron-fe-common-lib' -import ChartValuesView from '@Components/v2/values/chartValuesDiff/ChartValuesView' -import { ChartInstalledConfig } from '@Components/v2/values/chartValuesDiff/ChartValuesView.type' - import { fetchChartValuesList } from './services' import { ChartDetailsDeployProps, ChartDetailsRouteParams } from './types' +import ChartValuesView from '@Components/v2/values/chartValuesDiff/ChartValuesView' +import { ChartInstalledConfig } from '@Components/v2/values/chartValuesDiff/ChartValuesView.type' + export const ChartDetailsDeploy = ({ chartDetails, chartVersions, selectedChartVersion }: ChartDetailsDeployProps) => { const { chartId } = useParams() diff --git a/src/Pages/ChartStore/ChartDetails/ChartDetailsDeployments.tsx b/src/Pages/ChartStore/ChartDetails/ChartDetailsDeployments.tsx index 9386e035c7..463a3d53e6 100644 --- a/src/Pages/ChartStore/ChartDetails/ChartDetailsDeployments.tsx +++ b/src/Pages/ChartStore/ChartDetails/ChartDetailsDeployments.tsx @@ -35,8 +35,6 @@ import { useAsync, } from '@devtron-labs/devtron-fe-common-lib' -import ClusterNotReachableDialog from '@Components/common/ClusterNotReachableDialog/ClusterNotReachableDialog' -import { DELETE_ACTION } from '@Config/constants' import { ApplicationDeletionInfo } from '@Pages/Shared/ApplicationDeletionInfo/ApplicationDeletionInfo' import { DEPLOYMENTS_TABLE_COLUMNS, DeploymentsTableViewWrapper } from './ChartDetailsTableComponents' @@ -49,6 +47,9 @@ import { DeploymentsTableProps, } from './types' +import ClusterNotReachableDialog from '@Components/common/ClusterNotReachableDialog/ClusterNotReachableDialog' +import { DELETE_ACTION } from '@Config/constants' + export const ChartDetailsDeployments = ({ chartIcon }: ChartDetailsDeploymentsProps) => { // STATES const [isOpenDeleteConfirmationModal, setIsOpenDeleteConfirmationModal] = useState(false) diff --git a/src/Pages/ChartStore/ChartDetails/ChartDetailsPresetValues.tsx b/src/Pages/ChartStore/ChartDetails/ChartDetailsPresetValues.tsx index 33f79d94e2..9804d593e3 100644 --- a/src/Pages/ChartStore/ChartDetails/ChartDetailsPresetValues.tsx +++ b/src/Pages/ChartStore/ChartDetails/ChartDetailsPresetValues.tsx @@ -32,8 +32,6 @@ import { useAsync, } from '@devtron-labs/devtron-fe-common-lib' -import { deleteChartValues } from '@Components/charts/charts.service' -import { URLS } from '@Config/routes' import { ApplicationDeletionInfo } from '@Pages/Shared/ApplicationDeletionInfo/ApplicationDeletionInfo' import { @@ -50,6 +48,9 @@ import { PresetValuesTableProps, } from './types' +import { deleteChartValues } from '@Components/charts/charts.service' +import { URLS } from '@Config/routes' + const renderEmptyStateButton = (path: string) => () => ( -
+
+
{list.lastUsedAt ? moment(list.lastUsedAt).format( diff --git a/src/Pages/GlobalConfigurations/Authorization/APITokens/ApiTokens.component.tsx b/src/Pages/GlobalConfigurations/Authorization/APITokens/ApiTokens.component.tsx index e4d3d5f515..e54fff242b 100644 --- a/src/Pages/GlobalConfigurations/Authorization/APITokens/ApiTokens.component.tsx +++ b/src/Pages/GlobalConfigurations/Authorization/APITokens/ApiTokens.component.tsx @@ -28,8 +28,8 @@ import { import emptyGeneratToken from '@Images/ic-empty-generate-token.png' -import { TokenListType } from './apiToken.type' import APITokenList from './APITokenList' +import { TokenListType } from './apiToken.type' import CreateAPIToken from './CreateAPIToken' import EditAPIToken from './EditAPIToken' import { getGeneratedAPITokenList } from './service' diff --git a/src/Pages/GlobalConfigurations/Authorization/APITokens/CreateAPIToken.tsx b/src/Pages/GlobalConfigurations/Authorization/APITokens/CreateAPIToken.tsx index 8f9c149c1f..c63adb0892 100644 --- a/src/Pages/GlobalConfigurations/Authorization/APITokens/CreateAPIToken.tsx +++ b/src/Pages/GlobalConfigurations/Authorization/APITokens/CreateAPIToken.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ +import dayjs from 'dayjs' /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable jsx-a11y/label-has-associated-control */ import { useEffect, useState } from 'react' import { useNavigate } from 'react-router-dom' -import dayjs from 'dayjs' import { CustomInput, @@ -31,7 +31,7 @@ import { useMainContext, } from '@devtron-labs/devtron-fe-common-lib' -import Error from '../../../../assets/icons/ic-warning.svg?react' +import ErrorIcon from '../../../../assets/icons/ic-warning.svg?react' import { importComponentFromFELibrary } from '../../../../components/common' import { REQUIRED_FIELDS_MISSING } from '../../../../config' import { API_COMPONENTS } from '../../../../config/constantMessaging' @@ -259,9 +259,9 @@ const CreateAPIToken = ({
- + {API_COMPONENTS.NEW_API_TITLE}
{renderQuestionwithTippy()} @@ -297,7 +297,7 @@ const CreateAPIToken = ({
{formData.dateType === 'Custom' && formDataErrorObj.invalidCustomDate && ( - + {/* eslint-disable-next-line react/no-unescaped-entities */} Custom expiration can't be blank. Please select a date. diff --git a/src/Pages/GlobalConfigurations/Authorization/APITokens/DeleteAPITokenModal.tsx b/src/Pages/GlobalConfigurations/Authorization/APITokens/DeleteAPITokenModal.tsx index 403610c3ce..76c2670a24 100644 --- a/src/Pages/GlobalConfigurations/Authorization/APITokens/DeleteAPITokenModal.tsx +++ b/src/Pages/GlobalConfigurations/Authorization/APITokens/DeleteAPITokenModal.tsx @@ -18,11 +18,11 @@ import { useNavigate } from 'react-router-dom' import { DeleteConfirmationModal, ROUTER_URLS } from '@devtron-labs/devtron-fe-common-lib' -import { DeleteComponentsName } from '@Config/constantMessaging' - import { DeleteAPITokenModalProps } from './apiToken.type' import { deleteGeneratedAPIToken } from './service' +import { DeleteComponentsName } from '@Config/constantMessaging' + const DeleteAPITokenModal = ({ isEditView, tokenData, reload, setDeleteConfirmation }: DeleteAPITokenModalProps) => { const navigate = useNavigate() diff --git a/src/Pages/GlobalConfigurations/Authorization/APITokens/EditAPIToken.tsx b/src/Pages/GlobalConfigurations/Authorization/APITokens/EditAPIToken.tsx index 08996a41f5..cc80fe1ac2 100644 --- a/src/Pages/GlobalConfigurations/Authorization/APITokens/EditAPIToken.tsx +++ b/src/Pages/GlobalConfigurations/Authorization/APITokens/EditAPIToken.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ +import dayjs from 'dayjs' +import moment from 'moment' /* eslint-disable jsx-a11y/label-has-associated-control */ import React, { useEffect, useMemo, useState } from 'react' import { useNavigate, useParams } from 'react-router-dom' -import dayjs from 'dayjs' -import moment from 'moment' import { API_STATUS_CODES, @@ -207,9 +207,9 @@ const EditAPIToken = ({
- + {API_COMPONENTS.EDIT_API_TITLE}
{renderQuestionwithTippy()} @@ -247,6 +247,7 @@ const EditAPIToken = ({ error={invalidDescription ? 'Max 350 characters allowed.' : null} /> {!!editData?.token?.length && ( + // biome-ignore lint/a11y/noLabelWithoutControl: Legacy