Skip to content

Commit

Permalink
Merge pull request #2333 from devtron-labs/release-candidate-v0.26.0
Browse files Browse the repository at this point in the history
release: release candidate v0.26.0
  • Loading branch information
eshankvaish authored Jan 3, 2025
2 parents d5be6cc + e958840 commit b70b5d5
Show file tree
Hide file tree
Showing 186 changed files with 3,493 additions and 3,141 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ SIDEBAR_DT_LOGO=
ENABLE_EXTERNAL_ARGO_CD=false
API_BATCH_SIZE=20
SERVICE_WORKER_TIMEOUT=3
ENABLE_RESOURCE_SCAN=false
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE=false
ENABLE_RESOURCE_SCAN_V2=false
HIDE_RELEASES=true
HIDE_RESOURCE_WATCHER=true
ORGANIZATION_NAME=
Expand All @@ -61,8 +59,10 @@ FEATURE_CONFIG_DRIFT_ENABLE=false
FEATURE_PROMO_EMBEDDED_BUTTON_TEXT=
FEATURE_PROMO_EMBEDDED_MODAL_TITLE=
FEATURE_PROMO_EMBEDDED_IFRAME_URL=
FEATURE_SWAP_TRAFFIC_ENABLE=false
FEATURE_RB_SYNC_CLUSTER_ENABLE=false
FEATURE_BULK_RESTART_WORKLOADS_FROM_RB=deployment,rollout,daemonset,statefulset
FEATURE_DEFAULT_MERGE_STRATEGY=
FEATURE_CLUSTER_MAP_ENABLE=false
FEATURE_CLUSTER_MAP_ENABLE=true
FEATURE_DEFAULT_LANDING_RB_ENABLE=false
FEATURE_ACTION_AUDIOS_ENABLE=true
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ 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/SecurityVulnerabilityCard.tsx
src/components/app/details/appDetails/SourceInfo.tsx
src/components/app/details/appDetails/__tests__/GenericInfo.test.tsx
src/components/app/details/appDetails/index.tsx
Expand Down Expand Up @@ -246,7 +245,6 @@ src/components/common/DatePickers/DayPickerRangeController.tsx
src/components/common/DeprecatedUpdateWarn.tsx
src/components/common/Description/GenericDescription.tsx
src/components/common/DynamicTabs/__tests__/DynamicTabs.test.tsx
src/components/common/ExportToCsv/ExportToCsv.tsx
src/components/common/FloatingVariablesSuggestions/FloatingVariablesSuggestions.tsx
src/components/common/FloatingVariablesSuggestions/SuggestionItem.tsx
src/components/common/FloatingVariablesSuggestions/Suggestions.tsx
Expand Down
1 change: 1 addition & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@
| SERVICE_WORKER_TIMEOUT | "1" | Timeout value (in minutes) to fetch update for dashboard, change it cautiously as might hamper your update cycle |
| TRIGGER_API_TIMEOUT | 60000 | Default timeout for all API requests for Trigger calls (Deploy artifacts, charts) in DASHBOARD |
| FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS | "true" | Would hide the user direct permissions for non-super admin users in User Permissions |
| FEATURE_ACTION_AUDIOS_ENABLE | true | Would enable audios in dashboard |

# DASHBOARD CONFIG SECRET
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dashboard",
"version": "1.3.0",
"version": "1.4.0",
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.3.0-patch-4",
"@devtron-labs/devtron-fe-common-lib": "1.4.0-patch-1",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand Down Expand Up @@ -68,7 +68,8 @@
"jest": "jest",
"lint-staged": "lint-staged",
"storybook": "IS_STORYBOOK=true storybook dev -p 6006",
"build-storybook": "IS_STORYBOOK=true storybook build"
"build-storybook": "IS_STORYBOOK=true storybook build",
"postinstall": "patch-package"
},
"browserslist": [
">0.2%",
Expand Down Expand Up @@ -117,6 +118,8 @@
"jest-junit": "^13.0.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-test-render": "^1.1.2",
"sass": "^1.69.7",
Expand Down
137 changes: 137 additions & 0 deletions patches/react-select+5.8.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
diff --git a/node_modules/react-select/.DS_Store b/node_modules/react-select/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/node_modules/react-select/.DS_Store differ
diff --git a/node_modules/react-select/dist/declarations/src/components/Input.d.ts b/node_modules/react-select/dist/declarations/src/components/Input.d.ts
index e5f6741..c78fd13 100644
--- a/node_modules/react-select/dist/declarations/src/components/Input.d.ts
+++ b/node_modules/react-select/dist/declarations/src/components/Input.d.ts
@@ -13,6 +13,8 @@ export interface InputSpecificProps<Option = unknown, IsMulti extends boolean =
form?: string;
/** Set className for the input element */
inputClassName?: string;
+ /** Whether the input is textarea */
+ isTextArea?: boolean;
}
export declare type InputProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> = InputSpecificProps<Option, IsMulti, Group>;
export declare const inputCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, value, theme: { spacing, colors }, }: InputProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
diff --git a/node_modules/react-select/dist/index-665c4ed8.cjs.prod.js b/node_modules/react-select/dist/index-665c4ed8.cjs.prod.js
index 96cd04f..0636ebe 100644
--- a/node_modules/react-select/dist/index-665c4ed8.cjs.prod.js
+++ b/node_modules/react-select/dist/index-665c4ed8.cjs.prod.js
@@ -1090,7 +1090,7 @@ var GroupHeading = function GroupHeading(props) {
};
var Group$1 = Group;

-var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
+var _excluded = ["innerRef", "isDisabled", "isHidden", "isTextArea", "inputClassName"];
var inputCSS = function inputCSS(_ref, unstyled) {
var isDisabled = _ref.isDisabled,
value = _ref.value,
@@ -1145,13 +1145,25 @@ var Input = function Input(props) {
innerRef = _cleanCommonProps.innerRef,
isDisabled = _cleanCommonProps.isDisabled,
isHidden = _cleanCommonProps.isHidden,
+ isTextArea = _cleanCommonProps.isTextArea,
inputClassName = _cleanCommonProps.inputClassName,
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded);
return react.jsx("div", _extends({}, getStyleProps(props, 'input', {
'input-container': true
}), {
"data-value": value || ''
- }), react.jsx("input", _extends({
+ }), isTextArea ? react.jsx("textarea", _extends({
+ className: cx({
+ input: true
+ }, inputClassName),
+ ref: innerRef,
+ style: _objectSpread(_objectSpread({}, inputStyle(isHidden)), {}, {
+ resize: 'none'
+ }),
+ disabled: isDisabled
+ }, innerProps, {
+ rows: 1
+ })) : react.jsx("input", _extends({
className: cx({
input: true
}, inputClassName),
diff --git a/node_modules/react-select/dist/index-a301f526.esm.js b/node_modules/react-select/dist/index-a301f526.esm.js
index 514ba81..40d005d 100644
--- a/node_modules/react-select/dist/index-a301f526.esm.js
+++ b/node_modules/react-select/dist/index-a301f526.esm.js
@@ -1090,7 +1090,7 @@ var GroupHeading = function GroupHeading(props) {
};
var Group$1 = Group;

-var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
+var _excluded = ["innerRef", "isDisabled", "isHidden", "isTextArea", "inputClassName"];
var inputCSS = function inputCSS(_ref, unstyled) {
var isDisabled = _ref.isDisabled,
value = _ref.value,
@@ -1145,13 +1145,25 @@ var Input = function Input(props) {
innerRef = _cleanCommonProps.innerRef,
isDisabled = _cleanCommonProps.isDisabled,
isHidden = _cleanCommonProps.isHidden,
+ isTextArea = _cleanCommonProps.isTextArea,
inputClassName = _cleanCommonProps.inputClassName,
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded);
return jsx("div", _extends({}, getStyleProps(props, 'input', {
'input-container': true
}), {
"data-value": value || ''
- }), jsx("input", _extends({
+ }), isTextArea ? jsx("textarea", _extends({
+ className: cx({
+ input: true
+ }, inputClassName),
+ ref: innerRef,
+ style: _objectSpread(_objectSpread({}, inputStyle(isHidden)), {}, {
+ resize: 'none'
+ }),
+ disabled: isDisabled
+ }, innerProps, {
+ rows: 1
+ })) : jsx("input", _extends({
className: cx({
input: true
}, inputClassName),
diff --git a/node_modules/react-select/dist/index-d1cb43f3.cjs.dev.js b/node_modules/react-select/dist/index-d1cb43f3.cjs.dev.js
index 7defcdc..c8d796b 100644
--- a/node_modules/react-select/dist/index-d1cb43f3.cjs.dev.js
+++ b/node_modules/react-select/dist/index-d1cb43f3.cjs.dev.js
@@ -1096,7 +1096,7 @@ var GroupHeading = function GroupHeading(props) {
};
var Group$1 = Group;

-var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
+var _excluded = ["innerRef", "isDisabled", "isHidden", "isTextArea", "inputClassName"];
var inputCSS = function inputCSS(_ref, unstyled) {
var isDisabled = _ref.isDisabled,
value = _ref.value,
@@ -1151,13 +1151,25 @@ var Input = function Input(props) {
innerRef = _cleanCommonProps.innerRef,
isDisabled = _cleanCommonProps.isDisabled,
isHidden = _cleanCommonProps.isHidden,
+ isTextArea = _cleanCommonProps.isTextArea,
inputClassName = _cleanCommonProps.inputClassName,
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded);
return react.jsx("div", _extends({}, getStyleProps(props, 'input', {
'input-container': true
}), {
"data-value": value || ''
- }), react.jsx("input", _extends({
+ }), isTextArea ? react.jsx("textarea", _extends({
+ className: cx({
+ input: true
+ }, inputClassName),
+ ref: innerRef,
+ style: _objectSpread(_objectSpread({}, inputStyle(isHidden)), {}, {
+ resize: 'none'
+ }),
+ disabled: isDisabled
+ }, innerProps, {
+ rows: 1
+ })) : react.jsx("input", _extends({
className: cx({
input: true
}, inputClassName),
113 changes: 71 additions & 42 deletions src/Pages/App/Details/ExternalFlux/ExternalFluxAppDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import {
AppType,
ErrorScreenManager,
IndexStore,
useAsync,
useMainContext,
noop,
DeploymentAppTypes,
Progressing,
showError,
ResponseType,
noop,
ERROR_STATUS_CODE,
} from '@devtron-labs/devtron-fe-common-lib'
import { useEffect, useState } from 'react'
import { useParams } from 'react-router-dom'
Expand All @@ -37,62 +38,90 @@ let initTimer = null

const ExternalFluxAppDetails = () => {
const { clusterId, appName, namespace, templateType } = useParams<ExternalFluxAppDetailParams>()
const [isPublishing, setIsPublishing] = useState<boolean>(true)
const { isSuperAdmin } = useMainContext()
const isKustomization = templateType === FluxCDTemplateType.KUSTOMIZATION
const [initialLoading, setInitialLoading] = useState(true)
const [isReloadResourceTreeInProgress, setIsReloadResourceTreeInProgress] = useState(true)
const [appDetailsError, setAppDetailsError] = useState(null)

const [isAppDetailsLoading, appDetailsResult, appDetailsError, reloadAppDetails] = useAsync(
() => getExternalFluxCDAppDetails(clusterId, namespace, appName, isKustomization),
[clusterId, appName, namespace, templateType],
isSuperAdmin,
{
resetOnChange: false,
},
)
const handleUpdateIndexStoreWithDetails = (response: ResponseType<any>) => {
const genericAppDetail: AppDetails = {
...response.result,
appStatus: getAppStatus(response.result.appStatus),
deploymentAppType: DeploymentAppTypes.FLUX,
fluxTemplateType: templateType,
}

useEffect(
() => () => {
IndexStore.clearAppDetails()
clearTimeout(initTimer)
},
[],
)
IndexStore.publishAppDetails(genericAppDetail, AppType.EXTERNAL_FLUX_APP)
setAppDetailsError(null)
}

useEffect(() => {
if (appDetailsResult && !appDetailsError) {
initTimer = setTimeout(reloadAppDetails, window._env_.EA_APP_DETAILS_POLLING_INTERVAL || 30000)
const genericAppDetail: AppDetails = {
...appDetailsResult.result,
appStatus: getAppStatus(appDetailsResult.result.appStatus),
deploymentAppType: DeploymentAppTypes.FLUX,
fluxTemplateType: templateType,
}
IndexStore.publishAppDetails(genericAppDetail, AppType.EXTERNAL_FLUX_APP)
setIsPublishing(false)
}
}, [appDetailsResult])
const handleFetchExternalFluxCDAppDetails = () =>
// NOTE: returning a promise so that we can trigger the next timeout after this api call completes
new Promise<void>((resolve) => {
setIsReloadResourceTreeInProgress(true)

getExternalFluxCDAppDetails(clusterId, namespace, appName, isKustomization)
.then(handleUpdateIndexStoreWithDetails)
.catch((error) => {
if (!initialLoading) {
showError(error)
} else {
setAppDetailsError(error)
}
})
.finally(() => {
setIsReloadResourceTreeInProgress(false)
setInitialLoading(false)
resolve()
})
})

if (!isSuperAdmin) {
return <ErrorScreenManager code={403} />
const initializePageDetails = () => {
handleFetchExternalFluxCDAppDetails()
.then(() => {
// NOTE: using timeouts instead of intervals since we want the next api call after the last one finishes
// https://stackoverflow.com/questions/729921/whats-the-difference-between-recursive-settimeout-versus-setinterval
initTimer = setTimeout(initializePageDetails, window._env_.EA_APP_DETAILS_POLLING_INTERVAL || 30000)
})
.catch(noop)
}

if (appDetailsError) {
return <ErrorScreenManager code={appDetailsError.code} reload={reloadAppDetails} />
const handleReloadResourceTree = async () => {
await handleFetchExternalFluxCDAppDetails()
}

// To show loader on first render only
const isLoadingOnMount = isAppDetailsLoading && !appDetailsResult
useEffect(() => {
if (isSuperAdmin) {
setInitialLoading(true)
initializePageDetails()
}

return () => {
IndexStore.clearAppDetails()
clearTimeout(initTimer)
}
}, [clusterId, appName, namespace, templateType, isSuperAdmin])

if (isLoadingOnMount || isPublishing) {
return <Progressing pageLoader />
if (appDetailsError || !isSuperAdmin) {
return (
<ErrorScreenManager
code={appDetailsError?.code ?? ERROR_STATUS_CODE.PERMISSION_DENIED}
reload={handleReloadResourceTree}
/>
)
}

return (
<AppDetailsComponent
isExternalApp
// NOTE: in case of DA & Helm Apps, when we delete that app _init is called
// since we can't delete flux app, sending in noop
_init={noop}
loadingDetails={isLoadingOnMount}
loadingResourceTree={isLoadingOnMount}
loadingDetails={initialLoading}
loadingResourceTree={initialLoading}
handleReloadResourceTree={handleReloadResourceTree}
isReloadResourceTreeInProgress={isReloadResourceTreeInProgress}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EnvResourceType } from '@devtron-labs/devtron-fe-common-lib'
import { BASE_CONFIGURATION_ENV_ID, EnvResourceType } from '@devtron-labs/devtron-fe-common-lib'

export const BASE_CONFIGURATIONS = {
id: -1,
id: BASE_CONFIGURATION_ENV_ID,
name: 'Base Configurations',
}

Expand Down
Loading

0 comments on commit b70b5d5

Please sign in to comment.