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: <bo...@hy...> - 2007-03-24 11:39:00
|
Author: bob Date: 2007-03-24 03:38:55 -0800 (Sat, 24 Mar 2007) New Revision: 3859 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3859 Modified: branches/HQ_3_0/etc/version.properties Log: Release 3.0.3 build #351 Modified: branches/HQ_3_0/etc/version.properties =================================================================== --- branches/HQ_3_0/etc/version.properties 2007-03-24 03:22:24 UTC (rev 3858) +++ branches/HQ_3_0/etc/version.properties 2007-03-24 11:38:55 UTC (rev 3859) @@ -1,3 +1,3 @@ -#Fri Mar 23 04:09:47 PDT 2007 +#Sat Mar 24 04:09:10 PDT 2007 version=3.0.3 -build=350 +build=351 |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-24 03:23:38
|
[ http://jira.hyperic.com/browse/HHQ-295?page=all ] Doug MacEachern resolved HHQ-295: --------------------------------- Resolution: Fixed Implemented for 3.0.3 and 3.1 > WebSphere plugin should auto-configure non-default SOAP port > ------------------------------------------------------------ > > Key: HHQ-295 > URL: http://jira.hyperic.com/browse/HHQ-295 > Project: Hyperic HQ > Type: Improvement > Components: Plugins > Reporter: Doug MacEachern > Assignee: Doug MacEachern > Priority: Minor > Fix For: 3.0.3, 3.1.0 > > > Currently uses the default '8880'. If the port is different, the plugin can use serverindex.xml, location of which can be derived from the process arguments. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-24 03:23:37
|
[ http://jira.hyperic.com/browse/HHQ-295?page=all ] Doug MacEachern updated HHQ-295: -------------------------------- Fix Version: 3.0.3 3.1.0 (was: 2.7.6) > WebSphere plugin should auto-configure non-default SOAP port > ------------------------------------------------------------ > > Key: HHQ-295 > URL: http://jira.hyperic.com/browse/HHQ-295 > Project: Hyperic HQ > Type: Improvement > Components: Plugins > Reporter: Doug MacEachern > Assignee: Doug MacEachern > Priority: Minor > Fix For: 3.0.3, 3.1.0 > > > Currently uses the default '8880'. If the port is different, the plugin can use serverindex.xml, location of which can be derived from the process arguments. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: <do...@hy...> - 2007-03-24 03:22:30
|
Author: dougm Date: 2007-03-23 19:22:24 -0800 (Fri, 23 Mar 2007) New Revision: 3858 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3858 Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java Log: [HHQ-295] auto-configure non-default SOAP port Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java =================================================================== --- trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 03:21:50 UTC (rev 3857) +++ trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 03:22:24 UTC (rev 3858) @@ -48,8 +48,13 @@ private static final String PTQL_QUERY = "State.Name.eq=java,Args.*.eq=com.ibm.ws.runtime.WsServer"; + private static final String SOAP_PORT_EXPR = + "//specialEndpoints[@endPointName=\"SOAP_CONNECTOR_ADDRESS\"]//@port"; + private WebsphereRuntimeDiscoverer5 discoverer = null; private String node = null; + private String port = null; + private String installpath; protected List discoverServers(ConfigResponse config) throws PluginException { @@ -89,9 +94,56 @@ "localhost"); } + private File findServerIndex() { + //any serverindex.xml will do. + File[] cells = + new File(this.installpath + "/config/cells").listFiles(); + + if (cells == null) { + return null; + } + + for (int i=0; i<cells.length; i++) { + File[] nodes = + new File(cells[i], "nodes").listFiles(); + + if (nodes == null) { + continue; + } + + for (int j=0; j<nodes.length; j++) { + File index = new File(nodes[j], "serverindex.xml"); + if (index.exists() && index.canRead()) { + return index; + } + } + } + + return null; + } + protected String getAdminPort() { - return getManager().getProperty(WebsphereProductPlugin.PROP_ADMIN_PORT, - "8880"); + if (this.port != null) { + return this.port; + } + final String prop = + WebsphereProductPlugin.PROP_ADMIN_PORT; + + File index = findServerIndex(); + + if (index != null) { + this.port = + getXPathValue(index, SOAP_PORT_EXPR); + getLog().debug("Configuring " + prop + "=" + this.port + + " from: " + index); + } + + if (this.port == null) { + this.port = + getManager().getProperty(prop, "8880"); + } + + return this.port; } protected String getNodeName() { @@ -112,6 +164,8 @@ } protected void initDetector(File root) { + this.installpath = root.getAbsolutePath(); + //sadly, the setupCmdLine script is the //best way to determine the node name final String NODE_PROP = "WAS_NODE="; |
|
From: <do...@hy...> - 2007-03-24 03:21:52
|
Author: dougm Date: 2007-03-23 19:21:50 -0800 (Fri, 23 Mar 2007) New Revision: 3857 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3857 Modified: branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java Log: remove unused import Modified: branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java =================================================================== --- branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 03:19:55 UTC (rev 3856) +++ branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 03:21:50 UTC (rev 3857) @@ -27,7 +27,6 @@ import java.io.BufferedReader; import java.io.File; -import java.io.FileFilter; import java.io.FileReader; import java.io.IOException; import java.io.Reader; |
|
From: <do...@hy...> - 2007-03-24 03:20:00
|
Author: dougm Date: 2007-03-23 19:19:55 -0800 (Fri, 23 Mar 2007) New Revision: 3856 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3856 Modified: branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java Log: [HHQ-295] auto-configure non-default SOAP port Modified: branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java =================================================================== --- branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 01:50:27 UTC (rev 3855) +++ branches/HQ_3_0/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereDetector5.java 2007-03-24 03:19:55 UTC (rev 3856) @@ -27,6 +27,7 @@ import java.io.BufferedReader; import java.io.File; +import java.io.FileFilter; import java.io.FileReader; import java.io.IOException; import java.io.Reader; @@ -48,8 +49,13 @@ private static final String PTQL_QUERY = "State.Name.eq=java,Args.*.eq=com.ibm.ws.runtime.WsServer"; + private static final String SOAP_PORT_EXPR = + "//specialEndpoints[@endPointName=\"SOAP_CONNECTOR_ADDRESS\"]//@port"; + private WebsphereRuntimeDiscoverer5 discoverer = null; private String node = null; + private String port = null; + private String installpath; protected List discoverServers(ConfigResponse config) throws PluginException { @@ -89,9 +95,56 @@ "localhost"); } + private File findServerIndex() { + //any serverindex.xml will do. + File[] cells = + new File(this.installpath + "/config/cells").listFiles(); + + if (cells == null) { + return null; + } + + for (int i=0; i<cells.length; i++) { + File[] nodes = + new File(cells[i], "nodes").listFiles(); + + if (nodes == null) { + continue; + } + + for (int j=0; j<nodes.length; j++) { + File index = new File(nodes[j], "serverindex.xml"); + if (index.exists() && index.canRead()) { + return index; + } + } + } + + return null; + } + protected String getAdminPort() { - return getManager().getProperty(WebsphereProductPlugin.PROP_ADMIN_PORT, - "8880"); + if (this.port != null) { + return this.port; + } + final String prop = + WebsphereProductPlugin.PROP_ADMIN_PORT; + + File index = findServerIndex(); + + if (index != null) { + this.port = + getXPathValue(index, SOAP_PORT_EXPR); + getLog().debug("Configuring " + prop + "=" + this.port + + " from: " + index); + } + + if (this.port == null) { + this.port = + getManager().getProperty(prop, "8880"); + } + + return this.port; } protected String getNodeName() { @@ -112,6 +165,8 @@ } protected void initDetector(File root) { + this.installpath = root.getAbsolutePath(); + //sadly, the setupCmdLine script is the //best way to determine the node name final String NODE_PROP = "WAS_NODE="; |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-24 01:55:37
|
[ http://jira.hyperic.com/browse/HHQ-765?page=all ] Doug MacEachern updated HHQ-765: -------------------------------- Attachment: HHQ-765.zip Attaching a patch for use with 3.0.2, to apply: cd server-3.0.2 unzip HHQ-765.zip ./bin/hq-server.sh stop zip -urv hq-engine/server/default/deploy/hq.ear/hq.jar org/hyperic/hq/appdef/server/session/Server.class ./bin/hq-server.sh start rm -rf org > NPE in appdef.shared.ServiceManagerLocal.createService > ------------------------------------------------------ > > Key: HHQ-765 > URL: http://jira.hyperic.com/browse/HHQ-765 > Project: Hyperic HQ > Type: Bug > Components: Server > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Doug MacEachern > Priority: Critical > Fix For: 3.0.3 > Attachments: HHQ-765.zip, bug_765_stack_trace > > > In the auto-discovery process for MySQL a Null Pointer Exception occurs when trying to create services. > 2007-03-23 14:58:52,178 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new server: name: vmlin-001 MySQL 4.x mysqlAIIdentifier: /usrmysql > 2007-03-23 14:58:52,270 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] New server created: vmlin-001 MySQL 4.x mysql (id=10054) > 2007-03-23 14:58:52,285 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Updating services for server: vmlin-001 MySQL 4.x mysql > 2007-03-23 14:58:52,326 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new service: vmlin-001 MySQL 4.x mysql columns_priv > 2007-03-23 14:58:52,390 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer org.hyperic.hq.appdef.shared.ServiceManagerLocal.createService(org.hyperic.hq.authz.shared.AuthzSubjectValue,java.lang.Integer,java.lang.Integer,org.hyperic.hq.appdef.shared.ServiceValue) throws javax.ejb.CreateException,org.hyperic.hq.appdef.shared.ValidationException,org.hyperic.hq.authz.shared.PermissionException,org.hyperic.hq.appdef.shared.ServerNotFoundException,org.hyperic.hq.appdef.shared.AppdefDuplicateNameException, causedBy: > java.lang.NullPointerException > at org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl.createService(ServiceManagerEJBImpl.java:163) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Author: jtravis Date: 2007-03-23 17:50:27 -0800 (Fri, 23 Mar 2007) New Revision: 3855 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3855 Added: trunk/ui_plugins/rendit_sys/ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy Removed: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy Log: Move rendit_sys to the ui_plugins directory Copied: trunk/ui_plugins/rendit_sys (from rev 3844, trunk/src/org/hyperic/hq/ui/rendit/rendit_sys) Deleted: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-23 23:49:12 UTC (rev 3844) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -1,92 +0,0 @@ -package org.hyperic.hq.ui.rendit - -import java.io.OutputStreamWriter - -import org.apache.commons.logging.Log -import org.apache.commons.logging.LogFactory - -import org.hyperic.hq.authz.server.session.AuthzSubject -import org.hyperic.hq.ui.util.ContextUtils -import org.hyperic.hq.ui.util.RequestUtils - -import org.hyperic.hq.ui.rendit.helpers.LiveDataHelper -import org.hyperic.hq.ui.rendit.helpers.ResourceHelper - -import groovy.text.SimpleTemplateEngine -import java.io.File - -abstract class BaseController - extends Expando -{ - Log log = LogFactory.getLog(this.getClass()) - String action - File pluginDir - def invokeArgs - private AuthzSubject user - - private void setAction(String action) { - this.action = action - } - - def setInvokeArgs(def args) { - this.invokeArgs = args - } - - def setPluginDir(File pluginDir) { - this.pluginDir = pluginDir - } - - def getResourceHelper() { return new ResourceHelper(getUser()) } - def getLiveDataHelper() { return new LiveDataHelper(getUser()) } - - /** - * Retreives the currently logged-in user - */ - protected AuthzSubject getUser() { - if (this.user != null) - return this.user - - def sessId = RequestUtils.getSessionId(invokeArgs.request) - def ctx = invokeArgs.request.session.servletContext - - this.user = ContextUtils.getAuthzBoss(ctx).getCurrentSubject(sessId) - } - - /** - * Render a .gsp. - * - * This method takes a map of arguments. Valid arguments include: - * file: The file to render. If not specified, the name of the - * current action will be used - * args: A map of key/value pairs to send to the .gsp to use when - * rendering - * - * Examples: - * To render the file 'listView.gsp' to the browser - * > render file:'listView' - * - * To render the current action to the browser and pass in parameters - * needed by the .gsp - * > render args:[userName:'Jeff', favouriteDrink:'Vodka'] - * - */ - protected void render(args) { - args = (args == null) ? [:] : args - def gspArgs = args.remove("args") - def gspFile = args.remove("file") - def useAction - - if (gspFile == null) - useAction = action - else - useAction = gspFile - - new File(pluginDir, useAction + '.gsp').withReader { reader -> - def eng = new SimpleTemplateEngine(false) - def template = eng.createTemplate(reader) - def outStream = invokeArgs.response.outputStream - def outWriter = new OutputStreamWriter(outStream) - template.make(gspArgs).writeTo(outWriter) - } - } -} Copied: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy (from rev 3850, trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy) =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy (rev 0) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -0,0 +1,122 @@ +package org.hyperic.hq.ui.rendit + +import org.apache.commons.lang.StringEscapeUtils + +import java.io.OutputStreamWriter + +import org.apache.commons.logging.Log +import org.apache.commons.logging.LogFactory + +import org.hyperic.hq.authz.server.session.AuthzSubject +import org.hyperic.hq.ui.util.ContextUtils +import org.hyperic.hq.ui.util.RequestUtils + +import org.hyperic.hq.ui.rendit.helpers.LiveDataHelper +import org.hyperic.hq.ui.rendit.helpers.ResourceHelper + +import groovy.text.SimpleTemplateEngine +import java.io.File + +abstract class BaseController { + Log log = LogFactory.getLog(this.getClass()) + String action + File pluginDir + + private invokeArgs + private AuthzSubject user + + private void setAction(String action) { + this.action = action + } + + protected setInvokeArgs(args) { + this.invokeArgs = args + } + + def getInvokeArgs() { invokeArgs } + + def setPluginDir(File pluginDir) { + this.pluginDir = pluginDir + } + + def getResourceHelper() { return new ResourceHelper(getUser()) } + def getLiveDataHelper() { return new LiveDataHelper(getUser()) } + + /** + * Retreives the currently logged-in user + */ + protected AuthzSubject getUser() { + if (this.user != null) + return this.user + + def sessId = RequestUtils.getSessionId(invokeArgs.request) + def ctx = invokeArgs.request.session.servletContext + + this.user = ContextUtils.getAuthzBoss(ctx).getCurrentSubject(sessId) + } + + public String h(str) { + StringEscapeUtils.escapeHtml(str) + } + + public RENDER_BUILTINS = [ + link_to : { text, Object[] args -> + def url = "" + def opts = (args.length > 0) ? args[0] : [:] + def htmlOpts = (args.length > 1) ? args[1] : [:] + + if (opts.containsKey('action')) + url += h(opts['action']) + + url += '?' + for (o in htmlOpts) { + url += URLEncoder.encode("" + o.key, "UTF-8") + "=" + + URLEncoder.encode("" + o.value, "UTF-8") + "&" + } + + return "<a href=\"$url\">$text</a>" + }, + + h : { str -> h(str) } + ] + + /** + * Render a .gsp. + * + * This method takes a map of arguments. Valid arguments include: + * file: The file to render. If not specified, the name of the + * current action will be used + * args: A map of key/value pairs to send to the .gsp to use when + * rendering + * + * Examples: + * To render the file 'listView.gsp' to the browser + * > render file:'listView' + * + * To render the current action to the browser and pass in parameters + * needed by the .gsp + * > render args:[userName:'Jeff', favouriteDrink:'Vodka'] + * + */ + protected void render(args) { + args = (args == null) ? [:] : args + def gspArgs = args.remove("args") + def gspFile = args.remove("file") + def useAction + + if (gspFile == null) + useAction = action + else + useAction = gspFile + + new File(pluginDir, useAction + '.gsp').withReader { reader -> + def eng = new SimpleTemplateEngine(false) + def template = eng.createTemplate(reader) + def outStream = invokeArgs.response.outputStream + def outWriter = new OutputStreamWriter(outStream) + + gspArgs.putAll(RENDER_BUILTINS) + template.make(gspArgs).writeTo(outWriter) + } + } +} Deleted: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy 2007-03-23 23:49:12 UTC (rev 3844) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -1,59 +0,0 @@ -package org.hyperic.hq.ui.rendit - -import org.apache.commons.logging.Log -import org.apache.commons.logging.LogFactory - -/** - * The Dispatcher is the direct invocation target called from the HQ - * RenditServer. It has the responsibility of locating the controllers, - * setting up the environment, and invoking the request. - */ -class Dispatcher { - private Log log = LogFactory.getLog(Dispatcher.class); - - private File pluginDir - private String controllerName - private String action - private def invokeArgs - - private String capitalize(String s) { - if (s.length() == 0) - return s; - return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase(); - } - - def Dispatcher(def invokeArgs) { - def path = invokeArgs.requestPath - - if (path.size() < 3) { - throw new IllegalArgumentException("Path must have at least 3 " + - "components"); - } - - pluginDir = invokeArgs.pluginDir - controllerName = capitalize(path[1]) + "Controller" - action = path[2] - this.invokeArgs = invokeArgs - } - - def invoke() { - def controller = Class.forName(controllerName, true, - this.class.classLoader).newInstance() - - controller.setAction(action) - controller.setPluginDir(pluginDir) - controller.setInvokeArgs(invokeArgs) - - def runner = controller."$action" - if (runner == null) { - throw new IllegalArgumentException("Unknown action [$action]") - } - - def start = System.currentTimeMillis() - runner(invokeArgs.request.parameterMap) - log.info """Executed $controllerName:$action in - ${System.currentTimeMillis() - start} ms""" - } -} - -new Dispatcher(invokeArgs).invoke() Copied: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy (from rev 3847, trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy) =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy (rev 0) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -0,0 +1,59 @@ +package org.hyperic.hq.ui.rendit + +import org.apache.commons.logging.Log +import org.apache.commons.logging.LogFactory + +/** + * The Dispatcher is the direct invocation target called from the HQ + * RenditServer. It has the responsibility of locating the controllers, + * setting up the environment, and invoking the request. + */ +class Dispatcher { + private Log log = LogFactory.getLog(Dispatcher.class); + + private File pluginDir + private String controllerName + private String action + private def invokeArgs + + private String capitalize(String s) { + if (s.length() == 0) + return s; + return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase(); + } + + def Dispatcher(def invokeArgs) { + def path = invokeArgs.requestPath + + if (path.size() < 3) { + throw new IllegalArgumentException("Path must have at least 3 " + + "components"); + } + + pluginDir = invokeArgs.pluginDir + controllerName = capitalize(path[1]) + "Controller" + action = path[2] + this.invokeArgs = invokeArgs + } + + def invoke() { + def controller = Class.forName(controllerName, true, + this.class.classLoader).newInstance() + + controller.setAction(action) + controller.setPluginDir(pluginDir) + controller.setInvokeArgs(invokeArgs) + + def runner = controller."$action" + if (runner == null) { + throw new IllegalArgumentException("Unknown action [$action]") + } + + def start = System.currentTimeMillis() + runner(invokeArgs.request.parameterMap) + log.info "Executed $controllerName:$action in " + + "${System.currentTimeMillis() - start} ms" + } +} + +new Dispatcher(invokeArgs).invoke() Deleted: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy 2007-03-23 23:49:12 UTC (rev 3844) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -1,23 +0,0 @@ -package org.hyperic.hq.ui.rendit.helpers - -import org.hyperic.hq.livedata.server.session.LiveDataManagerEJBImpl -import org.json.JSONArray - -class LiveDataHelper - extends BaseHelper -{ - LiveDataHelper(user) { - super(user) - } - - private getDataMan() { LiveDataManagerEJBImpl.one } - - String[] getCommands(resource) { - dataMan.getCommands(userVal, resource.entityId) - } - - JSONArray getData(resource, command) { - new JSONArray(dataMan.getData(userVal, resource.entityId, command)) - } -} - Copied: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy (from rev 3849, trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy) =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy (rev 0) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -0,0 +1,29 @@ +package org.hyperic.hq.ui.rendit.helpers + +import org.hyperic.hq.appdef.shared.AppdefResourceValue +import org.hyperic.util.config.ConfigResponse +import org.hyperic.hq.livedata.server.session.LiveDataManagerEJBImpl +import org.hyperic.hq.livedata.shared.LiveDataResult +import org.json.JSONArray + +class LiveDataHelper + extends BaseHelper +{ + LiveDataHelper(user) { + super(user) + } + + private getDataMan() { LiveDataManagerEJBImpl.one } + + String[] getCommands(AppdefResourceValue resource) { + dataMan.getCommands(userVal, resource.entityId) + } + + LiveDataResult getData(AppdefResourceValue resource, String command, + config) + { + dataMan.getData(userVal, resource.entityId, command, + config as ConfigResponse) + } +} + Deleted: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-23 23:49:12 UTC (rev 3844) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -1,60 +0,0 @@ -package org.hyperic.hq.ui.rendit.helpers - -import org.hyperic.hq.appdef.shared.AppdefResourceValue -import org.hyperic.hq.appdef.server.session.PlatformManagerEJBImpl - -class ResourceHelper - extends BaseHelper -{ - private final NAME_FINDERS = [ - platform: [ - str: {name -> platMan.getPlatformByName(userVal, name)}, - int: {id -> platMan.getPlatformValueById(userVal, id)}], - platformType: [ - str: {name -> platMan.findPlatformTypeByName(name)}, - int: {id -> platMan.findPlatformTypeValueById(id)}], - ] - - ResourceHelper(user) { - super(user) - } - - private getPlatMan() { PlatformManagerEJBImpl.one } - - /** - * Generic method to find resources. - * - * args: The arguments are a map of options. Currently the only - * options are to find a platform or platformType by name or id. - * - * Examples: - * - * To find a platform by name: - * > find platform:'My Platform' - * - * To find a platform by id: - * > find platform:44123 - */ - AppdefResourceValue find(args) { - def resourceType - for (i in args) { - if (NAME_FINDERS.containsKey(i.key)) { - if (resourceType != null) { - throw new IllegalArgumentException("""Cannot specify more - than one resource type [$resourceType] and - [$i.key]""") - } - resourceType = i.key - } - } - - if (resourceType == null) - throw new IllegalArgumentException(""""No resource type specified. - Must be one of - $NAME_FINDERS.keySet()""") - - def resourceVal = args[resourceType] - def argType = (resourceVal instanceof String) ? 'str' : 'int' - NAME_FINDERS[resourceType][argType].call(resourceVal) - } -} Copied: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy (from rev 3853, trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy) =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy (rev 0) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 01:50:27 UTC (rev 3855) @@ -0,0 +1,85 @@ +package org.hyperic.hq.ui.rendit.helpers + +import org.hyperic.util.pager.PageControl + +import org.hyperic.hq.appdef.shared.AppdefResourceValue +import org.hyperic.hq.appdef.server.session.PlatformManagerEJBImpl + +class ResourceHelper + extends BaseHelper +{ + private final NAME_FINDERS = [ + platform: [ + str: {name -> platMan.getPlatformByName(userVal, name)}, + int: {id -> platMan.getPlatformValueById(userVal, id)}], + platformType: [ + str: {name -> platMan.findPlatformTypeByName(name)}, + int: {id -> platMan.findPlatformTypeValueById(id)}], + ] + + private final ALL_FINDERS = [ + platforms: {platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL)}, + ] + + ResourceHelper(user) { + super(user) + } + + private getPlatMan() { PlatformManagerEJBImpl.one } + + /** + * Generic method to find resources. The results are constrained by the + * authorization of the current user. The result objects are subclasses + * of AppdefResourceValue + * + * Examples: + * + * To find a platform by name: + * > find platform:'My Platform' + * + * To find a platform by id: + * > find platform:44123 + * + * To find all the platforms: + * > find all:'platforms' + */ + def find(args) { + if (args.containsKey('all')) { + return findAll(args) + } + findSingle(args) + } + + private def findAll(args) { + def type = args['all'] + if (!ALL_FINDERS.containsKey(type)) { + throw new IllegalArgumentException("Unknown resource type [$type]" + + ". Must be one of " + + ALL_FINDERS.keySet()); + } + ALL_FINDERS[type]() + } + + private def findSingle(args) { + def resourceType + for (i in args) { + if (NAME_FINDERS.containsKey(i.key)) { + if (resourceType != null) { + throw new IllegalArgumentException("Cannot specify more " + + "than one resource type [$resourceType] and " + + "[$i.key]") + } + resourceType = i.key + } + } + + if (resourceType == null) + throw new IllegalArgumentException("No resource type specified. "+ + "Must be one of " + + NAME_FINDERS.keySet()) + + def resourceVal = args[resourceType] + def argType = (resourceVal instanceof String) ? 'str' : 'int' + NAME_FINDERS[resourceType][argType](resourceVal) + } +} |
|
From: <jt...@hy...> - 2007-03-24 01:46:35
|
Author: jtravis Date: 2007-03-23 17:46:32 -0800 (Fri, 23 Mar 2007) New Revision: 3854 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3854 Modified: trunk/ui_plugins/hqu_livedata/LiveController.groovy Log: Use find(all) instead of a specific method for platforms Modified: trunk/ui_plugins/hqu_livedata/LiveController.groovy =================================================================== --- trunk/ui_plugins/hqu_livedata/LiveController.groovy 2007-03-24 01:46:10 UTC (rev 3853) +++ trunk/ui_plugins/hqu_livedata/LiveController.groovy 2007-03-24 01:46:32 UTC (rev 3854) @@ -4,7 +4,7 @@ public class LiveController extends BaseController { def index = { - render(args:[platforms:resourceHelper.allPlatforms]) + render(args:[platforms:resourceHelper.find(all:'platforms')]) } def showResource = { params -> |
|
From: <jt...@hy...> - 2007-03-24 01:46:13
|
Author: jtravis Date: 2007-03-23 17:46:10 -0800 (Fri, 23 Mar 2007) New Revision: 3853 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3853 Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy Log: Cleanup. Add more functionality to find (all), and remove getAllplatforms Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 00:55:24 UTC (rev 3852) +++ trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 01:46:10 UTC (rev 3853) @@ -16,6 +16,10 @@ str: {name -> platMan.findPlatformTypeByName(name)}, int: {id -> platMan.findPlatformTypeValueById(id)}], ] + + private final ALL_FINDERS = [ + platforms: {platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL)}, + ] ResourceHelper(user) { super(user) @@ -24,20 +28,10 @@ private getPlatMan() { PlatformManagerEJBImpl.one } /** - * Get all the platforms. The results are constrained by the authoraiztaion - * of the current user - */ - Collection getAllPlatforms() { - platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL) - } - - /** * Generic method to find resources. The results are constrained by the - * authorization of the current user + * authorization of the current user. The result objects are subclasses + * of AppdefResourceValue * - * args: The arguments are a map of options. Currently the only - * options are to find a platform or platformType by name or id. - * * Examples: * * To find a platform by name: @@ -45,27 +39,47 @@ * * To find a platform by id: * > find platform:44123 + * + * To find all the platforms: + * > find all:'platforms' */ - AppdefResourceValue find(args) { + def find(args) { + if (args.containsKey('all')) { + return findAll(args) + } + findSingle(args) + } + + private def findAll(args) { + def type = args['all'] + if (!ALL_FINDERS.containsKey(type)) { + throw new IllegalArgumentException("Unknown resource type [$type]" + + ". Must be one of " + + ALL_FINDERS.keySet()); + } + ALL_FINDERS[type]() + } + + private def findSingle(args) { def resourceType for (i in args) { if (NAME_FINDERS.containsKey(i.key)) { if (resourceType != null) { - throw new IllegalArgumentException("""Cannot specify more - than one resource type [$resourceType] and - [$i.key]""") + throw new IllegalArgumentException("Cannot specify more " + + "than one resource type [$resourceType] and " + + "[$i.key]") } resourceType = i.key } } if (resourceType == null) - throw new IllegalArgumentException(""""No resource type specified. - Must be one of - $NAME_FINDERS.keySet()""") + throw new IllegalArgumentException("No resource type specified. "+ + "Must be one of " + + NAME_FINDERS.keySet()) def resourceVal = args[resourceType] def argType = (resourceVal instanceof String) ? 'str' : 'int' - NAME_FINDERS[resourceType][argType].call(resourceVal) + NAME_FINDERS[resourceType][argType](resourceVal) } } |
|
From: Josh J. <jj...@gc...> - 2007-03-24 01:24:14
|
Actually yes, now that you mention it, everything went fine. I got a token and a big long token and all of that. After looking further into it I find that the Big availability exclamation point wasn't referring to the entire platform, just 2 out of the 4 servers on it, Tomcat and IIS, which look like they just need further configuration. After further testing I see that if I kill the java app the alarm goes off and vice versa. The only thing left is to find where I reduce the polling cycle from 10 minutes down to something more frequent, but I should be able to find that. Thanks again for all the help, this has been the most useful community I have ever dealt with. |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-24 00:56:37
|
[ http://jira.hyperic.com/browse/HHQ-765?page=all ] Doug MacEachern resolved HHQ-765: --------------------------------- Resolution: Fixed Fixed (by jtravis) for 3.0.3 and 3.1 > NPE in appdef.shared.ServiceManagerLocal.createService > ------------------------------------------------------ > > Key: HHQ-765 > URL: http://jira.hyperic.com/browse/HHQ-765 > Project: Hyperic HQ > Type: Bug > Components: Server > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Doug MacEachern > Priority: Critical > Fix For: 3.0.3 > Attachments: bug_765_stack_trace > > > In the auto-discovery process for MySQL a Null Pointer Exception occurs when trying to create services. > 2007-03-23 14:58:52,178 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new server: name: vmlin-001 MySQL 4.x mysqlAIIdentifier: /usrmysql > 2007-03-23 14:58:52,270 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] New server created: vmlin-001 MySQL 4.x mysql (id=10054) > 2007-03-23 14:58:52,285 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Updating services for server: vmlin-001 MySQL 4.x mysql > 2007-03-23 14:58:52,326 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new service: vmlin-001 MySQL 4.x mysql columns_priv > 2007-03-23 14:58:52,390 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer org.hyperic.hq.appdef.shared.ServiceManagerLocal.createService(org.hyperic.hq.authz.shared.AuthzSubjectValue,java.lang.Integer,java.lang.Integer,org.hyperic.hq.appdef.shared.ServiceValue) throws javax.ejb.CreateException,org.hyperic.hq.appdef.shared.ValidationException,org.hyperic.hq.authz.shared.PermissionException,org.hyperic.hq.appdef.shared.ServerNotFoundException,org.hyperic.hq.appdef.shared.AppdefDuplicateNameException, causedBy: > java.lang.NullPointerException > at org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl.createService(ServiceManagerEJBImpl.java:163) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: <do...@hy...> - 2007-03-24 00:55:29
|
Author: dougm Date: 2007-03-23 16:55:24 -0800 (Fri, 23 Mar 2007) New Revision: 3852 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3852 Modified: trunk/src/org/hyperic/hq/appdef/server/session/Server.java Log: [HHQ-765] prevent possible NPE in appdef.shared.ServiceManagerLocal.createService (fix from trav) Modified: trunk/src/org/hyperic/hq/appdef/server/session/Server.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/Server.java 2007-03-24 00:55:09 UTC (rev 3851) +++ trunk/src/org/hyperic/hq/appdef/server/session/Server.java 2007-03-24 00:55:24 UTC (rev 3852) @@ -47,7 +47,7 @@ private boolean _autodiscoveryZombie; private ServerType _serverType; private ConfigResponseDB _configResponse; - private Collection _services; + private Collection _services = new ArrayList(); public Server() { super(); |
|
From: <do...@hy...> - 2007-03-24 00:55:12
|
Author: dougm Date: 2007-03-23 16:55:09 -0800 (Fri, 23 Mar 2007) New Revision: 3851 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3851 Modified: branches/HQ_3_0/src/org/hyperic/hq/appdef/server/session/Server.java Log: [HHQ-765] prevent possible NPE in appdef.shared.ServiceManagerLocal.createService (fix from trav) Modified: branches/HQ_3_0/src/org/hyperic/hq/appdef/server/session/Server.java =================================================================== --- branches/HQ_3_0/src/org/hyperic/hq/appdef/server/session/Server.java 2007-03-24 00:18:29 UTC (rev 3850) +++ branches/HQ_3_0/src/org/hyperic/hq/appdef/server/session/Server.java 2007-03-24 00:55:09 UTC (rev 3851) @@ -47,7 +47,7 @@ private boolean _autodiscoveryZombie; private ServerType _serverType; private ConfigResponseDB _configResponse; - private Collection _services; + private Collection _services = new ArrayList(); public Server() { super(); |
|
From: mike m. <mi...@an...> - 2007-03-24 00:42:19
|
I have set up on unix and linux systems using file system mount and use percent the ability to monitor specific disk space. I cant seem to figure out how to do this for a windows systems . DISKs dont show up for the windows box on the dashboard. If I use file system mount it does NOT recognize c: or / .PLEASE HELP |
|
From: <jt...@hy...> - 2007-03-24 00:18:34
|
Author: jtravis Date: 2007-03-23 16:18:29 -0800 (Fri, 23 Mar 2007) New Revision: 3850 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3850 Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy Log: Add methods to deal with escaping. These methods are available to rendered scripts and controllers, but will be migrated later to use Groovy metaclasses Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-24 00:18:00 UTC (rev 3849) +++ trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-24 00:18:29 UTC (rev 3850) @@ -1,5 +1,7 @@ package org.hyperic.hq.ui.rendit +import org.apache.commons.lang.StringEscapeUtils + import java.io.OutputStreamWriter import org.apache.commons.logging.Log @@ -15,23 +17,24 @@ import groovy.text.SimpleTemplateEngine import java.io.File -abstract class BaseController - extends Expando -{ +abstract class BaseController { Log log = LogFactory.getLog(this.getClass()) String action File pluginDir - def invokeArgs + + private invokeArgs private AuthzSubject user private void setAction(String action) { this.action = action } - - def setInvokeArgs(def args) { + + protected setInvokeArgs(args) { this.invokeArgs = args } + def getInvokeArgs() { invokeArgs } + def setPluginDir(File pluginDir) { this.pluginDir = pluginDir } @@ -52,6 +55,31 @@ this.user = ContextUtils.getAuthzBoss(ctx).getCurrentSubject(sessId) } + public String h(str) { + StringEscapeUtils.escapeHtml(str) + } + + public RENDER_BUILTINS = [ + link_to : { text, Object[] args -> + def url = "" + def opts = (args.length > 0) ? args[0] : [:] + def htmlOpts = (args.length > 1) ? args[1] : [:] + + if (opts.containsKey('action')) + url += h(opts['action']) + + url += '?' + for (o in htmlOpts) { + url += URLEncoder.encode("" + o.key, "UTF-8") + "=" + + URLEncoder.encode("" + o.value, "UTF-8") + "&" + } + + return "<a href=\"$url\">$text</a>" + }, + + h : { str -> h(str) } + ] + /** * Render a .gsp. * @@ -85,7 +113,9 @@ def eng = new SimpleTemplateEngine(false) def template = eng.createTemplate(reader) def outStream = invokeArgs.response.outputStream - def outWriter = new OutputStreamWriter(outStream) + def outWriter = new OutputStreamWriter(outStream) + + gspArgs.putAll(RENDER_BUILTINS) template.make(gspArgs).writeTo(outWriter) } } |
|
From: <jt...@hy...> - 2007-03-24 00:18:10
|
Author: jtravis Date: 2007-03-23 16:18:00 -0800 (Fri, 23 Mar 2007) New Revision: 3849 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3849 Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy Log: Bring current with Morg's changes Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy 2007-03-24 00:17:46 UTC (rev 3848) +++ trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/LiveDataHelper.groovy 2007-03-24 00:18:00 UTC (rev 3849) @@ -1,6 +1,9 @@ package org.hyperic.hq.ui.rendit.helpers +import org.hyperic.hq.appdef.shared.AppdefResourceValue +import org.hyperic.util.config.ConfigResponse import org.hyperic.hq.livedata.server.session.LiveDataManagerEJBImpl +import org.hyperic.hq.livedata.shared.LiveDataResult import org.json.JSONArray class LiveDataHelper @@ -12,12 +15,15 @@ private getDataMan() { LiveDataManagerEJBImpl.one } - String[] getCommands(resource) { + String[] getCommands(AppdefResourceValue resource) { dataMan.getCommands(userVal, resource.entityId) } - JSONArray getData(resource, command) { - new JSONArray(dataMan.getData(userVal, resource.entityId, command)) + LiveDataResult getData(AppdefResourceValue resource, String command, + config) + { + dataMan.getData(userVal, resource.entityId, command, + config as ConfigResponse) } } |
|
From: <jt...@hy...> - 2007-03-24 00:17:48
|
Author: jtravis Date: 2007-03-23 16:17:46 -0800 (Fri, 23 Mar 2007) New Revision: 3848 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3848 Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy Log: Add getAllPlatforms Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 00:17:05 UTC (rev 3847) +++ trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/helpers/ResourceHelper.groovy 2007-03-24 00:17:46 UTC (rev 3848) @@ -1,5 +1,7 @@ package org.hyperic.hq.ui.rendit.helpers +import org.hyperic.util.pager.PageControl + import org.hyperic.hq.appdef.shared.AppdefResourceValue import org.hyperic.hq.appdef.server.session.PlatformManagerEJBImpl @@ -22,7 +24,16 @@ private getPlatMan() { PlatformManagerEJBImpl.one } /** - * Generic method to find resources. + * Get all the platforms. The results are constrained by the authoraiztaion + * of the current user + */ + Collection getAllPlatforms() { + platMan.getAllPlatforms(userVal, PageControl.PAGE_ALL) + } + + /** + * Generic method to find resources. The results are constrained by the + * authorization of the current user * * args: The arguments are a map of options. Currently the only * options are to find a platform or platformType by name or id. |
|
From: <jt...@hy...> - 2007-03-24 00:17:11
|
Author: jtravis Date: 2007-03-23 16:17:05 -0800 (Fri, 23 Mar 2007) New Revision: 3847 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3847 Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy Log: Cleanup formatting Modified: trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy =================================================================== --- trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy 2007-03-24 00:16:38 UTC (rev 3846) +++ trunk/src/org/hyperic/hq/ui/rendit/rendit_sys/org/hyperic/hq/ui/rendit/dispatcher.groovy 2007-03-24 00:17:05 UTC (rev 3847) @@ -51,8 +51,8 @@ def start = System.currentTimeMillis() runner(invokeArgs.request.parameterMap) - log.info """Executed $controllerName:$action in - ${System.currentTimeMillis() - start} ms""" + log.info "Executed $controllerName:$action in " + + "${System.currentTimeMillis() - start} ms" } } |
|
From: <jt...@hy...> - 2007-03-24 00:16:39
|
Author: jtravis Date: 2007-03-23 16:16:38 -0800 (Fri, 23 Mar 2007) New Revision: 3846 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3846 Added: trunk/thirdparty/lib/commons-lang-2.3.jar Modified: trunk/build.xml Log: Add commons-lang to allow escaping of HTML Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2007-03-24 00:15:02 UTC (rev 3845) +++ trunk/build.xml 2007-03-24 00:16:38 UTC (rev 3846) @@ -368,6 +368,7 @@ <fileset dir="${thirdparty.lib}" > <include name="backport-util-concurrent.jar" /> <include name="commons-beanutils.jar" /> + <include name="commons-lang-2.3.jar" /> <include name="commons-logging.jar" /> <include name="commons-modeler.jar" /> <include name="commons-collections.jar" /> Added: trunk/thirdparty/lib/commons-lang-2.3.jar =================================================================== (Binary files differ) Property changes on: trunk/thirdparty/lib/commons-lang-2.3.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: <jt...@hy...> - 2007-03-24 00:15:06
|
Author: jtravis Date: 2007-03-23 16:15:02 -0800 (Fri, 23 Mar 2007) New Revision: 3845 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3845 Added: trunk/ui_plugins/ trunk/ui_plugins/hqu_livedata/ trunk/ui_plugins/hqu_livedata/LiveController.groovy trunk/ui_plugins/hqu_livedata/index.gsp trunk/ui_plugins/hqu_livedata/showResource.gsp Log: Add ui plugins directory and example hqu_livedata Added: trunk/ui_plugins/hqu_livedata/LiveController.groovy =================================================================== --- trunk/ui_plugins/hqu_livedata/LiveController.groovy (rev 0) +++ trunk/ui_plugins/hqu_livedata/LiveController.groovy 2007-03-24 00:15:02 UTC (rev 3845) @@ -0,0 +1,24 @@ +import org.hyperic.hq.ui.rendit.BaseController + +import org.hyperic.util.config.ConfigResponse + +public class LiveController extends BaseController { + def index = { + render(args:[platforms:resourceHelper.allPlatforms]) + } + + def showResource = { params -> + def platId = Integer.parseInt(params['id'][0]) + def plat = resourceHelper.find(platform:platId) + def cmds = liveDataHelper.getCommands(plat) + def command = params['command'] + def result + + if (command != null) { + command = command[0] + result = liveDataHelper.getData(plat, command, [:]).XMLResult + } + + render(args:[resource:plat, cmds:cmds, result:result, command:command]) + } +} Added: trunk/ui_plugins/hqu_livedata/index.gsp =================================================================== --- trunk/ui_plugins/hqu_livedata/index.gsp (rev 0) +++ trunk/ui_plugins/hqu_livedata/index.gsp 2007-03-24 00:15:02 UTC (rev 3845) @@ -0,0 +1,11 @@ +<html> +<body> + <h1>Platform LiveData</h1> + + <ul> + <% for (plat in platforms) { %> + <li> <%= link_to plat.name, [action:'showResource'], + [id:plat.id] %> </li> + <% } %> +</body> +</html> Added: trunk/ui_plugins/hqu_livedata/showResource.gsp =================================================================== --- trunk/ui_plugins/hqu_livedata/showResource.gsp (rev 0) +++ trunk/ui_plugins/hqu_livedata/showResource.gsp 2007-03-24 00:15:02 UTC (rev 3845) @@ -0,0 +1,25 @@ +<html> +<body> + <h1>LiveData commands for <%= resource.name %> + (<%= resource.appdefResourceTypeValue.name %>)</h1> + + <p> + <%= link_to "<-- Go Back", [action:'index'], [:] %> + </p> + Available commands: + <ul> + <% for (c in cmds) { %> + <li> + <%= link_to c, [:], [id:resource.id, command:c] %> + </li> + <% } %> + </ul> + + <% if (result != null) { %> + <b>$command</b> result:<br/> + <pre> +<%= h(result) %> + </pre> + <% } %> +</body> +</html> |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-23 23:52:42
|
[ http://jira.hyperic.com/browse/HHQ-765?page=comments#action_16107 ] Doug MacEachern commented on HHQ-765: ------------------------------------- Also happens with WebSphere, WebLogic and iPlanet. Any plugin that reports servers during service discovery. > NPE in appdef.shared.ServiceManagerLocal.createService > ------------------------------------------------------ > > Key: HHQ-765 > URL: http://jira.hyperic.com/browse/HHQ-765 > Project: Hyperic HQ > Type: Bug > Components: Server > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Charles Lee > Priority: Critical > Fix For: 3.0.3 > Attachments: bug_765_stack_trace > > > In the auto-discovery process for MySQL a Null Pointer Exception occurs when trying to create services. > 2007-03-23 14:58:52,178 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new server: name: vmlin-001 MySQL 4.x mysqlAIIdentifier: /usrmysql > 2007-03-23 14:58:52,270 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] New server created: vmlin-001 MySQL 4.x mysql (id=10054) > 2007-03-23 14:58:52,285 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Updating services for server: vmlin-001 MySQL 4.x mysql > 2007-03-23 14:58:52,326 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new service: vmlin-001 MySQL 4.x mysql columns_priv > 2007-03-23 14:58:52,390 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer org.hyperic.hq.appdef.shared.ServiceManagerLocal.createService(org.hyperic.hq.authz.shared.AuthzSubjectValue,java.lang.Integer,java.lang.Integer,org.hyperic.hq.appdef.shared.ServiceValue) throws javax.ejb.CreateException,org.hyperic.hq.appdef.shared.ValidationException,org.hyperic.hq.authz.shared.PermissionException,org.hyperic.hq.appdef.shared.ServerNotFoundException,org.hyperic.hq.appdef.shared.AppdefDuplicateNameException, causedBy: > java.lang.NullPointerException > at org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl.createService(ServiceManagerEJBImpl.java:163) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: Doug M. (JIRA) <ji...@hy...> - 2007-03-23 23:52:42
|
[ http://jira.hyperic.com/browse/HHQ-765?page=all ] Doug MacEachern reassigned HHQ-765: ----------------------------------- Assign To: Doug MacEachern (was: Charles Lee) > NPE in appdef.shared.ServiceManagerLocal.createService > ------------------------------------------------------ > > Key: HHQ-765 > URL: http://jira.hyperic.com/browse/HHQ-765 > Project: Hyperic HQ > Type: Bug > Components: Server > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Doug MacEachern > Priority: Critical > Fix For: 3.0.3 > Attachments: bug_765_stack_trace > > > In the auto-discovery process for MySQL a Null Pointer Exception occurs when trying to create services. > 2007-03-23 14:58:52,178 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new server: name: vmlin-001 MySQL 4.x mysqlAIIdentifier: /usrmysql > 2007-03-23 14:58:52,270 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] New server created: vmlin-001 MySQL 4.x mysql (id=10054) > 2007-03-23 14:58:52,285 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Updating services for server: vmlin-001 MySQL 4.x mysql > 2007-03-23 14:58:52,326 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new service: vmlin-001 MySQL 4.x mysql columns_priv > 2007-03-23 14:58:52,390 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer org.hyperic.hq.appdef.shared.ServiceManagerLocal.createService(org.hyperic.hq.authz.shared.AuthzSubjectValue,java.lang.Integer,java.lang.Integer,org.hyperic.hq.appdef.shared.ServiceValue) throws javax.ejb.CreateException,org.hyperic.hq.appdef.shared.ValidationException,org.hyperic.hq.authz.shared.PermissionException,org.hyperic.hq.appdef.shared.ServerNotFoundException,org.hyperic.hq.appdef.shared.AppdefDuplicateNameException, causedBy: > java.lang.NullPointerException > at org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl.createService(ServiceManagerEJBImpl.java:163) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
From: <rm...@hy...> - 2007-03-23 23:49:20
|
Author: rmorgan Date: 2007-03-23 15:49:12 -0800 (Fri, 23 Mar 2007) New Revision: 3844 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3844 Modified: trunk/src/org/hyperic/hq/livedata/shared/LiveDataResult.java Log: Add getObjectResult() Modified: trunk/src/org/hyperic/hq/livedata/shared/LiveDataResult.java =================================================================== --- trunk/src/org/hyperic/hq/livedata/shared/LiveDataResult.java 2007-03-23 23:32:02 UTC (rev 3843) +++ trunk/src/org/hyperic/hq/livedata/shared/LiveDataResult.java 2007-03-23 23:49:12 UTC (rev 3844) @@ -1,10 +1,11 @@ package org.hyperic.hq.livedata.shared; +import com.thoughtworks.xstream.XStream; + import java.io.Serializable; /** * Result object from live data commands. - * */ public class LiveDataResult implements Serializable { @@ -20,4 +21,12 @@ public String getXMLResult() { return _xml; } + + /** + * Get the Object result for this request. + */ + public Object getObjectResult() { + XStream xstream = new XStream(); + return xstream.fromXML(_xml); + } } |
|
From: Noah S. (JIRA) <ji...@hy...> - 2007-03-23 23:48:37
|
[ http://jira.hyperic.com/browse/HHQ-765?page=all ] Noah Salzman updated HHQ-765: ----------------------------- Attachment: bug_765_stack_trace > NPE in appdef.shared.ServiceManagerLocal.createService > ------------------------------------------------------ > > Key: HHQ-765 > URL: http://jira.hyperic.com/browse/HHQ-765 > Project: Hyperic HQ > Type: Bug > Components: Server > Versions: 3.0.2 > Reporter: Noah Salzman > Assignee: Charles Lee > Priority: Critical > Fix For: 3.0.3 > Attachments: bug_765_stack_trace > > > In the auto-discovery process for MySQL a Null Pointer Exception occurs when trying to create services. > 2007-03-23 14:58:52,178 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new server: name: vmlin-001 MySQL 4.x mysqlAIIdentifier: /usrmysql > 2007-03-23 14:58:52,270 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] New server created: vmlin-001 MySQL 4.x mysql (id=10054) > 2007-03-23 14:58:52,285 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Updating services for server: vmlin-001 MySQL 4.x mysql > 2007-03-23 14:58:52,326 INFO [org.hyperic.hq.autoinventory.server.session.RuntimeReportProcessor] Creating new service: vmlin-001 MySQL 4.x mysql columns_priv > 2007-03-23 14:58:52,390 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Integer org.hyperic.hq.appdef.shared.ServiceManagerLocal.createService(org.hyperic.hq.authz.shared.AuthzSubjectValue,java.lang.Integer,java.lang.Integer,org.hyperic.hq.appdef.shared.ServiceValue) throws javax.ejb.CreateException,org.hyperic.hq.appdef.shared.ValidationException,org.hyperic.hq.authz.shared.PermissionException,org.hyperic.hq.appdef.shared.ServerNotFoundException,org.hyperic.hq.appdef.shared.AppdefDuplicateNameException, causedBy: > java.lang.NullPointerException > at org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl.createService(ServiceManagerEJBImpl.java:163) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.hyperic.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |