etc/scripts/install-rhq-agent.sh
| 32 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
| 22 ++++--
2 files changed, 45 insertions(+), 9 deletions(-)
New commits:
commit 4aba34c876baca85751e3ed749efaf485574879c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Jul 7 13:13:11 2011 -0400
fix a couple bugs in the recently added selectAll/deselectAll functionality on the
autodiscovery queue view
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index e504f2a..678bc74 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -265,19 +265,24 @@ public class ResourceAutodiscoveryView extends LocatableVLayout
implements Refre
SC.ask(MSG.view_autoDiscoveryQ_confirmSelectAll(), new BooleanCallback()
{
public void execute(Boolean selectChildServers) {
selectionChangedHandlerDisabled = true;
+ TreeNode[] nodesToSelect;
if (selectChildServers) {
- treeGrid.selectAllRecords();
+ // NOTE: We do not use treeGrid.selectAllRecords() here,
because it only selects nodes that
+ // are currently visible, and we want to select all
nodes, including server nodes
+ // under a collapsed platform node.
+ nodesToSelect = treeGrid.getTree().getAllNodes();
} else {
- // Select only the platforms.
TreeNode rootNode = treeGrid.getTree().getRoot();
- TreeNode[] platformNodes =
treeGrid.getTree().getChildren(rootNode);
- for (TreeNode platformNode : platformNodes) {
- treeGrid.selectRecord(platformNode);
- }
+ // The children of the root node are the platform nodes.
+ nodesToSelect = treeGrid.getTree().getChildren(rootNode);
}
- selectionChangedHandlerDisabled = false;
+ for (TreeNode nodeToSelect : nodesToSelect) {
+ treeGrid.selectRecord(nodeToSelect);
+ }
+ treeGrid.markForRedraw();
updateButtonEnablement(selectAllButton, deselectAllButton,
importButton, ignoreButton,
unignoreButton);
+ selectionChangedHandlerDisabled = false;
}
});
}
@@ -287,8 +292,9 @@ public class ResourceAutodiscoveryView extends LocatableVLayout
implements Refre
public void onClick(ClickEvent clickEvent) {
selectionChangedHandlerDisabled = true;
treeGrid.deselectAllRecords();
- selectionChangedHandlerDisabled = false;
+ treeGrid.markForRedraw();
updateButtonEnablement(selectAllButton, deselectAllButton, importButton,
ignoreButton, unignoreButton);
+ selectionChangedHandlerDisabled = false;
}
});
commit 306e16a8d1812d7ce693887911922f3028c24486
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Thu Jul 7 13:12:17 2011 -0400
more work on automated install scripts
diff --git a/etc/scripts/install-rhq-agent.sh b/etc/scripts/install-rhq-agent.sh
index 0cc583f..46618c4 100644
--- a/etc/scripts/install-rhq-agent.sh
+++ b/etc/scripts/install-rhq-agent.sh
@@ -1,5 +1,24 @@
#!/bin/sh
+#
+# This script silently installs an RHQ Agent. It requires that the RHQ Server
+# that the Agent will register with be up and running. It is configured via the
+# following environment variables. For convenience, these variables can be
+# defined in a file named install-rhq-agent-env.sh located in the same directory
+# as this script.
+#
+# RHQ_AGENT_ENV_URL - the URL or path of the rhq-agent-env.sh to be used by the
+# Agent
+# RHQ_AGENT_CONFIGURATION_URL - the URL or path of the agent-configuration.xml
+# to be used by the Agent for its initial
+# configuration
+# RHQ_AGENT_INSTALL_PARENT_DIR - the path of the directory under which the Agent
+# install directory (rhq-agent) will be created
+# (e.g. $HOME/Applications)
+# RHQ_AGENT_NAME - the Agent name
+# RHQ_AGENT_SERVER_BIND_ADDRESS - the Server bind address
+#
+
# Define functions.
abort()
{
@@ -15,12 +34,23 @@ usage()
abort "$@" "Usage: $EXE RHQ_SERVER_URL RHQ_AGENT_ENV_URL
RHQ_AGENT_CONFIGURATION_URL RHQ_AGENT_INSTALL_PARENT_DIR" "Example: $EXE
http://localhost:7080/ rhq-agent-env.sh agent-configuration.xml ~/Applications"
}
+SCRIPT_PATH=`readlink -e "$0" 2>/dev/null || readlink "$0"
2>/dev/null || echo "$0"`
+SCRIPT_PARENT_DIR=`dirname "$SCRIPT_PATH"`
+
+SCRIPT_ENV_PATH="${SCRIPT_PARENT_DIR}/install-rhq-agent-env.sh"
+if [ -f "$SCRIPT_ENV_PATH" ]; then
+ . "$SCRIPT_ENV_PATH" $*
+else
+ echo "No environment script found at: $SCRIPT_ENV_PATH"
+fi
+
# Process command line args.
EXE=`basename $0`
if [ "$#" -ne 4 ]; then
usage "Invalid number of arguments."
fi
-RHQ_SERVER_URL="$1"
+
+RHQ_SERVER_URL="http://$RHQ_AGENT_SERVER_BIND_ADDRESS:7080/"
RHQ_AGENT_ENV_URL="$2"
RHQ_AGENT_CONFIGURATION_URL="$3"
RHQ_AGENT_INSTALL_PARENT_DIR="$4"