How to use the grafana-dash-gen.Panels function in grafana-dash-gen

To help you get started, we’ve selected a few grafana-dash-gen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magma / magma / nms / app / fbcnms-packages / fbcnms-platform-server / grafana / dashboards / Dashboards.js View on Github external
export function newPanel(params: PanelParams) {
  const pan = new Grafana.Panels.Graph({
    title: params.title,
    span: 6,
    datasource: 'default',
  });
  // Have to add this after to avoid grafana-dash-gen from forcing the target
  // into a Graphite format
  pan.state.targets = params.targets;
  return pan;
}
github uber-node / ringpop-common / tools / grafana-dash / gen-dashboard.js View on Github external
function createBootstrapRow() {
    var row = new grafana.Row();
    row.state.title = 'BOOTSTRAP';
    row.state.showTitle = true;

    row.addPanel(new grafana.Panels.Graph({
        title: 'Join Times',
        span: 12,
        targets: [
            /* eslint-disable max-len */
            new grafana.Target(getTarget('bootstrap.join-p95'))
                .percentileOfSeries(50).alias('p95')
            /* eslint-enable max-len */
        ],
        legend: {
            show: false
        }
    }));

    return row;
}
github magma / magma / nms / app / packages / magmalte / grafana / dashboards / Dashboards.js View on Github external
function newPanel(params: PanelParams) {
  const pan = new Grafana.Panels.Graph({
    title: params.title,
    span: 6,
    datasource: 'default',
    description: params.description ?? '',
  });
  // Have to add this after to avoid grafana-dash-gen from forcing the target
  // into a Graphite format
  pan.state.targets = params.targets;

  // "short" is the default unit for grafana (no unit)
  pan.state.y_formats[0] = params.unit ?? 'short';

  // yMin should be 0 at minimum unless otherwise specified.
  // null is used to indicate 'auto' in grafana
  if (params.yMin === null) {
    pan.state.grid.leftMin = null;
github uber-node / ringpop-common / tools / grafana-dash / gen-dashboard.js View on Github external
function createGossipRow() {
    var row = new grafana.Row();
    row.state.title = 'GOSSIP';
    row.state.showTitle = true;

    row.addPanel(new grafana.Panels.SingleStat({
        title: 'Cluster Size',
        span: 3,
        targets: [
            new grafana.Target(getTarget('gossip.ping-send'))
                .countSeries().alias('total')
        ],
        legend: {
            show: false
        }
    }));

    row.addPanel(lineGraph({
        title: 'Ping TX/sec',
        span: 3,
        targets: [
            new grafana.Target(getTarget('gossip.ping-send'))
github uber-node / ringpop-common / tools / grafana-dash / gen-dashboard.js View on Github external
function lineGraph(opts) {
    var graph = new grafana.Panels.Graph(opts);
    graph.state.fill = 0;

    return graph;
}

grafana-dash-gen

A grafana dashboard generator

MIT
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis