Put the facebooklinkstats.rb to jobs/facebooklinkstats.rb.
Add the code from facebooklinkstats.erb to the desired dashboard.
| "meh": { | |
| "feh": "what ever the user types into the form field", | |
| "bleh": "what ever the user types into the form field" | |
| } |
A Dashing widget to show a Google Visualizations Gauge on a dashboard.
Copy the google_gauge.coffee, google_gauge.html and google_gauge.scss file to into /widgets/google_gauge directory.
Add the following to the dashboard layout file:
This widget is a fork of the original Progress Bar Widget, a widget made for Dashing.
The original widget shows multiple animated progress bars and reacts dynamically to new information being passed in. This forked widget adds the possibility to define warning and critical thresholds for each progress bars, which will change their color depending on the threshold reached.
Anything with a current state and with a projected max/goal state can easily be represented with this widget.
| console.log('Loading function'); | |
| var doc = require('dynamodb-doc'); | |
| var dynamo = new doc.DynamoDB(); | |
| /** | |
| * Provide an event that contains the following keys: | |
| * | |
| * - operation: one of the operations in the switch statement below | |
| * - tableName: required for operations that interact with DynamoDB |
| [ | |
| { | |
| "type": "help", | |
| "helpvalue": "<h4>Tabbed Array Example</h4><p>Tab arrays can have tabs to the left, top or right.</p>" | |
| }, | |
| { | |
| "key": "comments", | |
| "type": "tabarray", | |
| "add": "New", | |
| "remove": "Delete", |
| const puppeteer = require('puppeteer'); | |
| let scrape = async () => { | |
| const browser = await puppeteer.launch({headless: false}); | |
| const page = await browser.newPage(); | |
| await page.goto('http://books.toscrape.com/'); | |
| const result = await page.evaluate(() => { | |
| let data = []; // Create an empty array that will store our data |
| import template from './recipe.html' | |
| import DATA_SERVICE from '../../utils/data' | |
| export default class Recipe extends HTMLElement { | |
| constructor () { | |
| // attach shadow DOM, initialize private recipe property, and initialize data service | |
| super() | |
| this._shadowRoot = this.attachShadow({ mode: 'open' }) | |
| this._recipe = null | |
| this.ds = new DATA_SERVICE() | |
| } |
| import './components/error/error' | |
| import content404 from './components/404/404.html' | |
| import DATA_SERVICE from './utils/data' | |
| const ds = new DATA_SERVICE() | |
| // get SPA containing element | |
| const $el = document.getElementById('app') | |
| // define routes | |
| const home = async () => { | |
| await import('./components/recipe/recipe') |