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 Tenant Usage Text Size #1812

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
70 changes: 30 additions & 40 deletions web-app/src/screens/Console/Tenants/ListTenants/ListTenants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ import React, { Fragment, useEffect, useState } from "react";
import { AddIcon, Button, HelpBox, RefreshIcon, TenantsIcon } from "mds";
import Grid from "@mui/material/Grid";
import { LinearProgress, SelectChangeEvent } from "@mui/material";
import { Theme } from "@mui/material/styles";
import { NewServiceAccount } from "../../Common/CredentialsPrompt/types";
import {
actionsTray,
containerForHeader,
searchField,
} from "../../Common/FormComponents/common/styleLibrary";
import TenantListItem from "./TenantListItem";
import AButton from "../../Common/AButton/AButton";

Expand All @@ -38,7 +32,6 @@ import { useNavigate } from "react-router-dom";
import { useAppDispatch } from "../../../../store";
import TooltipWrapper from "../../Common/TooltipWrapper/TooltipWrapper";
import PageHeaderWrapper from "../../Common/PageHeaderWrapper/PageHeaderWrapper";
import makeStyles from "@mui/styles/makeStyles";
import { api } from "../../../../api";
import {
Error,
Expand All @@ -51,38 +44,9 @@ const CredentialsPrompt = withSuspense(
React.lazy(() => import("../../Common/CredentialsPrompt/CredentialsPrompt")),
);

const useStyles = makeStyles((theme: Theme) => ({
...actionsTray,
...searchField,
...containerForHeader,
tenantsList: {
height: "calc(100vh - 195px)",
},
sortByContainer: {
display: "flex",
justifyContent: "flex-end",
marginBottom: 10,
},
innerSort: {
maxWidth: 200,
width: "95%",
display: "flex",
flexDirection: "row",
alignItems: "center",
},
sortByLabel: {
whiteSpace: "nowrap",
fontSize: 14,
color: "#838383",
fontWeight: "bold",
marginRight: 10,
},
}));

const ListTenants = () => {
const dispatch = useAppDispatch();
const navigate = useNavigate();
const classes = useStyles();

const [isLoading, setIsLoading] = useState<boolean>(false);
const [filterTenants, setFilterTenants] = useState<string>("");
Expand Down Expand Up @@ -263,15 +227,41 @@ const ListTenants = () => {
}
/>
<PageLayout>
<Grid item xs={12} className={classes.tenantsList}>
<Grid item xs={12} style={{ height: "calc(100vh - 195px)" }}>
{isLoading && <LinearProgress />}
{!isLoading && (
<Fragment>
{filteredRecords.length !== 0 && (
<Fragment>
<Grid item xs={12} className={classes.sortByContainer}>
<div className={classes.innerSort}>
<span className={classes.sortByLabel}>Sort by</span>
<Grid
item
xs={12}
style={{
display: "flex",
justifyContent: "flex-end",
marginBottom: 10,
}}
>
<div
style={{
maxWidth: 200,
width: "95%",
display: "flex",
flexDirection: "row",
alignItems: "center",
}}
>
<span
style={{
whiteSpace: "nowrap",
fontSize: 14,
color: "#838383",
fontWeight: "bold",
marginRight: 10,
}}
>
Sort by
</span>
<SelectWrapper
id={"sort-by"}
label={""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const TenantCapacity = ({
transform: "translate(-50%, -50%)",
fontWeight: "bold",
color: "#000",
fontSize: 12,
fontSize: 11,
}}
>
{!isNaN(totalUsedSpace) ? niceBytesInt(totalUsedSpace) : "N/A"}
Expand Down
Loading