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

Scripted Dashboards #9434

Open
sabino opened this issue Feb 16, 2019 · 3 comments
Open

Scripted Dashboards #9434

sabino opened this issue Feb 16, 2019 · 3 comments

Comments

@sabino
Copy link
Contributor

sabino commented Feb 16, 2019

Feature request / proposal

I think it should be possible to create scripted dashboards. Something like this: http://docs.grafana.org/reference/scripting/

I know that it is possible to use the API but this is different. The dashboard stuff would not be store in the database, but maybe the filesystem. (I was thinking maybe something similar to the LookML stuff from Looker?). It would get stored in the database after importing.

And maybe the dashboard could be created based on the parameters coming from the files and they can't be edited unless you "reimport", or change the script that generated them.

That way it would be possible to recreate the dashboards anytime, and use an already known version control system, like git.

Related #7459

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

@sabino
Copy link
Contributor Author

sabino commented Mar 14, 2019

I just realized that this could be an extension for the X-rays / Automagic Dashboards.
The way it works today is that we can create a dashboard out of it, but there is no way to update an existing dashboard based on a yaml change right?

It could also be possible to point a git repo to link, so all yaml file would be placed there and there would be no need to deploy metabase on every new automagic table definition.

@sbelak
Copy link
Contributor

sbelak commented Mar 14, 2019

No, it's not, once you save an xray it "forgets" that it was an xray and acts just like any other dashboard.

One thing you could try is to use the POST /api/dashboard/save endpoint (which xrays use when saving) which takes as input a complete dashboard description in JSON. This will create a new dashboard though which might be awkward as the urls will change and you'd have to delete the old instance.

What exactly is your use-case? Maybe there are also some more partial solutions.

@sabino
Copy link
Contributor Author

sabino commented Mar 14, 2019

A use case would be to keep a reproducible version of the dashboard somewhere safe, and another is to make possible to review the dashboard before "going to production".

One could have a metabase running locally to develop a dashboard and after that export the settings of this dashboard an import into the shared production server. Also we could keep the server always clean as it could be easily redeployed from scratch and all the dashboards/questions would be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants