Skip to content

Commit 2da79be

Browse files
committed
Add env flag to allow disabling remote execution
1 parent 199354c commit 2da79be

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ REACT_APP_BACKEND_URL=http://localhost:4000
44
REACT_APP_USE_BACKEND=TRUE
55
REACT_APP_PLAYGROUND_ONLY=FALSE
66
REACT_APP_ENABLE_GITHUB_ASSESSMENTS=TRUE
7+
REACT_APP_ENABLE_REMOTE_EXECUTION=FALSE
78
REACT_APP_SHOW_RESEARCH_PROMPT=FALSE
89

910
REACT_APP_URL_SHORTENER_SIGNATURE=

src/commons/utils/Constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const moduleBackendUrl = process.env.REACT_APP_MODULE_BACKEND_URL || 'modules';
3030
const sharedbBackendUrl = process.env.REACT_APP_SHAREDB_BACKEND_URL || '';
3131
const playgroundOnly = !isTest && isTrue(process.env.REACT_APP_PLAYGROUND_ONLY, true);
3232
const enableGitHubAssessments = isTest || isTrue(process.env.REACT_APP_ENABLE_GITHUB_ASSESSMENTS);
33+
const enableRemoteExecution = isTest || isTrue(process.env.REACT_APP_ENABLE_REMOTE_EXECUTION);
3334
const sentryDsn = process.env.REACT_APP_SENTRY_DSN;
3435
const googleClientId = process.env.REACT_APP_GOOGLE_CLIENT_ID;
3536
const googleApiKey = process.env.REACT_APP_GOOGLE_API_KEY;
@@ -101,6 +102,7 @@ const Constants = {
101102
authProviders,
102103
playgroundOnly,
103104
enableGitHubAssessments,
105+
enableRemoteExecution,
104106
sentryDsn,
105107
googleClientId,
106108
googleApiKey,

src/pages/playground/Playground.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ import MobileWorkspace, {
115115
} from '../../commons/mobileWorkspace/MobileWorkspace';
116116
import { SideBarTab } from '../../commons/sideBar/SideBar';
117117
import { SideContentTab, SideContentType } from '../../commons/sideContent/SideContentTypes';
118-
import { Links } from '../../commons/utils/Constants';
118+
import Constants, { Links } from '../../commons/utils/Constants';
119119
import { generateLanguageIntroduction } from '../../commons/utils/IntroductionHelper';
120120
import { convertParamToBoolean, convertParamToInt } from '../../commons/utils/ParamParseHelper';
121121
import { IParsedQuery, parseQuery } from '../../commons/utils/QueryHelper';
@@ -776,7 +776,7 @@ const Playground: React.FC<PlaygroundProps> = props => {
776776
}
777777
}
778778

779-
if (!isSicpEditor) {
779+
if (!isSicpEditor && Constants.enableRemoteExecution) {
780780
tabs.push(remoteExecutionTab);
781781
}
782782

0 commit comments

Comments
 (0)