Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Notification QA fixes #2349

Merged
merged 51 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0153812
task: scss .dc__grid-half - add support to show divider
RohitRaj011 Dec 30, 2024
fe4c345
task: enable RB sync cluster feature in .env
RohitRaj011 Dec 31, 2024
6e261c7
feat: add vertical-divider class for improved layout separation
RohitRaj011 Jan 2, 2025
770d6b3
Merge branch 'develop' of github.com:devtron-labs/dashboard into fix/…
RohitRaj011 Jan 3, 2025
c3d8764
Merge branch 'fix/rb-compare-sync' of github.com:devtron-labs/dashboa…
RohitRaj011 Jan 3, 2025
602ad06
fix: global security issues
arunjaindev Jan 6, 2025
4164eb0
chore: bump common
eshankvaish Jan 7, 2025
f12fde0
chore: add fallback as false for isRollbackTrigger key
arunjaindev Jan 7, 2025
a52f252
feat: breakdown image cards in imageScan codeScan and manifestScan
arunjaindev Jan 7, 2025
64e8d2b
feat: show threats in card if found in any sub category
arunjaindev Jan 7, 2025
1aab679
update devtron-fe-common-lib dependency to version 1.4.0-patch-1-beta-1
AbhishekA1509 Jan 8, 2025
71da5fe
fix: yarn.lock
AbhishekA1509 Jan 8, 2025
e296c1a
feat: move threats array logic to common utils
arunjaindev Jan 8, 2025
c0ca5bb
fix: remove extrs null checks
arunjaindev Jan 8, 2025
0d80fb1
feat: hide security card if no access
arunjaindev Jan 8, 2025
42bf806
chore: version bump
arunjaindev Jan 8, 2025
9a4bdcc
fix: conditionally render label tags based on Helm chart status
AbhishekA1509 Jan 9, 2025
2de8099
Merge pull request #2335 from devtron-labs/feat/rb-compare-sync
RohitRaj011 Jan 9, 2025
f0e311b
chore: common-lib version bump
RohitRaj011 Jan 9, 2025
dcb6b3b
refactor: update getClusterListMin to use COMMON_ROUTES and mark as d…
RohitRaj011 Jan 9, 2025
41d0a7b
chore: common-lib version bump
RohitRaj011 Jan 9, 2025
ccaf3ad
chore: fix for rows saving issue
shivani170 Jan 10, 2025
2128ccd
chore: bump devtron-fe-common-lib dependency to version 1.4.0-patch-2
AbhishekA1509 Jan 10, 2025
03d9947
feat: hide CompareClusterButton for connection failed cluster
RohitRaj011 Jan 10, 2025
80302ca
chore: common-lib version bump
RohitRaj011 Jan 10, 2025
1ec16c4
Merge pull request #2346 from devtron-labs/feat/build-infra-2.5
AbhishekA1509 Jan 10, 2025
910a3d3
fix: add envId in payload when adding cve in application
arunjaindev Jan 10, 2025
f5723f9
chore: revert target url
arunjaindev Jan 10, 2025
5ee0825
chore: update css class
arunjaindev Jan 10, 2025
a547235
fix: QA fixes
shivani170 Jan 10, 2025
29b51b6
fix: same env id for all envs in updating severity
arunjaindev Jan 10, 2025
d43caa1
fix: QA webhook url link added
shivani170 Jan 10, 2025
f6986ba
fix: add cve modal not open for global
arunjaindev Jan 10, 2025
f74c3e8
fix: set state false on close
arunjaindev Jan 10, 2025
eb287ae
fix: re-generate the encoded url for external links
AbhishekA1509 Jan 10, 2025
83ad715
Merge pull request #2351 from devtron-labs/fix/external-link-parsing
vivek-devtron Jan 11, 2025
07defd0
refactor: ConfigMapSecret -update form submission handlers and improv…
RohitRaj011 Jan 9, 2025
1a3080f
fix: AppNavigation - incorrect envId param in Route path
RohitRaj011 Jan 10, 2025
d4a8e8e
fix: QA validation function refactoring of all config modal
shivani170 Jan 13, 2025
f996270
Merge pull request #2350 from devtron-labs/fix/cm-cs-dry-run-submit
RohitRaj011 Jan 13, 2025
2cb5f5b
feat: update return statements in security card
arunjaindev Jan 13, 2025
e4590e5
chore: QA code refactoring
shivani170 Jan 13, 2025
5c2e014
fix: GA analytics
eshankvaish Jan 13, 2025
93ca68c
Merge pull request #2344 from devtron-labs/feat/scanning-breakdown
arunjaindev Jan 13, 2025
fbcca67
Merge branch 'fix/security-issues' of github.com:devtron-labs/dashboa…
eshankvaish Jan 13, 2025
f43a547
Merge pull request #2343 from devtron-labs/fix/security-issues
arunjaindev Jan 13, 2025
4c8f939
Merge branch 'develop' of github.com:devtron-labs/dashboard into fix/…
RohitRaj011 Jan 13, 2025
a939da0
Merge branch 'main' of github.com:devtron-labs/dashboard into fix/rb-…
RohitRaj011 Jan 13, 2025
1e63c21
Merge pull request #2325 from devtron-labs/fix/rb-compare-sync
RohitRaj011 Jan 13, 2025
893d28e
chore: QA code refactoring of validation on save
shivani170 Jan 13, 2025
602ac64
Merge branch 'develop' into feat/uat-add-button
shivani170 Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ 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_RB_SYNC_CLUSTER_ENABLE=true
FEATURE_BULK_RESTART_WORKLOADS_FROM_RB=deployment,rollout,daemonset,statefulset
FEATURE_DEFAULT_MERGE_STRATEGY=
FEATURE_CLUSTER_MAP_ENABLE=true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.4.0-patch-1",
"@devtron-labs/devtron-fe-common-lib": "1.4.5",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ export const AppNavigation = () => {
<Switch>
<Route
path={[
`${path}/:resourceType(${Object.values(EnvResourceType).join('|')})/:envId(\\d+)?`,
`${path}/:resourceType(${Object.values(EnvResourceType).join('|')})`,
`${path}/${URLS.APP_ENV_OVERRIDE_CONFIG}/:envId(\\d+)/:resourceType(${Object.values(EnvResourceType).join('|')})`,
]}
>
{({ match }) => (
<EnvConfigurationsNav
key={`env-configurations-nav-${match.params.envId}`}
key={`env-configurations-nav-${'envId' in match.params ? match.params.envId : ''}`}
envConfig={envConfig}
fetchEnvConfig={fetchEnvConfig}
environments={environments.map(({ environmentName, environmentId }) => ({
Expand Down
27 changes: 20 additions & 7 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
usePrompt,
checkIfPathIsMatching,
useUrlFilters,
UseFormErrorHandler,
UseFormSubmitHandler,
} from '@devtron-labs/devtron-fe-common-lib'

import { URLS } from '@Config/routes'
Expand Down Expand Up @@ -682,7 +684,7 @@ export const ConfigMapSecretContainer = ({
}
}

const onSubmit: ConfigMapSecretFormProps['onSubmit'] = async (data) => {
const onSubmit: UseFormSubmitHandler<ConfigMapSecretUseFormProps> = async (data) => {
const payloadData = getConfigMapSecretPayload(data)

if (isApprovalPolicyConfigured) {
Expand Down Expand Up @@ -739,7 +741,7 @@ export const ConfigMapSecretContainer = ({
}
}

const onError: ConfigMapSecretFormProps['onError'] = (errors) => {
const onError: UseFormErrorHandler<ConfigMapSecretUseFormProps> = (errors) => {
if (errors.currentData?.[0] === CONFIG_MAP_SECRET_NO_DATA_ERROR) {
ToastManager.showToast({
variant: ToastVariantType.error,
Expand All @@ -755,6 +757,19 @@ export const ConfigMapSecretContainer = ({
}
}

const onDryRunError: UseFormErrorHandler<ConfigMapSecretUseFormProps> = (errors) => {
const hasErrors = Object.keys(errors).some((key) => !!errors[key])
if (hasErrors) {
ToastManager.showToast({
variant: ToastVariantType.error,
description: 'Please resolve form errors before saving.',
})
}
}

const formSubmitHandler = handleSubmit(onSubmit, onError)
const dryRunSubmitHandler = handleSubmit(onSubmit, onDryRunError)

// CONFIG TOOLBAR POPUP MENU
const toolbarPopupConfig: ConfigToolbarProps['popupConfig'] = {
menuConfig: getConfigToolbarPopupConfig({
Expand Down Expand Up @@ -802,8 +817,7 @@ export const ConfigMapSecretContainer = ({
draftData={resolvedDraftData ?? draftData}
inheritedConfigMapSecretData={resolvedInheritedConfigMapSecretData ?? inheritedConfigMapSecretData}
id={id}
onError={onError}
onSubmit={onSubmit}
onSubmit={formSubmitHandler}
selectedProtectionViewTab={selectedProtectionViewTab}
updateCMSecret={updateCMSecret}
componentType={componentType}
Expand All @@ -826,8 +840,7 @@ export const ConfigMapSecretContainer = ({
isApprovalPolicyConfigured={isApprovalPolicyConfigured}
isSubmitting={isSubmitting}
disableDataTypeChange={isDeleteDisabled}
onSubmit={onSubmit}
onError={onError}
onSubmit={formSubmitHandler}
onCancel={onCancel}
areScopeVariablesResolving={resolvedScopeVariablesResLoading}
appChartRef={appChartRef}
Expand Down Expand Up @@ -886,7 +899,7 @@ export const ConfigMapSecretContainer = ({
handleChangeDryRunEditorMode={setDryRunEditorMode}
showCrudButtons={!showNoOverride}
isSubmitting={isSubmitting}
onSubmit={onSubmit}
onSubmit={dryRunSubmitHandler}
parentName={parentName}
updateCMSecret={updateCMSecret}
formData={resolvedFormData ?? formData}
Expand Down
5 changes: 1 addition & 4 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretDryRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ export const ConfigMapSecretDryRun = ({
isDryRunDataPresent && !hideManifest,
)

// METHODS
const handleSubmit = () => onSubmit(formData)

// RENDERERS
const renderLHSContent = () => {
if (publishedVersionDoesNotExist) {
Expand Down Expand Up @@ -264,7 +261,7 @@ export const ConfigMapSecretDryRun = ({
dataTestId="cm-secret-form-submit-btn"
text={`Save${!isCreateView ? ' Changes' : ''}${isApprovalPolicyConfigured ? '...' : ''}`}
size={ComponentSizeType.medium}
onClick={handleSubmit}
onClick={onSubmit}
isLoading={isSubmitting}
disabled={isSaveButtonDisabled}
/>
Expand Down
5 changes: 2 additions & 3 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ export const ConfigMapSecretForm = ({
areScopeVariablesResolving,
useFormProps,
onSubmit,
onError,
onCancel,
}: ConfigMapSecretFormProps) => {
// HOOKS
const location = useLocation()

// FORM PROPS
const { data, errors, formState, setValue, register, handleSubmit } = useFormProps
const { data, errors, formState, setValue, register } = useFormProps

// CONSTANTS
const isCreateView = id === null
Expand Down Expand Up @@ -329,7 +328,7 @@ export const ConfigMapSecretForm = ({
dataTestId="cm-secret-form-submit-btn"
text={`Save${!isCreateView ? ' Changes' : ''}${isApprovalPolicyConfigured ? '...' : ''}`}
size={ComponentSizeType.medium}
onClick={handleSubmit(onSubmit, onError)}
onClick={onSubmit}
isLoading={isSubmitting}
disabled={isSubmitting || areScopeVariablesResolving || isFormDisabled}
/>
Expand Down
2 changes: 0 additions & 2 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretProtected.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const ConfigMapSecretProtected = ({
parentName,
inheritedConfigMapSecretData,
areScopeVariablesResolving,
onError,
onSubmit,
updateCMSecret,
shouldMergeTemplateWithPatches,
Expand Down Expand Up @@ -222,7 +221,6 @@ export const ConfigMapSecretProtected = ({
disableDataTypeChange={disableDataTypeChange}
isSubmitting={false}
onCancel={noop}
onError={onError}
onSubmit={onSubmit}
areScopeVariablesResolving={areScopeVariablesResolving}
useFormProps={useFormProps}
Expand Down
6 changes: 1 addition & 5 deletions src/Pages/Shared/ConfigMapSecret/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
ProtectConfigTabsType,
SelectPickerOptionType,
useForm,
UseFormErrorHandler,
UseFormSubmitHandler,
AppEnvDeploymentConfigDTO,
DryRunEditorMode,
ConfigHeaderTabType,
Expand Down Expand Up @@ -156,8 +154,7 @@ export interface ConfigMapSecretFormProps
areScopeVariablesResolving: boolean
isDraft?: boolean
disableDataTypeChange: boolean
onSubmit: UseFormSubmitHandler<ConfigMapSecretUseFormProps>
onError: UseFormErrorHandler<ConfigMapSecretUseFormProps>
onSubmit: () => void
onCancel: () => void
useFormProps: ReturnType<typeof useForm<ConfigMapSecretUseFormProps>>
}
Expand Down Expand Up @@ -217,7 +214,6 @@ export type ConfigMapSecretProtectedProps = Pick<ConfigMapSecretContainerProps,
| 'isJob'
| 'disableDataTypeChange'
| 'id'
| 'onError'
| 'onSubmit'
| 'areScopeVariablesResolving'
| 'appChartRef'
Expand Down
Loading
Loading