npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

@7span/directus-extension-custom-query-panel

v1.1.6

Published

Behold the magic 🎩✨ of our simple panel! View your data without the hassle of writing custom endpoints or preparing views - it's like having your cake 🍰 and eating it too, but for data! πŸ’ΎπŸŽ‰

Downloads

38

Readme

Directus Custom Query Panel

Behold the magic 🎩✨ of our simple panel! View your data without the hassle of writing custom endpoints or preparing views - it's like having your cake 🍰 and eating it too, but for data! πŸ’ΎπŸŽ‰

Details

  • Execute custom SQL queries directly from the panel.
  • Use dynamic parameters to reuse queries with different values.
  • Display query results in a simple tabular structure for easy readability.
  • Enhance data visibility and understanding by enabling users to extract meaningful insights from their data which is crucial for CRM and data-driven applications.

πŸ‘€Set Up Instructions

NOTE: Replace localhost:8055 with your domain

curl --location --request POST 'http://localhost:8055/custom-query-panel/create-table'
  • Table named cqp_queries will be available in your project.

How To use This Extension

  1. Create the queries in the table (cqp_queries) as explained in below example.
select first_name, last_name from employees where department = ${department} 
  1. This extension provides support of global variables added in insights like department or week.
  1. Use variables field give in panel settings below fields.
  1. Use double mustache syntax for entering value field to get value from variables.

πŸ‘€ Environment Variables

  • You can provide collection name in CUSTOM_QUERY_COLLECTION as per your needs.
  • It Also provide support for custom query length using CUSTOM_QUERY_FIELD_LENGTH
# default value CUSTOM_QUERY_COLLECTION = "cqp_queries" 
CUSTOM_QUERY_COLLECTION="custom_query"
# default value CUSTOM_QUERY_FIELD_LENGTH = 5000 
CUSTOM_QUERY_FIELD_LENGTH=10000

Problem

  • Getting data from database query and show it in a insights panel was missing.

  • The ability to extract and display data from a database query within an insights panel is crucial for CRM and data-driven applications.

  • Insights panels serve as a hub for users to access valuable information, gain actionable insights, and make informed decisions.

  • This feature bridges the gap between raw data stored in the database and its meaningful interpretation, making Directus an even more versatile platform for managing customer relationships and data-driven business operations.

Extension Type

  • πŸ“¦ Bundle ( Panel + Custom Endpoint )

Screenshots

Add Query Department Example dynamic-fields Adding File Label Alt text

Collaborators

Contact Details

🚧 Please note

  • this extension uses raw query. Use with caution. It might do uninteded actions.
  • Roles and permission check for query

Table Fields

  • We have repeater interface with multiple columns support