Skip to content

Instantly share code, notes, and snippets.

@oriolrius
Created November 29, 2017 16:32
Show Gist options
  • Select an option

  • Save oriolrius/a580c1d56809570a97ecc062b2224b3d to your computer and use it in GitHub Desktop.

Select an option

Save oriolrius/a580c1d56809570a97ecc062b2224b3d to your computer and use it in GitHub Desktop.

Revisions

  1. oriolrius created this gist Nov 29, 2017.
    37 changes: 37 additions & 0 deletions grafana-script-test.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    'use strict';

    var dashboard;

    dashboard = {
    title: 'this is just a test',
    rows : [],
    };

    dashboard.time = {
    from: "now-6h",
    to: "now"
    };

    dashboard.rows.push({
    title: 'Chart',
    panels: [
    {
    title: 'el titol',
    type: 'graph',
    span: 12,
    fill: 1,
    linewidth: 2,
    targets: [
    {
    'target': "randomWalk('prova')"
    },
    {
    'target': "randomWalk('random walk2')"
    }
    ]
    }
    ]
    });


    return dashboard;