Coder Social home page Coder Social logo

wilbrdt / potsie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openfun/potsie

0.0 0.0 0.0 6.36 MB

:bar_chart: Grafana dashboards suite for learning analytics

Home Page: https://demo.potsie.education

License: MIT License

Shell 7.14% JavaScript 0.73% Python 2.47% TypeScript 27.94% Makefile 4.85% Dockerfile 0.92% Jsonnet 55.95%

potsie's Introduction

Potsie

Potsie is a collection of Grafana dashboards for learning analytics.

Sneak peek

We've cooked an up-to-date project demonstration for you! Check this out at https://demo.potsie.education using the following credentials:

Account Login Password
Teacher teacher funfunfun

Getting started

Once you have cloned this project, bootstrapping it should be as easy as typing the following command from your terminal:

$ make bootstrap

Now you are ready to fire up grafana using:

$ make run

After a few seconds, the application should be running at localhost:3000. Default admin credentials are admin:pass. Once logged in, running grafana instance should be provisioned with all dashboards versioned in this repository.

Developer guide

Working on dashboards

Potsie dashboards are written using the Jsonnet templating language with the help of the grafonnet library. Sources are stored in the src/ directory and should be compiled to plain JSON before being sent to grafana.

Sources compilation can be done using the ad hoc command:

$ make compile

Once compiled, our potsie provisioner (see potsie.yaml) should automatically load new or modified dashboards in running grafana instance (after at most 3 seconds). You should refresh your web browser to see modifications.

nota bene: you can see compiled sources in the var/lib/grafana/ directory from this repository (look for JSON files).

To automatically compile sources upon saved modifications, we provide a watcher that requires to install the inotify-tools dependency for your system. It can be run using:

$ make watch

Quality checks

To respect Jsonnet standards, we recommend to use official language formatter and linter:

# Format sources
$ make format

# Lint sources
$ make lint

You can also use the bin/jsonnetfmt or bin/jsonnet-lint helper scripts for custom use of the related tools. Adding a Git pre-commit hook script to autoformat sources before committing changes would be an example usage of those scripts.

Other helper scripts

To install new dependencies, you should use the bin/jb wrapper script we provide. This script uses the Jsonnet Bundler, aka jb package manager to handle project requirements. To list available commands and options, use the --help flag:

$ bin/jb --help

If you want to play with the Jsonnet compiler, we also provide a wrapper script, see:

$ bin/jsonnet --help

Create a new Grafana Plugin

To create a new Grafana plugin, we use the following script:

$ ./bin/create-plugin my-new-awesome-plugin

The script will ask you a couple of questions and then create your plugin in the ./src/plugins/packages directory using @grafana/toolkit.

Then, download the necessary dependencies and build all plugins by running the following commands:

$ make dependencies
$ make plugins

Grab a coffee or tea; this might take a while โ˜•

Finally, add your plugin to the GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS in ./env.d/grafana (it's a comma-separated list of plugin names) and restart Grafana:

$ make stop
$ make run

Working on plugins

To launch continuous build of your plugin, run:

$ ./bin/run-plugin potsie-my-new-awesome-plugin watch

Note: the run-plugin script wraps the usual npm run commands and executes them on the node development docker image. You can replace the watch argument with any other script defined in your plugins package.json file.

Finally, to view your changes on the plugin, create a new panel using the plugin in grafana and refresh the panel page in the browser.

Contributing

This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any question related to our implementation or design decisions.

We try to raise our code quality standards and expect contributors to follow the recommandations from our handbook.

License

This work is released under the MIT License (see LICENSE).

potsie's People

Contributors

jmaupetit avatar quitterie-lcs avatar sergiosim avatar p-bizouard 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.