Skip to content
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
Expand Up @@ -288,36 +288,38 @@ function Operation(props) {
</div>
</Tooltip>
)}
<Tooltip
title={
(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? (
<FormattedMessage
id={'Apis.Details.Resources.components.Operation.disable.security'
+ '.when.used.in.api.products'}
defaultMessage='Security enabled'
/>
)
: (
<FormattedMessage
id='Apis.Details.Resources.components.enabled.security'
defaultMessage='No security'
/>
)
}
aria-label={(
<FormattedMessage
id='Apis.Details.Resources.components.Operation.security.operation'
defaultMessage='Security '
/>
)}
>
<IconButton aria-label='Security' size='large'>
{(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? <LockIcon fontSize='small' />
: <LockOpenIcon fontSize='small' />}
</IconButton>
</Tooltip>
{componentValidator.includes('operationSecurity') && (
<Tooltip
title={
(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? (
<FormattedMessage
id={'Apis.Details.Resources.components.Operation.disable.security'
+ '.when.used.in.api.products'}
defaultMessage='Security enabled'
/>
)
: (
<FormattedMessage
id='Apis.Details.Resources.components.enabled.security'
defaultMessage='No security'
/>
)
}
aria-label={(
<FormattedMessage
id='Apis.Details.Resources.components.Operation.security.operation'
defaultMessage='Security '
/>
)}
>
<IconButton aria-label='Security' size='large'>
{(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? <LockIcon fontSize='small' />
: <LockOpenIcon fontSize='small' />}
</IconButton>
</Tooltip>
)}

</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ export default function OperationGovernance(props) {
setFocusOperationLevel(true);
document.querySelector('#react-root').scrollTop = 195;
};

if (!componentValidator.includes('operationSecurity') &&
!componentValidator.includes('operationLevelRateLimiting')) {
return null;
}

return (
<>
<Grid item xs={12} md={12}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,36 +403,38 @@ function ToolDetails(props) {
</div>
</Tooltip>
)}
<Tooltip
title={
(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? (
<FormattedMessage
id={'Apis.Details.Resources.components.Operation.disable.security'
+ '.when.used.in.api.products'}
defaultMessage='Security enabled'
/>
)
: (
<FormattedMessage
id='Apis.Details.Resources.components.enabled.security'
defaultMessage='No security'
/>
)
}
aria-label={(
<FormattedMessage
id='Apis.Details.Resources.components.Operation.security.operation'
defaultMessage='Security '
/>
)}
>
<IconButton aria-label='Security' size='large'>
{(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? <LockIcon fontSize='small' />
: <LockOpenIcon fontSize='small' />}
</IconButton>
</Tooltip>
{componentValidator.includes('operationSecurity') && (
<Tooltip
title={
(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? (
<FormattedMessage
id={'Apis.Details.Resources.components.Operation.disable.security'
+ '.when.used.in.api.products'}
defaultMessage='Security enabled'
/>
)
: (
<FormattedMessage
id='Apis.Details.Resources.components.enabled.security'
defaultMessage='No security'
/>
)
}
aria-label={(
<FormattedMessage
id='Apis.Details.Resources.components.Operation.security.operation'
defaultMessage='Security '
/>
)}
>
<IconButton aria-label='Security' size='large'>
{(operation['x-auth-type'] && operation['x-auth-type'].toLowerCase() !== 'none')
? <LockIcon fontSize='small' />
: <LockOpenIcon fontSize='small' />}
</IconButton>
</Tooltip>
)}
</Box>
</Grid>
</Grid>
Expand Down