parse-community / parse-dashboard

A dashboard for managing Parse Server
https://parseplatform.org
Other
3.73k stars 1.38k forks source link

feat: Add workspace with vite project for v2 dashboard #2540

Open patelmilanun opened 3 months ago

patelmilanun commented 3 months ago

New Pull Request Checklist

Issue Description

Old dashboard is outdated.

Closes: #2460

Approach

Implement modern dashboard with modern libraries.

TODOs before merging

parse-github-assistant[bot] commented 3 months ago

Thanks for opening this pull request!

parse-github-assistant[bot] commented 3 months ago

I will reformat the title to use the proper commit message syntax.

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49183

:watch: Updated Mar 31, 2024, 16:59 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

patelmilanun commented 3 months ago

@mtrezza will uffizzi deployment update with new commit?

mtrezza commented 3 months ago

It will update if you close and re-open the PR. Takes a few minutes though.

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49187

:watch: Updated Mar 31, 2024, 22:47 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49191

:watch: Updated Apr 01, 2024, 03:38 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

patelmilanun commented 3 months ago

also added refine.dev

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49215

:watch: Updated Apr 01, 2024, 12:26 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49219

:watch: Updated Apr 01, 2024, 13:13 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

patelmilanun commented 3 months ago

@mtrezza can you explain why we have trailing slash at the end of proxy_pass for /location inside nginx-uffizzi\nginx.conf

image

Can we remove it as it is constricting wrong URL. For my case it's actually giving me problem when I'm hitting /dashboard/v2 as this will be treated as /dashboard//v2.

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49252

:watch: Updated Apr 01, 2024, 19:38 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

mtrezza commented 3 months ago

Removing the slash at the end will prevent nginx from normalizing the URL. But in this case we have the same path /dashboard. I believe an alternative way to write this would be:

location /dashboard {
    proxy_pass http://localhost:4040;
}

Since we maintain the base path anyway. Would that work for your setup as well?

patelmilanun commented 3 months ago

@mtrezza what I noticed is that even after removing the slash at the end the deployment is still not working. I even have checked with the same compose file in my local and it was working fine.

I don't think that it will prevent nginx from normalizing the URL. As I can see in nginx docs, its more related to the location path and not the proxy_pass path.

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49267

:watch: Updated Apr 02, 2024, 07:24 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

mtrezza commented 3 months ago

I don't think you can just remove the slash. Did you try my previous comment?

Alternatively you could wrote a conditional proxy pass for the v2:

if ($request_uri ...) { 
    proxy_pass ...;
    break;
}

// Fallback
proxy_pass ...;
patelmilanun commented 3 months ago

@mtrezza I have removed it from the nginx config and redeployed but I'm facing the same issue and I think it might be because the changes to that file is not reflecting else how can I able reproduce the same issue in my local and was able to solve it just by removing the trailing slash.

I'm using the same docker compose file for docker.

mtrezza commented 3 months ago

I assume the nginx changes need to be merged before they apply here.

patelmilanun commented 3 months ago

@mtrezza can u do it for me. Removing trailing slash works as well as ur suggested way of removing whole /dashboard/ in the end like

location /dashboard {
    proxy_pass http://localhost:4040;
}

Whichever you prefer can you get it merged so we can finally see the preview on uffizzi deployment.

mtrezza commented 3 months ago

Done https://github.com/parse-community/parse-dashboard/pull/2542

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49311

:watch: Updated Apr 02, 2024, 14:20 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

patelmilanun commented 3 months ago

@mtrezza its working now u can check here https://pr-2540-deployment-49311-parse-dashboard.app.uffizzi.com/dashboard/v2.

Thanks for the quick help.

Now just need to fix test cases as we are using a custom font styling for displaying "Where we are serving the dashboard at".

Another one is what is the issue with npm lock file version? Why its failing?

I'm planning to move the whole app to 1 next js server removing the need of custom express. This still needs to be analyzed and then I can move forward. 1 more thing, right now this is using only workspace feature for managing this in better way I might integrate monorepo.

Either I will move whole thing to next js with monorepo or just monorepos which will reduce the deployment time.

I also want to check to see if we can utilize vercel for our deployment previews if I'm converting to next js.

Let me know your thoughts

mtrezza commented 3 months ago

Great!

Another one is what is the issue with npm lock file version? Why its failing?

Fixed in https://github.com/parse-community/parse-dashboard/pull/2543; I suggest you start with the lockfile from the alpha branch and install all dependencies again; rather than trying to merge changes.

I'm planning to move the whole app to 1 next js server removing the need of custom express. This still needs to be analyzed and then I can move forward.

I also want to check to see if we can utilize vercel for our deployment previews if I'm converting to next js.

Some community feedback may be helpful. Such high level / strategic questions are best to be posted on the issue rather than the PR.

right now this is using only workspace feature for managing this in better way I might integrate monorepo.

Keep in mind that we have an automated release process (semantic release) with 2 pre-release branches (alpha, beta). Any changes should be tested with the release process, and this may add quite some complexity or even outright prevent certain setups. For any monorepo setup we'd use npm workspaces, which is the tech across Parse Platform org.

uffizzi-cloud[bot] commented 3 months ago

Uffizzi Ephemeral Environment deployment-49361

:watch: Updated Apr 03, 2024, 00:56 UTC

:cloud: https://app.uffizzi.com/github.com/parse-community/parse-dashboard/pull/2540

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more

mtrezza commented 2 months ago

@patelmilanun How's it going with this PR? Do you need any help?