Can a dashboard or widget be cloned?

  • I'd love to clone a dashboard (the same user, or to another user) or a widget. Is there some straight forward method to do this? This would include using the command line on my Raspberry Pi if that makes sense.

    Background: I have a MySensors node in each room to control the IR HVAC unit in that room. I made a dashboard for each HVAC/room. The dashboard includes several "Sensor custom buttons" widgets as well as graphs and sensor widgets. I "cloned" the dashboards using copy/paste as much as possible (mostly the JSON on the custom buttons), but it was still a lot of work. Today I setup another user and I realized I was going to have to create those dashboards all over again. Any level of cloning support that makes all of this easier would be greatly appreciated. I realize that implementing a general dashboard/widget cloning feature could be lots of work.

    P.S. I understand that after cloning I may have to change the sensors used by a widget, but it would still save a lot of time.

  • @tomg For now, there is no direct clone support. As you are in 1.4.0 SNAPSHOT version you may clone it in the backend as follows,

    1. Capture existing dashboards from mycontroller/conf/resources/dashboards
    2. Select your exact dashboard, you want to clone. In my case, it was a0481d5d-422d-4fc9-9548-ca299cfd77e1.json
    3. Now create a new dashboard and note that dashboard name in mycontroller/conf/resources/dashboards (in my case it was bb1aa13d-7679-4161-9cd5-7da580cdcb27.json), NOTE: New dashboard layout should be as like old dashboard.
    4. Execute the following commands,
    • cd mycontroller/conf/resources/dashboards/
    • cp a0481d5d-422d-4fc9-9548-ca299cfd77e1.json bb1aa13d-7679-4161-9cd5-7da580cdcb27.json

    NOTE: All the commands should be executed as the same user as running MyController server.
    IMPORTANT: As dashboard have unique id's may lead some issue, I never tested this. Just giving an idea.

  • @jkandasa Thanks for the suggestion, I'll give it a try in the near future.

    Please consider supporting this functionality in the future in the user interface of the MyController program.

  • @tomg Sure, Kindly create a ticket to track this request in GitHub.

Suggested Topics