Giter Club home page Giter Club logo

malhar-ui-console's Introduction

DataTorrent Front

Open-source, web-based user interface for use with DataTorrent, a stream-processing platform for developing real-time, big data applications in Hadoop.

Contributing

This project welcomes new contributors!

You acknowledge that your submissions to DataTorrent on this repository are made pursuant the terms of the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) and constitute "Contributions," as defined therein, and you represent and warrant that you have the right and authority to do so.

When adding new javascript files, please prepend the Apache v2.0 license header, which can be found in CONTRIBUTING.md file.

Installation/Building

After cloning the Malhar repository from Github:

cd front
npm install .
make build

This creates a dist folder whose contents should be copied into the static file server root on the DataTorrent Gateway.

Browser Compatibility

The following browsers are currently supported:

  • Chrome
  • Firefox
  • Safari

Tests

Tests are written using the Mocha Framework, the Chai Assertion Library, and the Sinon Library. The suite.js file which is located in front/test/ includes all the tests to be run. The individual test files are located in the same directory of the file under test, and by convention end in .spec.js.

CLI

To run tests via command line, run make clitest (or npm test, which proxies to the make target).

Browser

To run the tests in the browser, run make test, then go to http://localhost:3334/test/runner.html to view the test results.

Development

To start development on the DataTorrent UI, you will need to set up a ssh tunnel to the node in a DataTorrent cluster that has the DT Gateway successfully configured and running.

Configure

By default, the ui assumes that you have set up a tunnel that is listening on port 3390 of your local machine that is connected to the Gateway node. If you are using another port, change the assignment of config.gateway.port in config.js to the appropriate port.

Starting Dev Server

Run the command:

node server

Then, open http://localhost:3333/ in your browser and you should see the dashboard. Chrome is best when developing.

The DT Global Variable

At runtime, the variable DT is available on the global namespace and contains all the base components that the Front relies on, such as classes that model aspects of your datatorrent applications and views that are common throughout the project. To view what is on this module, take a look at the file located at front/js/datatorent/index.js.

Pages

The file located at front/js/app/pages.js acts as an index for all registered pages, and contains more information therein about how to set up a page. The actual page definitions are located in front/js/app/lib/pages/ and specify a page name, the widgets that can be instantiated, the default widget configurations (called dashboards), and the page-wide models that will be instantiated. The best way to get familiar with these is to review the code.

Widgets

Widgets are simply enhanced backbone views. It is recommended (but not necessarily required) to have all widgets extend from DT.widgets.Widget, which maps to the base backbone view located at front/js/datatorrent/WidgetView.js.

Location

Widgets live in /js/App/lib/widgets.

Creation

To create a boilerplate for a widget, run

./bin/createWidget [-c] _WIDGET_NAME_

This will append "Widget" to the end of your widget name, so it is not necessary to include it here. The new folder that is created will be located at front/js/app/lib/widgets/_WIDGET_NAME_Widget.

malhar-ui-console's People

Contributors

andyperlitch avatar

Watchers

James Cloos avatar Sasha avatar

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.