Giter VIP home page Giter VIP logo

just-dashboard's Introduction

just-dashboard

Documentation β€’ Getting started β€’ Chart types

Travis Codecov

just-dashboard turns this:

dashboard "Food":
  - h1 text: Food
  - h2 text: By caloric content
  - 3 columns:
    - rows:
      - h3 text: Bananas
      - pie chart: {
          "columns": [
            ["Protein", 5], ["Sugar", 10], ["Other carbs", 40], ["Fat", 1]
          ]
        }
    - rows:
      - h3 text: Tofu
      - pie chart: {
          "columns": [
            ["Protein", 30], ["Sugar", 0], ["Other carbs", 40], ["Fat", 3]
          ]
        }
    - rows:
      - h3 text: Peanut butter
      - pie chart: {
          "columns": [
            ["Protein", 20], ["Sugar", 2], ["Other carbs", 20], ["Fat", 50]
          ]
}

Into this:

Screenshot of a dashboard that compares the macronutrients in bananas, tofu and peanut butter.

To host your dashboard, you can roll your own backend, or:

  • Create a public GitHub gist with a file named dashboard.yml or dashboard.json (depending on your preferred format)
  • Access it as a shareable dashboard at: http://bottoml.in/e/{Github username}/{Gist ID}

In fact, I've created a Gist with the example above: https://gist.github.com/kantord/2973bdd4ad689642562018bb4091ffbd; thus it's accessible as a dashboard at: http://bottoml.in/e/kantord/2973bdd4ad689642562018bb4091ffbd

just-dashboard's People

Contributors

dependabot-support avatar dependabot[bot] avatar fossabot avatar gitter-badger avatar kantord 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

just-dashboard's Issues

Support for # in the parser URL and variable filenames

https://github.com/kantord/bottoml.in-e imports the just-dashboard module to show one way it can be used with ready-written gists and data files.
I wanted to have a collection of related files in one single gist so thought to look at the code to see how locked into the appended gist URL format you were. It seemed that you detected input file format initially by file extension so I guess the files need to end in .yml or .json etc?

Wasn't sure if the filename 'must' be called dashboard, as in dashboard.yml? I wanted to have pairs in the gist collection of files, t22-yml, t33.yml, t33A.json t33B.json etc

Wanted to group similar graphs in the same gist but that means a location.hash added to the url so a new regexp needed? For instance, I made this gist

https://gist.github.com/zawsx/84c95865d0613ce210a148421815e966

If contains two of your example files,
https://gist.github.com/zawsx/84c95865d0613ce210a148421815e966#file-g22nutri-json
and
https://gist.github.com/zawsx/84c95865d0613ce210a148421815e966#file-t22-yml

Explicit support for hashes might also bring the possibility of adding #myswitch (e.g. #local, #remote, #debug) so as to maybe bring more flexibility to the segment count approach? My localhost test of the bottomline server wouldn't resolve to the pattern I was expecting - localhost:8080/reponame by default, I got confused as localhost:8080/example worked but not localhost:8080/reponame/example

Request to add a config variable

It seemed that the 'e' in
http://bottoml.in/e/ is hardwired so I thought to split it out (making it 'g' for gist' etc). If you were to kindly add this facility, it would mean I could keep pace better with any future enhancements.

Setup Airbrake for your JavaScript application

Install Airbrake in 2 easy steps:

Step 1: Add the library
Include via CDN:

<script src="https://cdnjs.cloudflare.com/ajax/libs/airbrake-js/1.0.4/client.min.js"></script>

We also support installation via npm and Bower.

Step 2: Copy this config snippet to your app.js file

(You can find your project ID and API KEY with your project's settings):

var airbrake = new airbrakeJs.Client({
  projectId: <Your project ID>,
  projectKey: '<Your project API Key>'
});
airbrake.addFilter(function (notice) {
  notice.context.environment = 'production';
  return notice;
});

To test that Airbrake has been installed correctly in your JavaScript project, just open up the JavaScript console in your internet browser and paste in:

airbrake.notify('hey there!')

Visit official GitHub repo for more info on alternative configurations and advanced options.

Page Weight for gist parser - need it be reduced?

When using just-dashboard, you've kindly provided the option to submit ready-written dashboard and data files. With this, however, the bundle.js (as used for one of your simple pie chart examples for instance) is 907kb ([http://bottoml.in/e/kantord/2973bdd4ad689642562018bb4091ffbd]). Doesn't that make the idea a bit restricted in the width of uses? I had hoped to use it in a sort of 'i-frame' manner (without the iframe of course) as I think you intend.
However, in a text and graphics-heavy page, adding 1Kb to that page weight for a graph makes it noticeably slow to load when I try it - will people for the graphs to load whilst browsing the page, especially on mobile? Obviously caching will alleviate massively but for me, it'll only be one page per website so that doesn't help.
A news article might well have a page weight of 1Mb. If it were to include an auto-generated graphic (or set of graphics), generated by just-dashboard (as in http://bottoml.in/e/kantord/2973bdd4ad689642562018bb4091ffbd), there would be a further delay, after the 'main' page has loaded.
Maybe if the just-dashboard bundle.js could somehow be able to use async defer from the calling (1Mb) page, then the delay wouldn't be noticeable? Destroy some simplicity of use, so maybe as an option?

Add optional 'file_loader' attribute to render

The render method should use 'file_loader' to load files with.
file_loader(filename) should return file contents.

This would be useful:

  • On bottoml.in/e/ to enable loading other files from the Gist
  • In just-dashboard-desktop to load other files from the file system

Windows 10 package.json config

Had to remove the single quotes around './src/index.js' in package.json for it to work under windows - here's them removed:
"manual-test": "webpack-dev-server ./src/index.js --hot --inline --output-filename 'bundle.js'"

env variable assignments in package.json scripts don't work out of the box in W10 on mine. WEBPACK_ENV for instance.

The Makefile won't work under windows as make isn't native so the examples docs can't be compiled.

Size of bundle.js

https://github.com/kantord/bottoml.in-e imports the just-dashboard module to show one way it can be used and outputs bundle.js
When I complile it, I'm actually getting bundle.js split into two parts as my webpack output, 625kb and 2548Kb. Looking back at the dashboard include, my dashboard.js is 3781kb and my vendors bundle 3335Kb
Is there a minimisation option I can take as I can't figure out why my bundle is 2171kb, more than double yours?

How use this lib?

Hi!
I'm triying to create a page with multiple chars in same page, but I don't understand this lib, is server or client side?
How can I use with a single file in client, or make functional in server, whatever works is valid to me.
Thanks :)

Create component gallery

Create a component gallery that

  • Has an automatically generated screenshot for each component
  • Example code to generate such screenshot
  • Organized by category (text / input / chart / etc.)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Unable to run locally - hard to understand why

Hi! Thanks for doing this, it looks excellent!
Sorry if this is not really an issue - I couldn't figure the code out and hope it might help other idiots like me :)

I downloaded and installed it, then
npm i -s
Is there another step I need to take? I see the travis setup which I presume is for CI

Ran
npm run dev
Had to modify node_modules\webpack-cli\bin\webpack.js to
statsPresetToOptions = require("../../webpack/lib/Stats.js").presetToOptions;

Got to this point:
justd

Can't figure out what to do next. Looked at the docs but they seem to be GHpages for https://kantord.github.io/just-dashboard/ ?

Basic problem is that I don't understand how the back end is arranged or what the front end code that calls the back end looks like? Looks as if jq-web is used to parse the yaml file? Couldn't figure out the route from api endpoint to the parser. Wanted to try everything locally.

manual_test.html for example, contains this:

<script src="dashboard.js"></script> <script src="jq.bundle.js"></script> <script src="manual_test.js"></script>

Can't figure out what to put in manual_test.js

Maybe be really helpful if there was a version of manual_test.js (say, demo.js) in dist so that,say, demo,html would run locally?

Once again, sorry for being an idiot.

Change data/loader syntax

Instead of having attr:loader attr:query etc., data should be modified like this:

  • Data should be an array
  • If data x is not an array, it's interpreted as [x]

Each element in the array can be

  • A "magic" string that is parsed into an array of loader objects
  • An object with one key and one value (e. q. {graphQl: ["asdf"]} etc.)

The first loader receives undefined as input argument. All the other loaders receive the result of the first loader as argument.

Provide it as a standalone library

Hello very cool library,

But that can be cool to provide this dashboard as a standalone library... So we can make pages without install webpack, etc... just load the lib and the conf

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.