Skip to content

Commit

Permalink
text changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaramakrishnan-techconative committed Dec 14, 2023
1 parent 8e3e329 commit cd30eb8
Show file tree
Hide file tree
Showing 16 changed files with 155 additions and 186 deletions.
14 changes: 7 additions & 7 deletions dist/config-import-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/config-import-bundle.js.map

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions dist/log.bundle-sizes.rest-import-ui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@ lodash: 239.44 KB (2.11%)
core-js-pure: 165.03 KB (1.45%)
@mui\system: 162.12 KB (1.43%)
immutable: 139.01 KB (1.22%)
react-dom: 129.98 KB (1.14%)
js-yaml: 105.01 KB (0.924%)
react-redux: 90.92 KB (0.800%)
axios: 87.01 KB (0.766%)
react-dom: 129.98 KB (1.15%)
js-yaml: 105.01 KB (0.925%)
react-redux: 90.92 KB (0.801%)
axios: 87.01 KB (0.767%)
@reduxjs\toolkit: 84.36 KB (0.743%)
i18next: 82.68 KB (0.728%)
@popperjs\core: 68.84 KB (0.606%)
i18next: 82.68 KB (0.729%)
@popperjs\core: 68.84 KB (0.607%)
buffer: 56.99 KB (0.502%)
react-transition-group: 55.52 KB (0.489%)
@emotion\cache: 40.02 KB (0.352%)
@emotion\cache: 40.02 KB (0.353%)
@mui\utils: 34.3 KB (0.302%)
redux: 28.94 KB (0.255%)
react-i18next: 25.61 KB (0.225%)
react-i18next: 25.61 KB (0.226%)
stylis: 23.54 KB (0.207%)
@emotion\react: 23.27 KB (0.205%)
@emotion\styled: 19 KB (0.167%)
sha.js: 18.57 KB (0.163%)
immer: 17.99 KB (0.158%)
sha.js: 18.57 KB (0.164%)
immer: 17.99 KB (0.159%)
url-parse: 16.23 KB (0.143%)
@emotion\serialize: 13.35 KB (0.118%)
js-base64: 10.11 KB (0.0890%)
reselect: 8.85 KB (0.0779%)
react: 7.98 KB (0.0703%)
redux-immutable: 5.43 KB (0.0478%)
js-base64: 10.11 KB (0.0891%)
reselect: 8.85 KB (0.0780%)
react: 7.98 KB (0.0704%)
redux-immutable: 5.43 KB (0.0479%)
process: 5.29 KB (0.0466%)
@emotion\sheet: 4.66 KB (0.0411%)
scheduler: 4.33 KB (0.0381%)
@emotion\is-prop-valid: 4.33 KB (0.0381%)
deep-extend: 4.19 KB (0.0369%)
@babel\runtime: 3.93 KB (0.0346%)
@babel\runtime: 3.93 KB (0.0347%)
@babel\runtime-corejs3: 3.93 KB (0.0346%)
base64-js: 3.84 KB (0.0338%)
@mui\styled-engine: 3.55 KB (0.0313%)
Expand All @@ -43,8 +43,8 @@ css.escape: 3.08 KB (0.0271%)
serialize-error: 2.93 KB (0.0258%)
hoist-non-react-statics: 2.68 KB (0.0236%)
prop-types: 2.6 KB (0.0229%)
use-sync-external-store: 2.59 KB (0.0228%)
querystringify: 2.5 KB (0.0220%)
use-sync-external-store: 2.59 KB (0.0229%)
querystringify: 2.5 KB (0.0221%)
react-is: 2.4 KB (0.0212%)
ieee754: 2.1 KB (0.0185%)
html-parse-stringify: 2.09 KB (0.0184%)
Expand All @@ -54,14 +54,14 @@ safe-buffer: 1.63 KB (0.0144%)
clipboard-copy: 1.61 KB (0.0142%)
dom-helpers: 1.57 KB (0.0138%)
randombytes: 1.54 KB (0.0136%)
@braintree\sanitize-url: 1.38 KB (0.0121%)
@braintree\sanitize-url: 1.38 KB (0.0122%)
redux-thunk: 1.27 KB (0.0112%)
@emotion\unitless: 924 B (0.00794%)
inherits: 753 B (0.00647%)
requires-port: 753 B (0.00647%)
@emotion\unitless: 924 B (0.00795%)
inherits: 753 B (0.00648%)
requires-port: 753 B (0.00648%)
@emotion\use-insertion-effect-with-fallbacks: 472 B (0.00406%)
@emotion\weak-memoize: 379 B (0.00326%)
clsx: 374 B (0.00322%)
void-elements: 338 B (0.00291%)
@emotion\memoize: 202 B (0.00174%)
<self>: 1.7 MB (15.4%)
<self>: 1.69 MB (15.3%)
14 changes: 7 additions & 7 deletions dist/rest-import-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rest-import-bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rest-import-wavemaker",
"version": "0.1.88",
"version": "0.1.92",
"private": false,
"main": "./dist/core/components/RestImport.js",
"release": {
Expand Down
24 changes: 8 additions & 16 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function App() {
base_path: "http://localhost:4000/",
proxy_path: "restimport",
list_provider: "get-default-provider",
settingsUpload:"",
settingsUpload: "",
getprovider: "getprovider",
addprovider: "addprovider",
authorizationUrl: "authorizationUrl",
Expand All @@ -32,18 +32,6 @@ export default function App() {
type: "TIME",
value: "vew"
}],
state_val: "eyJtb2RlIjoiZGVzaWduVGltZSIsInByb2plY3RJZCI6IldNUFJKMmM5MTgwODg4OWE5NjQwMDAxOGExYzE0YjBhNzI4YTQifQ==",
default_proxy_state: "ON", // Execute the proxy configuration if the value of default_proxy_state is set to "ON"; otherwise, execute the OAuth configuration.
oAuthConfig: {
base_path: "https://www.wavemakeronline.com/studio/services",
settingsUpload:"",
project_id: "",
proxy_path: '', // /projects/{projectID}/restservices/invoke?optimizeResponse=true
list_provider: "oauth2/providers/default",
getprovider: "", // /projects/{projectID}/oauth2/providers
addprovider: "", // /projects/{projectID}/oauth2/providers
authorizationUrl: "studio/services/projects/WMPRJ2c9180868bb704a7018bb82b602a00cd/oauth2/:providerID/authorizationUrl", // /projects/{projectID}/oauth2/{providerId}/authorizationUrl
},
setResponse: {
testing: false,
},
Expand All @@ -54,11 +42,15 @@ export default function App() {
errorMethod: "toast",
errorMessageTimeout: 5000
},
handleResponse: (request: AxiosRequestConfig, response?: AxiosResponse) => {
console.log(request, response)
handleResponse: (request: AxiosRequestConfig, settingsUploadData: any, response?: AxiosResponse) => {
console.log(request, response, settingsUploadData)
},
hideMonacoEditor: (value: boolean) => {
},
hideMonacoEditor: (value: boolean) => { },
getServiceName(value: string) { },
getUseProxy(value) {
console.log(value)
},
setServiceName: '',
viewMode: false,
setResponseHeaders: { kingkong: "test" },
Expand Down
8 changes: 4 additions & 4 deletions src/core/components/ConfigModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ConfigModel({ handleOpen, handleClose, handleParentModal

const customProviderList = useSelector((store: any) => store.slice.providerList)
useEffect(() => {
const base_path = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path : proxyObj?.oAuthConfig?.base_path
const base_path = proxyObj?.proxy_conf?.base_path
setBasePath(base_path)
}, [proxyObj])

Expand Down Expand Up @@ -184,7 +184,7 @@ export default function ConfigModel({ handleOpen, handleClose, handleParentModal
}
const filteredProviders = customProviderList.filter((provider: { providerId: string; }) => provider.providerId !== providerId);
const newProviderList = [...filteredProviders, newProvider];
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.addprovider : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.addprovider;
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.addprovider
const configWProvider: AxiosRequestConfig = {
url: url,
data: newProviderList,
Expand Down Expand Up @@ -212,7 +212,7 @@ export default function ConfigModel({ handleOpen, handleClose, handleParentModal
}

const handleProviderList = async () => {
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.getprovider : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.getprovider;
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.getprovider
try {
const response = await getProviderList(url);
const sortedProviders = response.data;
Expand All @@ -223,7 +223,7 @@ export default function ConfigModel({ handleOpen, handleClose, handleParentModal
}

const handleAuthorizationUrl = async () => {
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.authorizationUrl.replace(":providerID", providerId) : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.authorizationUrl.replace(":providerID", providerId);
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.authorizationUrl.replace(":providerID", providerId)
const configProvider = {
url: url,
method: "GET",
Expand Down
6 changes: 3 additions & 3 deletions src/core/components/ProviderModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function ProviderModal({ handleOpen, handleClose, proxyObj, handl
}, [currentProvider])

const handleAuthorizationUrl = async () => {
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.authorizationUrl.replace(":providerID", currentProvider?.providerId as string) : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.authorizationUrl.replace(":providerID", currentProvider?.providerId as string);
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.authorizationUrl.replace(":providerID", currentProvider?.providerId as string)
const configProvider = {
url: url,
method: "GET",
Expand All @@ -91,7 +91,7 @@ export default function ProviderModal({ handleOpen, handleClose, proxyObj, handl
setopenConfig(false)
}
const handleProviderList = async () => {
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.getprovider : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.getprovider;
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.getprovider
try {
const response = await getProviderList(url);
const sortedProviders = response.data;
Expand All @@ -101,7 +101,7 @@ export default function ProviderModal({ handleOpen, handleClose, proxyObj, handl
}
}
const handleDefaultProviderList = async () => {
const url = proxyObj?.default_proxy_state === 'ON' ? proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.list_provider : proxyObj?.oAuthConfig?.base_path + proxyObj?.oAuthConfig?.list_provider;
const url = proxyObj?.proxy_conf?.base_path + proxyObj?.proxy_conf?.list_provider
const configProvider = {
url: url,
method: "GET",
Expand Down
Loading

0 comments on commit cd30eb8

Please sign in to comment.