Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wizeapps/charts-runtime

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wizeapps/charts-runtime

Wize Charts

  • 1.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@wizeapps/charts-runtime

Description

Enables analytics on app sequelize models. It works only on postgres DB. It has dependency on @wizni/wize-runtime-load-routes, @wizni/wize-sequelize-runtime & @wizni/wize-sequelize-source. It reads config.json for all models defined in app.

Models

  • ChartSettings: Stores query data, report name, access and chart settings data.
  • ReportCategories: Stores all report categories defined by admin user.
  • ReportCategoryFields: Stores all fields under report category defined by admin user.

APIs

  • [GET] /api/metadata/dbschema - Lists all DB models & their meta information.
  • [POST] /api/metadata/executeQuery - Executes query in DB to fetch chart data.
  • [POST] /api/reportcategories - Create new report category.
  • [PATCH] /api/reportcategories - update existing report category.

Chart Settings

{
  "id": <Auto-increment> INTEGER,
  "name": STRING (Report Name),
  "description": STRING (Report Description),
  "type": STRING (Chart Type),
  "chartSettings": JSONB (Chart display settings & format etc.),
  "dataQuery": JSONB (Tables, columns, matrics, filters, pivots information to be executes as query in DB)
}

Usage

Installation

npm install --save @wizeapps/charts-runtime

Initialize

import chartsApis from '@wizeapps/charts-runtime';
.
.
.
/*
app: koa-app returned from 'const app = createServer({});'
sequelizeSource: sequelize object returned from 'import sequelizeSource from './sources/postgresql';'
*/
chartsApis(app, sequelizeSource);
Model Definition

Module assumes that model has system fields - createdBy and modifiedBy, which are used to store the actor. Supply createdBy in instance during Create and modifiedBy during Update and Delete operations.

Test

npm run test

License

MIT License

FAQs

Package last updated on 16 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc