Skip to content

Need to add "viewCode: true" in features.cloudCode json of FeaturesRouter.js #6752

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

Closed
dinoLee opened this issue Jun 25, 2020 · 4 comments
Closed
Labels
type:question Support or code-level question

Comments

@dinoLee
Copy link

dinoLee commented Jun 25, 2020

  1. When Run Parse-Dashboard.
    request http://xxx.xxx.xxx/parse/serverInfo
    response
{"features":{"globalConfig":{"create":true,"read":true,"update":true,"delete":true},"hooks":{"create":true,"read":true,"update":true,"delete":true},"cloudCode":{"jobs":true},"logs":{"level":true,"size":true,"order":true,"until":true,"from":true},"push":{"immediatePush":false,"scheduledPush":false,"storedPushData":false,"pushAudiences":true,"localization":true},"schemas":{"addField":true,"removeField":true,"addClass":true,"removeClass":true,"clearAllDataFromClass":true,"exportClass":false,"editClassLevelPermissions":true,"editPointerPermissions":true}},"parseServerVersion":"4.2.0"}
  1. If change "cloudCode":{"jobs":true} to "cloudCode":{"jobs":true, "viewCode":true}, so Parse-Dashboard Side Menu show "Cloud Code". But Current Do not Show "Cloud Code" Menu.
    ref) You will know cause, if see parse-dashboard/src/dashboard/DashboardView.react.js,
if (features.cloudCode && features.cloudCode.viewCode) {
  coreSubsections.push({
	name: 'Cloud Code',
	link: '/cloud_code'
  });
}
  1. So need to change
	const features = {... 
		cloudCode: {jobs: true}
	,...} 

	to

	const features = {... 
		cloudCode: {jobs: true, viewCode: true}
	,...}
	
	in FeaturesRouter.js 
@mtrezza mtrezza added the type:question Support or code-level question label Jul 2, 2020
@mtrezza
Copy link
Member

mtrezza commented Jul 2, 2020

This feature has not been implemented in Open Source Parse Server yet.

Historically, on hosted Parse Server it was possible to interact with Cloud Code directly in the Parse Dashboard. But this is not possible in Open Source Parse Server, even with the change you suggest. As you can see, the dashboard would try to get the cloud code file from endpoint /releases/latest. This endpoint does not exist on Open Source Parse Server.

https://github.com/parse-community/parse-dashboard/blob/ed5e4f3c23b002b1c259fc60b72ed7a58abac3b1/src/lib/ParseApp.js#L157

You can find the discussion here: #895

@mtrezza
Copy link
Member

mtrezza commented Jul 5, 2020

I'm closing this as it seems to be resolved, feel free to comment if you have any questions and we can re-open this issue.

@mtrezza mtrezza closed this as completed Jul 5, 2020
@TomWFox
Copy link
Contributor

TomWFox commented Jul 5, 2020

Btw @mtrezza if you close an issue the author can't reopen - only those with triage access and above can.

@mtrezza
Copy link
Member

mtrezza commented Jul 5, 2020

@TomWFox Thanks, I rephrased my previous comment 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

3 participants