-
Notifications
You must be signed in to change notification settings - Fork 178
Provide support to upgrade opaque apps to JWT from Admin portal #1273
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9914457
Add tabbed UI for Application settings
tharikaGitHub be6bce3
Filter apps based on token type
tharikaGitHub 9b66a70
Show tabs based on upgradable app existence
tharikaGitHub 6aa9013
Add warning message when switching tabs
tharikaGitHub 616f6a5
Fix reload issue
tharikaGitHub 3be8825
Adjust warning message and popup for more information
tharikaGitHub fad7e85
Fix code quality
tharikaGitHub de68485
Add code quality improvements
tharikaGitHub 2d228ca
Add localization files
tharikaGitHub a2b469e
Address review comments
tharikaGitHub cb295e0
Address review comments
tharikaGitHub a238e58
Address review comments
tharikaGitHub ea53c65
Address review comments
tharikaGitHub b0fe1e4
Address review comments
tharikaGitHub 53e2c8f
Fix test failure
tharikaGitHub 744e8bd
Address review comments
tharikaGitHub a2c79b4
Address review comments
tharikaGitHub 0392f09
Address review comments
tharikaGitHub 2e1707d
Fix test failure
tharikaGitHub 3deec77
Address review comments
tharikaGitHub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
...s/admin/src/main/webapp/source/src/app/components/AdminPages/Addons/TabbedContentBase.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| /* | ||
| * Copyright (c) 2026, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
| * | ||
| * WSO2 Inc. licenses this file to you under the Apache License, | ||
| * Version 2.0 (the "License"); you may not use this file except | ||
| * in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| import React, { useState } from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import Grid from '@mui/material/Grid'; | ||
| import Tabs from '@mui/material/Tabs'; | ||
| import Tab from '@mui/material/Tab'; | ||
| import Box from '@mui/material/Box'; | ||
| import ContentBase from 'AppComponents/AdminPages/Addons/ContentBase'; | ||
|
|
||
| /** | ||
| * This is a wrapper component around ContentBase used for displaying a tabbed structure. | ||
| * @param {object} props - The component props. | ||
| * @returns {JSX.Element} The rendered tabbed content component. | ||
| */ | ||
| function TabbedContentBase(props) { | ||
| const { | ||
| title, | ||
| help, | ||
| pageDescription, | ||
| tabs, | ||
| warning, | ||
| } = props; | ||
|
|
||
| const [value, setValue] = useState(0); | ||
|
|
||
| const handleChange = (event, newValue) => { | ||
| setValue(newValue); | ||
| }; | ||
|
|
||
| return ( | ||
| <ContentBase | ||
| title={title} | ||
| help={help} | ||
| pageDescription={pageDescription} | ||
| warning={value === 1 ? warning : null} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like when the user switches tabs, the warning message appears above the tabs and causes both the tabs and the table to shift. Wouldn’t it be better to always display the warning banner in this page if there's a warning? cc: @Induwara04 |
||
| > | ||
tharikaGitHub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Grid container> | ||
|
|
||
| <Grid item xs={12}> | ||
| <Tabs | ||
| variant='standard' | ||
| indicatorColor='primary' | ||
| textColor='primary' | ||
| value={value} | ||
| onChange={handleChange} | ||
| sx={{ | ||
| minHeight: 48, | ||
| backgroundColor: 'grey.200', | ||
| ml: 0, | ||
| pl: 0, | ||
| borderBottom: 'none', | ||
| '& .MuiTab-root': { | ||
| minHeight: 48, | ||
| margin: 0, | ||
| px: 6, | ||
| textTransform: 'none', | ||
| borderTop: 1, | ||
| borderLeft: 1, | ||
| borderRight: 1, | ||
| borderBottom: 1, | ||
| borderColor: 'divider', | ||
| borderBottomColor: 'divider', | ||
| borderTopLeftRadius: 8, | ||
| borderTopRightRadius: 8, | ||
| backgroundColor: 'grey.200', | ||
| color: 'text.secondary', | ||
| '&.Mui-selected': { | ||
| backgroundColor: 'background.paper', | ||
| color: 'primary.main', | ||
| fontWeight: 600, | ||
| borderBottom: 'none', | ||
| }, | ||
| '&:hover': { | ||
| backgroundColor: 'background.paper', | ||
| }, | ||
| }, | ||
| }} | ||
| > | ||
| {tabs.map((tab, index) => ( | ||
| <Tab | ||
| key={tab.id ?? index} | ||
| label={tab.label} | ||
| /> | ||
| ))} | ||
| </Tabs> | ||
| </Grid> | ||
| <Grid item xs={12}> | ||
| <Box sx={{ mt: 0 }}> | ||
| {tabs[value]?.content} | ||
| </Box> | ||
| </Grid> | ||
|
|
||
| </Grid> | ||
| </ContentBase> | ||
| ); | ||
| } | ||
|
|
||
| TabbedContentBase.propTypes = { | ||
| title: PropTypes.string.isRequired, | ||
| help: PropTypes.element.isRequired, | ||
| pageDescription: PropTypes.string, | ||
| tabs: PropTypes.arrayOf( | ||
| PropTypes.shape({ | ||
| id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), | ||
| label: PropTypes.node.isRequired, | ||
| content: PropTypes.element.isRequired, | ||
| }), | ||
| ).isRequired, | ||
| warning: PropTypes.node, | ||
| }; | ||
|
|
||
| TabbedContentBase.defaultProps = { | ||
| pageDescription: null, | ||
| warning: null, | ||
| }; | ||
|
|
||
| export default TabbedContentBase; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.