-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Provisioning: Allow saving of provisioned dashboards #19820
Conversation
This looks good. Just needs some docs.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Feels a bit weird to pass the allowUiUpdate
flag to the DashboardService
, but I understand why it is so and I don't think bringing in the ProvisioningService
as a dependency to DashboardService
is a good alternative. For now we have to live with the weirdness of the DashboardService
that already existed before these changes.
I've added some docs suggestions. Still feel that the docs may need some more thoughts besides my suggestions. Maybe @marcusolsson can help out with this?
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com>
…afana/grafana into provisioned_dashboards_saving
This is a feature I am watching and eagerly anticipating. If I can be of any assistance in testing etc, please let me know. I want to be able to hook into the save event somehow and automatically commit a change to the repo where we store our dashboard json. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope of my review is only limited to the documentation. I'll leave the code part in the very capable hands of @marefr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@drewhemm Sure! Feel free to test it and please give feedback if you have any. It will be in the next nightly build. As for the second part - sounds like an interesting feature, feel free to raise an issue explaining in a little more detail what it should do and what kind of use-cases it would solve. |
Wohoo! |
В Grafana 6.5.1 появилась возможность сохранять изменения в *provisioned dashboards*. Эти изменения не попадают в файловую систему, но это всё равно удобнее, чем создавать клон дашборда. Ref: grafana/grafana#19820 Docs: https://grafana.com/docs/grafana/v9.1/administration/provisioning/#dashboards
What this PR does / why we need it:
Allows saving of provisioned dashboards if the config value allowUiUpdates is set to true
This lets the user modify and save a dashboard that has been provisioned. It also enables some automation scenarios where the updated dashboards are pulled out via API calls and updated - provisioned to other instances etc.
Which issue(s) this PR fixes:
#11778
Allow UI to save changes for provisioned dashboards
Fixes #11778
Special notes for your reviewer:
Note that if updated on disk - the manually updated dashboard will be overwritten again by the provisioning engine. I recommend creating a separate Issue for this as it requires some thought around behaviour.
I would like the code to be a bit more readable an efficient but I could not find a way of doing that that would not require a big refactor of the services. If there are nice way of cleaning it up a bit, please give me some pointers!