parse-community / parse-dashboard

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

Info Panel is not visible on the dashboard #2611

Open chadpav opened 2 days ago

chadpav commented 2 days ago

New Issue Checklist

Issue Description

I want to expirement with the new Info Panel feature in the Dashboard. I've configured the feature accorinding to the README but I never see the 'Show/Hid Info Panel' button in the upper-right corner of the Data Browser.

Steps to reproduce

  1. Configure an example Parse Dashboard as express middleware as documented here
  2. Provide the infoPanel json structure
  3. Provide a generic implementation of a cloud function for the info panel to call.
  4. Open the Dashboard and navigate to the data class.
apps: [
{
infoPanel: [
        {
          title: 'User Details',
          classes: ['_User'],
          cloudCodeFunction: 'fetchUserDetailsPanel',
        },
      ],
...
}
]
Parse.Cloud.define(
  'fetchUserDetailsPanel',
  async (request: Parse.Cloud.FunctionRequest) => {
    configureSentryScope(request);
    const user = request.params.object as User;
    logger.info('Fetching details panel for user ' + user.id);

    const userDetailsPanel = {
      panel: {
        segments: [
          {
            title: 'Segment 1',
            description: 'Segment 1 description',
            items: [
              {
                title: 'Item 1',
                description: 'Item 1 description',
              },
            ],
          },
          {
            title: 'Segment 2',
            description: 'Segment 2 description',
            items: [
              {
                title: 'Item 2',
                description: 'Item 2 description',
              },
            ],
          },
        ],
      },
    };

    return userDetailsPanel;
  }
);

Actual Outcome

Expected Outcome

Environment

Dashboard

Server

Database

Logs

nothing is printed to the logs

parse-github-assistant[bot] commented 2 days ago

Thanks for opening this issue!

chadpav commented 2 days ago

Moving conversation thread from the Pull Request to this issue for support: https://github.com/parse-community/parse-dashboard/pull/2584#issuecomment-2412524243

It looks like maybe this is because I run the dashboard as express middleware?