Giter Club home page Giter Club logo

freeboard's Introduction

freeboard

free·board (noun) *\ˈfrē-ˌbȯrd*

  1. the distance between the waterline and the main deck or weather deck of a ship or between the level of the water and the upper edge of the side of a small boat.
  2. the act of freeing data from below the "waterline" and exposing it to the world.
  3. a damn-sexy, open source real-time dashboard builder/viewer for IOT and other web mashups.

Demo

http://freeboard.github.io/freeboard

https://freeboard.io

Screenshots

Weather

What is It?

Freeboard is a turn-key HTML-based "engine" for dashboards. Besides a nice looking layout engine, it provides a plugin architecture for creating datasources (which fetch data) and widgets (which display data)— freeboard then does all the work to connect the two together. Another feature of freeboard is its ability to run entirely in the browser as a single-page static web app without the need for a server. The feature makes it extremely attractive as a front-end for embedded devices which may have limited ability to serve complex and dynamic web pages.

The code here is the client-side portion of what you see when you visit a freeboard at http://freeboard.io. It does not include any of the server-side code for user management, saving to a database or public/private functionality— this is left up to you to implement should you want to use freeboard as an online service.

How to Use

Freeboard can be run entirely from a local hard drive. Simply download/clone the repository and open index.html. When using Chrome, you may run into issues with CORS when accessing JSON based APIs if you load from your local hard-drive— in this case you can switch to using JSONP or load index.html and run from a local or remote web server.

  1. git clone https://github.com/Freeboard/freeboard.git
  2. cd freeboard
  3. npm install
  4. grunt

Then run a index.html or index-dev.html through a webserver.

API

While freeboard runs as a stand-alone app out of the box, you can augment and control it from javascript with a simple API. All API calls are made on the freeboard singleton object.


freeboard.initialize(allowEdit, [callback])

Must be called first to initialize freeboard.

allowEdit (boolean) - Sets the initial state of freeboard to allow or disallow editing.

callback (function) - Function that will be called back when freeboard has finished initializing.


freeboard.newDashboard()

Clear the contents of the freeboard and initialize a new dashboard.


freeboard.serialize()

Serializes the current dashboard and returns a javascript object.


freeboard.loadDashboard(configuration, [callback])

Load the dashboard from a serialized dashboard object.

configuration (object) - A javascript object containing the configuration of a dashboard. Normally this will be an object that has been created and saved via the freeboard.serialize() function.

callback (function) - Function that will be called back when the dashboard has finished loading.


freeboard.setEditing(editing, animate)

Programatically control the editing state of the of dashboard.

editing (bool) - Set to true or false to modify the view-only or editing state of the board.

animate (function) - Set to true or false to animate the modification of the editing state. This animates the top-tab dropdown (the part where you can edit datasources and such).


freeboard.isEditing()

Returns boolean depending on whether the dashboard is in in the view-only or edit state.


freeboard.loadDatasourcePlugin(plugin)

Register a datasource plugin. See http://freeboard.github.io/freeboard/docs/plugin_example.html for information on creating plugins.

plugin (object) - A plugin definition object as defined at http://freeboard.github.io/freeboard/docs/plugin_example.html


freeboard.loadWidgetPlugin(plugin)

Register a widget plugin. See http://freeboard.github.io/freeboard/docs/plugin_example.html for information on creating plugins.

plugin (object) - A plugin definition object as defined at http://freeboard.github.io/freeboard/docs/plugin_example.html


freeboard.showLoadingIndicator(show)

Show/hide the loading indicator. The loading indicator will display an indicator over the entire board that can be useful when you have some code that takes a while and you want to give a visual indication and to prevent the user from modifying the board.

show (boolean) - Set to true or false to show or hide the loading indicator.


freeboard.showDialog(contentElement, title, okButtonTitle, cancelButtonTitle, okCallback)

Show a styled dialog box with custom content.

contentElement (DOM or jquery element) - The DOM or jquery element to display within the content of the dialog box.

title (string) - The title of the dialog box displayed on the top left.

okButtonTitle (string) - The string to display in the button that will be used as the OK button. A null or undefined value will result in no button being displayed.

cancelButtonTitle (string) - The string to display in the button that will be used as the Cancel button. A null or undefined value will result in no button being displayed.

okCallback (function) - A function that will be called if the user presses the OK button.


freeboard.getDatasourceSettings(datasourceName)

Returns an object with the current settings for a datasource or null if no datasource with the given name is found.

datasourceName (string) - The name of a datasource in the dashboard.


freeboard.setDatasourceSettings(datasourceName, settings)

Updates settings on a datasource.

datasourceName (string) - The name of a datasource in the dashboard.

settings (object) - An object of key-value pairs for the settings of the datasource. The values specified here will be combined with the current settings, so you do not need specify every setting if you only want to update one. To get a list of possible settings for a datasource, consult the datasource documentation or code, or call the freeboard.getDatasourceSettings function.


freeboard.on(eventName, callback)

Attach to a global freeboard event.

eventName (string) - The name of a global event. The following events are supported:

"dashboard_loaded" - Occurs after a dashboard has been loaded.

"initialized" - Occurs after freeboard has first been initialized.

callback (function) - The callback function to be called when the event occurs.


Building Plugins

See http://freeboard.github.io/freeboard/docs/plugin_example.html for info on how to build plugins for freeboard.

Testing Plugins

Just edit index.html and add a link to your javascript file near the end of the head.js script loader, like:

...
"path/to/my/plugin/file.js",
$(function()
{ //DOM Ready
    freeboard.initialize(true);
});

Copyright

Copyright © 2013 Jim Heising (https://github.com/jheising)
Copyright © 2013 Bug Labs, Inc. (http://buglabs.net)
Licensed under the MIT license.


freeboard's People

Contributors

andrewwolverton avatar bugvish avatar deiwin avatar edent avatar fcobcn avatar gnain avatar h4wkmoon avatar jensrantil avatar jheising avatar jlabusch avatar kcampbell avatar linsong avatar lirantal avatar markqvist avatar mythosil avatar nochte avatar np avatar robertthz avatar virgilvox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeboard's Issues

Better error reporting for datasources

Basically there is none now unless you use browser developer tools. I'd like to add something a bit more user friendly. It's been on the to-do list for a while, but I think we'll need to step it up.

Privacy: Users' email addresses can be verified as registered.

When using the password reset feature, it's possible to find out if a user has registered for the service.

For example, entering an email address of [email protected] gives the error:

Email address not found.

Using an email address which is registered gives:

We sent password reset instructions to your email address.

From this, a malicious user can deduce who has registered with the service.

JSON Supported on secure HTTPS sources only

I have received an email from yourselves stating you are working on a way of supporting JSON datasource that will work from an HTTP source.
Waiting for this with great enthusiasm as I have embedded devices that supply JSON data but do not support SSL.

*.map files not found

I'm simply loading an unmodified (latest master) freeboard index.html served from /freeboard/index.html. See screenshot.
screen shot 2014-09-03 at 13 32 48

General less-spaghettiness

The code has seen a lot of quick changes since day one and is in need of a cleanup and spitshine. Probably could use a bit of splitting up into separate files and a grunt script to "compile".

datasource syntax

Please excuse me for the noob question, I haven't been able to figure it out for myself.
What's the correct syntax to get the "current_value" in "datastreams" with "id":"example" in the following json data?

{
"id": 121601,
"title": "Demo",
"private": "false",
"version": "1.0.0",
"datastreams": [
{
"id": "example",
"current_value": "333",
"at": "2013-04-23T01:10:02.986063Z",
"max_value": "333.0",
"min_value": "333.0"},
{
"id": "key",
"current_value": "value",
"at": "2013-04-23T00:40:34.032979Z"},
{
"id": "temp"
}],
"location": {
"domain": "physical"
}
}
Thanks for your help

Using JSONP breaks parsing of return data

Good day,

Maybe I missed it in the notes or other questions, but I can not see any mention of the following. To fix CORS, I am using JSONP, but now I am getting errors on the returned data :

Timestamp: 2014/05/30, 14:45:45
Error: SyntaxError: missing ; before statement
Source File: http://www.site.cc/rand?callback=jQuery20302740955555920611_1401453890633&_=1401453890657
Line: 1, Column: 8
Source Code:
{"total":62}

basically indicating that between total and 62 (at the colon) there is a missing ; before statement ?

Worked fine on JSON when running both data and freeboard on same server/site

Thanks for the time and effort.

file loading not quite right

If I use the url to directly load a file eg
index.html?load=examples/weather.json
the edit control is missing...
One way to fix is by inserting two lines below/after line 2182 of freeboard.js
2182 ... {

            theFreeboardModel.allow_edit(allowEdit); // honour the allowEdit state
            theFreeboardModel.setEditing(false); // but by default editor is closed

2183 $.ajax({...

Accessing JSON with numerical keys fails

I currently have the following piece of JSON.

   {
    "Body" : {
        "Data" : {
            "PAC" : {
                "Values" : {
                    "1" : 3206
                }
            },
                       .....

If I try to access it using datasources["solar"].Body.Data.DAY_ENERGY.Values.1 it fails. As does Values[0], Values["1"] and all the other variants I could think of.

If I alter the JSON to read

                "Values" : {
                    "Result" : 3206
                }

I can access the value using datasources["solar"].Body.Data.DAY_ENERGY.Values.Result.

Question: API integrations?

Do you guys have any plans with places like FireBase/ActionHero/Express/SailsJS etc. to get some kind of API integration into a full web stack? I was just messing around and I think something like ActionHero is a nice backend to the Freeboard for servage / API-age.

Further that, what about publishing to npm or bower?

Documentation - CORS

Might be worth adding some documentation saying that JSON data sources may need cross origin header.

For example, in PHP,

 <?php
     header('Access-Control-Allow-Origin: https://freeboard.io');

iPhone display issue

Tutorial x button is covered by help button. Also, not all panes (only 2 of 3) appear to show up.

https://freeboard.io/board/53cdc698c12c59b81c000061

Password Resets Fail

When trying to reset my password, I type in my email address and get back the following error message.

Error Sending: Email failed to send. Error: authorization.failed

(I use a .mobi domain, which can cause issues for websites which expect all tlds to be 2 - 3 characters)

Save freeboard session for debugging

Trying to write a Datasource Plugin to pull some XML data from a website and show it as a widget.

Can I save a session which I have created a Freeboard datasouce and added a widget that displays text from my datasource?

I am trying to call an external .js as a phaser to convert XML to JSON and then use it as datasource but so far I have no success.. which I need a better development environment to debug.

Right now I need to click 'Add datasource' and then add the widget and then once I refresh, everything is gone. I tried to click 'SAVE FREEBOARD' but nothing seems to happen.

Can't have more than 3 columns!

Unfortunatelly I have not been able to have more than 3 columns in my dashboard.
I have downloaded the latest source from github, but each time I press either the 'right add' or 'left add' button , it does nothing.
Any ideas why this is happening? I don't get any errors in my javascript console and my screen size is big enough to have at least 6 columns...

Full width and resizable widgets

Hi, great initiative with this dashboard project.

But why did you make it fixed width? A lot of screen estate is being unused.

It would be awesome if you could use the entire screen width and be able to resize the widgets in whatever size you want.

Look at this: http://gridster.net/demos/dynamic-grid-width.html

You can support both custom widths, custom widget sizes and custom placements at once! Why restrict the user? I hated the fixed sizes with Geckoboard.

Thanks.

New sizing version breaks existing freeboards on Nexus 7 1st gen

Where a 3 column design would fit OK in the landscape mode of a Chrome browser on a Nexus 7 (1st gen 1280 pixels wide), the new sizing changes break these existing boards so they are repositioned to 2 columns.
The 3 columns were fine and were quite useful. Now all those boards look odd taking up a 2 column strip in the centre of the screen.

Dweet.io Datasource doesn't work if served from webserver with non-standard port

I deployed freeboard on a web server using port 8086. It was a smooth deployment, but dweet.io datasources would not update automatically, only after pressing the refresh button.

I'm not sure if this is just me not understanding Cross-origin resource sharing or an actual bug. It appears the problem is in http://dweet.io/socket.io/socket.io.js requested by http://dweet.io/client/dweet.io.min.js/socket.io/socket.io.js the best I can tell. Chrome complains about a time out at dweet.io:8086/socket.io etc, which is clearly wrong. I'm also not sure if this is truly a freeboard issue or dweet.io issue since that is where the code is hosted. If it is my misunderstanding of CORS, perhaps a mention in the readme.md would help others from scratching their head needlessly.

If I use a json datasource to get the same data from dweet.io it works fine and updates as expected. Testing the node.js server on port 80, both datasources work as expected.

moment.js

It would be quite nice to have moment.js included in the main branch.
Numeral.js also looks like a great match to freeboard.
I have been using moment in my dashboard, helps a lot on readability.
screen shot 2014-06-06 at 21 25 13

Setting separator for json datasources in a text widget, where the selected value is a json array/table

I'm trying to make a Freeboard-based stats dashboard for an IRC bot I wrote. I made it so it saves json data to a file on my web server, and I have logged in users to the bot as a array/table (tbh I don't really know the difference, I'm using a library for it...). In freeboard though, instead of putting them on separate lines/allowing you to set the separator, it comma-separates them and does not wrap the lines. When I try making the bot give Freeboard the table as a string instead (ie. concatenated together) "\n" in the json data (\n in the code), it doesn't separate it on separate lines, instead it just displays it. Same thing for
and just \n in the code.

Getting JSON from Microsoft Azure Mobile Service

I wanted to grab some data from some data I have on a Microsoft Azure Mobile Service Custom API. It appears azure services do not permit custom query parameters that do not start with a letter. Looking a little into the traffic it appears the board is adding two parameters to the URL entered. The first a jquery call back and the second a number. Now as the query name is "" I get a 400 bad response back from my Azure end point. Specifically Error: Invalid query parameter name ''. Custom query parameter names must start with a letter. Arguably a limitation of Azure, however I thought it would be easier to change freeboard to avoid this specific parameter name.

WebSocket JSON DataSource

Hi. I just developed a simple JSON-based datasource using WebSockets. This allows non-polling datasource update that performs very well whenever data changes either more slowly with respect to typical refresh interval periods (5-10 secs) or in scenarios requiring quasi-realtime updates. (I can arrange a pull request if you like).

Just a question: "refresh" datasource widget/button isn't so useful for a push-only datasource, so I simply close and reopen WebSocket in my updateNow member function, but maybe the fact that update time is not refreshed as a consequence could be a bit misleading for end user. What about providing a datasource plugin property that changes icon and or behavior in a way that it can be interpreted as a "reconnect" rather than a "refresh" operation?

Thanks!

What about an "active" (e.g. a button) Widget?

Hi.

I'd like to add some active control features to a freeboard dashboard by designing some new widget embedding something like buttons, togglebuttons, slider, checkbox and so on.

Is current widget plugin model suitable? Could you please suggest me what should I do according to you?

Thanks!

How do you title a board?

Is there a way to title the board with the same look and feel as the actual service in freeboard.io?

It is important to be able to title boards

Scroll text

Ability to scroll text in a widget. Right now text can not be very long.

Allow datasources with complex data models to update sub properties only

I'm working on a Spark core datasource for freeboard for which I'm allowing people to use a single datasource to listen for multiple events from the spark (so as not to need the registration of the same core multiple times for different feeds).

This all works really well, however when an updateCallback is called, it always updates everything, where as it would be nice if one could issue an update for a single element.

ie, in my test case, I have a temperature sensor logging it's temperature every 2 seconds and I also have a button that can be pressed any time. The issue is, when the button is pressed, it also forces the temperature sensor widget to update, logging the same temperature as was previously recorded, so I get some extra datapoints in my sparkline graph that I wouldn't want.

Therfore, it would be great if freeboard could handle sub notifications that only update widgets listening to those specific parts of the datamodel, rather than broadcasting a model wide update.

ios App

Very interested in this.. but is there a way to make it work as a iOS app? Curently we are using geckoboard, mainly so we can also monitor our stats from the iphone..

Bar chart widget

Sparklines are great for one variable, but it would be great to have other kind of charts available. What would it take to get a simple barchart with multiple variables working?

initial data in a sparkline?

I haven't dug deep into the code to figure this out, but I've struggled a bit to figure out how to pre-populate a sparkline with initial trend data. I'd like, on page load, for a set of historical data to be loaded, and then continue with the live feed.

I have the historical array, it's just the right way (if one even exists) to load it isn't evident to me.

If this isn't available then cool, I'll figure it out.

This is awesome btw... thanks so much!
S

No Load or Save Dialog in IE 10

No file dialog window appears when clicking Load Freeboard or Save Freeboard in IE10.

(When do you intend to roll out the changes available here into your own live version on freeboard.io?)

Dweet datasource not updating in edit mode

On live freeboard.io
Dweet datasource not updating in edit mode since last change. A manual update pulls in the latest data and updates the 'Last Updated' timestamp though.
Same freeboard updates ok when logged out and viewing the board without access to the editor.

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.