Live demo of our MCP this Thursday! RSVP
Directus Logo
  • Use Cases and Features
    • Headless CMS
      Manage and deliver content with ease
    • Backend-as-a-Service
      Build and ship applications faster
    • Headless Commerce
      A single source of truth for products
    • 100+ More Use Cases
      Build anything (or everything)
    • Instant APIs
      Connect a database, get REST + GraphQL APIs
    • Granular Policy-Based Auth
      Provide secure, autonomous data access
    • Visual Automation Builder
      Automate content and data workflows with ease
    • 50+ More Features
      Get everything you need out-of-the-box
    Project Showcase
    Built With Directus

    Built With Directus

    See what everyone's been building with Directus

  • Learn More
    • Blog
      Read our latest articles and guides
    • Case Studies
      Case studies and success stories
    • Community
      Join our 13k member Discord community.
    • Agency Directory
      Browse our list of agency partners
    • About Us
      Learn more about Directus and the team
    • Wall of Love
      See what others are saying about us
    • Contact
      Have a general inquiry or question for us?
    • Support
      Reach out to Directus support
    Watch Directus TV
    Directus TV
    Video

    Directus TV

    Go down the rabbit hole with hours of original video content from our team.

  • Developers
  • Enterprise
  • Pricing
Chat With UsGet Started Free
GitHub logo30,736
Back
product
Wednesday, August 31, 2022

Technical Overview: Overhauling the Directus Insights Module

The Insights Module in Directus allows you to rapidly build a no-code analytics dashboard and set up key data metrics in just minutes. Each dashboard starts with a blank drag-and-drop canvas where you can add and organize different Panels, like Labels, Lists, Metrics, and Time Series, to quickly and easily build out customized insights. The Directus Insights Module can be extended, customized, and modified for teams that require highly advanced and specialized analytics.
Technical Overview: Overhauling the Directus Insights Module

The Insights Module in Directus allows you to rapidly build a no-code analytics dashboard and set up key data metrics in just minutes. Each dashboard starts with a blank drag-and-drop canvas where you can add and organize different Panels, such as Labels, Lists, Metrics, and Time Series, to quickly and easily build out customized insights. The Directus Insights Module can be extended, customized, and modified for teams that require highly advanced and specialized analytics.

In this article, we’ll dive into the latest Directus Insights dashboard overhaul, starting with the GitHub pull request: Refactor Insights Dashboard to use a single query #12960, where our team of developers worked with several contributors to merge 70+ related commits.

Before this update, dashboards individually reloaded their panels after every change. Since each panel made its own request to the API, this would often lead to hitting the rate limiter. This led to a slow and taxing experience editing dashboards. The goal of this overhaul was to optimize the loading times and the caching strategy within Insights, also making room for new features such as auto-reloading, real-time WebSockets, and global variables.

Project Overview, Goals and Changes

Work in April of 2022, moving through R&D, testing, and final polish over the following few months. Other developers started taking notice, “Seems very helpful… Does this PR mean the 30 Metric Panels I currently have that load asynchronous will load together once?” That's right! And this approach also means that we can cache the results of the whole dashboard, so the overall experience is greatly improved. 🎉

Now, the dashboard makes one single query for all data, which resolves the main issue of being rate limited. After that broad initial query, if query parameters on a panel change, the dashboard makes a smaller, scoped query only for that specific panel’s data.

More importantly, this laid the groundwork for other big updates also released for Insights. Notably, we’ve built out new interactive panels allowing users to update the dashboard's global variables. This allows for exciting new capabilities, such as adding “Date Range” dropdowns to control all Time Series at once, tailoring the dashboard based on a chosen Customer, or other dynamic dashboards leveraging user-controlled variables.

The Directus team is currently working on developing several new insight panel types, including bar charts, pie charts, meters, and more. These new options will be released to the Directus Cloud service soon.

Visit our Directus Insights Docs and set up your Dashboard.

Posted By

Rijk van Zanten

Rijk van Zanten

CTO, Co-Founder

Share

LinkedIn LogoTwitter LogoReddit LogoDev.to Logo

Sign up for updates 🐇

Get insights, releases, and exciting news delivered directly to your inbox once a month. No spam - we promise. 🙂

  • Directus LogoDirectus Logo

    A composable backend to build your Headless CMS, BaaS, and more. 

  • Solutions
    • Headless CMS
    • Backend-as-a-Service
    • Product Information
    • 100+ Things to Build
  • Resources
    • Documentation
    • Guides
    • Community
    • Release Notes
  • Support
    • Issue Tracker
    • Feature Requests
    • Community Chat
    • Cloud Dashboard
  • Organization
    • About
    • Careers
    • Brand Assets
    • Contact
©2025 Monospace Inc
  • Cloud Policies
  • License
  • Terms
  • Privacy