Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying panels at dashboard construction time #2

Open
dlespiau opened this issue Jun 24, 2019 · 0 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@dlespiau
Copy link
Member

At the moment the API looks like:

const dashboard = name => new g.Dashboard(`Service > ${name}`)
  .addPanel(
    new g.Graph(`${name} RPS`, {
      datasource: '$datasource',
    })
      .addTargets([
        new g.Prometheus(RPS(job(name)), { legendFormat: '{{code}}' }),
      ]),
  );

We should allow construction time panels = [ ... ] for people that prefer that option:

const dashboard = name => new g.Dashboard(`Service > ${name}`, {
  panels = [
    new g.Graph(`${name} RPS`, {
      datasource: '$datasource',
      targets = [
        new g.Prometheus(RPS(job(name)), { legendFormat: '{{code}}' }),
      ];
    })
  ].
});
@dlespiau dlespiau added enhancement New feature or request question Further information is requested labels Jun 24, 2019
@squaremo squaremo changed the title Add support for specifying panels at dasboard construction time Add support for specifying panels at dashboard construction time Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant