Skip to content

Commit edd0acf

Browse files
committed
Merge branch 'develop' of https://github.com/devtron-labs/dashboard into fix-ng-changes-develop-sync
2 parents 24ed78d + c8b013d commit edd0acf

File tree

628 files changed

+9851
-6540
lines changed

Some content is hidden

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

628 files changed

+9851
-6540
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ FEATURE_CLUSTER_MAP_ENABLE=true
6161
FEATURE_DEFAULT_LANDING_RB_ENABLE=false
6262
FEATURE_ACTION_AUDIOS_ENABLE=true
6363
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
64-
FEATURE_CODE_MIRROR_ENABLE=false
65-
FEATURE_EXPERIMENTAL_THEMING_ENABLE=true
64+
FEATURE_CODE_MIRROR_ENABLE=true
6665
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6766
GATEKEEPER_URL=https://license.devtron.ai/dashboard
67+
FEATURE_AI_INTEGRATION_ENABLE=false

.eslintignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ src/components/ApplicationGroup/SearchBar.tsx
3636
src/components/CIPipelineN/AdvancedConfigOptions.tsx
3737
src/components/CIPipelineN/Build.tsx
3838
src/components/CIPipelineN/CIPipeline.tsx
39-
src/components/CIPipelineN/ConditionContainer.tsx
4039
src/components/CIPipelineN/CustomImageTags.tsx
4140
src/components/CIPipelineN/CustomInputOutputVariables.tsx
4241
src/components/CIPipelineN/CustomInputVariableSelect.tsx
@@ -86,7 +85,6 @@ src/components/app/create/CreateApp.tsx
8685
src/components/app/create/validationRules.ts
8786
src/components/app/details/AboutAppInfoModal.tsx
8887
src/components/app/details/AboutTagEditModal.tsx
89-
src/components/app/details/AppHeader.tsx
9088
src/components/app/details/appDetails/AppMetrics.tsx
9189
src/components/app/details/appDetails/AppStatusCard.tsx
9290
src/components/app/details/appDetails/DeploymentStatusDetailModal.tsx
@@ -385,7 +383,6 @@ src/components/v2/values/chartValuesDiff/ProjectUpdateModal.tsx
385383
src/components/v2/values/common/chartValues.api.ts
386384
src/components/workflowEditor/CDSuccessModal.tsx
387385
src/components/workflowEditor/CreateWorkflow.tsx
388-
src/components/workflowEditor/DeprecatedPipelineWarning.tsx
389386
src/components/workflowEditor/DeprecatedWarningModal.tsx
390387
src/components/workflowEditor/EmptyWorkflow.tsx
391388
src/components/workflowEditor/NoGitOpsConfiguredWarning.tsx

.eslintrc.js

Lines changed: 23 additions & 1 deletion
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
{

.storybook/preview.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
useTheme,
1515
} from '@devtron-labs/devtron-fe-common-lib'
1616
import { SwitchThemeDialog } from '../src/Pages/Shared'
17+
import './storybook.css'
1718

1819
const SwitchThemeDialogWrapper = () => {
1920
const { showThemeSwitcherDialog, themePreference, handleThemeSwitcherDialogVisibilityChange } = useTheme()
@@ -22,7 +23,7 @@ const SwitchThemeDialogWrapper = () => {
2223
}
2324

2425
return (
25-
showThemeSwitcherDialog ? <SwitchThemeDialog initialThemePreference={themePreference} handleClose={handleClose} disableAPICalls /> : null
26+
showThemeSwitcherDialog ? <SwitchThemeDialog initialThemePreference={themePreference} handleClose={handleClose} disableAPICalls handleUpdateUserThemePreference={noop} /> : null
2627
)
2728
}
2829

@@ -37,9 +38,7 @@ const preview: Preview = {
3738
},
3839
decorators: (Story) => {
3940
if (!window._env_) {
40-
window._env_ = {
41-
FEATURE_EXPERIMENTAL_THEMING_ENABLE: true,
42-
} as customEnv
41+
window._env_ = {} as customEnv
4342
}
4443

4544
return (
@@ -58,6 +57,7 @@ const preview: Preview = {
5857
<SwitchThemeDialogWrapper />
5958

6059
<div id="animated-dialog-backdrop" />
60+
<div id="visible-modal" />
6161

6262
<BaseConfirmationModal />
6363
</ConfirmationModalProvider>

.storybook/storybook.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background: var(--bg-primary);
3+
}

config.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +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_EXPERIMENTAL_THEMING_ENABLE | true | Would enable theming 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 |
4952

5053
# DASHBOARD CONFIG SECRET

nginx.conf

Lines changed: 8 additions & 0 deletions
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

Lines changed: 5 additions & 10 deletions
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.10.0-patch-8-ng",
7+
"@devtron-labs/devtron-fe-common-lib": "1.12.0-pre-8",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",
@@ -23,8 +23,6 @@
2323
"flexsearch": "^0.6.32",
2424
"jsonpath-plus": "^10.3.0",
2525
"moment": "^2.29.4",
26-
"monaco-editor": "0.44.0",
27-
"monaco-yaml": "5.1.1",
2826
"query-string": "^7.1.1",
2927
"react": "^17.0.2",
3028
"react-csv": "^2.2.2",
@@ -33,7 +31,6 @@
3331
"react-ga4": "^1.4.1",
3432
"react-gtm-module": "^2.0.11",
3533
"react-mde": "^11.5.0",
36-
"react-monaco-editor": "^0.55.0",
3734
"react-router-dom": "^5.3.4",
3835
"react-select": "5.8.0",
3936
"react-virtualized": "^9.22.5",
@@ -42,7 +39,7 @@
4239
"rxjs": "^7.5.4",
4340
"sockjs-client": "1.6.1",
4441
"tippy.js": "^6.3.7",
45-
"vite": "5.4.14",
42+
"vite": "5.4.17",
4643
"vite-plugin-require-transform": "1.0.21",
4744
"vite-plugin-svgr": "^2.4.0",
4845
"xterm": "^4.19.0",
@@ -111,6 +108,7 @@
111108
"eslint-plugin-prettier": "^5.1.2",
112109
"eslint-plugin-react": "^7.33.2",
113110
"eslint-plugin-react-hooks": "^4.6.0",
111+
"eslint-plugin-simple-import-sort": "^12.1.1",
114112
"eslint-plugin-storybook": "^0.8.0",
115113
"husky": "^7.0.4",
116114
"jest-extended": "^2.0.0",
@@ -129,6 +127,7 @@
129127
"ts-jest": "29.2.5",
130128
"ts-node": "10.9.2",
131129
"typescript": "5.5.4",
130+
"vite-plugin-compression2": "^1.3.3",
132131
"vite-plugin-image-optimizer": "^1.1.8",
133132
"vite-plugin-pwa": "^0.21.1",
134133
"vite-tsconfig-paths": "5.0.1"
@@ -145,11 +144,7 @@
145144
],
146145
"setupFilesAfterEnv": [
147146
"jest-extended"
148-
],
149-
"moduleNameMapper": {
150-
"monaco-editor": "<rootDir>/node_modules/react-monaco-editor",
151-
"monaco-yaml": "<rootDir>/node_modules/react-monaco-editor"
152-
}
147+
]
153148
},
154149
"resolutions": {
155150
"nanoid": "^3.3.8",

src/App.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ import {
4242
} from './components/common'
4343
import { UPDATE_AVAILABLE_TOAST_PROGRESS_BG, URLS } from './config'
4444
import { validateToken } from './services/service'
45+
import ActivateLicense from '@Pages/License/ActivateLicense'
4546

4647
const NavigationRoutes = lazy(() => import('./components/common/navigation/NavigationRoutes'))
4748
const Login = lazy(() => import('./components/login/Login'))
4849
const GenericDirectApprovalModal = importComponentFromFELibrary('GenericDirectApprovalModal')
49-
const ActivateLicense = importComponentFromFELibrary('ActivateLicense', null, 'function')
5050

5151
export default function App() {
5252
const onlineToastRef = useRef(null)
@@ -160,7 +160,6 @@ export default function App() {
160160
}
161161

162162
useEffect(() => {
163-
164163
if (navigator.serviceWorker) {
165164
navigator.serviceWorker.addEventListener('controllerchange', handleControllerChange)
166165
}
@@ -328,7 +327,7 @@ export default function App() {
328327
<div className="full-height-width bg__tertiary">
329328
<Reload />
330329
</div>
331-
) : (
330+
) : (
332331
<ErrorBoundary>
333332
<BreadcrumbStore>
334333
<Switch>
@@ -340,11 +339,9 @@ export default function App() {
340339
/>
341340
</Route>
342341
)}
343-
{ActivateLicense && (
344-
<Route path={CommonURLS.LICENSE_AUTH}>
345-
<ActivateLicense />
346-
</Route>
347-
)}
342+
<Route path={CommonURLS.LICENSE_AUTH}>
343+
<ActivateLicense />
344+
</Route>
348345
{!window._env_.K8S_CLIENT && <Route path="/login" component={Login} />}
349346
<Route path="/" render={() => <NavigationRoutes />} />
350347
<Redirect

src/Pages/App/CreateAppModal/AppToCloneSelector.tsx

Lines changed: 5 additions & 2 deletions
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) => {
@@ -33,7 +36,7 @@ const AppToCloneSelector = ({ isJobView, error, handleCloneIdChange }: AppToClon
3336
const onInputChange: SelectPickerProps['onInputChange'] = async (val) => {
3437
setInputValue(val)
3538
setAreOptionsLoading(true)
36-
const fetchedOptions = await appListOptions(val, isJobView)
39+
const fetchedOptions = await appListOptions({ inputValue: val, isJobView })
3740
setAreOptionsLoading(false)
3841
setOptions(fetchedOptions)
3942
}

0 commit comments

Comments
 (0)