Socket
Socket
Sign inDemoInstall

@edenjs/admin

Package Overview
Dependencies
6
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @edenjs/admin

[![TravisCI](https://travis-ci.com/eden-js/admin.svg?branch=master)](https://travis-ci.com/eden-js/admin) [![Issues](https://img.shields.io/github/issues/eden-js/admin.svg)](https://github.com/eden-js/admin/issues) [![License](https://img.shields.io/badge


Version published
Weekly downloads
26
increased by1200%
Maintainers
3
Install size
1.01 MB
Created
Weekly downloads
 

Readme

Source

EdenJS - Admin

TravisCI Issues License Awesome Discord

Administrator base logic component for EdenJS

@edenjs/admin creates all the base administrator logic that any normal system should require. This module also creates configuratble dashboards.

Setup

Install

npm i --save @edenjs/admin

Configure

No configuration is required for this module

Models

Dashboard Usage

Dashboard model consists of a single configurable dashboard instance. These are created in the frontend through the api.

Example
// load model
const Dashboard = model('dashboard');

// get first dashboard
const dashboard = await Dashboard.findOne();

// dashboard used in frontend
const data = await dashboard.sanitise();

Hooks

No hooks created in this module

Views

<dashboard> Usage

The dashboard view creates an instance of a dashboard container, this provides a fully configurable dashboard area.

Example

In the controller Usage

// require helper
const blockHelper = helper('cms/block');

// get dashboards
const dashboards = await Dashboard.find();

// sanitise data
const data = await Promise.all(dashboards.map(dash => dash.sanitise()));

// render dashboard/home.tag view
res.render('dashboard/home', {
  blocks     : blockHelper.renderBlocks('admin'), // render blocks can be namespaced
  dashboards : data,
});

In the view dashboard/home.tag Usage

<dashboard-home-page>
  <dashboard dashboards={ opts.dashboards } blocks={ opts.blocks } type="my.dashboard" name="My Dashboard" />
</dashboard-home-page>

<admin-header> Usage

The admin header view creates a common admin header component for use in admin layout pages.

Example

In the view

<admin-header title="Admin Header Title" />

FAQs

Last updated on 03 Jan 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc