Skip to content

Disable remote execution tab if deployment is playground only #2695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ REACT_APP_BACKEND_URL=http://localhost:4000
REACT_APP_USE_BACKEND=TRUE
REACT_APP_PLAYGROUND_ONLY=FALSE
REACT_APP_ENABLE_GITHUB_ASSESSMENTS=TRUE
REACT_APP_ENABLE_REMOTE_EXECUTION=FALSE
REACT_APP_SHOW_RESEARCH_PROMPT=FALSE

REACT_APP_URL_SHORTENER_SIGNATURE=
Expand Down
2 changes: 2 additions & 0 deletions src/commons/utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const moduleBackendUrl = process.env.REACT_APP_MODULE_BACKEND_URL || 'modules';
const sharedbBackendUrl = process.env.REACT_APP_SHAREDB_BACKEND_URL || '';
const playgroundOnly = !isTest && isTrue(process.env.REACT_APP_PLAYGROUND_ONLY, true);
const enableGitHubAssessments = isTest || isTrue(process.env.REACT_APP_ENABLE_GITHUB_ASSESSMENTS);
const enableRemoteExecution = isTest || isTrue(process.env.REACT_APP_ENABLE_REMOTE_EXECUTION);
const sentryDsn = process.env.REACT_APP_SENTRY_DSN;
const googleClientId = process.env.REACT_APP_GOOGLE_CLIENT_ID;
const googleApiKey = process.env.REACT_APP_GOOGLE_API_KEY;
Expand Down Expand Up @@ -101,6 +102,7 @@ const Constants = {
authProviders,
playgroundOnly,
enableGitHubAssessments,
enableRemoteExecution,
sentryDsn,
googleClientId,
googleApiKey,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/playground/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ import MobileWorkspace, {
} from '../../commons/mobileWorkspace/MobileWorkspace';
import { SideBarTab } from '../../commons/sideBar/SideBar';
import { SideContentTab, SideContentType } from '../../commons/sideContent/SideContentTypes';
import { Links } from '../../commons/utils/Constants';
import Constants, { Links } from '../../commons/utils/Constants';
import { generateLanguageIntroduction } from '../../commons/utils/IntroductionHelper';
import { convertParamToBoolean, convertParamToInt } from '../../commons/utils/ParamParseHelper';
import { IParsedQuery, parseQuery } from '../../commons/utils/QueryHelper';
Expand Down Expand Up @@ -776,7 +776,7 @@ const Playground: React.FC<PlaygroundProps> = props => {
}
}

if (!isSicpEditor) {
if (!isSicpEditor && Constants.enableRemoteExecution) {
tabs.push(remoteExecutionTab);
}

Expand Down