diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx index 971635af383..021b4fc8446 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/ApiConsole/ApiConsole.jsx @@ -32,7 +32,7 @@ import fileDownload from 'js-file-download'; import openapiToPostman from 'openapi-to-postmanv2'; import swaggerToPostman from 'swagger2-postman2-converter'; import FileCopyIcon from '@mui/icons-material/FileCopy'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import CloudDownloadRounded from '@mui/icons-material/CloudDownloadRounded'; import queryString from 'query-string'; @@ -637,17 +637,20 @@ class ApiConsole extends React.Component { )} placement='top' > - - - + {/* */} + + {location.origin + '/api/am/devportal/v3/apis/' + api.id + '/swagger?accessToken=' + + accessTokenPart + '&X-WSO2-Tenant-Q=' + tenant + '&' + selectedAttribute + '=' + + selectedEnvironment} + {/* */} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/GenericSubscriptionUI.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/GenericSubscriptionUI.jsx index 5115a580aaa..7edfbe55689 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/GenericSubscriptionUI.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/GenericSubscriptionUI.jsx @@ -24,7 +24,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import Typography from '@mui/material/Typography'; import AccordionActions from '@mui/material/AccordionActions'; import Button from '@mui/material/Button'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import TextField from '@mui/material/TextField'; import Alert from 'AppComponents/Shared/Alert'; import makeStyles from '@mui/styles/makeStyles'; @@ -143,16 +143,20 @@ export default function GenericSubscriptionUI(props) { - */} + - + + {command} + + {/* */} ); diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/WebhookSubscriptionUI.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/WebhookSubscriptionUI.jsx index 87cfc523e0a..648b323b42d 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/WebhookSubscriptionUI.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/AsyncApiConsole/WebhookSubscriptionUI.jsx @@ -24,7 +24,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import Typography from '@mui/material/Typography'; import AccordionActions from '@mui/material/AccordionActions'; import Button from '@mui/material/Button'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import TextField from '@mui/material/TextField'; import Alert from 'AppComponents/Shared/Alert'; import makeStyles from '@mui/styles/makeStyles'; @@ -289,17 +289,21 @@ function WebhookSubscriptionUI(props) { - Alert.info(intl.formatMessage({ + {/* */} + - + + {curl} + + {/* */} ); diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Environments.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Environments.jsx index 3b7d99e47b0..f3c12b14b47 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Environments.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Environments.jsx @@ -27,7 +27,7 @@ import VerticalDivider from 'AppComponents/Shared/VerticalDivider'; import Avatar from '@mui/material/Avatar'; import PropTypes from 'prop-types'; import Typography from '@mui/material/Typography'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import Box from '@mui/material/Box'; import Icon from '@mui/material/Icon'; @@ -142,18 +142,19 @@ function Environments(props) { placement='right' className={classes.iconStyle} > - */} + onCopy('urlCopied')}> + file_copy + {defaultVersionURLs.https || defaultVersionURLs.http || defaultVersionURLs.ws || defaultVersionURLs.wss} - // text={endpoint.URLs.http} - onCopy={() => onCopy('urlCopied')} - > - - file_copy - - + + {/* */} ); @@ -252,18 +253,26 @@ function Environments(props) { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} */} + {/* > */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {selectedEndpoint.URLs.https + || selectedEndpoint.URLs.http + || selectedEndpoint.URLs.wss + || selectedEndpoint.URLs.ws} + + {/* */} @@ -308,15 +317,21 @@ function Environments(props) { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} */} + {/* > */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {selectedEndpoint.URLs.wss + || selectedEndpoint.URLs.ws} + + {/* */} @@ -382,15 +397,20 @@ function Environments(props) { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} */} + {/* > */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {advertiseInfo.apiExternalProductionEndpoint} + + {/* */} @@ -432,14 +452,19 @@ function Environments(props) { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} */} + {/* > */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {advertiseInfo.apiExternalSandboxEndpoint} + + {/* */} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Social/EmbedCode.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Social/EmbedCode.jsx index b32077b5fdd..eb9f1da91e3 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Social/EmbedCode.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Social/EmbedCode.jsx @@ -3,7 +3,7 @@ import makeStyles from '@mui/styles/makeStyles'; import Modal from '@mui/material/Modal'; import CodeIcon from '@mui/icons-material/Code'; import { FormattedMessage, injectIntl } from 'react-intl'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import Icon from '@mui/material/Icon'; @@ -112,12 +112,15 @@ function EmbedCode(props) { placement='right' className={classes.iconStyle} > - - file_copy - + {/* */} + + file_copy + {embedCode} + + {/* */} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceApi/SolaceTopicsInfo.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceApi/SolaceTopicsInfo.jsx index 469a78e9a7f..124084ad5fa 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceApi/SolaceTopicsInfo.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceApi/SolaceTopicsInfo.jsx @@ -24,7 +24,7 @@ import Box from '@mui/material/Box'; import InputBase from '@mui/material/InputBase'; import Avatar from '@mui/material/Avatar'; import Tooltip from '@mui/material/Tooltip'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import IconButton from '@mui/material/IconButton'; import Button from '@mui/material/Button'; import Icon from '@mui/material/Icon'; @@ -409,14 +409,19 @@ function SolaceTopicsInfo() { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} + {/* */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {selectedEndpoint} + + {/* */} @@ -466,14 +471,19 @@ function SolaceTopicsInfo() { placement='right' className={classes.iconStyle} > - onTopicCopy('topicCopied')} + {/* onTopicCopy('topicCopied')} */} + {/* > */} + onTopicCopy('topicCopied')} > - - file_copy - - + file_copy + {t} + + {/* */} @@ -535,14 +545,19 @@ function SolaceTopicsInfo() { placement='right' className={classes.iconStyle} > - onTopicCopy('topicCopied')} + {/* onTopicCopy('topicCopied')} */} + {/* > */} + onTopicCopy('topicCopied')} > - - file_copy - - + file_copy + {t} + + {/* */} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceEndpoints.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceEndpoints.jsx index 8344a5c2012..92acd36c893 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceEndpoints.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SolaceEndpoints.jsx @@ -25,7 +25,7 @@ import Typography from '@mui/material/Typography'; import Avatar from '@mui/material/Avatar'; import Grid from '@mui/material/Grid'; import Chip from '@mui/material/Chip'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import { upperCaseString } from 'AppData/stringFormatter'; import { ApiContext } from './ApiContext'; @@ -209,15 +209,20 @@ function SolaceEndpoints() { placement='right' className={classes.iconStyle} > - onCopy('urlCopied')} + {/* */} + onCopy('urlCopied')} > - - file_copy - - + file_copy + {p.endPointUrl} + + {/* */} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SourceDownload.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SourceDownload.jsx index e64ec6632a2..233c575814a 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SourceDownload.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/SourceDownload.jsx @@ -22,7 +22,7 @@ import makeStyles from '@mui/styles/makeStyles'; import Button from '@mui/material/Button'; import Box from '@mui/material/Box'; import CloudDownloadRounded from '@mui/icons-material/CloudDownloadRounded'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import API from 'AppData/api'; import Utils from 'AppData/Utils'; @@ -238,17 +238,18 @@ function SourceDownload(props) { )} placement='top' > - - - + {/* */} + + {/* */} ); diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/KeyConfiguration.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/KeyConfiguration.jsx index 59f7c7c6823..b5572f425ba 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/KeyConfiguration.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/KeyConfiguration.jsx @@ -23,7 +23,7 @@ import TextField from '@mui/material/TextField'; import FormHelperText from '@mui/material/FormHelperText'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import IconButton from '@mui/material/IconButton'; import Icon from '@mui/material/Icon'; @@ -270,17 +270,19 @@ const KeyConfiguration = (props) => { placement='right' className={classes.iconStyle} > - + {/**/} + size="large" + onCopy={onCopy}> file_copy + {tokenEndpoint} - + {/**/} @@ -310,17 +312,19 @@ const KeyConfiguration = (props) => { placement='right' className={classes.iconStyle} > - + {/**/} + size="large" + onClick={onCopy}> file_copy + {revokeEndpoint} - + {/**/} @@ -350,17 +354,19 @@ const KeyConfiguration = (props) => { placement='right' className={classes.iconStyle} > - + {/**/} + size="large" + onClick={onCopy}> file_copy + {userInfoEndpoint} - + {/**/} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenExchangeKeyConfiguration.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenExchangeKeyConfiguration.jsx index 12ef43c5051..3d1e5970e8f 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenExchangeKeyConfiguration.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/TokenExchangeKeyConfiguration.jsx @@ -19,7 +19,7 @@ import React, {useReducer, useState} from 'react'; import Box from '@mui/material/Box'; import withStyles from '@mui/styles/withStyles'; import TextField from '@mui/material/TextField'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import IconButton from '@mui/material/IconButton'; import Icon from '@mui/material/Icon'; @@ -483,17 +483,20 @@ const TokenExchangeKeyConfiguration = (props) => { placement='right' className={classes.iconStyle} > - + {/**/} + size="large" + onClick={onCopy} + > file_copy + {keyManagerConfig.tokenEndpoint} - + {/**/} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx index 833c869d3a9..7a47f686bcb 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewCurl.jsx @@ -19,7 +19,7 @@ import React, { useState, useContext } from 'react'; import PropTypes from 'prop-types'; import makeStyles from '@mui/styles/makeStyles'; import { Typography } from '@mui/material'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import FileCopy from '@mui/icons-material/FileCopy'; import Tooltip from '@mui/material/Tooltip'; import { FormattedMessage, injectIntl } from 'react-intl'; @@ -116,14 +116,17 @@ function ViewCurl(props) { } placement='right' > - - - + {/**/} + + {`curl -k -X POST ${tokenEndpoint} -d ` + + '"grant_type=password&username=Username&password=Password" -H ' + + `"Authorization: Basic ${bas64Encoded}"`} + {/**/} @@ -165,14 +168,17 @@ function ViewCurl(props) { } placement='right' > - - - + {/**/} + + {`curl -k -X POST ${tokenEndpoint} -d ` + + '"grant_type=client_credentials" -H ' + + `"Authorization: Basic ${bas64Encoded}"`} + {/**/} @@ -240,17 +246,23 @@ function ViewCurl(props) { } placement='right' > - - - + {/**/} + + {`curl -k -X POST ${defaultTokenEndpoint} -d ` + + '"grant_type=urn:ietf:params:oauth:grant-type:token-exchange" -d ' + + '"subject_token_type=urn:ietf:params:oauth:token-type:jwt" -d ' + + '"requested_token_type=urn:ietf:params:oauth:token-type:jwt" -d ' + + `"subject_token=${jwtToken}" -H ` + + `"Authorization: Basic ${bas64Encoded}"`} + {/**/} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewKeys.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewKeys.jsx index e2f50f86939..2d5ed80336c 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewKeys.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewKeys.jsx @@ -25,7 +25,7 @@ import FormHelperText from '@mui/material/FormHelperText'; import FormControl from '@mui/material/FormControl'; import Icon from '@mui/material/Icon'; import Grid from '@mui/material/Grid'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import CircularProgress from '@mui/material/CircularProgress'; import Tooltip from '@mui/material/Tooltip'; import Dialog from '@mui/material/Dialog'; @@ -343,20 +343,23 @@ class ViewKeys extends React.Component { } placement='right' > - this.onCopy('keyCopied')} - classes={{ root: classes.iconButton }} - > + {/* this.onCopy('keyCopied')}*/} + {/* classes={{ root: classes.iconButton }}*/} + {/*>*/} + size="large" + onCopy={() => this.onCopy('keyCopied')} + > file_copy + {consumerKey} - + {/**/} ), @@ -414,18 +417,21 @@ class ViewKeys extends React.Component { } placement='right' > - this.onCopy('secretCopied')} - classes={{ root: classes.iconButton }} - > + {/* this.onCopy('secretCopied')}*/} + {/* classes={{ root: classes.iconButton }}*/} + {/*>*/} + size="large" + onCopy={() => this.onCopy('secretCopied')} + > file_copy + {consumerSecret} - + {/**/} ), diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewSecret.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewSecret.jsx index 761e3679170..f640bf59f04 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewSecret.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewSecret.jsx @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import withStyles from '@mui/styles/withStyles'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import FileCopy from '@mui/icons-material/FileCopy'; import Typography from '@mui/material/Typography'; @@ -178,9 +178,10 @@ class ViewSecret extends React.Component { } placement='right' > - - file_copy - + {/**/} + file_copy + {secret.consumerSecret} + {/**/} diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx index d8f01176b5f..acd86d84ab0 100755 --- a/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Shared/AppsAndKeys/ViewToken.jsx @@ -18,7 +18,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import withStyles from '@mui/styles/withStyles'; -import CopyToClipboard from 'react-copy-to-clipboard'; +// import CopyToClipboard from 'react-copy-to-clipboard'; import Tooltip from '@mui/material/Tooltip'; import FileCopy from '@mui/icons-material/FileCopy'; import Typography from '@mui/material/Typography'; @@ -229,11 +229,12 @@ class ViewToken extends React.Component { } placement='right' > - - + {/**/} + file_copy + {token.accessToken} - + {/**/}