Giter VIP home page Giter VIP logo

monique-web's Introduction

Monique Web

Monique Web screenshot

Monique Web is a fully featured web application supporting creating custom dashboards, built using Monique library and taking advantage of the library's features:

  • tiles display data from report instances, which represent data from multiple sources, like SQL query results, JSON documents, CSV files, single metrics
  • the data can be visualized using a chart, a table or textual information
  • data series can be created automatically (for example, all rows contained in SQL results can be automatically included)
  • tiles can be created automatically (for example, a tile could be created for each IP address that sends data)

Installation

Monique library must be installed as a prerequisite. Note that the mqeconifg_override.py file, created during installation, will need to be placed in the $PYTHONPATH.

Monique Web isn't available on PyPI, but can be run from a git clone:

$ git clone https://github.com/monique-dashboards/monique-web.git

The requirements can be installed using pip:

$ pip install -r monique-web/requirements.txt

Note that there might be compatibility issues between simplejson versions and the JSON serialization implemented by the app. The safest way is to install the app in a virtualenv and ensure the simplejson package is not installed.

Executing database migrations

Monique Web supports both the SQLite3 and the Cassandra database.

For the SQLite3 database, files having the extension .sqlite3 must be executed:

 $ cat monique-web/mqeweb/migrations/*.sqlite3 | sqlite3 /var/lib/monique.db

For the Cassandra database, files having the extension .cql must be executed:

$ for file in monique-web/mqeweb/migrations/*.cql; do cqlsh 127.0.0.1 -f "$file"; done

Configuring the app

For security reasons the Flask's SECRET_KEY and SALT settings should be changed, to ensure cookies will not be decoded by an attacker. Additionaly, external URLs under which Monique Web and Monique API will be available can be configured. The values should be put into the webconfig_override.py file:

# The base URL under which the web application is available
BASE_URL_WEB = 'https://example.com:8100'

# The base URL under which the API application is available
BASE_URL_API = 'https://example.com:8101'

class FlaskSettings(object):
    # !!! The values should be changed for openly accessible apps
    SECRET_KEY = '\xf3,\xe2c\xa6q\xba<\xe1\x9b\x05\x88\xf9,\xb5s+\x13\xd1u\xceY\x9d\x08'
    SALT = '\xde\x1c\xcb\x86'

Running the WSGI app

The WSGI application (which is also a Flask application) is returned by the function mqeweb.webapp.create().

For example, the following commands run Monique Web using Gunicorn server:

$ cd monique-web
$ ls *_override.py # ensure the config modules are present
mqeconfig_override.py webconfig_override.py

$ pip install gunicorn
$ gunicorn -b 0.0.0.0:8100 'mqeweb.webapp:create()'

The application should be running under URL http://localhost:8100. Note that when the application is available through the internet, using HTTPS is strongly recommended.

At this point you will probably want to install Monique API, which provides a HTTP REST API for submitting report instances. An alternative is to use the Monique library's API directly.

Used libraries

Besides Monique, which implements the backend, the list of used libraries includes:

  • Flask - used as a web framework
  • Gridstack - used to implement a dashboard grid
  • Chart.js - used for rendering charts (the library draws inside a Canvas element)

Monique Web uses only libraries with liberal open source licenses, like BSD or MIT.

monique-web's People

Contributors

aartur avatar

Watchers

James Cloos 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.