Skip to content

Commit 61718a5

Browse files
jinapurapuJillian Inapurapubexsoft
authored
Size handling for CounterCard long value (#2345)
Avoids overlap of counterValue text and Browse button. ![Screen Shot 2022-09-30 at 10 42 41 AM](https://user-images.githubusercontent.com/65002498/193326883-9379f6de-73c7-4fee-a5e5-0e50bd052359.png) Co-authored-by: Jillian Inapurapu <[email protected]> Co-authored-by: Alex <[email protected]>
1 parent 2fed357 commit 61718a5

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

portal-ui/src/common/SecureComponent/permissions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ export const IAM_PAGES = {
129129
ACCOUNT_ADD: "/identity/account/new-account",
130130
USER_SA_ACCOUNT_ADD: "/identity/users/new-user-sa/:userName",
131131

132-
/* Access */
133132
POLICIES: "/identity/policies",
134133
POLICY_ADD: "/identity/add-policy",
135134
POLICIES_VIEW: "/identity/policies/*",

portal-ui/src/screens/Console/Buckets/BucketDetails/BucketDetails.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ const BucketDetails = ({ classes }: IBucketDetailsProps) => {
145145
IAM_SCOPES.S3_DELETE_BUCKET,
146146
IAM_SCOPES.S3_FORCE_DELETE_BUCKET,
147147
]);
148-
const canBrowse = hasPermission(
149-
bucketName,
150-
IAM_PERMISSIONS[IAM_ROLES.BUCKET_VIEWER]
151-
);
148+
const canBrowse = hasPermission(bucketName, [IAM_SCOPES.S3_LIST_BUCKET]);
152149

153150
useEffect(() => {
154151
setActiveTab(selTab);

portal-ui/src/screens/Console/Dashboard/BasicDashboard/BasicDashboard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ const BasicDashboard = ({ usage }: IDashboardProps) => {
240240
padding: 5,
241241
height: 30,
242242
fontSize: 14,
243+
marginTop: 20,
243244
}}
244245
/>
245246
</TooltipWrapper>

portal-ui/src/screens/Console/Dashboard/BasicDashboard/CounterCard.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,23 @@ const CounterCard = ({
7878
<Tooltip title={counterValue} placement="bottom" enterDelay={500}>
7979
<Box
8080
sx={{
81-
fontSize: {
82-
xl: "55px",
83-
lg: "50px",
84-
md: "36px",
85-
sm: "35px",
86-
xs: "35px",
87-
},
81+
fontSize:
82+
counterValue.toString().length >= 5
83+
? {
84+
xl: "50px",
85+
lg: "45px",
86+
md: "28px",
87+
sm: "28px",
88+
xs: "20px",
89+
}
90+
: {
91+
xl: "55px",
92+
lg: "50px",
93+
md: "36px",
94+
sm: "35px",
95+
xs: "35px",
96+
},
97+
8898
fontWeight: 600,
8999
overflow: "hidden",
90100
textOverflow: "ellipsis",

0 commit comments

Comments
 (0)