Skip to content

Add readme file and fix UI issue #7635

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 2 commits into from
Oct 18, 2019
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Override public folder
If you want to override a certain devportal webapp static files, this is the correct place to do it.
You do not have to copy the entire directory, only copy the desired file/files.

#### Example

Following will override the main.css file.
```sh
override
├── Readme.txt
└── css
└── main.css

```

### Configurations
Add following configurations to jaggery.conf file in order to apply the changes.

```json
"filters":[
{
"name":"URLMappingFilter",
"class":"org.wso2.carbon.apimgt.impl.filter.URLMappingFilter"
}
]


"filterMappings":[
{
"name":"URLMappingFilter",
"url":"/site/public/*"
}
]
```

### Runtime
You do not re-build or restart the server. This changes will apply runtime after configs are done.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Paper from '@material-ui/core/Paper';
import Grid from '@material-ui/core/Grid';
import { FormattedMessage, injectIntl } from 'react-intl';
import Application from 'AppData/Application';
import AuthManager from 'AppData/AuthManager';
import SubscribeToApi from 'AppComponents/Shared/AppsAndKeys/SubscribeToApi';
import { ScopeValidation, resourceMethods, resourcePaths } from 'AppComponents/Shared/ScopeValidation';
import { ApiContext } from '../ApiContext';
Expand Down Expand Up @@ -271,6 +272,7 @@ class Credentials extends React.Component {
throttlingPolicyList,
applicationOwner,
} = this.state;
const user = AuthManager.getUser();
return (
<Grid container>
<Grid item md={12} lg={11}>
Expand All @@ -297,15 +299,20 @@ class Credentials extends React.Component {
<GenericDisplayDialog
classes={classes}
handleClick={this.goToWizard}
heading={intl.formatMessage({
heading={user ? intl.formatMessage({
defaultMessage: 'Generate Credentials',
id: 'Apis.Details.Credentials.Credentials.generate.credentials',
})}
}) :
intl.formatMessage({
defaultMessage: 'Sign In to Generate Credentials',
id: 'Apis.Details.Credentials.Credentials.generate.credentials',
})
}
caption={intl.formatMessage({
defaultMessage: 'You need to generate credentials to access this API',
id:
'Apis.Details.Credentials.Credentials.you.need.to'
+ '.generate.credentials.to.access.this.api',
'Apis.Details.Credentials.Credentials.you.need.to'
+ '.generate.credentials.to.access.this.api',
})}
buttonText={intl.formatMessage({
defaultMessage: 'GENERATE',
Expand All @@ -322,7 +329,7 @@ class Credentials extends React.Component {
<Typography variant='h5'>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials'
+ '.api.credentials.generate'}
+ '.api.credentials.generate'}
defaultMessage='Generate Credentials'
/>
</Typography>
Expand All @@ -331,7 +338,7 @@ class Credentials extends React.Component {
<Typography variant='body2'>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.'
+ 'api.credentials.with.wizard.message'}
+ 'api.credentials.with.wizard.message'}
defaultMessage={
'Use the Key Generation Wizard. '
+ 'Create a new application -> '
Expand All @@ -342,7 +349,8 @@ class Credentials extends React.Component {
</Typography>
<Link
to={`/apis/${api.id}/credentials/wizard`}
style={!api.isSubscriptionAvailable ? { pointerEvents: 'none' } : null}
style={!api.isSubscriptionAvailable ?
{ pointerEvents: 'none' } : null}
>
<Button
variant='contained'
Expand All @@ -352,7 +360,7 @@ class Credentials extends React.Component {
>
<FormattedMessage
id={'Apis.Details.Credentials.' +
'SubscibeButtonPanel.subscribe.wizard'}
'SubscibeButtonPanel.subscribe.wizard'}
defaultMessage='Wizard'
/>
</Button>
Expand All @@ -363,9 +371,9 @@ class Credentials extends React.Component {
<Typography variant='body2'>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials' +
'.api.credentials.with.subscribe.message'}
'.api.credentials.with.subscribe.message'}
defaultMessage={'Subscribe to an application' +
' and generate credentials'}
' and generate credentials'}
/>
</Typography>
<SubscribeToApi
Expand All @@ -386,7 +394,7 @@ class Credentials extends React.Component {
>
<FormattedMessage
id={'Apis.Details.Credentials.'
+ 'SubscibeButtonPanel.subscribe.btn'}
+ 'SubscibeButtonPanel.subscribe.btn'}
defaultMessage='Subscribe'
/>
</Button>
Expand All @@ -396,23 +404,23 @@ class Credentials extends React.Component {
</ScopeValidation>
</div>
{/*
****************************
Subscription List
***************************
*/}
****************************
Subscription List
***************************
*/}
{subscribedApplications && subscribedApplications.length > 0 && (
<React.Fragment>
<Typography variant='h5'>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.' +
'api.credentials.subscribed.apps.title'}
'api.credentials.subscribed.apps.title'}
defaultMessage='View Credentials'
/>
</Typography>
<Typography variant='body2'>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.' +
'api.credentials.subscribed.apps.description'}
'api.credentials.subscribed.apps.description'}
defaultMessage='( Subscribed Applications )'
/>
</Typography>
Expand All @@ -421,21 +429,21 @@ class Credentials extends React.Component {
<th className={classes.th}>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.' +
'api.credentials.subscribed.apps.name'}
'api.credentials.subscribed.apps.name'}
defaultMessage='Application Name'
/>
</th>
<th className={classes.th}>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.api.' +
'credentials.subscribed.apps.tier'}
'credentials.subscribed.apps.tier'}
defaultMessage='Throttling Tier'
/>
</th>
<th className={classes.th}>
<FormattedMessage
id={'Apis.Details.Credentials.Credentials.' +
'api.credentials.subscribed.apps.status'}
'api.credentials.subscribed.apps.status'}
defaultMessage='Application Status'
/>
</th>
Expand Down