Skip to content

Dashboards Component

Used to sync dashboards from a source instance to a destination instance of Swimlane

sync_dashboard

This method syncs a single dashboard from a source instance to a destination instance.

This class first checks to see if the provided dashboard already exists on the destination instance. If it does not exist then we attempt to add the dashboard to the destination instance.

If it already exists on the destination instance we first check it against all destination instance dashboards. This check involves comparing the provided source dashboard dict with the uid and name of a destination instance dashboard.

If a match is found we then check if the version is the same. If it is, we simply skip processing this dashboard.

If a match is found but the versions are different we first ensure that all the reports in the dashboard are on the destination instance. Once that is complete, we modify the dashboard to remove unneeded keys and then update it as provided by the source instance.

def sync_dashboard(self, dashboard: dict)

sync

This method is used to sync all dashboards from a source instance to a destination instance

def sync(self)