parse-community / parse-dashboard

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

Actions resulting in opening a new browser window fail when the dashboard is not mounted on "/" (see generatePath) #2441

Open FransGH opened 1 year ago

FransGH commented 1 year ago

New Issue Checklist

Issue Description

Doing a Cmd-CLick on a pointer should open the target object in a new browser window. This works fine if the dashboard is mounted on / When there is a subpath like /parse or /dashboard the external links fail.

An earlier PR where an external link was 'hacked' by using the current location instead of generatePath worked fine when the dashboard was mounted on / and /parse Changing to generatePath appeared to work fine but was not tested on /parse.

Looking at generatePath it becomes clear that none of the links that use this function will work when the dashboard is not mounted on /

export default function generatePath(currentApp, path) {
  return `/apps/${currentApp.slug}/${path}`;
}

Steps to reproduce

Actual Outcome

the new window doesn't show the dashboard but an error

Expected Outcome

The same functionality when the dashboard was mounted on /

Environment

Dashboard

Server

Database

Logs

n/a

parse-github-assistant[bot] commented 1 year ago

Thanks for opening this issue!

FransGH commented 1 year ago

@mtrezza sorry, missed this during testing after changing to generatePath. I'll look into this and fix it with a new PR.