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 alignment issues in admin portal tables #814

Merged
merged 2 commits into from
Oct 18, 2024
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
5 changes: 2 additions & 3 deletions portals/admin/src/main/webapp/site/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@
"Apis.Details.Scopes.permission.status.deny": "Deny",
"Apis.Details.Scopes.permission.status.none": "None",
"Apis.Listing.Listing.apis.search": "Search",
"Apis.Listing.Listing.apis.search.label": "Search by API",
"Apis.Listing.Listing.apis.searching": "Searching",
"Apis.Listing.Listing.clear.search": "Clear Search",
"Apis.Listing.Listing.empty.message": "No Data to Display",
"Apis.Listing.Listing.search.placeholder": "Api Name",
"Apis.Listing.Listing.search.placeholder": "Search by API Name",
"Apis.Listing.apiTableHead.name": "Name",
"Apis.Listing.apiTableHead.provider": "Provider",
"Apis.Listing.apiTableHead.version": "Version",
Expand Down Expand Up @@ -251,7 +250,7 @@
"Applications.Listing.Listing.applications.searching": "Searching",
"Applications.Listing.Listing.clear.search": "Clear Search",
"Applications.Listing.Listing.empty.message": "No Data to Display",
"Applications.Listing.Listing.search.placeholder": "Application Name/Owner",
"Applications.Listing.Listing.search.placeholder": "Search Application by Name/Owner",
"Applications.Listing.apis.list.rows.more.than.label": "more than {to}",
"Applications.Listing.apis.list.rows.range.label": "{from}-{to} of {count}",
"Applications.Listing.apis.list.rows.show.label": "Show",
Expand Down
5 changes: 2 additions & 3 deletions portals/admin/src/main/webapp/site/public/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@
"Apis.Details.Scopes.permission.status.deny": "Deny",
"Apis.Details.Scopes.permission.status.none": "None",
"Apis.Listing.Listing.apis.search": "Search",
"Apis.Listing.Listing.apis.search.label": "Search by API",
"Apis.Listing.Listing.apis.searching": "Searching",
"Apis.Listing.Listing.clear.search": "Clear Search",
"Apis.Listing.Listing.empty.message": "No Data to Display",
"Apis.Listing.Listing.search.placeholder": "Api Name",
"Apis.Listing.Listing.search.placeholder": "Search by API Name",
"Apis.Listing.apiTableHead.name": "Name",
"Apis.Listing.apiTableHead.provider": "Provider",
"Apis.Listing.apiTableHead.version": "Version",
Expand Down Expand Up @@ -251,7 +250,7 @@
"Applications.Listing.Listing.applications.searching": "Searching",
"Applications.Listing.Listing.clear.search": "Clear Search",
"Applications.Listing.Listing.empty.message": "No Data to Display",
"Applications.Listing.Listing.search.placeholder": "Application Name/Owner",
"Applications.Listing.Listing.search.placeholder": "Search Application by Name/Owner",
"Applications.Listing.apis.list.rows.more.than.label": "more than {to}",
"Applications.Listing.apis.list.rows.range.label": "{from}-{to} of {count}",
"Applications.Listing.apis.list.rows.show.label": "Show",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const styles = {
height: theme.spacing(5),
'& td': {
padding: theme.spacing(0.5),
paddingLeft: theme.spacing(2),
},
}),
appOwner: {
Expand Down Expand Up @@ -75,16 +76,12 @@ const styles = {
flexDirection: 'row',
alignItems: 'left',
justifyContent: 'left',
marginLeft: 10,
},
textfield: {
maxHeight: '10px',
marginTop: '-5px',
maxWidth: '120px',
},
tableCell: {
marginLeft: 10,
},
};

const StyledTableCell = styled(TableCell)(({ theme }) => ({
Expand Down Expand Up @@ -195,13 +192,13 @@ const ApisTableContent = ({ apis, updateApiList }) => {
{api.name}
</StyledTableCell>
<StyledTableCell align='left'>
<StyledDiv sx={styles.tableCell}>
<StyledDiv>
{api.version}
</StyledDiv>
</StyledTableCell>
<StyledTableCell align='left'>
{!editableRows.has(api.id) && (
<StyledDiv sx={styles.tableCell}>
<StyledDiv>
{ api.provider }
<IconButton color='primary' onClick={() => handleEditClick(api.id)}>
<EditIcon aria-label='edit-api-settings' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ const styles = {
block: {
display: 'block',
},
clearSearch: {
position: 'absolute',
right: 111,
top: 13,
},
addUser: {
marginRight: 1,
},
Expand Down Expand Up @@ -157,17 +152,14 @@ export default function ListApis() {
<Grid item>
<SearchIcon sx={styles.block} color='inherit' />
</Grid>
<Grid item xs>
<Grid item xs sx={{ display: 'flex', alignItems: 'center' }}>
<TextField
hiddenLabel
fullWidth
variant='standard'
id='search-label'
label={intl.formatMessage({
defaultMessage: 'Search by API',
id: 'Apis.Listing.Listing.apis.search.label',
})}
placeholder={intl.formatMessage({
defaultMessage: 'Api Name',
defaultMessage: 'Search by API Name',
id: 'Apis.Listing.Listing.search.placeholder',
})}
sx={(theme) => ({
Expand All @@ -194,7 +186,6 @@ export default function ListApis() {
>
<IconButton
aria-label='delete'
sx={styles.clearSearch}
onClick={clearSearch}
>
<HighlightOffRoundedIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function ContentBase(props) {
</Toolbar>
</Grid>
<Grid item xs={11} sm={size}>
<Box pt={6} position='relative'>
<Box py={6} position='relative'>
{pageStyle === 'paperLess' || paperLess ? children : (
<Paper {...PaperProps}>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ class AppsTableContent extends Component {
{apps && apps.map((app) => {
return (
<TableRow
sx={{ height: 5, '& td': { padding: 0.5 } }}
sx={{
height: 5,
'& td': { padding: 0.5, paddingLeft: 2 },
}}
key={app.applicationId}
>
<TableCell align='left'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default function ListApplications() {
function clearSearch() {
setPage(0);
setSearchQuery('');
apiCall(page, '').then((result) => {
apiCall(page, '', '').then((result) => {
setApplicationList(result);
});
}
Expand Down Expand Up @@ -145,21 +145,24 @@ export default function ListApplications() {
<Grid item>
<SearchIcon sx={{ display: 'block' }} color='inherit' />
</Grid>
<Grid item xs>
<Grid item xs sx={{ display: 'flex', alignItems: 'center' }}>
<TextField
hiddenLabel
variant='standard'
fullWidth
id='search-label'
label={intl.formatMessage({
defaultMessage: 'Search Application',
id: 'Applications.Listing.Listing.applications.search.label',
})}
placeholder={intl.formatMessage({
defaultMessage: 'Application Name/Owner',
defaultMessage: 'Search Application by Name/Owner',
id: 'Applications.Listing.Listing.search.placeholder',
})}
sx={(theme) => ({
'& .search-input': {
fontSize: theme.typography.fontSize,
},
})}
InputProps={{
disableUnderline: true,
className: 'search-input',
}}
value={searchQuery}
onChange={setQuery}
Expand All @@ -176,11 +179,6 @@ export default function ListApplications() {
>
<IconButton
aria-label='delete'
sx={{
position: 'absolute',
right: 111,
top: 13,
}}
onClick={clearSearch}
size='large'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
"Apis.Details.Scopes.CreateScope.roles.help": "",
"Apis.Details.Scopes.Roles.Invalid": "",
"Apis.Listing.Listing.apis.search": "",
"Apis.Listing.Listing.apis.search.label": "",
"Apis.Listing.Listing.apis.searching": "",
"Apis.Listing.Listing.clear.search": "",
"Apis.Listing.Listing.empty.message": "",
Expand Down
Loading