Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mozaik

plouc1851.4.4

Mozaik dashboard composition tool

mozaik, realtime, websockets, components, widget, extension, dashboard, framework, dataviz, d3, react

readme

MOZAÏK

License Travis CI NPM version Quality Dependencies

Mozaïk is a tool based on nodejs / react / reflux / d3 / stylus to easily craft beautiful dashboards. See demo

preview

Features:

  • Scalable layout
  • Themes support
  • Extendable by modules
  • Grid positioning
  • Optimized backend communication
  • Rotation support (with smooth transition)

Getting started

Join the chat at https://gitter.im/plouc/mozaik

Easy way to get started is using the demo dashboard. Look at the instructions on the dedicated repository https://github.com/plouc/mozaik-demo.

Alternatively, use provided Yeoman generator available to start with new dashboard or widget:

npm install -g yo gulp generator-mozaik
yo mozaik
npm install
gulp build
node app.js

Visit the Wiki for further information/doc.

Widgets

Widgets are maintained as separate modules, thus available via mozaik-ext-name in npm.js. To install an extension:

  • Install modules from npmjs:

    npm install --save mozaik-ext-example
  • Register widgets by adding to dashboard src/App.jsx:

    import mozaikExampleComponents from 'mozaik-ext-example';
    
    Mozaik.Registry.addExtension('example', mozaikExampleComponents);

    Configure size, widget placement and params in config.js:

    
    module.exports = {
      // ...
      dashboards: [
        // Dashboard 1
        {
          columns: 2, rows: 2, // Dashboard grid layout
          widgets: [
            {
              type: 'example.widget_name', // WidgetName -> widget_name
              param1: 'value1',            // See widget documentation
              columns: 1, rows: 1,         // Size
              x: 0, y: 0                   // Position
            }
          ]
        }
      ]
    }
  • If widget needs to communicate with backend (see widget documentation), register its client api by adding to dashboard app.js:

    mozaik.bus.registerApi('example',
      require('mozaik-ext-example/client')
    );

    If client api requires configuration, it is provided in dashboard's config.js:

    
    module.exports = {
      env: process.env.NODE_ENV || 'production',
      host: 'localhost',
      port: process.env.PORT || 5000,
    
      // Server-side client configuration.
      // By convention, the name follow the module
      api: {
        example: {
          foo: 'bar'
        },
      }
    
      // ...
    }
  • (Re)build the dashboard:

    gulp build

Themes

Mozaïk dashboard comes with 5 themes and makes it easy to develop your own theme. Set theme name in config.js:

// Options: bordeau, night-blue, light-grey, light-yellow, yellow
theme: 'night-blue'

changelog

Mozaïk Changelog

Tags:

  • [New Feature]
  • [Bug Fix]
  • [Breaking Change]
  • [Documentation]
  • [Internal]
  • [Polish]

v1.4.4 (2016-04-14)

  • Internal
    • build: #79 Reduce Mozaïk js build size.

v1.4.3 (2016-04-13)

  • Polish
    • packages: c1f00c5 Upgrade outdated packages.

v1.4.2 (2016-04-13)

  • New Feature

    • themes: 4de8fa5 Add new harlequin theme.
  • Polish

    • charts: 7a73927 Improve pie and gauge components.

v1.4.1 (2016-04-12)

  • Bug Fix
    • ws: 5c3f0be fix typo in ConnectionStatusStore.

v1.4.0 (2016-04-12)

  • New Feature

    • ws: #77 Add ability to automatically reconnect websockets.
    • notifications: 5a0bea9 Add notifications support.
  • Polish

    • styles: 6d577dc Change the way stylus var are defined in order to have more concise themes.

v1.3.0 (2016-04-07)

  • New Feature

    • Bus: #76 Add ability to define 'push' apis.
  • Bug Fix

    • gulp: 39a2667 Fix inspector component uptime formatting

v1.2.1 (2016-04-06)

  • New Feature
    • Bus: #75 Add ability to define custom apis poll interval.

v1.2.0 (2016-04-06)

  • New Feature

    • mozaik.inspector: #74 Add Mozaïk Inspector widget.
    • Bus: #74 Add clientCount() method on Bus to return connected clients count.
  • Bug Fix

    • gulp: d5dc3ed Fix styles watcher.
  • Internal

    • Bus: ba4a24a Move Mozaïk Bus to simple function.
    • npm: f64592a Enforce npm@3 usage.

v1.1.0 (2016-04-04)

  • Internal
    • packages: #71 Update babel and other packages.

v1.0.13 (2016-04-02)

  • New Feature

    • Dashboard: #70 Add optional title to dashboard.
  • Bug Fix

    • build: #69 Update watchify to prevent segment fault errors.
    • websockets: #68 Fixing unexpected end of input console error.

v1.0.12 (2016-03-23)

  • Bug Fix
    • styles: #65 Added overflow: hidden to avoid V & H scrollbars.

v1.0.11 (2016-03-18)

  • Bug Fix
    • build: e0e8a7e Fix copy issue when using npm@3.

v1.0.10 (2016-01-14)

  • Bug Fix

    • server: #51 Use server configuration port.
    • server: #54 Use server configuration host.
  • Polish

    • server: #55 improve es6 usage for Mozaïk backend.