Skip to content

Commit 4a228d0

Browse files
Merge pull request #2673 from devtron-labs/rc-merge/v0.34.0
chore: merge rc-v0.34.0
2 parents 4c18929 + b21057a commit 4a228d0

File tree

499 files changed

+4137
-2776
lines changed

Some content is hidden

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

499 files changed

+4137
-2776
lines changed

.eslintrc.js

+23-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17+
const tsconfigPath = require('./tsconfig.json')
18+
1719
module.exports = {
1820
parser: '@typescript-eslint/parser',
19-
plugins: ['@typescript-eslint', 'react', 'prettier', 'import'],
21+
plugins: ['@typescript-eslint', 'react', 'prettier', 'import', 'simple-import-sort'],
2022
env: {
2123
browser: true,
2224
es2021: true,
@@ -112,6 +114,26 @@ module.exports = {
112114
'import/named': 'off',
113115
'no-use-before-define': 'off',
114116
'@typescript-eslint/no-use-before-define': 'error',
117+
'simple-import-sort/imports': [
118+
'error',
119+
{
120+
groups: [
121+
// Packages `react` related packages and external packages.
122+
['^react', '^@?\\w'],
123+
// Devtron packages
124+
['^@devtron-labs'],
125+
// Internal packages.
126+
[...Object.keys(tsconfigPath.compilerOptions.paths).map((alias) => alias.replace('/*', ''))],
127+
// Side effect imports.
128+
['^\\u0000'],
129+
// Put same-folder imports, `..` and `.` last. Other relative imports.
130+
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$',],
131+
// Style imports.
132+
[ '^.+\\.?(css|scss)$'],
133+
],
134+
},
135+
],
136+
'simple-import-sort/exports': 'error',
115137
},
116138
overrides: [
117139
{

config.md

+4
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,9 @@
4545
| TRIGGER_API_TIMEOUT | 60000 | Default timeout for all API requests for Trigger calls (Deploy artifacts, charts) in DASHBOARD |
4646
| FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS | "true" | Would hide the user direct permissions for non-super admin users in User Permissions |
4747
| FEATURE_ACTION_AUDIOS_ENABLE | true | Would enable audios in dashboard |
48+
| FEATURE_EXTERNAL_FLUX_CD_ENABLE | false | To enable flux cd option in app list page |
49+
| FEATURE_BULK_RESTART_WORKLOADS_FROM_RB | deployment,rollout,daemonset,statefulset | Enables the bulk operations in the resource browser for specific workload type. |
50+
| FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE | false | If enabled user can pass the manual gitops repo |
51+
| SENTRY_RELEASE_VERSION | | Sentry release Version |
4852

4953
# DASHBOARD CONFIG SECRET

nginx.conf

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ http {
1919
sendfile on;
2020
#tcp_nopush on;
2121
keepalive_timeout 65;
22+
2223
gzip on;
24+
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
25+
gzip_vary on;
26+
gzip_min_length 1024;
27+
gzip_proxied any;
28+
gzip_comp_level 6;
29+
gzip_static on;
30+
2331
include /etc/nginx/conf.d/*.conf;
2432
}

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "1.11.2",
7+
"@devtron-labs/devtron-fe-common-lib": "1.12.0",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -42,7 +42,7 @@
4242
"rxjs": "^7.5.4",
4343
"sockjs-client": "1.6.1",
4444
"tippy.js": "^6.3.7",
45-
"vite": "5.4.14",
45+
"vite": "5.4.17",
4646
"vite-plugin-require-transform": "1.0.21",
4747
"vite-plugin-svgr": "^2.4.0",
4848
"xterm": "^4.19.0",
@@ -111,6 +111,7 @@
111111
"eslint-plugin-prettier": "^5.1.2",
112112
"eslint-plugin-react": "^7.33.2",
113113
"eslint-plugin-react-hooks": "^4.6.0",
114+
"eslint-plugin-simple-import-sort": "^12.1.1",
114115
"eslint-plugin-storybook": "^0.8.0",
115116
"husky": "^7.0.4",
116117
"jest-extended": "^2.0.0",
@@ -129,6 +130,7 @@
129130
"ts-jest": "29.2.5",
130131
"ts-node": "10.9.2",
131132
"typescript": "5.5.4",
133+
"vite-plugin-compression2": "^1.3.3",
132134
"vite-plugin-image-optimizer": "^1.1.8",
133135
"vite-plugin-pwa": "^0.21.1",
134136
"vite-tsconfig-paths": "5.0.1"

src/Pages/App/CreateAppModal/AppToCloneSelector.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { useState } from 'react'
18+
1719
import {
1820
AppSelectorNoOptionsMessage as appSelectorNoOptionsMessage,
1921
ComponentSizeType,
2022
InfoBlock,
2123
SelectPicker,
2224
SelectPickerProps,
2325
} from '@devtron-labs/devtron-fe-common-lib'
26+
2427
import { appListOptions } from '@Components/AppSelector/AppSelectorUtil'
25-
import { useState } from 'react'
28+
2629
import { AppToCloneSelectorProps } from './types'
2730

2831
const AppToCloneSelector = ({ isJobView, error, handleCloneIdChange }: AppToCloneSelectorProps) => {

src/Pages/App/CreateAppModal/ApplicationInfoForm.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { ChangeEvent } from 'react'
18+
1719
import { CustomInput, TagsContainer, Textarea } from '@devtron-labs/devtron-fe-common-lib'
18-
import { ReactComponent as ICDevtronApp } from '@Icons/ic-devtron-app.svg'
20+
1921
import { ReactComponent as ICCaretLeftSmall } from '@Icons/ic-caret-left-small.svg'
20-
import { ChangeEvent } from 'react'
22+
import { ReactComponent as ICDevtronApp } from '@Icons/ic-devtron-app.svg'
2123
import { importComponentFromFELibrary } from '@Components/common'
2224
import { APP_TYPE } from '@Config/constants'
25+
26+
import AppToCloneSelector from './AppToCloneSelector'
2327
import ProjectSelector from './ProjectSelector'
2428
import {
2529
ApplicationInfoFormProps,
@@ -29,7 +33,6 @@ import {
2933
HandleFormStateChangeParamsType,
3034
ProjectSelectorProps,
3135
} from './types'
32-
import AppToCloneSelector from './AppToCloneSelector'
3336

3437
const MandatoryTagsContainer = importComponentFromFELibrary('MandatoryTagsContainer', null, 'function')
3538

src/Pages/App/CreateAppModal/CreateAppModal.component.tsx

+15-13
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { useEffect, useMemo, useState } from 'react'
18+
import { useHistory } from 'react-router-dom'
19+
1720
import {
1821
Button,
1922
ButtonStyleType,
@@ -28,17 +31,21 @@ import {
2831
validateTagKeyValue,
2932
validateTagValue,
3033
} from '@devtron-labs/devtron-fe-common-lib'
31-
import { useEffect, useMemo, useState } from 'react'
32-
import { getHostURLConfiguration } from '@Services/service'
34+
35+
import { ReactComponent as ICAppTemplate } from '@Icons/ic-app-template.svg'
36+
import { ReactComponent as ICBack } from '@Icons/ic-caret-left-small.svg'
37+
import { importComponentFromFELibrary } from '@Components/common'
3338
import { saveHostURLConfiguration } from '@Components/hostURL/hosturl.service'
3439
import { createJob } from '@Components/Jobs/Service'
35-
import { APP_COMPOSE_STAGE, getAppComposeURL, URLS } from '@Config/routes'
36-
import { useHistory } from 'react-router-dom'
3740
import { REQUIRED_FIELDS_MISSING } from '@Config/constants'
38-
import { importComponentFromFELibrary } from '@Components/common'
39-
import { ReactComponent as ICBack } from '@Icons/ic-caret-left-small.svg'
40-
import { ReactComponent as ICAppTemplate } from '@Icons/ic-app-template.svg'
41+
import { APP_COMPOSE_STAGE, getAppComposeURL, URLS } from '@Config/routes'
42+
import { getHostURLConfiguration } from '@Services/service'
4143

44+
import ApplicationInfoForm from './ApplicationInfoForm'
45+
import { createAppInitialFormErrorState, createAppInitialFormState } from './constants'
46+
import HeaderSection from './HeaderSection'
47+
import { createApp } from './service'
48+
import Sidebar from './Sidebar'
4249
import {
4350
ApplicationInfoFormProps,
4451
CreateAppFormErrorStateType,
@@ -47,13 +54,8 @@ import {
4754
CreateAppModalProps,
4855
CreationMethodType,
4956
} from './types'
50-
import { createAppInitialFormErrorState, createAppInitialFormState } from './constants'
51-
import { getCreateMethodConfig, validateAppName, validateCloneApp, validateProject } from './utils'
52-
import { createApp } from './service'
53-
import ApplicationInfoForm from './ApplicationInfoForm'
54-
import HeaderSection from './HeaderSection'
55-
import Sidebar from './Sidebar'
5657
import UpdateTemplateConfig from './UpdateTemplateConfig'
58+
import { getCreateMethodConfig, validateAppName, validateCloneApp, validateProject } from './utils'
5759

5860
import './styles.scss'
5961

src/Pages/App/CreateAppModal/HeaderSection.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
import { Button, ButtonStyleType, ButtonVariantType, ComponentSizeType } from '@devtron-labs/devtron-fe-common-lib'
18+
1819
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
20+
1921
import { HeaderSectionProps } from './types'
2022

2123
const HeaderSection = ({ isJobView, handleClose, isCloseDisabled }: HeaderSectionProps) => (

src/Pages/App/CreateAppModal/ProjectSelector.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ import {
2121
SelectPickerProps,
2222
useGetResourceKindsOptions,
2323
} from '@devtron-labs/devtron-fe-common-lib'
24+
2425
import { ReactComponent as ICFolderColor } from '@Icons/ic-folder-color.svg'
26+
2527
import { CreateAppFormStateType, ProjectSelectorProps } from './types'
2628

2729
const ProjectSelector = ({ selectedProjectId, handleProjectIdChange, error }: ProjectSelectorProps) => {

src/Pages/App/CreateAppModal/Sidebar.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
import { ModalSidebarPanel } from '@devtron-labs/devtron-fe-common-lib'
18+
1819
import { DOCUMENTATION } from '@Config/constants'
20+
1921
import { CreationMethodType, SidebarProps } from './types'
2022

2123
const Sidebar = ({

src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
import { noop } from '@devtron-labs/devtron-fe-common-lib'
1818

19-
import MaterialList from '@Components/material/MaterialList'
2019
import CIConfig from '@Components/ciConfig/CIConfig'
2120
import { CIConfigProps } from '@Components/ciConfig/types'
2221
import { DockerConfigOverrideKeys } from '@Components/ciPipeline/types'
2322
import { MaterialListProps } from '@Components/material/material.types'
23+
import MaterialList from '@Components/material/MaterialList'
2424

25-
import { Workflow, WorkflowProps } from './Workflow'
2625
import { CreateAppFormStateActionType, UpdateTemplateConfigProps } from './types'
26+
import { Workflow, WorkflowProps } from './Workflow'
2727

2828
const parentState: CIConfigProps['parentState'] = {
2929
loadingState: null,

src/Pages/App/CreateAppModal/Workflow/Workflow.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { useEffect, useState } from 'react'
18+
1819
import {
1920
APIResponseHandler,
2021
GenericEmptyState,
@@ -29,6 +30,7 @@ import {
2930
import { getCreateWorkflows } from '@Components/app/details/triggerView/workflow.service'
3031
import { getEnvironmentListMin } from '@Services/service'
3132

33+
import { HandleNodeUpdateActionProps, NodeUpdateActionType, WorkflowProps } from './types'
3234
import {
3335
getCDNodeIcon,
3436
getPipelineIdFromNodeId,
@@ -37,7 +39,6 @@ import {
3739
getWorkflowGraphVisualizerNodes,
3840
getWorkflowLinkedCDNodes,
3941
} from './utils'
40-
import { HandleNodeUpdateActionProps, NodeUpdateActionType, WorkflowProps } from './types'
4142

4243
export const Workflow = ({ templateId, onChange, workflowIdToErrorMessageMap }: WorkflowProps) => {
4344
// STATES

src/Pages/App/CreateAppModal/Workflow/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
* limitations under the License.
1515
*/
1616

17-
export * from './Workflow'
1817
export type { WorkflowProps } from './types'
18+
export * from './Workflow'

src/Pages/App/CreateAppModal/Workflow/utils.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ import {
2626
WorkflowType,
2727
} from '@devtron-labs/devtron-fe-common-lib'
2828

29-
import { ReactComponent as ICCi } from '@Icons/ic-CI.svg'
3029
import { ReactComponent as ICCD } from '@Icons/ic-CD.svg'
30+
import { ReactComponent as ICCi } from '@Icons/ic-CI.svg'
3131
import { ReactComponent as ICCIWebhook } from '@Icons/ic-CIWebhook.svg'
32-
import { ReactComponent as ICNodeBuildLinked } from '@Icons/ic-node-build-linked.svg'
33-
import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
32+
import { ReactComponent as ICError } from '@Icons/ic-error.svg'
3433
import { ReactComponent as ICJobNode } from '@Icons/ic-job-node.svg'
3534
import { ReactComponent as ICLinkedCD } from '@Icons/ic-linked-cd.svg'
35+
import { ReactComponent as ICNodeBuildLinked } from '@Icons/ic-node-build-linked.svg'
3636
import { ReactComponent as ICPaperRocket } from '@Icons/ic-paper-rocket.svg'
37-
import { ReactComponent as ICError } from '@Icons/ic-error.svg'
37+
import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
3838
import { createClusterEnvGroup } from '@Components/common'
3939

4040
import {

src/Pages/App/CreateAppModal/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { getEmptyTagTableRow } from '@devtron-labs/devtron-fe-common-lib'
18+
1819
import { CreateAppFormErrorStateType, CreateAppFormStateType } from './types'
1920

2021
export const createAppInitialFormState: CreateAppFormStateType = {

src/Pages/App/CreateAppModal/service.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { post } from '@devtron-labs/devtron-fe-common-lib'
18+
1819
import { Routes } from '@Config/constants'
1920

2021
export const createApp = (request) => post(Routes.APP, request)

src/Pages/App/CreateAppModal/types.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { SyntheticEvent } from 'react'
18+
1719
import {
1820
ButtonProps,
1921
DynamicDataTableCellErrorType,
2022
DynamicDataTableRowType,
2123
SelectPickerProps,
2224
TagsTableColumnsType,
2325
} from '@devtron-labs/devtron-fe-common-lib'
24-
import { SyntheticEvent } from 'react'
25-
import { GitMaterialType } from '@Components/material/material.types'
26+
2627
import { CIConfigProps } from '@Components/ciConfig/types'
28+
import { GitMaterialType } from '@Components/material/material.types'
29+
2730
import { getCreateMethodConfig } from './utils'
2831

2932
interface CreateAppWorkflowConfigType {

src/Pages/App/CreateAppModal/utils.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { MAX_LENGTH_30 } from '@Config/constantMessaging'
18-
import { PATTERNS } from '@Config/constants'
1917
import { Icon, IconsProps, SelectPickerOptionType, ValidationResponseType } from '@devtron-labs/devtron-fe-common-lib'
18+
2019
import { importComponentFromFELibrary } from '@Components/common'
20+
import { MAX_LENGTH_30 } from '@Config/constantMessaging'
21+
import { PATTERNS } from '@Config/constants'
22+
2123
import { CreateAppFormStateType, CreateAppModalProps, CreationMethodType } from './types'
2224

2325
const isFELibAvailable: boolean = importComponentFromFELibrary('isFELibAvailable', null, 'function')

src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx

+12-10
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,27 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { useEffect, useState } from 'react'
18+
import { useParams } from 'react-router-dom'
19+
1720
import {
1821
AppType,
22+
DeploymentAppTypes,
23+
ERROR_STATUS_CODE,
1924
ErrorScreenManager,
2025
IndexStore,
21-
useMainContext,
22-
DeploymentAppTypes,
23-
showError,
24-
ResponseType,
2526
noop,
26-
ERROR_STATUS_CODE,
27+
ResponseType,
28+
showError,
29+
useMainContext,
2730
} from '@devtron-labs/devtron-fe-common-lib'
28-
import { useEffect, useState } from 'react'
29-
import { useParams } from 'react-router-dom'
30-
import { ExternalFluxAppDetailParams } from './types'
31-
import { getExternalFluxCDAppDetails } from './service'
31+
3232
import { FluxCDTemplateType } from '../../../../components/app/list-new/AppListType'
3333
import AppDetailsComponent from '../../../../components/v2/appDetails/AppDetails.component'
34-
import { getAppStatus } from './utils'
3534
import { AppDetails } from '../../../../components/v2/appDetails/appDetails.type'
35+
import { getExternalFluxCDAppDetails } from './service'
36+
import { ExternalFluxAppDetailParams } from './types'
37+
import { getAppStatus } from './utils'
3638

3739
let initTimer = null
3840

0 commit comments

Comments
 (0)