Parse Dashboard

repository·alpha·Indexed 26 days ago

https://github.com/parse-community/parse-dashboard

A standalone management interface for Parse Server applications (version 9.3.0-alpha.4) that allows developers to manage data, users, and cloud code via a browser-based UI. It includes a development-only Browser Control API for programmatically controlling browser instances, managing sessions, and automating interactions through HTTP endpoints and WebSockets.

Tokens
23.9K
Snippets
54
Records
193
Agent score
79%

What's inside parse-dashboard

  1. Customize Data Browser graphs

    alpha

    In version 8.3.0-alpha.14 and later, you can customize several aspects of graphs within the Data Browser:

    • Styles: Customize styles for line and bar series.
    • Axes: Add customizable Y-axis titles.
    • Calculated Values: Use formula-based calculated values in graphs.
    • Date Formatting: Optimized appearance of graph tick labels on the x-axis for date values.
  2. Configure Shared Session Store for Multiple Replicas

    alpha

    When running multiple dashboard replicas behind a load balancer, you must use a shared session store compatible with express-session to prevent CSRF token validation failures.

    Recommended stores: connect-redis, connect-mongo, connect-pg-simple, or memorystore.

    Requirements:

    • Use the sessionStore option in the dashboard initialization.
    • Set cookieSessionSecret to the same value across all replicas.
    const express = require('express');
    const ParseDashboard = require('parse-dashboard');
    const { createClient } = require('redis');
    const RedisStore = require('connect-redis').default;
    
    // Instantiate Redis client
    const redisClient = createClient({ url: 'redis://localhost:6379' });
    redisClient.connect();
    
    // Instantiate Redis session store
    const cookieSessionStore = new RedisStore({ client: redisClient });
    
    // Configure dashboard with session store
    const dashboard = new ParseDashboard({
      apps: [...],
      users: [...],
    }, {
      cookieSessionStore,
      cookieSessionSecret: 'your-secret-key',
    });
  3. Use Auto-Scroll in the Info Panel

    alpha

    The Info Panel supports automatic scrolling for hands-free browsing of large datasets.

    Setup and Usage:

    1. Enable it via Settings > Info Panel > Auto-scroll.
    2. Record a pattern: Hold the Command (⌘) key while scrolling in the panel to record the scroll amount and pause interval. Release the key after the desired interval.
    3. Stop auto-scrolling: Press the Escape key or click the highlighted "Auto-scroll" button in the toolbar.
    4. New pattern: Hold the Command key to stop the current scroll and start recording a new one.
    5. Manual scroll: Temporarily pauses auto-scrolling; it resumes after a period of inactivity.
  4. Configure Proxy Trust for Secure Deployments

    alpha

    When deploying Parse Dashboard behind a load balancer or reverse proxy (like Heroku), the dashboard may fail to detect a secure HTTPS connection. To fix this, enable proxy trust so the dashboard relies on X-Forwarded-* headers.

    You can do this via the CLI flag --trustProxy=1, the environment variable PARSE_DASHBOARD_TRUST_PROXY=1, or by setting trustProxy: 1 in the configuration object when using it as Express middleware.

    var trustProxy = true;
    var dashboard = new ParseDashboard({
      "apps": [
        {
          "serverURL": "http://localhost:1337/parse",
          "appId": "myAppId",
          "masterKey": "myMasterKey",
          "appName": "MyApp"
        }
      ],
      "trustProxy": 1
    });
  5. Use Canvas for custom dashboards

    alpha

    Starting from version 8.3.0-alpha.9, Parse Dashboard includes a custom dashboard canvas. You can add graphs and data tables to create a personalized overview of your data. Features include:

    • Adding View elements to the canvas.
    • Cloning elements within the canvas.
    • Favoriting specific canvases for quick access via the sidebar menu.
    • Using a canvas tree in the sidebar for easier navigation.
  6. Configure Calculated Values for Graphs

    alpha

    The Parse Dashboard data browser includes a graph feature for visualizing data in pie, bar, or line charts. You can use Calculated Values to derive new data points using specific operators.

    Available Operators:

    • Sum: Sum of all values in the selected field.
    • Percent: Percentage of numerator relative to denominator.
    • Average: Average of all values in the selected field.
    • Difference: Difference between two fields.
    • Ratio: Ratio of numerator to denominator.
    • Formula: Custom mathematical expressions.

    Naming Rules: Calculated value names must follow Parse field naming conventions: start with a letter or underscore, and contain only letters, numbers, and underscores (no spaces or special characters).