Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 578935 Details for
Bug 802810
as7: signal a reload-required to the user
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Possible patch
BZ_802810_-_Signal_reload_to_the_user_by_filling_and_displaying_the_notes_field_of_a_confi.patch (text/plain), 7.48 KB, created by
Heiko W. Rupp
on 2012-04-20 09:53:05 UTC
(
hide
)
Description:
Possible patch
Filename:
MIME Type:
Creator:
Heiko W. Rupp
Created:
2012-04-20 09:53:05 UTC
Size:
7.48 KB
patch
obsolete
>Index: modules/core/plugin-container/src/main/java/org/rhq/core/pc/configuration/LegacyConfigManagement.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>MacRoman >=================================================================== >--- modules/core/plugin-container/src/main/java/org/rhq/core/pc/configuration/LegacyConfigManagement.java (revision 5b25bef96890db2bc75fe91da60bdcca4dc1d7b6) >+++ modules/core/plugin-container/src/main/java/org/rhq/core/pc/configuration/LegacyConfigManagement.java (revision ) >@@ -49,13 +49,9 @@ > if (configuration == null) { > return null; > } >- >+ > ResourceType resourceType = componentService.getResourceType(resourceId); > >- if (configuration.getNotes() == null) { >- configuration.setNotes("Resource config for " + resourceType.getName() + " Resource w/ id " + resourceId); >- } >- > ConfigurationDefinition configurationDefinition = resourceType.getResourceConfigurationDefinition(); > > configUtilityService.normalizeConfiguration(configuration, configurationDefinition); >Index: modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>MacRoman >=================================================================== >--- modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java (revision 5b25bef96890db2bc75fe91da60bdcca4dc1d7b6) >+++ modules/core/domain/src/main/java/org/rhq/core/domain/configuration/Configuration.java (revision ) >@@ -46,6 +46,7 @@ > import javax.persistence.PreUpdate; > import javax.persistence.SequenceGenerator; > import javax.persistence.Table; >+import javax.persistence.Transient; > import javax.xml.bind.annotation.XmlAccessType; > import javax.xml.bind.annotation.XmlAccessorType; > import javax.xml.bind.annotation.XmlElementRef; >@@ -83,7 +84,7 @@ > * > * @author Jason Dobies > * @author Greg Hinkle >- * >+ * > * @see Property > * @see PropertySimple > * @see PropertyList >@@ -150,7 +151,7 @@ > > // use the prop name as the map key > @MapKey(name = "name") >- // CascadeType.REMOVE has been omitted, the cascade delete has been moved to the data model for performance >+ // CascadeType.REMOVE has been omitted, the cascade delete has been moved to the data model for performance > @Cascade({ CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.DELETE_ORPHAN }) > @OneToMany(mappedBy = "configuration", fetch = FetchType.EAGER) > @XmlTransient >@@ -425,7 +426,7 @@ > * <p> > * When adding a property to the collection returned from this method, its > * {@link Property#getConfiguration() configuration property} is set to this instance. >- * >+ * > * @return all child properties of this Configuration > */ > @NotNull >@@ -624,8 +625,9 @@ > } > > Configuration that = (Configuration) obj; >+ boolean notesMatch = (this.notes==null && that.notes==null) || (this.notes!=null && this.notes.equals(that.notes)); > >- return (this.properties.equals(that.properties)) && (this.rawConfigurations.equals(that.rawConfigurations)); >+ return (this.properties.equals(that.properties)) && (this.rawConfigurations.equals(that.rawConfigurations) && notesMatch); > } > > @Override >@@ -686,9 +688,9 @@ > } > } > >- /** Getter for the properties reference. >- * >- * @return Map<String, Property> >+ /** Getter for the properties reference. >+ * >+ * @return Map<String, Property> > */ > public Map<String, Property> getAllProperties() { > return this.properties; >Index: modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>MacRoman >=================================================================== >--- modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java (revision 5b25bef96890db2bc75fe91da60bdcca4dc1d7b6) >+++ modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/BaseComponent.java (revision ) >@@ -269,7 +269,15 @@ > > ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition(); > ConfigurationLoadDelegate delegate = new ConfigurationLoadDelegate(configDef, connection, address); >- return delegate.loadResourceConfiguration(); >+ Configuration configuration = delegate.loadResourceConfiguration(); >+ >+ // Read server state >+ ReadAttribute op = new ReadAttribute(getAddress(),"name"); >+ Result res = getASConnection().execute(op); >+ if (res.isReloadRequired()) { >+ configuration.setNotes("The server needs a reload for the latest changes to come effective."); >+ } >+ return configuration; > } > > public void updateResourceConfiguration(ConfigurationUpdateReport report) { >Index: modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java >IDEA additional info: >Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP ><+>MacRoman >=================================================================== >--- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java (revision 5b25bef96890db2bc75fe91da60bdcca4dc1d7b6) >+++ modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/configuration/ConfigurationEditor.java (revision ) >@@ -373,6 +373,11 @@ > this.originalConfiguration = configuration.deepCopy(); > } > >+ if (this.configuration.getNotes()!=null) { >+ Message msg = new Message(this.configuration.getNotes(),Message.Severity.Warning,EnumSet.of(Message.Option.Transient)); >+ CoreGUI.getMessageCenter().notify(msg); >+ } >+ > for (Canvas childCanvas : getChildren()) { > childCanvas.destroy(); > } >@@ -1461,7 +1466,7 @@ > > unsetItem.addChangedHandler(new ChangedHandler() { > public void onChanged(ChangedEvent changeEvent) { >- // treat the ChangedEvent as a possible focus change, since this is a checkbox >+ // treat the ChangedEvent as a possible focus change, since this is a checkbox > handleFocusChange(valueItem, unsetItem); > > Boolean isUnset = (Boolean) changeEvent.getValue(); >@@ -1492,10 +1497,10 @@ > } > }); > >- // (Smartgwt 3.0) Certain FormItems, like SelectItem, generate a Blur event when we don't want them to. >- // For example, expanding the SelectItem drop down (via click) generates a Blur event (which makes no >+ // (Smartgwt 3.0) Certain FormItems, like SelectItem, generate a Blur event when we don't want them to. >+ // For example, expanding the SelectItem drop down (via click) generates a Blur event (which makes no > // sense to me since the user is obviously not leaving the widget, it should still be in focus imo). Anyway, >- // to get around this behavior and to be able to unset config properties that a user has left as null values >+ // to get around this behavior and to be able to unset config properties that a user has left as null values > // when changing focus, we avoid BlurHandler and instead use FocusHandlers and a DIY blur handling > // approach. >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 802810
: 578935