Bug 782506

Summary: [gui] config editor shows edit/pencil icon for a map that does not contain any editable member props
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: Core UIAssignee: Mike Thompson <mithomps>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: ccrouch, hrupp, loleary, mithomps
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: 4.5.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 820429 880793 (view as bug list) Environment:
Last Closed: 2013-09-01 06:15:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 707223, 814152, 820425, 880793    
Description Flags
Read only icon fix. none

Description Heiko W. Rupp 2012-01-17 10:45:39 EST
Created attachment 555818 [details]

I have the following in a plugin descriptor:

  <c:group name="children:extension:module" displayName="Installed extensions" hiddenByDefault="true">

                <c:list-property name="*1" displayName="Installed extensions" readOnly="true" required="false">
                    <c:map-property name="*" displayName="Name" readOnly="true">
                        <c:simple-property name="module" displayName="Module name" readOnly="true"/>

Still the UI allows me to edit the individual "module" simple-property entries.

See screenshot
Comment 1 Charles Crouch 2012-01-23 11:16:09 EST
This should not happen
Comment 2 Charles Crouch 2012-02-13 12:38:34 EST
(9:58:24 AM) ccrouch: can you check if we actually have any instances in our plugins of this
(9:58:25 AM) ccrouch: https://bugzilla.redhat.com/show_bug.cgi?id=782506
(9:58:46 AM) pilhuhn: yep
(9:59:01 AM) pilhuhn: the plugin descriptor excerpt is from the as7 plugin
(9:59:10 AM) pilhuhn: But let me check if it still looks like this
(9:59:49 AM) pilhuhn: yep
(9:59:50 AM) ccrouch: anything other than the as7 plugin?
(10:00:45 AM) pilhuhn: tricky to find. 
(10:22:56 AM) pilhuhn: agent plugin, agent service wrapper launcher is a candidate
(10:23:15 AM) pilhuhn: cron plugin
(10:24:24 AM) ccrouch: thanks
Comment 3 Ian Springer 2012-02-13 15:32:53 EST
I was not able to reproduce this against master. For me, the module names were not editable.

QE, can you please see if you can reproduce it against 3.0.1?
Comment 4 Ian Springer 2012-02-14 12:18:22 EST
The module names were indeed editable in the 3.0.x branch. However, it looks like because the as7 plugin descriptor is missing the readOnly="true" attribute, i.e. it contains:

  <c:simple-property name="module" displayName="Module

Reassigning to Heiko so he can see if this is the issue and, if so, fix it.
Comment 5 Charles Crouch 2012-03-28 18:34:53 EDT
Changing tracker, since solution seems to be an as7 plugin change.
Comment 6 Heiko W. Rupp 2012-04-11 08:20:59 EDT
Ian, in the above description all elements are marked as read-only - or do you mean something else?
Comment 7 Heiko W. Rupp 2012-04-12 11:56:13 EDT
In the current situation everything is r/o and still the pencils show up (even if in the details screen nothing can be changed). So this is a UI issue.
Comment 8 Charles Crouch 2012-04-12 14:06:20 EDT
Setting this back to ON_DEV
Comment 9 Charles Crouch 2012-04-12 20:22:33 EDT
Lowering priority, this is not a blocker for rhq4.4
Comment 10 Charles Crouch 2012-05-09 17:47:13 EDT
(1:52:14 PM) ips: ccrouch: i looked at that bug several months ago, and as i recall, making the editor smart enough to not show the pencil when all member props in each of the maps are read-only AND had a non-null value was a significant amount of work
(1:52:37 PM) ips: my conclusion was it is not worth the effort with many bigger fish to fry
(1:52:46 PM) ccrouch: the question was whether if you make a change through the editor, whether the edits actually get applied server side
(1:53:06 PM) ccrouch: i.e. whether you are fully able to override the "read-only" aspect
(1:53:13 PM) ips: not a big deal if user clicks the pencil as long as the fields in the edit-map modal that are supposed to be read-only are
(1:53:37 PM) asantos: if it's purely a UI issue then I have no problem doc'ing it and pushing it out
(1:54:11 PM) ccrouch: pilhuhn: is that what you were seeing?
(1:54:17 PM) ips: it's just that we show a pencil(edit) icon next to the map, rather than a view/read icon
(1:54:36 PM) ccrouch: that the pencil appeared, but that everything still remained actually readonly?
(1:54:49 PM) ips: and then when user clicks the pencil they may be dismayed that no member props in the map are actually editable
(1:55:44 PM) pilhuhn: let me quickly check, ccrouch 
(1:58:48 PM) pilhuhn: yes, the row shows as editable, but when the user clicks it , it's entry can't be changed
(1:59:20 PM) pilhuhn: So, re-categorize the BZ to documentation and we're done here :)
(2:02:01 PM) ccrouch: I'm going to clone a docs bug and leave this one open, as I still think its a legitimate issue, just not a high priority one

Keeping this BZ open to track getting the issue described above fixed but dropping its priority and unsetting Target Release. I'll add a tracker for config editor related fixes and make this block that
Comment 11 Mike Thompson 2012-07-02 18:37:48 EDT
Fixed by master commit ID: 87f63d5522059ca035c0c1d1377aba569e552b22

The pencil showing instead of the view/read icon for readOnly fields has been resolved.

This related code fix also fixed BZ 734490 - AS7 plugin: resource config: 'Module Name' member props of 'Installed Extensions' map should be read-only.
Comment 12 Mike Thompson 2012-07-02 18:38:22 EDT
Created attachment 595822 [details]
Read only icon fix.
Comment 13 Heiko W. Rupp 2013-09-01 06:15:22 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.