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

Cannot move dashboard to a new space #31

Closed
HPNoha opened this issue May 17, 2019 · 4 comments
Closed

Cannot move dashboard to a new space #31

HPNoha opened this issue May 17, 2019 · 4 comments

Comments

@HPNoha
Copy link

HPNoha commented May 17, 2019

Here is the use case
I initially imported dashboard x from instance A to instance B under space y
Now I need to import the same dashboard again from A to B and at the same time move it to a new space z (or move it from space y to z then import again)
The only option is to do another import to space z but that gives me:
slug <slug id> already used for dashboard <dashboard x's title> in space y dashboard will be imported with new slug
so now I have two copies of the dashboard, I'd like it to have the same id after being moved to the new space so users can still reference it with the same url. Exactly the same way you'd move dashboards between spaces from the UI.
Did I miss a way to do that with gazer or do we perhaps need a gzr mv command that would move a dashboard between two spaces on the same instance?

@pioneer903
Copy link

I would like to add more information to this.

  1. There is --force flag that can be used to overwrite the existing dashboard on the destination instance.
  2. This stopped working after upgrading destination instance to 6.10. It worked fine with 6.6.

Here's the error that i get if I am trying to import an existing dashboard

Importing file Dashboard_2305_dash2.1.json
Running gzr dashboard import Dashboard_2305_dash2.1.json 2571 --host=destination_looker.com --no-verify-ssl --force
slug 66AW6tmTPZXZKpaczFS4zB already used for dashboard dash2.1 in space 2479
dashboard will be imported with new slug
Modifying existing dashboard 3119 dash2.1 in space 2571
Error updating dashboard_element(19525,{
  "body_text": null,
  "dashboard_id": null,
  "look_id": null,
  "merge_result_id": null,
  "note_display": null,
  "note_state": null,
  "note_text": null,
  "query_id": null,
  "refresh_interval": null,
  "result_maker": null,
  "subtitle_text": null,
  "title": null,
  "title_hidden": false,
  "title_text": "cccccc",
  "type": "text"
})
Not found

ERROR: Not found

@HPNoha
Copy link
Author

HPNoha commented May 23, 2019

@pioneer903, to clarify, --force works (when it does) only when re-importing a dashboard to the same space, the issue I have to when re-importing to a new space, it detects that this dashboard already exists in a different space and it creates a new one instead.

@pioneer903
Copy link

Ok, I see. I must have misread your comment and thought it is related to mine. Thank you for clarifying. I will open another issue.

@drstrangelooker
Copy link
Collaborator

You can refer to a dashboard with the slug instead of the dashboard_id. This value should also remain consistent across instances of Looker as well, where the id value will change if you copy a dashboard from one Looker instance to another.

If you want to move a dashboard, you can currently do the following.
gzr dashboard cat <DASHBOARD_ID> ... to get the dashboard json
gzr dashboard rm <DASHBOARD_ID> ... to remove the existing version
gzr dashboard import <DASHBOARD_JSON_FILE> <TARGET_SPACE_ID> ... to import the dashboard into the target space. The dashboard_id will change, but the dashboard slug will stay the same.

I'm going to create a new issue to implement a gzr dashboard mv operation.

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

No branches or pull requests

3 participants