Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e215507
Add useContentBase prop to ListBase for conditional rendering
Piumal1999 Jan 28, 2025
9d200c6
Add routes, API client support and policy creation feature
Piumal1999 Jan 28, 2025
b36e747
Fix the create/edit ruleset functionality
Piumal1999 Jan 29, 2025
705fb50
Update license headers
Piumal1999 Jan 29, 2025
2db2924
Merge pull request #858 from Piumal1999/feature-governance
AnuGayan Jan 29, 2025
106fca3
Update license headers
Piumal1999 Jan 29, 2025
de4628d
Implement governance results pages
Piumal1999 Jan 29, 2025
3513dd1
Fix the navigation bug
Piumal1999 Jan 30, 2025
6c70b71
Add intl support to overview pages
Piumal1999 Jan 30, 2025
16f4744
Add handling for empty data scenarios in progress indicators
Piumal1999 Jan 30, 2025
f8a5c8f
Merge pull request #859 from Piumal1999/feature-governance
AnuGayan Jan 30, 2025
5df5125
Implement compliance page on publisher portal
Piumal1999 Jan 30, 2025
ee53248
Merge pull request #861 from Piumal1999/feature-governance
AnuGayan Jan 30, 2025
4158f08
Add empty state handling and intl support
Piumal1999 Jan 30, 2025
e92e06c
Minor UI improvements
Piumal1999 Feb 1, 2025
595d84a
Add doc link input and provider
Piumal1999 Feb 1, 2025
d6b14e8
Add new ruleset selector component
Piumal1999 Feb 2, 2025
0577c4c
Update swagger URLs
Piumal1999 Feb 2, 2025
93c302e
Integrate label feature to policy creation
Piumal1999 Feb 2, 2025
eb637b0
Dispaly warning when overwriting ruleset content
Piumal1999 Feb 3, 2025
d8b35e5
Fix the errors due to API changes
Piumal1999 Feb 3, 2025
307d926
Fix the issues related to API changes
Piumal1999 Feb 3, 2025
52eed85
Improve the charts
Piumal1999 Feb 3, 2025
53ef0d3
Fix the api calls in publisher portal
Piumal1999 Feb 3, 2025
51da2c7
Merge pull request #862 from Piumal1999/feature-governance
AnuGayan Feb 3, 2025
bb70152
Fix issue in loading governance in across portals
AnuGayan Feb 3, 2025
0e5e50a
Merge branch 'feature-governance' of https://github.com/wso2/apim-app…
AnuGayan Feb 3, 2025
1b6eb1e
Fix issue in loading governance in across portals
AnuGayan Feb 3, 2025
284e449
Update login_callback.jsp
AnuGayan Feb 5, 2025
8edd0ce
Update login_callback.jsp
AnuGayan Feb 5, 2025
dad28f3
Merge pull request #870 from AnuGayan/main-4.5.0
Avishka-Shamendra Feb 5, 2025
58fbb88
Improve the Publisher Portal Compliance Page
Piumal1999 Feb 3, 2025
9912111
Add form validations and lint fixes
Piumal1999 Feb 6, 2025
3f0611c
Update localization files
Piumal1999 Feb 6, 2025
b27907b
Remove unwanted whitespace changes
Piumal1999 Feb 7, 2025
b4fa9af
Update the rule table value
Piumal1999 Feb 7, 2025
78fd88c
Fix the ruleset pie chart logic
Piumal1999 Feb 7, 2025
0462b37
Fix lint issue
Piumal1999 Feb 7, 2025
befe976
Merge pull request #869 from Piumal1999/feature-governance
AnuGayan Feb 7, 2025
0cc5aa0
Correct the cookie name in logout/refresh callbacks
Piumal1999 Feb 7, 2025
07f1b99
Merge pull request #887 from Piumal1999/feature-governance
Avishka-Shamendra Feb 7, 2025
ec3f5d7
Merge branch 'main' into feature-governance
Avishka-Shamendra Feb 7, 2025
8a20abb
Fix api name display issue
Piumal1999 Feb 7, 2025
cb0f02b
Fix the reliability bug caught by sonarqube check
Piumal1999 Feb 7, 2025
97dde76
Improve the UI to display rule violations when blocking
Piumal1999 Feb 7, 2025
c341b41
Fix lint issues
Piumal1999 Feb 7, 2025
3eb7144
Update translations
Piumal1999 Feb 7, 2025
9031ba7
Fix lint issues
Piumal1999 Feb 7, 2025
8570123
Merge pull request #890 from Piumal1999/feature-governance
AnuGayan Feb 8, 2025
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
1 change: 1 addition & 0 deletions portals/admin/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<servlet-mapping>
<servlet-name>index</servlet-name>
<url-pattern>/tasks/*</url-pattern>
<url-pattern>/governance/*</url-pattern>
<url-pattern>/microgateway/*</url-pattern>
<url-pattern>/settings/*</url-pattern>
<url-pattern>/categories/*</url-pattern>
Expand Down
362 changes: 352 additions & 10 deletions portals/admin/src/main/webapp/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions portals/admin/src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@mui/lab": "^5.0.0-alpha.160",
"@mui/material": "^5.15.4",
"@mui/system": "^5.15.4",
"@mui/x-charts": "^7.24.0",
"@mui/x-date-pickers": "^7.14.0",
"@mui/x-tree-view": "^6.17.0",
"@react-pdf/renderer": "^3.4.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@
cookie.setMaxAge((int) expiresIn);
response.addCookie(cookie);

cookie = new Cookie("AM_ADMIN_ACC_TOKEN_DEFAULT_P2", accessTokenPart2);
cookie.setPath(proxyContext != null ? proxyContext + "/api/am/governance/" : "/api/am/governance/");
cookie.setHttpOnly(true);
cookie.setSecure(true);
cookie.setMaxAge((int) expiresIn);
response.addCookie(cookie);

cookie = new Cookie("AM_REF_TOKEN_DEFAULT_P2", refreshTokenPart2);
cookie.setPath(context + "/");
cookie.setHttpOnly(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
cookie.setMaxAge(2);
response.addCookie(cookie);

cookie = new Cookie("AM_ADMIN_ACC_TOKEN_DEFAULT_P2", "");
cookie.setPath("/api/am/governance/" + context + "/");
cookie.setHttpOnly(true);
cookie.setSecure(true);
cookie.setMaxAge(2);
response.addCookie(cookie);

cookie = new Cookie("AM_REF_TOKEN_DEFAULT_P2", "");
cookie.setPath(context + "/");
cookie.setHttpOnly(true);
Expand Down
7 changes: 7 additions & 0 deletions portals/admin/src/main/webapp/services/refresh/refresh.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@
cookie.setMaxAge((int) expiresIn);
response.addCookie(cookie);

cookie = new Cookie("AM_ADMIN_ACC_TOKEN_DEFAULT_P2", accessTokenPart2);
cookie.setPath("/api/am/governance/");
cookie.setHttpOnly(true);
cookie.setSecure(true);
cookie.setMaxAge((int) expiresIn);
response.addCookie(cookie);

cookie = new Cookie("AM_REF_TOKEN_DEFAULT_P2", refreshTokenPart2);
cookie.setPath(context + "/");
cookie.setHttpOnly(true);
Expand Down
184 changes: 184 additions & 0 deletions portals/admin/src/main/webapp/site/public/locales/en.json

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions portals/admin/src/main/webapp/site/public/locales/fr.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions portals/admin/src/main/webapp/source/dev/auth_login.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ function devServerBefore(app) {
maxAge,
});

res.cookie('AM_ACC_TOKEN_DEFAULT_P2', accessTokenPart2, {
path: '/api/am/governance/',
httpOnly: true,
secure: true,
maxAge,
});

res.cookie('AM_ACC_TOKEN_DEFAULT_P2', accessTokenPart2, {
path: '/api/am/service-catalog/v1/',
httpOnly: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function ListBase(props) {
addedActions,
enableCollapsable,
renderExpandableRow,
useContentBase,
} = props;

const [searchText, setSearchText] = useState('');
Expand Down Expand Up @@ -223,6 +224,7 @@ function ListBase(props) {
customToolbar: null,
responsive: 'vertical',
searchText,
rowsPerPageOptions: [5, 10, 25, 50, 100],
onColumnSortChange,
textLabels: {
body: {
Expand All @@ -244,137 +246,137 @@ function ListBase(props) {
},
expandableRows: enableCollapsable,
renderExpandableRow,
...props.options,
};

// If no apiCall is provided OR,
// retrieved data is empty, display an information card.
if (!apiCall || (data && data.length === 0)) {
return (
<ContentBase
{...pageProps}
pageStyle='small'
>
<Card>
<CardContent>
{emptyBoxTitle}
{emptyBoxContent}
</CardContent>
<CardActions>
{addButtonOverride || (
EditComponent && (<EditComponent updateList={fetchData} {...addButtonProps} />)
)}
</CardActions>
</Card>
</ContentBase>
const content = (
<Card>
<CardContent>
{emptyBoxTitle}
{emptyBoxContent}
</CardContent>
<CardActions>
{addButtonOverride || (
EditComponent && (<EditComponent updateList={fetchData} {...addButtonProps} />)
)}
</CardActions>
</Card>
);

return useContentBase ? (
<ContentBase {...pageProps} pageStyle='small'>{content}</ContentBase>
) : content;
}

// If apiCall is provided and data is not retrieved yet, display progress component
if (!error && apiCall && !data) {
return (
<ContentBase pageStyle='paperLess'>
<InlineProgress />
</ContentBase>

);
const content = <InlineProgress />;
return useContentBase ? (
<ContentBase pageStyle='paperLess'>{content}</ContentBase>
) : content;
}
if (error) {
return (
<ContentBase {...pageProps}>
<Alert severity='error'>{error}</Alert>
</ContentBase>

);
if (error) {
const content = <Alert severity='error'>{error}</Alert>;
return useContentBase ? (
<ContentBase {...pageProps}>{content}</ContentBase>
) : content;
}
return (

const mainContent = (
<>
<ContentBase {...pageProps}>
{(searchActive || addButtonProps) && (
<AppBar
sx={{ borderBottom: '1px solid rgba(0, 0, 0, 0.12)' }}
position='static'
color='default'
elevation={0}
>
<Toolbar>
<Grid container spacing={2} alignItems='center'>
{(searchActive || addButtonProps) && (
<AppBar
sx={{ borderBottom: '1px solid rgba(0, 0, 0, 0.12)' }}
position='static'
color='default'
elevation={0}
>
<Toolbar>
<Grid container spacing={2} alignItems='center'>

<Grid item>
{searchActive && (<SearchIcon sx={{ display: 'block' }} color='inherit' />)}
</Grid>
<Grid item xs>
{searchActive && (
<TextField
variant='standard'
fullWidth
placeholder={searchPlaceholder}
sx={(theme) => ({
'& .search-input': {
fontSize: theme.typography.fontSize,
},
})}
InputProps={{
disableUnderline: true,
className: 'search-input',
}}
// eslint-disable-next-line react/jsx-no-duplicate-props
inputProps={{
'aria-label': 'search-by-policy',
}}
onChange={filterData}
value={searchText}
<Grid item>
{searchActive && (<SearchIcon sx={{ display: 'block' }} color='inherit' />)}
</Grid>
<Grid item xs>
{searchActive && (
<TextField
variant='standard'
fullWidth
placeholder={searchPlaceholder}
sx={(theme) => ({
'& .search-input': {
fontSize: theme.typography.fontSize,
},
})}
InputProps={{
disableUnderline: true,
className: 'search-input',
}}
// eslint-disable-next-line react/jsx-no-duplicate-props
inputProps={{
'aria-label': 'search-by-policy',
}}
onChange={filterData}
value={searchText}
/>
)}
</Grid>
<Grid item>
{addButtonOverride || (
EditComponent && (
<EditComponent
updateList={fetchData}
{...addButtonProps}
/>
)}
</Grid>
<Grid item>
{addButtonOverride || (
EditComponent && (
<EditComponent
updateList={fetchData}
{...addButtonProps}
/>
)
)}
<Tooltip title={(
<FormattedMessage
id='AdminPages.Addons.ListBase.reload'
defaultMessage='Reload'
)
)}
<Tooltip title={(
<FormattedMessage
id='AdminPages.Addons.ListBase.reload'
defaultMessage='Reload'
/>
)}
>
<IconButton onClick={fetchData} size='large'>
<RefreshIcon
aria-label='refresh-advanced-policies'
sx={{ display: 'block' }}
color='inherit'
/>
)}
>
<IconButton onClick={fetchData} size='large'>
<RefreshIcon
aria-label='refresh-advanced-policies'
sx={{ display: 'block' }}
color='inherit'
/>
</IconButton>
</Tooltip>
</Grid>
</IconButton>
</Tooltip>
</Grid>
</Toolbar>
</AppBar>
</Grid>
</Toolbar>
</AppBar>
)}
<div>
{data && data.length > 0 && (
<MUIDataTable
title={null}
data={data}
columns={columns}
options={options}
/>
)}
</div>
{data && data.length === 0 && (
<div>
{data && data.length > 0 && (
<MUIDataTable
title={null}
data={data}
columns={columns}
options={options}
/>
)}
<Typography color='textSecondary' align='center'>
{noDataMessage}
</Typography>
</div>
{data && data.length === 0 && (
<div>
<Typography color='textSecondary' align='center'>
{noDataMessage}
</Typography>
</div>
)}
</ContentBase>
)}
</>
);

return useContentBase ? (
<ContentBase {...pageProps}>{mainContent}</ContentBase>
) : mainContent;
}

ListBase.defaultProps = {
Expand Down Expand Up @@ -404,7 +406,10 @@ ListBase.defaultProps = {
columProps: null,
enableCollapsable: false,
renderExpandableRow: null,
useContentBase: true,
options: {},
};

ListBase.propTypes = {
EditComponent: PropTypes.element,
editComponentProps: PropTypes.shape({}),
Expand Down Expand Up @@ -432,5 +437,7 @@ ListBase.propTypes = {
addedActions: PropTypes.shape([]),
enableCollapsable: PropTypes.bool,
renderExpandableRow: PropTypes.func,
useContentBase: PropTypes.bool,
options: PropTypes.shape({}),
};
export default ListBase;
Loading
Loading