From 813ea9e31c90b8daee9897236842da5dc580ce85 Mon Sep 17 00:00:00 2001 From: Rudhra Deep Biswas <98055396+rudeUltra@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:09:29 +0530 Subject: [PATCH] Workspace constant Page UI changes (#11339) --- .../ManageOrgConstants/ManageOrgConstants.jsx | 297 +++++++++--------- frontend/src/_styles/theme.scss | 7 +- 2 files changed, 158 insertions(+), 146 deletions(-) diff --git a/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx b/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx index b6548197bd..3d40ce168e 100644 --- a/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx +++ b/frontend/src/ManageOrgConstants/ManageOrgConstants.jsx @@ -17,6 +17,7 @@ import { BreadCrumbContext } from '@/App'; import './ConstantFormStyle.scss'; import { Constants, redirectToWorkspace } from '@/_helpers/utils'; import { SearchBox } from '@/_components/SearchBox'; +import { OrganizationList } from '@/_components/OrganizationManager/List'; const MODES = Object.freeze({ CREATE: 'create', EDIT: 'edit', @@ -429,156 +430,166 @@ const ManageOrgConstantsComponent = ({ darkMode }) => { /> )} -
-
- {capitalize(activeTabEnvironment?.name)} ({globalCount + secretCount}) -
-
- {canCreateVariable() && ( - { - setMode(() => MODES.CREATE); - setIsManageVarDrawerOpen(() => true); - }} - className="add-new-constant-button" - customStyles={{ minWidth: '200px', height: '32px' }} - disabled={isManageVarDrawerOpen} - > - + Create new constant - - )} -
-
-
-
-
-
-
-
- - -
-
- -
+
+
+
+ +
+ +
+ +
+
+
+
+ {capitalize(activeTabEnvironment?.name)} ({globalCount + secretCount}) +
+
+ {canCreateVariable() && ( + { + setMode(() => MODES.CREATE); + setIsManageVarDrawerOpen(() => true); + }} + className="add-new-constant-button" + customStyles={{ minWidth: '200px', height: '32px' }} + disabled={isManageVarDrawerOpen} + > + + Create new constant + + )}
-
-
-
-
-
- -
-
- {activeTab === Constants.Global ? ( - <> - To resolve a global workspace constant use{' '} - {'{{constants.access_token}}'} - - ) : ( - <> - To resolve a secret workspace constant use{' '} - {'{{secrets.access_token}}'} - - )} -
- -
- -
+
+
+
+
+
+ +
- -
-
-
- - {(activeTab === Constants.Global && globalCount > 0) || - (activeTab === Constants.Secret && secretCount > 0) ? ( -
- - 0} - /> -
- ) : ( - + - )} +
+
+
+ +
+
+ +
+
+ {activeTab === Constants.Global ? ( + <> + To resolve a global workspace constant use{' '} + + {'{{constants.access_token}}'} + + + ) : ( + <> + To resolve a secret workspace constant use{' '} + {'{{secrets.access_token}}'} + + )} +
+ +
+ +
+
+
+
+ +
+
+ {(activeTab === Constants.Global && globalCount > 0) || + (activeTab === Constants.Secret && secretCount > 0) ? ( +
+ + 0} + /> +
+ ) : ( + + )} +
diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index 3c59855152..1b145788b4 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -15569,9 +15569,10 @@ color: var(--text-default); background-color: var(--page-default); height: calc(100vh - 64px); display: flex; - align-items: center; - justify-content: center; - padding-top: 1.5rem; + //Uncomment for EE + // align-items: center; + // justify-content: center; + // padding-top: 1.5rem; } .blank-page-wrapper {