You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(927) |
Apr
(419) |
May
(352) |
Jun
(431) |
Jul
(463) |
Aug
(345) |
Sep
(304) |
Oct
(596) |
Nov
(466) |
Dec
(414) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(348) |
Feb
(313) |
Mar
(665) |
Apr
(688) |
May
(434) |
Jun
(311) |
Jul
(540) |
Aug
(554) |
Sep
(467) |
Oct
(341) |
Nov
(365) |
Dec
(272) |
2009 |
Jan
(386) |
Feb
(293) |
Mar
(279) |
Apr
(239) |
May
(229) |
Jun
(199) |
Jul
(186) |
Aug
(111) |
Sep
(196) |
Oct
(146) |
Nov
(116) |
Dec
(140) |
2010 |
Jan
(170) |
Feb
(159) |
Mar
(151) |
Apr
(161) |
May
(90) |
Jun
(56) |
Jul
(28) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(23) |
Dec
(12) |
2011 |
Jan
(8) |
Feb
(8) |
Mar
(22) |
Apr
(24) |
May
(4) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <pn...@hy...> - 2009-12-03 22:38:44
|
Author: pnguyen Date: 2009-12-03 14:38:33 -0800 (Thu, 03 Dec 2009) New Revision: 14027 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14027 Added: trunk/unittest/src/org/hyperic/hq/product/Metric_test.java Modified: trunk/src/org/hyperic/hq/product/Metric.java Log: [HHQ-3246] Some characters ("%3D", "%3A", "%2C") need to be escaped with a double backslash to preserve their value during the decoding process. Modified: trunk/src/org/hyperic/hq/product/Metric.java =================================================================== --- trunk/src/org/hyperic/hq/product/Metric.java 2009-12-03 10:47:17 UTC (rev 14026) +++ trunk/src/org/hyperic/hq/product/Metric.java 2009-12-03 22:38:33 UTC (rev 14027) @@ -120,6 +120,39 @@ return '0'; } + /** + * HHQ-3246: Some characters need to be escaped with a double backlash + * to preserve their value during the decoding process. + * + * For example, the equals sign = will normally be encoded + * to %3D and decoded back to = + * + * However, if %3D is the desired string, it needs + * to be escaped with the double backslash \\%3D so that %3D + * is the outputted string during the decoding process. + */ + private static String getUnescapedDecoding(String s, int i) { + String escapeIndicator = "\\\\"; + String[] specialVals = new String[] {"%3D", "%3A", "%2C"}; + String unescapedDecoding = null; + + try { + String encodedString = s.substring(i, i+5); + + for (int j=0; j<specialVals.length; j++) { + String escapedString = escapeIndicator + specialVals[j]; + if (escapedString.equals(encodedString)) { + unescapedDecoding = specialVals[j]; + break; + } + } + } catch (IndexOutOfBoundsException iob) { + // + } + + return unescapedDecoding; + } + public static void addSecret(String key) { secrets.put(key, Boolean.TRUE); } @@ -154,18 +187,30 @@ for (int i=0; i<len; i++) { char c = val.charAt(i); - - if ((c == '%') && ((i+2) < len)) { - char dc = getDecoding(val, i); - - if (dc != '0') { - i += 2; - c = dc; + + if ((c == '\\') && ((i+4) < len)) { + String unesc = getUnescapedDecoding(val, i); + + if (unesc == null) { + buf.append(c); + } else { + i += 4; + buf.append(unesc); changed = true; } + } else { + if ((c == '%') && ((i+2) < len)) { + char dc = getDecoding(val, i); + + if (dc != '0') { + i += 2; + c = dc; + changed = true; + } + } + + buf.append(c); } - - buf.append(c); } return changed ? buf.toString() : val; Added: trunk/unittest/src/org/hyperic/hq/product/Metric_test.java =================================================================== --- trunk/unittest/src/org/hyperic/hq/product/Metric_test.java (rev 0) +++ trunk/unittest/src/org/hyperic/hq/product/Metric_test.java 2009-12-03 22:38:33 UTC (rev 14027) @@ -0,0 +1,175 @@ +/* + * NOTE: This copyright does *not* cover user programs that use HQ + * program services by normal system calls through the application + * program interfaces provided as part of the Hyperic Plug-in Development + * Kit or the Hyperic Client Development Kit - this is merely considered + * normal use of the program, and does *not* fall under the heading of + * "derived work". + * + * Copyright (C) [2004-2009], Hyperic, Inc. + * This file is part of HQ. + * + * HQ is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.hq.product; + +import junit.framework.TestCase; + +/** + * Tests the Metric class. + */ +public class Metric_test extends TestCase { + + /** + * Creates an instance. + * + * @param name + */ + public Metric_test(String name) { + super(name); + } + + /** + * + */ + public void testDecodeTemplateNoChange() throws Exception { + // special encoded characters are: + // %2C + // %3A + // %3D + + // add template strings to test here + String[] templates = + new String[] { + "no special characters here", + "another test with an invalid special character %3B", + "this should not change because \\\\%3B is an invalid escaped character" + }; + + for (int i=0; i<templates.length; i++) { + String original = templates[i]; + String decoded = Metric.decode(original); + + assertEquals(original, decoded); + } + } + + /** + * + */ + public void testDecodeTemplateChange() throws Exception { + // special encoded characters are: + // %2C + // %3A + // %3D + + // add template strings to test here + String[] templates = + new String[] { + "an encoded special character here %3A", + "%3D is another encoded special character", + "this is the last encoded special character %2C for now", + "all three (%3A %2C %3D) included here", + "this should change from \\%3A to \\:", + "\\\\%3A should be decoded to :", + "testing the double backslash \\\\%3D", + "and the comma \\\\%2C needs to be escaped also", + "all three escaped sequences (\\\\%3A \\\\%2C \\\\%3D) include here", + "/REQUEST?xmldata=%3C%3Fxml+version\\\\%3D%221.0%22+encoding\\\\%3D%22UTF-8%22%3F%3E%3Clogin_echo_request+schemaVersion\\\\%3D%224.9%22%3E%3Cauthentication%3E%3Cshortcut%3Eacme%3C%2Fshortcut%3E%3Cemail%3Eprajash%3C%2Femail%3E%3Cpassword%3Eprash%3C%2Fpassword%3E%3CuserAgent%3EChannelOnline+Connect%3C%2FuserAgent%3E%3C%2Fauthentication%3E%3Cecho+something\\\\%3D%22whatever%22%3EHello+world%3C%2Fecho%3E%3C%2Flogin_echo_request%3E%0D%0A" + }; + + // added expected decoded template strings here + String[] expected = + new String[] { + "an encoded special character here :", + "= is another encoded special character", + "this is the last encoded special character , for now", + "all three (: , =) included here", + "this should change from \\: to \\:", + "%3A should be decoded to :", + "testing the double backslash %3D", + "and the comma %2C needs to be escaped also", + "all three escaped sequences (%3A %2C %3D) include here", + "/REQUEST?xmldata=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%3Clogin_echo_request+schemaVersion%3D%224.9%22%3E%3Cauthentication%3E%3Cshortcut%3Eacme%3C%2Fshortcut%3E%3Cemail%3Eprajash%3C%2Femail%3E%3Cpassword%3Eprash%3C%2Fpassword%3E%3CuserAgent%3EChannelOnline+Connect%3C%2FuserAgent%3E%3C%2Fauthentication%3E%3Cecho+something%3D%22whatever%22%3EHello+world%3C%2Fecho%3E%3C%2Flogin_echo_request%3E%0D%0A" + }; + + for (int i=0; i<templates.length; i++) { + String original = templates[i]; + String decoded = Metric.decode(original); + + assertFalse(original.equals(decoded)); + assertTrue(decoded.equals(expected[i])); + } + } + + /** + * + */ + public void testEncodeTemplateNoChange() throws Exception { + // special characters to encode: + // , + // : + // = + + // add template strings to test here + String[] templates = + new String[] { + "\\\\%3A should not be encoded", + "testing the double backslash \\\\%3D", + "and the escaped comma \\\\%2C also" + }; + + for (int i=0; i<templates.length; i++) { + String original = templates[i]; + String encoded = Metric.encode(original); + + assertEquals(original, encoded); + } + } + + /** + * + */ + public void testEncodeTemplateChange() throws Exception { + // special characters to encode: + // , + // : + // = + + // add template strings to test here + String[] templates = + new String[] { + "comma , tested here", + "colon : tested here", + "equals sign = tested here" + }; + + // added expected encoded template strings here + String[] expected = + new String[] { + "comma %2C tested here", + "colon %3A tested here", + "equals sign %3D tested here" + }; + + for (int i=0; i<templates.length; i++) { + String original = templates[i]; + String encoded = Metric.encode(original); + + assertFalse(original.equals(encoded)); + assertTrue(encoded.equals(expected[i])); + } + } +} |
From: <bo...@hy...> - 2009-12-03 10:47:32
|
Author: bob Date: 2009-12-03 02:47:17 -0800 (Thu, 03 Dec 2009) New Revision: 14026 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14026 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1281 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-12-03 08:56:45 UTC (rev 14025) +++ branches/HQ_4_2/etc/version.properties 2009-12-03 10:47:17 UTC (rev 14026) @@ -1,3 +1,3 @@ -#Wed Dec 02 01:34:38 PST 2009 +#Thu Dec 03 01:33:42 PST 2009 version=4.2.1 -build=1280 +build=1281 |
From: <bo...@hy...> - 2009-12-03 08:56:59
|
Author: bob Date: 2009-12-03 00:56:45 -0800 (Thu, 03 Dec 2009) New Revision: 14025 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14025 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1277 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-02 18:10:15 UTC (rev 14024) +++ trunk/etc/version.properties 2009-12-03 08:56:45 UTC (rev 14025) @@ -1,3 +1,3 @@ -#Wed Dec 02 00:19:26 PST 2009 +#Thu Dec 03 00:17:18 PST 2009 version=4.3.0 -build=1276 +build=1277 |
From: <no...@gi...> - 2009-12-03 02:55:20
|
Branch: refs/heads/evolution Home: http://github.com/hyperic/hqapi Commit: 7c54b8845ea424c1cdc46909a6e59d9b214d32aa http://github.com/hyperic/hqapi/commit/7c54b8845ea424c1cdc46909a6e59d9b214d32aa Author: Jennifer Hickey <jen...@sp...> Date: 2009-12-02 (Wed, 02 Dec 2009) Changed paths: M .classpath Log Message: ----------- Updated with new Eclipse dependencies from HE-228 |
From: <pn...@hy...> - 2009-12-02 18:10:30
|
Author: pnguyen Date: 2009-12-02 10:10:15 -0800 (Wed, 02 Dec 2009) New Revision: 14024 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14024 Modified: trunk/src/org/hyperic/hq/hqu/rendit/metaclass/ResourceCategory.groovy Log: [HHQ-3473] Added getGroupsContaining() and getGroupsNotContaining() to facilitate HQApi integration testing for this bug Modified: trunk/src/org/hyperic/hq/hqu/rendit/metaclass/ResourceCategory.groovy =================================================================== --- trunk/src/org/hyperic/hq/hqu/rendit/metaclass/ResourceCategory.groovy 2009-12-02 10:52:55 UTC (rev 14023) +++ trunk/src/org/hyperic/hq/hqu/rendit/metaclass/ResourceCategory.groovy 2009-12-02 18:10:15 UTC (rev 14024) @@ -8,6 +8,7 @@ import org.hyperic.hq.authz.server.session.ResourceGroup.ResourceGroupCreateInfo import org.hyperic.hq.authz.server.session.ResourceManagerEJBImpl as ResMan import org.hyperic.hq.authz.server.session.ResourceGroupManagerEJBImpl as GroupMan +import org.hyperic.hq.authz.server.session.ResourceGroupSortField import org.hyperic.hq.appdef.Agent import org.hyperic.hq.appdef.shared.AppdefEntityID import org.hyperic.hq.appdef.shared.AppdefEntityConstants @@ -31,6 +32,7 @@ import org.hyperic.hq.product.PluginNotFoundException import org.hyperic.hq.measurement.server.session.MeasurementManagerEJBImpl as DMan +import org.hyperic.hibernate.PageInfo import org.hyperic.hq.livedata.shared.LiveDataCommand import org.hyperic.hq.livedata.shared.LiveDataResult import org.hyperic.util.config.ConfigResponse @@ -444,6 +446,23 @@ [] } + static List getGroupsContaining(Resource r, AuthzSubject user) { + PageInfo pInfo = PageInfo.create(PageControl.PAGE_ALL, + ResourceGroupSortField.NAME) + return groupMan.findGroupsContaining(user, r, + Collections.EMPTY_LIST, + pInfo) + } + + static List getGroupsNotContaining(Resource r, AuthzSubject user) { + PageInfo pInfo = PageInfo.create(PageControl.PAGE_ALL, + ResourceGroupSortField.NAME) + + return groupMan.findGroupsNotContaining(user, r, r.getPrototype(), + Collections.EMPTY_LIST, + pInfo) + } + static createInstance(Resource proto, Resource parent, String name, AuthzSubject subject, Map cfg, Agent agent, List ips) { |
From: <bo...@hy...> - 2009-12-02 10:53:08
|
Author: bob Date: 2009-12-02 02:52:55 -0800 (Wed, 02 Dec 2009) New Revision: 14023 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14023 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1280 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-12-02 08:55:15 UTC (rev 14022) +++ branches/HQ_4_2/etc/version.properties 2009-12-02 10:52:55 UTC (rev 14023) @@ -1,3 +1,3 @@ -#Tue Dec 01 01:32:47 PST 2009 +#Wed Dec 02 01:34:38 PST 2009 version=4.2.1 -build=1279 +build=1280 |
From: <bo...@hy...> - 2009-12-02 08:55:31
|
Author: bob Date: 2009-12-02 00:55:15 -0800 (Wed, 02 Dec 2009) New Revision: 14022 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14022 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1276 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-02 04:35:37 UTC (rev 14021) +++ trunk/etc/version.properties 2009-12-02 08:55:15 UTC (rev 14022) @@ -1,3 +1,3 @@ -#Tue Dec 01 00:18:30 PST 2009 +#Wed Dec 02 00:19:26 PST 2009 version=4.3.0 -build=1275 +build=1276 |
From: <bo...@hy...> - 2009-12-02 04:35:50
|
Author: bob Date: 2009-12-01 20:35:37 -0800 (Tue, 01 Dec 2009) New Revision: 14021 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14021 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: Release 4.2.0.2 build #1265 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-02 01:49:42 UTC (rev 14020) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-02 04:35:37 UTC (rev 14021) @@ -1,3 +1,3 @@ -#Thu Nov 19 16:54:15 PST 2009 +#Tue Dec 01 19:57:48 PST 2009 version=4.2.0.2 -build=1264 +build=1265 |
From: <no...@gi...> - 2009-12-02 03:51:54
|
Branch: refs/heads/evolution Home: http://github.com/hyperic/hqapi Commit: 889c3b86c6e3f10139f1a3c9cc9ffba3bda98de4 http://github.com/hyperic/hqapi/commit/889c3b86c6e3f10139f1a3c9cc9ffba3bda98de4 Author: Jennifer Hickey <jen...@sp...> Date: 2009-12-01 (Tue, 01 Dec 2009) Changed paths: M .classpath Log Message: ----------- Update Eclipse classpath to new project structure |
From: <jh...@hy...> - 2009-12-02 03:48:29
|
Author: jhickey Date: 2009-12-01 19:48:15 -0800 (Tue, 01 Dec 2009) New Revision: 34 Modified: branches/evolution/.classpath Log: Update Eclipse classpath to new project structure Modified: branches/evolution/.classpath =================================================================== --- branches/evolution/.classpath 2009-11-16 21:19:33 UTC (rev 33) +++ branches/evolution/.classpath 2009-12-02 03:48:15 UTC (rev 34) @@ -3,8 +3,6 @@ <classpathentry kind="src" path="src"/> <classpathentry kind="lib" path="lib/servlet.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry combineaccessrules="false" kind="src" path="/HQ"/> - <classpathentry kind="lib" path="/HQ/thirdparty/lib/commons-beanutils-1.8.0.jar"/> - <classpathentry kind="lib" path="/HQ/thirdparty/lib/commons-logging-1.0.4.jar"/> + <classpathentry combineaccessrules="false" kind="src" path="/hq-web"/> <classpathentry kind="output" path="build/classes"/> </classpath> |
From: <rm...@hy...> - 2009-12-02 02:02:49
|
Author: rmorgan Date: 2009-12-01 17:45:22 -0800 (Tue, 01 Dec 2009) New Revision: 14019 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14019 Modified: branches/HQ_4_2/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java Log: On configuration updates to resources make sure update events are sent out for all children to ensure metric properties are up-to-date. [HHQ-3559] [merge from trunk] Modified: branches/HQ_4_2/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java =================================================================== --- branches/HQ_4_2/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-02 00:40:12 UTC (rev 14018) +++ branches/HQ_4_2/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-02 01:45:22 UTC (rev 14019) @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import java.util.List; import javax.ejb.CreateException; import javax.ejb.FinderException; @@ -560,12 +561,37 @@ } if (wasUpdated) { - // XXX: Need to cascade and send events for each resource that may - // have been affected by this config update. if (sendConfigEvent) { - ResourceUpdatedZevent event = - new ResourceUpdatedZevent(subject, appdefID); - ZeventManager.getInstance().enqueueEventAfterCommit(event); + List events = new ArrayList(); + events.add(new ResourceUpdatedZevent(subject, appdefID)); + + if (appdefID.isPlatform()) { + try { + Platform p = getPlatformManagerLocal().findPlatformById(appdefID.getId()); + for (Iterator i = p.getServers().iterator(); i.hasNext() ;) { + Server s = (Server)i.next(); + events.add(new ResourceUpdatedZevent(subject, s.getEntityId())); + for (Iterator it = s.getServices().iterator(); it.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } + } catch (org.hyperic.hq.appdef.shared.PlatformNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } else if (appdefID.isServer()) { + try { + Server s = getServerManagerLocal().findServerById(appdefID.getId()); + for (Iterator i = s.getServices().iterator(); i.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } catch (org.hyperic.hq.appdef.shared.ServerNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } + + ZeventManager.getInstance().enqueueEventsAfterCommit(events); } return appdefID; |
From: <rm...@hy...> - 2009-12-02 01:49:57
|
Author: rmorgan Date: 2009-12-01 17:49:42 -0800 (Tue, 01 Dec 2009) New Revision: 14020 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14020 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java Log: On configuration updates to resources make sure update events are sent out for all children to ensure metric properties are up-to-date. [HHQ-3559] [merge from 4_2] Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-02 01:45:22 UTC (rev 14019) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-02 01:49:42 UTC (rev 14020) @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import java.util.List; import javax.ejb.CreateException; import javax.ejb.FinderException; @@ -560,12 +561,37 @@ } if (wasUpdated) { - // XXX: Need to cascade and send events for each resource that may - // have been affected by this config update. if (sendConfigEvent) { - ResourceUpdatedZevent event = - new ResourceUpdatedZevent(subject, appdefID); - ZeventManager.getInstance().enqueueEventAfterCommit(event); + List events = new ArrayList(); + events.add(new ResourceUpdatedZevent(subject, appdefID)); + + if (appdefID.isPlatform()) { + try { + Platform p = getPlatformManagerLocal().findPlatformById(appdefID.getId()); + for (Iterator i = p.getServers().iterator(); i.hasNext() ;) { + Server s = (Server)i.next(); + events.add(new ResourceUpdatedZevent(subject, s.getEntityId())); + for (Iterator it = s.getServices().iterator(); it.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } + } catch (org.hyperic.hq.appdef.shared.PlatformNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } else if (appdefID.isServer()) { + try { + Server s = getServerManagerLocal().findServerById(appdefID.getId()); + for (Iterator i = s.getServices().iterator(); i.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } catch (org.hyperic.hq.appdef.shared.ServerNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } + + ZeventManager.getInstance().enqueueEventsAfterCommit(events); } return appdefID; |
From: <sc...@hy...> - 2009-12-02 00:40:26
|
Author: scottmf Date: 2009-12-01 16:40:12 -0800 (Tue, 01 Dec 2009) New Revision: 14018 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14018 Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/EventsBossEJBImpl.java branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java Log: [HHQ-3534] reworked code so that the entireCleanup is not called per appdefId, instead it is called once. Also batched it up to avoid potential timeout issues Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/EventsBossEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/EventsBossEJBImpl.java 2009-12-02 00:27:18 UTC (rev 14017) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/bizapp/server/session/EventsBossEJBImpl.java 2009-12-02 00:40:12 UTC (rev 14018) @@ -1724,9 +1724,8 @@ _log.debug("fixPreviousAlerts: alertId = " + alertID + ", previous alerts fixed = " + fixCount + ", time = " + watch); - - return fixCount; } + return fixCount; } /** @@ -1833,16 +1832,30 @@ // are deleted. HashSet events = new HashSet(); events.add (ResourceDeletedZevent.class); - ZeventManager.getInstance().addBufferedListener(events, - new ZeventListener() { + ZeventManager inst = ZeventManager.getInstance(); + inst.addBufferedListener( + events, new ZeventListener() { public void processEvents(List events) { - AlertDefinitionManagerLocal adm = getADM(); - for (Iterator i = events.iterator(); i.hasNext();) { - ResourceZevent z = (ResourceZevent) i.next(); - if (z instanceof ResourceDeletedZevent) { - adm.cleanupAlertDefinitions(z.getAppdefEntityID()); + final StopWatch watch = new StopWatch(); + final Log log = LogFactory.getLog(this.getClass().getName()); + final boolean debug = log.isDebugEnabled(); + final AlertDefinitionManagerLocal adm = getADM(); + final List alertDefs = getADM().getAllDeletedAlertDefs(); + final int batchSize = 1000; + for (int i=0; i<alertDefs.size(); i+=batchSize) { + final int end = Math.min(i+batchSize, alertDefs.size()); + final List sublist = alertDefs.subList(i, end); + // can't pass in pojos since the session changes + final List ids = new ArrayList(sublist.size()); + for (final Iterator it=sublist.iterator(); it.hasNext(); ) { + final AlertDefinition def = (AlertDefinition) it.next(); + ids.add(def.getId()); } + if (debug) watch.markTimeBegin("cleanupAlertDefs"); + adm.cleanupAlertDefs(ids); + if (debug) watch.markTimeEnd("cleanupAlertDefs"); } + if (debug) log.debug(watch); } public String toString() { Modified: branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java =================================================================== --- branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-02 00:27:18 UTC (rev 14017) +++ branches/HQ_4_2_0_PATCH/src/org/hyperic/hq/events/server/session/AlertDefinitionManagerEJBImpl.java 2009-12-02 00:40:12 UTC (rev 14018) @@ -67,7 +67,6 @@ import org.hyperic.hq.events.shared.AlertDefinitionValue; import org.hyperic.hq.events.shared.RegisteredTriggerManagerLocal; import org.hyperic.hq.events.shared.RegisteredTriggerValue; -import org.hyperic.hq.measurement.MeasurementConstants; import org.hyperic.hq.measurement.server.session.Measurement; import org.hyperic.hq.measurement.server.session.MeasurementDAO; import org.hyperic.util.config.ConfigResponse; @@ -741,56 +740,59 @@ } aDao.getSession().flush(); } + + /** + * @ejb:interface-method + */ + public List getAllDeletedAlertDefs() { + return getAlertDefDAO().findAllDeletedResources(); + } - /** Clean up alert definitions and alerts for removed resources - * + /** + * @param alertDefIds {@link List} of {@link Integer} of alertDefIds * @ejb:interface-method */ - public void cleanupAlertDefinitions(AppdefEntityID aeid) { - StopWatch watch = new StopWatch(); - + public void cleanupAlertDefs(List alertDefIds) { + if (alertDefIds.size() <= 0) { + return; + } + final StopWatch watch = new StopWatch(); + final boolean debug = log.isDebugEnabled(); + final AlertDAO dao = getAlertDAO(); final AlertDefinitionDAO aDao = getAlertDefDAO(); - final AlertDAO dao = getAlertDAO(); final ActionDAO actionDAO = getActionDAO(); + for (final Iterator i = alertDefIds.iterator(); i.hasNext();) { + final Integer alertdefId = (Integer) i.next(); + final AlertDefinition alertdef = aDao.findById(alertdefId); - List adefs = aDao.findAllDeletedResources(); - for (Iterator i = adefs.iterator(); i.hasNext();) { - AlertDefinition alertdef = (AlertDefinition) i.next(); - // Delete the alerts - watch.markTimeBegin("deleteByAlertDefinition"); + if (debug) watch.markTimeBegin("deleteByAlertDefinition"); dao.deleteByAlertDefinition(alertdef); - watch.markTimeEnd("deleteByAlertDefinition"); + if (debug) watch.markTimeEnd("deleteByAlertDefinition"); - // Get the alerts deleted - dao.getSession().flush(); - // Remove the conditions - watch.markTimeBegin("remove conditions and triggers"); + if (debug) watch.markTimeBegin("remove conditions and triggers"); alertdef.clearConditions(); alertdef.getTriggersBag().clear(); - watch.markTimeEnd("remove conditions and triggers"); + if (debug) watch.markTimeEnd("remove conditions and triggers"); // Remove the actions - watch.markTimeBegin("removeActions"); + if (debug) watch.markTimeBegin("removeActions"); actionDAO.removeActions(alertdef); - watch.markTimeEnd("removeActions"); + if (debug) watch.markTimeEnd("removeActions"); - watch.markTimeBegin("remove from parent"); + if (debug) watch.markTimeBegin("remove from parent"); if (alertdef.getParent() != null) { alertdef.getParent().getChildrenBag().remove(alertdef); } - watch.markTimeBegin("remove from parent"); + if (debug) watch.markTimeEnd("remove from parent"); // Actually remove the definition - watch.markTimeBegin("remove"); + if (debug) watch.markTimeBegin("remove"); aDao.remove(alertdef); - watch.markTimeBegin("remove"); - - if (log.isDebugEnabled()) { - log.debug("deleteAlertDefinition: " + watch); - } + if (debug) watch.markTimeEnd("remove"); } + if (debug) log.debug("deleted " + alertDefIds.size() + " alertDefs: " + watch); } /** Find an alert definition and return a value object |
From: <bo...@hy...> - 2009-12-02 00:30:49
|
Author: bob Date: 2009-12-01 16:27:18 -0800 (Tue, 01 Dec 2009) New Revision: 14017 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14017 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties Log: update version to 4.2.0.2 Modified: branches/HQ_4_2_0_PATCH/etc/version.properties =================================================================== --- branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-01 23:42:00 UTC (rev 14016) +++ branches/HQ_4_2_0_PATCH/etc/version.properties 2009-12-02 00:27:18 UTC (rev 14017) @@ -1,3 +1,3 @@ #Thu Nov 19 16:54:15 PST 2009 -version=4.2.0.1 +version=4.2.0.2 build=1264 |
From: <rm...@hy...> - 2009-12-01 23:42:14
|
Author: rmorgan Date: 2009-12-01 15:42:00 -0800 (Tue, 01 Dec 2009) New Revision: 14016 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14016 Modified: trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java Log: On configuration updates to resources make sure update events are sent out for all children to ensure metric properties are up-to-date. [HHQ-3559] Modified: trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-01 19:28:14 UTC (rev 14015) +++ trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2009-12-01 23:42:00 UTC (rev 14016) @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; +import java.util.List; import javax.ejb.CreateException; import javax.ejb.FinderException; @@ -560,12 +561,37 @@ } if (wasUpdated) { - // XXX: Need to cascade and send events for each resource that may - // have been affected by this config update. if (sendConfigEvent) { - ResourceUpdatedZevent event = - new ResourceUpdatedZevent(subject, appdefID); - ZeventManager.getInstance().enqueueEventAfterCommit(event); + List events = new ArrayList(); + events.add(new ResourceUpdatedZevent(subject, appdefID)); + + if (appdefID.isPlatform()) { + try { + Platform p = getPlatformManagerLocal().findPlatformById(appdefID.getId()); + for (Iterator i = p.getServers().iterator(); i.hasNext() ;) { + Server s = (Server)i.next(); + events.add(new ResourceUpdatedZevent(subject, s.getEntityId())); + for (Iterator it = s.getServices().iterator(); it.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } + } catch (org.hyperic.hq.appdef.shared.PlatformNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } else if (appdefID.isServer()) { + try { + Server s = getServerManagerLocal().findServerById(appdefID.getId()); + for (Iterator i = s.getServices().iterator(); i.hasNext();) { + Service svc = (Service)i.next(); + events.add(new ResourceUpdatedZevent(subject, svc.getEntityId())); + } + } catch (org.hyperic.hq.appdef.shared.ServerNotFoundException e) { + log.warn("Error sending config event for: " + appdefID, e); + } + } + + ZeventManager.getInstance().enqueueEventsAfterCommit(events); } return appdefID; |
From: <rm...@hy...> - 2009-12-01 19:28:28
|
Author: rmorgan Date: 2009-12-01 11:28:14 -0800 (Tue, 01 Dec 2009) New Revision: 14015 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14015 Modified: trunk/src/org/hyperic/hq/hqu/rendit/html/DojoUtil.groovy Log: Add javascript that is run on table refresh to override --moz-user-select: none on elements within Dojo tables. This allows for cut and paste from these pages. [HQ-1953] Modified: trunk/src/org/hyperic/hq/hqu/rendit/html/DojoUtil.groovy =================================================================== --- trunk/src/org/hyperic/hq/hqu/rendit/html/DojoUtil.groovy 2009-12-01 10:51:49 UTC (rev 14014) +++ trunk/src/org/hyperic/hq/hqu/rendit/html/DojoUtil.groovy 2009-12-01 19:28:14 UTC (rev 14015) @@ -443,6 +443,22 @@ ${tableVar}.store.clearData(); } + // Called after refreshTable() to make rows selectable. + function ${idVar}_makeSelectable() { + dojo11.setSelectable('${id}', true); + var rows = dojo11.byId("${id}").rows; + for (var x = 0; x < rows.length; x++) { + try { + dojo11.setSelectable(rows[x], true); // Override --moz-user-select: none; + for(var y = 0; y < rows[x].cells.length; y++) { + dojo11.setSelectable(rows[x].cells[y], true); // Override --moz-user-select: none; + } + } catch(e) { + console.log(e); + } + } + } + function ${id}_refreshTable(kwArgs) { // Don't refresh data for this table if it's hidden. var tableWrapper = dojo.byId("${id}_tableWrapper"); @@ -496,6 +512,8 @@ } else { dojo.event.topic.publish("XHRComplete", "DATA_RETURNED"); } + + ${idVar}_makeSelectable(); } }); } |
From: <bo...@hy...> - 2009-12-01 10:52:01
|
Author: bob Date: 2009-12-01 02:51:49 -0800 (Tue, 01 Dec 2009) New Revision: 14014 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14014 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1279 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-12-01 08:56:54 UTC (rev 14013) +++ branches/HQ_4_2/etc/version.properties 2009-12-01 10:51:49 UTC (rev 14014) @@ -1,3 +1,3 @@ -#Mon Nov 30 01:46:34 PST 2009 +#Tue Dec 01 01:32:47 PST 2009 version=4.2.1 -build=1278 +build=1279 |
From: <bo...@hy...> - 2009-12-01 08:57:08
|
Author: bob Date: 2009-12-01 00:56:54 -0800 (Tue, 01 Dec 2009) New Revision: 14013 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14013 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1275 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-12-01 00:33:18 UTC (rev 14012) +++ trunk/etc/version.properties 2009-12-01 08:56:54 UTC (rev 14013) @@ -1,3 +1,3 @@ -#Mon Nov 30 00:18:13 PST 2009 +#Tue Dec 01 00:18:30 PST 2009 version=4.3.0 -build=1274 +build=1275 |
From: <rm...@hy...> - 2009-12-01 01:02:49
|
Author: rmorgan Date: 2009-11-30 16:33:18 -0800 (Mon, 30 Nov 2009) New Revision: 14012 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14012 Modified: trunk/ui_plugins/ Log: Bump HQApi binaries to 3.0. Property changes on: trunk/ui_plugins ___________________________________________________________________ Name: svn:externals - hqapi1 http://svn.hyperic.org/projects/hqapi/dist/HQAPI_2_2 + hqapi1 http://svn.hyperic.org/projects/hqapi/dist/HQAPI_3_0 |
From: <no...@gi...> - 2009-12-01 00:30:49
|
Branch: refs/heads/master Home: http://github.com/hyperic/hqapi Commit: 5edd94bb8929fbf3fc5a5c0e318321c93674a387 http://github.com/hyperic/hqapi/commit/5edd94bb8929fbf3fc5a5c0e318321c93674a387 Author: Ryan Morgan <rm...@hy...> Date: 2009-11-30 (Mon, 30 Nov 2009) Changed paths: M ChangeLog M hqu/hqapi1/plugin.properties Log Message: ----------- Bump to 3.1. |
From: <bo...@hy...> - 2009-11-30 10:38:38
|
Author: bob Date: 2009-11-30 02:38:25 -0800 (Mon, 30 Nov 2009) New Revision: 14011 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14011 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1278 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-11-30 08:57:57 UTC (rev 14010) +++ branches/HQ_4_2/etc/version.properties 2009-11-30 10:38:25 UTC (rev 14011) @@ -1,3 +1,3 @@ -#Sun Nov 29 01:43:34 PST 2009 +#Mon Nov 30 01:46:34 PST 2009 version=4.2.1 -build=1277 +build=1278 |
From: <bo...@hy...> - 2009-11-30 08:58:09
|
Author: bob Date: 2009-11-30 00:57:57 -0800 (Mon, 30 Nov 2009) New Revision: 14010 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14010 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1274 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-11-29 10:37:33 UTC (rev 14009) +++ trunk/etc/version.properties 2009-11-30 08:57:57 UTC (rev 14010) @@ -1,3 +1,3 @@ -#Sun Nov 29 00:16:45 PST 2009 +#Mon Nov 30 00:18:13 PST 2009 version=4.3.0 -build=1273 +build=1274 |
From: <bo...@hy...> - 2009-11-29 10:37:44
|
Author: bob Date: 2009-11-29 02:37:33 -0800 (Sun, 29 Nov 2009) New Revision: 14009 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14009 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1277 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-11-29 08:55:34 UTC (rev 14008) +++ branches/HQ_4_2/etc/version.properties 2009-11-29 10:37:33 UTC (rev 14009) @@ -1,3 +1,3 @@ -#Sat Nov 28 01:48:25 PST 2009 +#Sun Nov 29 01:43:34 PST 2009 version=4.2.1 -build=1276 +build=1277 |
From: <bo...@hy...> - 2009-11-29 08:55:45
|
Author: bob Date: 2009-11-29 00:55:34 -0800 (Sun, 29 Nov 2009) New Revision: 14008 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14008 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1273 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2009-11-28 10:42:47 UTC (rev 14007) +++ trunk/etc/version.properties 2009-11-29 08:55:34 UTC (rev 14008) @@ -1,3 +1,3 @@ -#Sat Nov 28 00:17:57 PST 2009 +#Sun Nov 29 00:16:45 PST 2009 version=4.3.0 -build=1272 +build=1273 |
From: <bo...@hy...> - 2009-11-28 10:43:02
|
Author: bob Date: 2009-11-28 02:42:47 -0800 (Sat, 28 Nov 2009) New Revision: 14007 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14007 Modified: branches/HQ_4_2/etc/version.properties Log: Release 4.2.1 build #1276 Modified: branches/HQ_4_2/etc/version.properties =================================================================== --- branches/HQ_4_2/etc/version.properties 2009-11-28 08:57:39 UTC (rev 14006) +++ branches/HQ_4_2/etc/version.properties 2009-11-28 10:42:47 UTC (rev 14007) @@ -1,3 +1,3 @@ -#Fri Nov 27 01:46:04 PST 2009 +#Sat Nov 28 01:48:25 PST 2009 version=4.2.1 -build=1275 +build=1276 |