Skip to content

Commit 82ecf83

Browse files
Merge branch 'develop' into fix/external-apps-abort-controller
2 parents 6d339bf + d0609fe commit 82ecf83

File tree

9 files changed

+43
-32
lines changed

9 files changed

+43
-32
lines changed

src/Pages/GlobalConfigurations/Authorization/APITokens/APITokenList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
6969

7070
return (
7171
<div className="bg__primary">
72-
<div data-testid="api-token-page-header" className="flex dc__content-space pl-20 pr-20 pb-16">
72+
<div data-testid="api-token-page-header" className="flex dc__content-space pl-20 pr-20 py-16">
7373
<FeatureTitleWithInfo
7474
title={HEADER_TEXT.API_TOKEN.title}
7575
renderDescriptionContent={() => HEADER_TEXT.API_TOKEN.description}

src/Pages/GlobalConfigurations/Authorization/Authorization.component.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { lazy } from 'react'
17+
import { lazy, useRef } from 'react'
1818
import { Redirect, Route, Switch, useRouteMatch } from 'react-router-dom'
1919

2020
import { Routes } from '../../../config'
@@ -26,15 +26,21 @@ const SSOLogin = lazy(() => import('./SSOLoginServices'))
2626

2727
const Authorization = () => {
2828
const { path } = useRouteMatch()
29+
const authorizationContainerRef = useRef<HTMLDivElement>(null)
2930

3031
return (
3132
<Switch>
3233
<Route path={`${path}/${Routes.SSO_LOGIN_SERVICES}`} component={SSOLogin} />
3334
<Route
3435
path={path}
3536
render={() => (
36-
<div className="authorization-container flexbox-col flex-grow-1 min-h-100 bg__primary flex-align-center dc__content-center pt-16">
37-
<UserAndGroupPermissions />
37+
<div
38+
ref={authorizationContainerRef}
39+
className="authorization-container flexbox-col flex-grow-1 h-100 bg__primary dc__overflow-hidden"
40+
>
41+
<div className="flex-grow-1 flexbox-col dc__overflow-auto">
42+
<UserAndGroupPermissions authorizationContainerRef={authorizationContainerRef} />
43+
</div>
3844
</div>
3945
)}
4046
/>

src/Pages/GlobalConfigurations/Authorization/AuthorizationProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const AuthorizationContext = createContext<AuthorizationContextProps>({
2626
possibleRolesMetaForCluster: {},
2727
},
2828
isAutoAssignFlowEnabled: false,
29+
authorizationContainerRef: { current: null },
2930
})
3031

3132
export const AuthorizationProvider = ({ children, value }: AuthorizationProviderProps) => (

src/Pages/GlobalConfigurations/Authorization/PermissionGroups/List/PermissionGroupListHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const PermissionGroupListHeader = ({
4141
const { isSuperAdmin } = useMainContext()
4242

4343
return (
44-
<div className="flex dc__content-space pl-20 pr-20">
44+
<div className="flex dc__content-space pl-20 pr-20 pt-16">
4545
<div className="flex dc__gap-8">
4646
<h2 className="fs-16 lh-32 cn-9 fw-6 m-0">Permission Groups</h2>
4747
<InfoIconTippy

src/Pages/GlobalConfigurations/Authorization/UserAndGroupPermissions.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { importComponentFromFELibrary } from '@Components/common'
3232
import { API_STATUS_CODES, Routes } from '../../../config'
3333
import { getCustomRoles } from './authorization.service'
3434
import { AuthorizationProvider } from './AuthorizationProvider'
35-
import { UserAndGroupPermissionsWrapProps } from './types'
35+
import { AuthorizationContextProps, UserAndGroupPermissionsWrapProps } from './types'
3636
import { getMetaPossibleRoles } from './utils'
3737

3838
import './authorization.scss'
@@ -57,7 +57,9 @@ const UserAndGroupPermissionsWrap = ({ children, setIsAutoAssignFlowEnabled }: U
5757
)
5858
}
5959

60-
const UserAndGroupPermissions = () => {
60+
const UserAndGroupPermissions = ({
61+
authorizationContainerRef,
62+
}: Pick<AuthorizationContextProps, 'authorizationContainerRef'>) => {
6163
const { path } = useRouteMatch()
6264
const [isDataLoading, customRolesList, error, reload] = useAsync(getCustomRoles)
6365
// For handling the auto assign flow for enterprise
@@ -71,6 +73,7 @@ const UserAndGroupPermissions = () => {
7173
() => ({
7274
customRoles: getMetaPossibleRoles(filteredCustomRoles ?? []),
7375
isAutoAssignFlowEnabled,
76+
authorizationContainerRef,
7477
}),
7578
[isAutoAssignFlowEnabled, customRolesList],
7679
)
@@ -92,7 +95,7 @@ const UserAndGroupPermissions = () => {
9295
}
9396

9497
return (
95-
<div className="flexbox-col flex-grow-1 h-100 w-100 dc__content-center">
98+
<div className="flexbox-col flex-grow-1 dc__content-center">
9699
<AuthorizationProvider value={authorizationProviderValue}>
97100
<Switch>
98101
<Route path={`${path}/${Routes.USER_PERMISSIONS}`}>

src/Pages/GlobalConfigurations/Authorization/UserPermissions/List/UserPermissionContainer.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useRef } from 'react'
18-
1917
import {
2018
DEFAULT_BASE_PAGE_SIZE,
2119
ERROR_EMPTY_SCREEN,
@@ -28,6 +26,7 @@ import {
2826

2927
import { importComponentFromFELibrary } from '../../../../../components/common'
3028
import { API_STATUS_CODES } from '../../../../../config'
29+
import { useAuthorizationContext } from '../../AuthorizationProvider'
3130
import { BulkSelectionModalTypes, useAuthorizationBulkSelection } from '../../Shared/components/BulkSelection'
3231
import BulkSelectionActionWidget from '../../Shared/components/BulkSelection/BulkSelectionActionWidget'
3332
import BulkSelectionModal from '../../Shared/components/BulkSelection/BulkSelectionModal'
@@ -55,10 +54,10 @@ const UserPermissionContainer = ({
5554

5655
const { searchKey, handleSearch: _handleSearch, clearFilters, status, updateStatusFilter } = urlFilters
5756

58-
const draggableRef = useRef<HTMLDivElement>()
5957
const { getSelectedIdentifiersCount, isBulkSelectionApplied } = useAuthorizationBulkSelection()
6058
const isSomeRowChecked = getSelectedIdentifiersCount() > 0
6159
const selectedUsersCount = isBulkSelectionApplied ? totalCount : getSelectedIdentifiersCount()
60+
const { authorizationContainerRef } = useAuthorizationContext()
6261

6362
if (!showLoadingState) {
6463
if (error) {
@@ -121,7 +120,7 @@ const UserPermissionContainer = ({
121120

122121
return (
123122
<>
124-
<div className="flexbox-col flex-grow-1" ref={draggableRef}>
123+
<div className="flexbox-col flex-grow-1">
125124
<div className="flexbox-col dc__gap-8 flex-grow-1">
126125
<UserPermissionListHeader
127126
disabled={isActionsDisabled}
@@ -155,24 +154,25 @@ const UserPermissionContainer = ({
155154
) : (
156155
<GenericFilterEmptyState handleClearFilters={clearFilters} classname="flex-grow-1" />
157156
)}
158-
{isSomeRowChecked && selectedUsersCount > 0 && (
159-
<BulkSelectionActionWidget
160-
count={selectedUsersCount}
161-
parentRef={draggableRef}
162-
showStatus={showStatus}
163-
areActionsDisabled={showLoadingState || isClearBulkSelectionModalOpen}
164-
setBulkSelectionModalConfig={setBulkSelectionModalConfig}
165-
refetchList={refetchUserPermissionList}
166-
filterConfig={{
167-
searchKey: urlFilters.searchKey,
168-
status: urlFilters.status,
169-
}}
170-
selectedIdentifiersCount={selectedUsersCount}
171-
isCountApproximate={isBulkSelectionApplied}
172-
entityType={BulkSelectionEntityTypes.users}
173-
/>
174-
)}
175157
</div>
158+
159+
{isSomeRowChecked && selectedUsersCount > 0 && (
160+
<BulkSelectionActionWidget
161+
count={selectedUsersCount}
162+
parentRef={authorizationContainerRef}
163+
showStatus={showStatus}
164+
areActionsDisabled={showLoadingState || isClearBulkSelectionModalOpen}
165+
setBulkSelectionModalConfig={setBulkSelectionModalConfig}
166+
refetchList={refetchUserPermissionList}
167+
filterConfig={{
168+
searchKey: urlFilters.searchKey,
169+
status: urlFilters.status,
170+
}}
171+
selectedIdentifiersCount={selectedUsersCount}
172+
isCountApproximate={isBulkSelectionApplied}
173+
entityType={BulkSelectionEntityTypes.users}
174+
/>
175+
)}
176176
</div>
177177

178178
{isClearBulkSelectionModalOpen && (

src/Pages/GlobalConfigurations/Authorization/UserPermissions/List/UserPermissionListHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const UserPermissionListHeader = ({
4747
const { isSuperAdmin } = useMainContext()
4848

4949
return (
50-
<div className="flex dc__content-space px-20 dc__zi-2">
50+
<div className="flex dc__content-space px-20 dc__zi-2 pt-16">
5151
<div className="flex dc__gap-8">
5252
<h2 className="fs-16 lh-32 cn-9 fw-6 m-0">User Permissions</h2>
5353
<InfoIconTippy

src/Pages/GlobalConfigurations/Authorization/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ export type PermissionGroupBulkDeletePayload =
255255
export interface AuthorizationContextProps {
256256
customRoles: CustomRoleAndMeta
257257
isAutoAssignFlowEnabled: boolean
258+
authorizationContainerRef: React.RefObject<HTMLDivElement>
258259
}
259260

260261
export interface AuthorizationProviderProps {

src/components/dockerRegistry/Docker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ const DockerForm = ({
798798
username: trimmedUsername,
799799
password:
800800
customState.password.value === DEFAULT_SECRET_PLACEHOLDER
801-
? parsePassword(customState.password.value)
802-
: `'${parsePassword(customState.password.value)}'`,
801+
? ''
802+
: `'${JSON.stringify(JSON.parse(customState.password.value))}'`,
803803
}
804804
: {}),
805805
...(registryStorageType !== RegistryStorageType.OCI_PUBLIC &&

0 commit comments

Comments
 (0)