Bug 677916

Summary: Make configuration components UI renderring overrideable at runtime
Product: [Other] RHQ Project Reporter: Lin Gao <lgao>
Component: Core UIAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0.0.B02CC: lgao
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screen shot for the jca config-properties configuration list none

Description Lin Gao 2011-02-16 09:34:53 UTC
This is a feature proposal:

In the resource configuration:

 <c:list-property name="config-property">
     <c:map-property name="config-property">
       <c:simple-property name="name" readOnly="true" />
       <c:simple-property name="value" />
     </c:map-property>
 </c:list-property>

in some cases, some of the 'value' properties need to be read only, others do not. 
In the case of JCA 1.6, it depends on the config-property`s dynamic attribute value(true or false).

In current implementation, UI rendering is pre-defined in the rhq-plugin.xml, and can not be changed at runtime.


Use case comes from the discuss: http://community.jboss.org/thread/161336

Please refer to the mail list thread: https://fedorahosted.org/pipermail/rhq-users/2011-February/000319.html

Comment 1 Lin Gao 2011-02-21 07:45:10 UTC
RHQ doesn't support dynamic resource plugin metadata, so that it can not decide how to render the configuration UI components at runtime.

The use case mentioned in the community discuss: http://community.jboss.org/message/586549#586549 requires RHQ to have a ability to override the configuration definition in build-time resource plugin metadata, so that it can change the configuration component UI component`s attributes at runtime.

Comment 2 Lin Gao 2011-02-21 08:24:07 UTC
Created attachment 479840 [details]
screen shot for the jca config-properties configuration list

Comment 3 Lin Gao 2011-02-21 08:32:17 UTC
For example:

In the following configuration definition:

<resource-configuration>
  <c:group name="ConfigProperties" displayName="All Config Properties">
    <c:list-property required="false" name="config-property" readOnly="true">
        <c:map-property name="config-property">
            <c:simple-property name="name" readOnly="true" />
            <c:simple-property name="type" readOnly="true">
                <c:property-options>
                    <c:option value="java.lang.String"/>
                    <c:option value="java.lang.Boolean"/>
                    <c:option value="java.lang.Integer"/>
                    <c:option value="java.lang.Double"/>
                </c:property-options>
            </c:simple-property>
            <c:simple-property name="value" required="false" />
        </c:map-property>
    </c:list-property>
  </c:group>
</resource-configuration>

The simple-property of 'value' here is not defined as read only, and please refer to the attached screenshot:config-properties.png, in this case, the property name: 'LTMCFPropIntegerOne' should be read only, which is a requirement of JCA 1.6; the property name: 'MyConfidentialProperty' needs to be displayed as: '*****', which is a requirement of JCA 1.6 also.

But currently, all these config properties are not read only and displayed as plain text. We need RHQ to support that.