Giter VIP home page Giter VIP logo

freeboard-plugin-for-mongodb's Introduction

Freeboard-plugin-for-MongoDB

A Freeboard plugin for MongoDB.

This plugin enables Freeboard to retrieve latest data for every specified interval from MongoDB via the RESTHeart a REST API server for MongoDB.

Refer to [Freeboard GitHub] (https://github.com/Freeboard/freeboard) for Freeboard specifics.

Refer to [MongoDB GitHub] (https://github.com/mongodb/mongo) for MongoDB specifics.

##Prerequisites ###Server side

###Development environment to build this plugin

##Install To make this plugin, execute the following commands.

$ git clone https://github.com/Hitachi-Data-Systems/Freeboard-plugin-for-MongoDB.git
$ npm install
$ ls mongodb.plugin.js
mongodb.plugin.js

To load the plugin in your Freeboard, copy to "mongodb.plugin.js" to your plugin folder for Freeboard, and add it to the list in your index.html used to initialize Freeboard. Below is an example of index.html to load this plugin.

<script type="text/javascript">
        head.js("js/freeboard_plugins.min.js",
                "plugins/thirdparty/mongodb.plugin.js",
                // *** Load more plugins here ***
                function(){
                    $(function()
                    { //DOM Ready
                        freeboard.initialize(true);
						...
                    });
                });

##Usage Choose the data source "MongoDB".

###NAME Name the data source.

###REST SERVER Specify the hostname/address and port of your RESTHeart server where your RESTHeart server binds.

###REST API Specify a REST API query according to RESTHeart query format to retrieve data from MongoDB via RESTHeart server. Below is an example of query:

/kaa/logs_48635001004582290736/?count&sort_by=-header.timestamp&pagesize=1

This plugin supports an additional filtering operator "$latest" adding to the operators supported by RESTHeart. The $latest operator is interpreted as time, which is your specified refresh time behind than current time. This operator must be specified with the following filtering operators.

"$gt", "$gte", "$eq", "$date"

Below is an example of query with a filtering operator:

/kaa/logs_48635001004582290736/?filter={"header.timestamp.long":{"$gt":"$latest"}}

###REFRESH TIME Specify an interval of refresh timer used to retrieve data and update Freeboard.

Add Datasource

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.