Enable support for custom ports for dashboard backup
Currently dashboard backup uses a hardcoded base_url of localhost:3000,
which breaks the backup script if the user changes the port to anything
else.
Add some logic to fetch the port config and pass it into the dashboard
backup script. Also make sure dashboard backups are kept in sync with
any port changes.
So dashboard will not be imported and there is no error.
Add a normal `dashboards-relation-joined` hook, query relation data directly with key,
so operator based charm can relate to grafana and import dashboard.
Actually this is a misuse of the grafana rest api structure.
Dashboard JSON data should include the real data directly.
Refer to LP1897843 for details.
This patch make the code support both formats.
Since most of our dashboard JSON file followed the wrong pattern, we
have to keep backward compatibility until grafana charm upgraded in all clouds.
Actually this is a misuse of the grafana rest api structure.
Dashboard JSON data should include the real data directly.
Refer to LP1897843 for details.
This patch make the code support both formats.
Since most of our dashboard JSON file followed the wrong pattern, we
have to keep backward compatibility until grafana charm upgraded in all clouds.