Bug 1314875

Summary: [RFE][M-5] Clone Dashboards in UI
Product: Red Hat CloudForms Management Engine Reporter: Dustin Scott <dscott>
Component: UI - OPSAssignee: Zita Nemeckova <znemecko>
Status: CLOSED ERRATA QA Contact: Jaroslav Henner <jhenner>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.5.0CC: abellott, bmidwood, dmetzger, dmisharo, hkataria, jhardy, jocarter, lavenel, mfeifer, mpovolny, nachandr, obarenbo, simaishi, tnovotna, yrudman
Target Milestone: GAKeywords: FutureFeature, RFE
Target Release: 5.11.0Flags: mfeifer: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard: ui:dashboard
Fixed In Version: 5.11.0.21 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:33:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Feature
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Dustin Scott 2016-03-04 18:05:56 UTC
-What is the nature and description of the request?
Request to be able to duplicate dashboards in the User Interface.
  
-Why does the customer need this? (List the business requirements here)
Ease of dashboard creation when similar dashboards exist.
  
-How would the customer like to achieve this? (List the functional requirements here)
A button on each dashboard with the ability to clone it.
  
-Is there already an existing RFE upstream or in Red Hat Bugzilla?
I have not found one.
  
-Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
Before the customer goes into production.  This is tentatively scheduled for now depending on the success of the current implementation in development.
  
-Is the sales team involved in this request and do they have any additional input?
Yes, sales in involved.  Input pending depending on future meeting.
  
-List any affected packages or components.
cfme-appliance-5.5.2.4-1.el7cf.x86_64
cfme-5.5.2.4-1.el7cf.x86_64

Comment 6 Yuri Rudman 2019-03-14 15:42:40 UTC
PR: https://github.com/ManageIQ/manageiq/pull/18550

Comment 20 CFME Bot 2019-06-20 19:47:44 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/b8042fb98cf55e0368f78f9379758bfd559d989c
commit b8042fb98cf55e0368f78f9379758bfd559d989c
Author:     Yuri Rudman <yrudman>
AuthorDate: Thu Jun 20 09:23:24 2019 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Thu Jun 20 09:23:24 2019 -0400

    keep widgets while cloning dashboard
    https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 app/models/miq_widget_set.rb | 1 +
 spec/models/miq_widget_set_spec.rb | 7 +
 2 files changed, 8 insertions(+)

Comment 22 CFME Bot 2019-07-08 15:31:45 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/f34a0480d90b0ae0698b5d1708f21dc5fdce9263
commit f34a0480d90b0ae0698b5d1708f21dc5fdce9263
Author:     Richard Vsiansky <r.vsia>
AuthorDate: Thu Jun 20 07:57:27 2019 -0400
Commit:     Richard Vsiansky <r.vsia>
CommitDate: Thu Jun 20 07:57:27 2019 -0400

    Add copy of dashboard form

    https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 app/controllers/report_controller.rb | 18 +-
 app/controllers/report_controller/dashboards.rb | 55 +
 app/helpers/application_helper/toolbar/miq_widget_set_center.rb | 7 +
 app/javascript/components/copy-dashboard-form/copy-dashboard-form.jsx | 79 +
 app/javascript/components/copy-dashboard-form/copy-dashboard-form.schema.js | 66 +
 app/javascript/packs/component-definitions-common.js | 2 +
 app/views/report/_copy_dashboard.html.haml | 3 +
 app/views/report/_db_show.html.haml | 6 +-
 config/routes.rb | 4 +
 9 files changed, 232 insertions(+), 8 deletions(-)

Comment 23 Jaroslav Henner 2019-07-26 11:40:26 UTC
I managed to copy the dashboard using UI and when I changed the new copy it I saw no change in the original so I guess they were distinct entities.

Comment 24 Jaroslav Henner 2019-07-26 12:21:13 UTC
When I try to copy the dashboard as an user belonging to Admin group, I get errors:


Server Error (API)

URL https://10.8.199.13/api/groups?expand=resources

Status 403 Forbidden

Content-Type application/json; charset=utf-8

Data {"error":{"kind":"forbidden","message":"Use of the read action is forbidden","klass":"Api::ForbiddenError"}}


and on the new page I get this flash:
Use of the read action is forbidden

I think in case that user doesn't have sufficient priviledges, the button shouldn't be enabled.

Comment 31 CFME Bot 2019-08-20 20:31:25 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/55dc46683180dcf9b27937d9ed1e9b4b3d1ac67e
commit 55dc46683180dcf9b27937d9ed1e9b4b3d1ac67e
Author:     Zita Nemeckova <znemecko>
AuthorDate: Tue Aug 20 07:18:42 2019 -0400
Commit:     Zita Nemeckova <znemecko>
CommitDate: Tue Aug 20 07:18:42 2019 -0400

    Hide Dashboard Copy

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 db/fixtures/miq_product_features.yml | 1 +
 1 file changed, 1 insertion(+)

Comment 32 CFME Bot 2019-08-21 09:56:56 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/e83bbdeb92608c36447c975e9abe19664ba9114f
commit e83bbdeb92608c36447c975e9abe19664ba9114f
Author:     Zita Nemeckova <znemecko>
AuthorDate: Tue Aug 20 05:20:26 2019 -0400
Commit:     Zita Nemeckova <znemecko>
CommitDate: Tue Aug 20 05:20:26 2019 -0400

    Hide Copy Dashboard for non-SuperAdmin users

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 app/helpers/application_helper/button/miq_widget_set_copy.rb | 5 +
 app/helpers/application_helper/toolbar/miq_widget_set_center.rb | 3 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comment 33 Zita Nemeckova 2019-08-21 10:06:52 UTC
Moving to ON_DEV to wait for second PR

Comment 34 Zita Nemeckova 2019-08-21 10:08:21 UTC
Second PR merged.

Comment 35 CFME Bot 2019-08-21 20:26:30 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/5c9d4a46de2f84421be6255bb4c0fb9c0b674181
commit 5c9d4a46de2f84421be6255bb4c0fb9c0b674181
Author:     Brandon Dunne <bdunne>
AuthorDate: Tue Aug 20 16:27:24 2019 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Tue Aug 20 16:27:24 2019 -0400

    Merge pull request #19171 from ZitaNemeckova/hide_copy_dashboard

    Hide Dashboard Copy

    (cherry picked from commit 26d92879b02e80d78ae625daa5820d0d315ba206)

    https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 db/fixtures/miq_product_features.yml | 1 +
 1 file changed, 1 insertion(+)

Comment 36 CFME Bot 2019-08-21 20:27:28 UTC
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/26eea56aaa972fbf24547e2fbaae8b6248266fad
commit 26eea56aaa972fbf24547e2fbaae8b6248266fad
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Wed Aug 21 05:54:01 2019 -0400
Commit:     Milan Zázrivec <mzazrivec>
CommitDate: Wed Aug 21 05:54:01 2019 -0400

    Merge pull request #6064 from ZitaNemeckova/disable_copy_widget

    Hide Copy Widget for non-SuperAdmin users

    (cherry picked from commit a2dfc55ae8ea9b994f6ce4d532f6fee678c20f50)

    https://bugzilla.redhat.com/show_bug.cgi?id=1314875

 app/helpers/application_helper/button/miq_widget_set_copy.rb | 5 +
 app/helpers/application_helper/toolbar/miq_widget_set_center.rb | 3 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comment 37 Jaroslav Henner 2019-09-04 14:44:38 UTC
I was able to copy and display the dashboard.

Comment 39 errata-xmlrpc 2019-12-12 13:33:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4199