You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new queries now include named parameters (e.g. project and release) which differ from the previous format. Ensure that the updated command string format is consistently applied throughout the codebase.
Dynamic insertion of variables (like ${id}) into command strings can pose injection risks if the input is not properly sanitized. Verify that these values are validated before use.
? `AdminGetProjectPortalDetails('${id}');`
: `GetProjectPortalDetails('${id}');`,);useEffect(()=>{if(getPortalDetails.status!=='SUCCESS'){return;}// Set Details for PortalsetPortalDetails({
...getPortalDetails.data,});// Get the portal reactors if we have a portalif(getPortalDetails.data.project_has_portal){getPortalReactors();}},[getPortalDetails.status,getPortalDetails.data]);/** LOADING */if(getPortalDetails.status!=='SUCCESS'){return(<LoadingScreen.Triggerdescription="Getting app portal details"/>);}/** * @name getPortalReactors */constgetPortalReactors=()=>{constpixelString=adminMode
? `AdminGetProjectAvailableReactors(project=['${id}']);`
: `GetProjectAvailableReactors(project=['${id}']);`;monolithStore.runQuery(pixelString).then((response)=>{letoutput=undefined;lettype=undefined;output=response.pixelReturn[0].output;type=response.pixelReturn[0].operationType[0];if(type.indexOf('ERROR')>-1){notification.add({color: 'error',message: output,});return;}setPortalReactors({
...portalReactors,reactors: output,});}).catch((error)=>{notification.add({color: 'error',message: error,});});};/** * @name recompileReactors */constrecompileReactors=({ release })=>{letpixelString;if(release==null){pixelString=`ReloadInsightClasses(project='${id}');`;}else{pixelString=`ReloadInsightClasses(project='${id}', release=true);`;}monolithStore.runQuery(pixelString).then((response)=>{letoutput=undefined;lettype=undefined;output=response.pixelReturn[0].output;type=response.pixelReturn[0].operationType[0];if(type.indexOf('ERROR')>-1){notification.add({color: 'error',message: output,});return;}if(release==null){notification.add({color: 'success',message: 'Successfully recompiled',});}else{notification.add({color: 'success',message: 'Successfully redeployed',});}}).catch((error)=>{notification.add({color: 'error',message: error,});});};/** * @name publish * @desc Publishes Portal */constpublish=()=>{constpixelString=`PublishProject(project='${id}', release=true);`;monolithStore.runQuery(pixelString).then((response)=>{letoutput=undefined;lettype=undefined;output=response.pixelReturn[0].output;type=response.pixelReturn[0].operationType[0];if(type.indexOf('ERROR')>-1){notification.add({color: 'error',message: output,});return;}setPortalDetails({
...portalDetails,project_portal_url: output,});notification.add({color: 'success',message: 'Successfully published',});}).catch((error)=>{notification.add({color: 'error',message: error,});});};/** * @name enablePublishing */constenablePublishing=()=>{monolithStore.setProjectPortal(admin,id,!portalDetails.project_has_portal).then((resp)=>{if(resp.data){setPortalDetails({
...portalDetails,project_has_portal: !portalDetails.project_has_portal,});notification.add({color: 'success',message: `Successfully ${!portalDetails.project_has_portal ? 'enabled' : 'disabled'} portal`,});}else{notification.add({color: 'error',message: `Unsuccessfully ${!portalDetails.project_has_portal ? 'disabled' : 'enabled'} portal`,});}}).catch((error)=>{notification.add({color: 'error',message: error,});});};/** * @name editApp */consteditApp=handleSubmit(async(data: EditAppForm)=>{// turn on loadingsetIsLoading(true);try{constpath='version/assets/';// unzip the file in the new appawaitmonolithStore.runQuery(`DeleteAsset(filePath=["${path}"], space=["${id}"]);`,);// upload the fileconstupload=awaitmonolithStore.uploadFile([data.PROJECT_UPLOAD],configStore.store.insightID,id,path,);// upnzip the file in the new appawaitmonolithStore.runQuery(`UnzipFile(filePath=["${`${path}${upload[0].fileName}`}"], space=["${id}"]);`,);// Load the insight classesawaitmonolithStore.runQuery(`ReloadInsightClasses(project='${id}', release=true);`,);// set the app portalawaitmonolithStore.setProjectPortal(false,id,true,'public');// Publish the app the insight classesawaitmonolithStore.runQuery(`PublishProject(project='${id}', release=true);`,);
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
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.
No description provided.