Skip to content

Commit bd9ea0a

Browse files
authored
Merge pull request #2593 from devtron-labs/refactor/plugin-policy-v1
refactor: remove plugin policy v1 code and theming feature flag
2 parents 1b0853b + b382801 commit bd9ea0a

File tree

11 files changed

+16
-35
lines changed

11 files changed

+16
-35
lines changed

.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ FEATURE_SCOPED_VARIABLE_ENVIRONMENT_LIST_ENABLE=false
5151
HIDE_NETWORK_STATUS_INTERFACE=true
5252
SYSTEM_CONTROLLER_LISTING_TIMEOUT=300000
5353
FEATURE_IMAGE_PROMOTION_ENABLE=false
54-
FEATURE_CD_MANDATORY_PLUGINS_ENABLE=true
5554
FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS=false
5655
FEATURE_CONFIG_DRIFT_ENABLE=false
5756
FEATURE_PROMO_EMBEDDED_BUTTON_TEXT=
@@ -66,5 +65,4 @@ FEATURE_DEFAULT_LANDING_RB_ENABLE=false
6665
FEATURE_ACTION_AUDIOS_ENABLE=true
6766
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
6867
FEATURE_CODE_MIRROR_ENABLE=false
69-
FEATURE_EXPERIMENTAL_THEMING_ENABLE=true
7068
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false

.storybook/preview.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ const preview: Preview = {
3838
},
3939
decorators: (Story) => {
4040
if (!window._env_) {
41-
window._env_ = {
42-
FEATURE_EXPERIMENTAL_THEMING_ENABLE: true,
43-
} as customEnv
41+
window._env_ = {} as customEnv
4442
}
4543

4644
return (

config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,5 @@
4848
| TRIGGER_API_TIMEOUT | 60000 | Default timeout for all API requests for Trigger calls (Deploy artifacts, charts) in DASHBOARD |
4949
| FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS | "true" | Would hide the user direct permissions for non-super admin users in User Permissions |
5050
| FEATURE_ACTION_AUDIOS_ENABLE | true | Would enable audios in dashboard |
51-
| FEATURE_EXPERIMENTAL_THEMING_ENABLE | true | Would enable theming in dashboard |
5251

5352
# DASHBOARD CONFIG SECRET

package.json

Lines changed: 1 addition & 1 deletion
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.3",
7+
"@devtron-labs/devtron-fe-common-lib": "1.10.4",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages/Shared/SwitchThemeDialog/SwitchThemeDialog.component.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ const SwitchThemeDialog = ({
203203
},
204204
}}
205205
isLandscapeView
206-
showConfetti={!initialThemePreference}
207206
>
208207
<div className="dc__grid dc__column-gap-16 theme-preference-option__container">
209208
{THEME_PREFERENCE_OPTION_LIST.map((value) => (

src/components/common/helpers/Helpers.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,11 +1161,7 @@ export const getParsedBranchValuesForPlugin = (branchName: string): string => {
11611161
return ''
11621162
}
11631163

1164-
if (window._env_.FEATURE_CD_MANDATORY_PLUGINS_ENABLE) {
1165-
return `[${branchName}]`
1166-
}
1167-
1168-
return branchName
1164+
return `[${branchName}]`
11691165
}
11701166

11711167
export const getAppFilterLocalStorageKey = (filterParentType: FilterParentType): AppEnvLocalStorageKeyType =>

src/components/common/navigation/NavigationRoutes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export default function NavigationRoutes() {
354354
}
355355

356356
const handleInitializeUserPreferencesFromResponse = (userPreferencesResponse: UserPreferencesType) => {
357-
if (window._env_.FEATURE_EXPERIMENTAL_THEMING_ENABLE && !userPreferencesResponse?.themePreference) {
357+
if (!userPreferencesResponse?.themePreference) {
358358
handleThemeSwitcherDialogVisibilityChange(true)
359359
} else if (userPreferencesResponse?.themePreference) {
360360
handleThemePreferenceChange(userPreferencesResponse?.themePreference)
@@ -507,7 +507,7 @@ export default function NavigationRoutes() {
507507
}}
508508
>
509509
<main className={_isOnboardingPage ? 'no-nav' : ''} id={DEVTRON_BASE_MAIN_ID}>
510-
{window._env_.FEATURE_EXPERIMENTAL_THEMING_ENABLE && showThemeSwitcherDialog && (
510+
{showThemeSwitcherDialog && (
511511
<SwitchThemeDialog
512512
initialThemePreference={userPreferences?.themePreference}
513513
handleClose={handleCloseSwitchThemeDialog}

src/components/globalConfigurations/GlobalConfiguration.tsx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ const ScopedVariables = lazy(() => import('../scopedVariables/ScopedVariables'))
6464
// NOTE: Might import from index itself
6565
const BuildInfra = lazy(() => import('../../Pages/GlobalConfigurations/BuildInfra/BuildInfra'))
6666
const TagListContainer = importComponentFromFELibrary('TagListContainer')
67-
const PluginsPolicyV1 = importComponentFromFELibrary('PluginsPolicyV1')
6867
const PluginsPolicy = importComponentFromFELibrary('PluginsPolicy', null, 'function')
6968
const FilterConditions = importComponentFromFELibrary('FilterConditions')
7069
const LockDeploymentConfiguration = importComponentFromFELibrary('LockDeploymentConfiguration', null, 'function')
@@ -764,17 +763,11 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate,
764763
<ImagePromotion isSuperAdmin={isSuperAdmin} />
765764
</Route>
766765
),
767-
window._env_.FEATURE_CD_MANDATORY_PLUGINS_ENABLE
768-
? PluginsPolicy && (
769-
<Route path={URLS.GLOBAL_CONFIG_PLUGIN_POLICY}>
770-
<PluginsPolicy OfflinePipelineModalAppView={OffendingPipelineModalAppView} />
771-
</Route>
772-
)
773-
: PluginsPolicyV1 && (
774-
<Route path={URLS.GLOBAL_CONFIG_PLUGIN_POLICY}>
775-
<PluginsPolicyV1 />
776-
</Route>
777-
),
766+
PluginsPolicy && (
767+
<Route path={URLS.GLOBAL_CONFIG_PLUGIN_POLICY}>
768+
<PluginsPolicy OfflinePipelineModalAppView={OffendingPipelineModalAppView} />
769+
</Route>
770+
),
778771
PullImageDigest && (
779772
<Route path={URLS.GLOBAL_CONFIG_PULL_IMAGE_DIGEST}>
780773
<PullImageDigest isSuperAdmin={isSuperAdmin} />
@@ -799,7 +792,7 @@ const Body = ({ getHostURLConfig, checkList, serverMode, handleChecklistUpdate,
799792
<Route path={CommonURLS.GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP}>
800793
<DevtronAppTemplates AppConfig={AppConfig} />
801794
</Route>
802-
)
795+
),
803796
]}
804797
<Redirect to={defaultRoute()} />
805798
</Switch>

src/components/login/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const Login = () => {
125125
{loginList
126126
.filter((sso) => sso.active)
127127
.map((item) => (
128-
<div className="login-button">
128+
<div className="login-button" key={item.name}>
129129
<Button
130130
variant={ButtonVariantType.secondary}
131131
text={`Login with ${item.name}`}

src/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ if (!window || !window._env_) {
155155
HIDE_NETWORK_STATUS_INTERFACE: true,
156156
SYSTEM_CONTROLLER_LISTING_TIMEOUT: 60000 * 5,
157157
FEATURE_IMAGE_PROMOTION_ENABLE: false,
158-
FEATURE_CD_MANDATORY_PLUGINS_ENABLE: true,
159158
FEATURE_HIDE_USER_DIRECT_PERMISSIONS_FOR_NON_SUPER_ADMINS: false,
160159
FEATURE_CONFIG_DRIFT_ENABLE: false,
161160
FEATURE_PROMO_EMBEDDED_BUTTON_TEXT: '',
@@ -168,7 +167,6 @@ if (!window || !window._env_) {
168167
FEATURE_DEFAULT_LANDING_RB_ENABLE: false,
169168
FEATURE_CLUSTER_MAP_ENABLE: true,
170169
FEATURE_ACTION_AUDIOS_ENABLE: true,
171-
FEATURE_EXPERIMENTAL_THEMING_ENABLE: import.meta.env.DEV,
172170
FEATURE_APPLICATION_TEMPLATES_ENABLE: true,
173171
FEATURE_CODE_MIRROR_ENABLE: true,
174172
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE: false,

0 commit comments

Comments
 (0)