Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/agent-in-se…
Browse files Browse the repository at this point in the history
…rver

Conflicts:
	modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
	modules/enterprise/server/server-control/src/main/java/org/rhq/server/control/command/Upgrade.java
  • Loading branch information
jmazzitelli committed Jun 4, 2014
2 parents 0e2089b + ed8a2c4 commit 9630968
Show file tree
Hide file tree
Showing 748 changed files with 38,082 additions and 21,708 deletions.
6 changes: 3 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@
<classpathentry exported="true" kind="var" path="M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3.jar" sourcepath="/M2_REPO/mc4j/org-mc4j-ems/1.3/org-mc4j-ems-1.3-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5.jar" sourcepath="/M2_REPO/org/opensymphony/quartz/quartz/1.6.5/quartz-1.6.5-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/javax/mail/mail/1.4.4/mail-1.4.4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.3.1/commons-fileupload-1.3.1.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.3.Final/richfaces-api-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-api/3.1.3.GA/richfaces-api-3.1.3.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.3.Final/richfaces-impl-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0.GA/richfaces-impl-3.3.0.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0.GA/richfaces-ui-3.3.0.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/postgresql/postgresql/9.2-1002.jdbc4/postgresql-9.2-1002.jdbc4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-cache/1.4.1.SP9/jboss-cache-1.4.1.SP9.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-5/sigar-1.6.5.132-5.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-5/sigar-1.6.5.132-5-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-6/sigar-1.6.5.132-6.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-6/sigar-1.6.5.132-6-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossts/jbossjts/4.16.4.Final/jbossjts-4.16.4.Final.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0.8/maven-project-2.0.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0.8/maven-plugin-api-2.0.8.jar"/>
Expand All @@ -305,7 +305,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/google/gwt/gwt-dev/2.5.0/gwt-dev-2.5.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/smartgwt/smartgwt/3.0/smartgwt-3.0.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/jcraft/jsch/0.1.29/jsch-0.1.29.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/com/jcraft/jsch/0.1.51/jsch-0.1.51.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/dbunit/dbunit/2.4.8/dbunit-2.4.8.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/apache/poi/poi/3.7/poi-3.7.jar"/>
Expand Down
32 changes: 17 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
#
# Specific files and directories must start with a slash
# See http://git-scm.com/docs/gitignore
#
/dev-container/
/rhq-data/
/modules/enterprise/gui/portal-war/build/classes/
/modules/enterprise/gui/coregui/build/classes/
#eclipse specific
/modules/enterprise/gui/coregui/.externalToolBuilders/
/modules/enterprise/gui/content_http-war/build/classes/
#created by rhq-enterprise-server's unit tests
/modules/enterprise/server/jar/transaction.log

#
# Files and directories to ignore at any level in the tree
#
target/
test-output/
eclipse-classes/
logs/
antlr-generated/
gwt-tmp/
dev-container/
rhq-data/
rhq-agent/
dev-agent/
dev-cli/
modules/enterprise/gui/portal-war/build/classes/
modules/enterprise/gui/coregui/build/classes/
#eclipse specific
modules/enterprise/gui/coregui/.externalToolBuilders/
modules/enterprise/gui/content_http-war/build/classes/

#created by rhq-enterprise-server's unit tests
modules/enterprise/server/jar/transaction.log

.idea/
.metadata/
*cache.html
Expand All @@ -33,6 +36,5 @@ modules/enterprise/server/jar/transaction.log
.wtpmodules
*~
*.DS_Store

#these are created by the python script engine during the tests
cachedir/
18 changes: 10 additions & 8 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
eclipse.preferences.version=1
encoding//modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtilsI18NResourceKeys.java=UTF-8
encoding//modules/core/util/src/main/java/org/rhq/core/util/UtilI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/i18n/CommI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/measurement/MeasurementI18NResourceKeys.java=ISO-8859-1
encoding//modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerI18NFactory.java=UTF-8
encoding//modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerI18NResourceKeys.java=UTF-8
#Fri Apr 04 11:49:54 EDT 2014
eclipse.preferences.version=1
encoding//modules/core/dbutils/src/main/java/org/rhq/core/db/DbUtilsI18NResourceKeys.java=UTF-8
encoding//modules/core/util/src/main/java/org/rhq/core/util/UtilI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/i18n/AgentI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/comm/src/main/java/org/rhq/enterprise/communications/i18n/CommI18NResourceKeys.java=UTF-8
encoding//modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties=UTF-8
encoding//modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/measurement/MeasurementI18NResourceKeys.java=ISO-8859-1
encoding//modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerI18NFactory.java=UTF-8
encoding//modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/comm/ServerI18NResourceKeys.java=UTF-8
2 changes: 1 addition & 1 deletion code-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>rhq-parent</artifactId>
<groupId>org.rhq</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.12.0-SNAPSHOT</version>
</parent>

<artifactId>rhq-code-coverage</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion etc/eclipse-tools/RHQ Remote Debugging - GWT.launch

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion etc/eclipse-tools/RHQ Remote Debugging - Test.launch

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion etc/eclipse-tools/hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
<mapping class="org.rhq.core.domain.resource.ProductVersion" />
<mapping class="org.rhq.core.domain.resource.Resource" />
<mapping class="org.rhq.core.domain.resource.ResourceError" />
<mapping class="org.rhq.core.domain.resource.ResourceSubCategory" />
<mapping class="org.rhq.core.domain.resource.ResourceType" />
<mapping class="org.rhq.core.domain.configuration.definition.ConfigurationDefinition" />
<mapping class="org.rhq.core.domain.configuration.definition.ConfigurationTemplate" />
Expand Down
33 changes: 33 additions & 0 deletions etc/greasemonkey/RHQ_login_monkey-before-4.11.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// ==UserScript==
// @name RHQ login monkey old
// @namespace org.rhq.coregui
// @description Types in the credentials when pressing ALT+C on the login page. This script works also for Chrome/Chromium with the extension called Tampermonkey. This version works well with the RHQ 4.10 and lower.
// @include *:7080/coregui/*
// @include *:7080/coregui/#LogOut
// @exclude *:7080/coregui/login*
// @grant none
// @author Jiri Kremser <jkremser@redhat.com>
// @version 1.1
// ==/UserScript==

function fillTheCredentials() {
document.getElementsByName("user")[0].value="rhqadmin";
document.getElementsByName("password")[0].value="rhqadmin";
//document.forms[0].submit() doesn't work, SmartGWT uses internal logic
document.getElementsByName("password")[0].focus();
}

// register the function and the hot key
//GM_registerMenuCommand("Fill the credentials", function(e) {
// fillTheCredentials();
//}, "c", "alt", "c" );

// fallback solution, because the function above doesn't work in all browsers
(function(){
document.addEventListener('keydown', function(e) {
// pressed alt+c
if (e.keyCode == 67 && !e.shiftKey && !e.ctrlKey && e.altKey && !e.metaKey) {
fillTheCredentials();
}
}, false);
}());
33 changes: 16 additions & 17 deletions etc/greasemonkey/RHQ_login_monkey.user.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
// ==UserScript==
// @name RHQ login monkey
// @namespace org.rhq.coregui
// @description Types in the credentials when pressing ALT+C on the login page. This script works also for Chrome/Chromium with the extension called Tampermonkey.
// @include *:7080/coregui/*
// @include *:7080/coregui/#LogOut
// @description Types in the credentials when pressing ALT+C on the login page. This script works also for Chrome/Chromium with the extension called Tampermonkey. This script works with the new login screen that was added to RHQ 4.11
// @include *:7080/coregui/login*
// @grant none
// @author Jiri Kremser <jkremser@redhat.com>
// @version 1.1
// @version 1.2
// ==/UserScript==

function fillTheCredentials() {
document.getElementsByName("user")[0].value="rhqadmin";
document.getElementsByName("password")[0].value="rhqadmin";
//document.forms[0].submit() doesn't work, SmartGWT uses internal logic
document.getElementsByName("password")[0].focus();
// new UI
document.getElementById('inputUsername').value="rhqadmin";
document.getElementById('inputPassword').value="rhqadmin";
document.getElementById('loginForm').submit();
}

// register the function and the hot key
GM_registerMenuCommand("Fill the credentials", function(e) {
fillTheCredentials();
}, "c", "alt", "c" );
//GM_registerMenuCommand("Fill the credentials", function(e) {
// fillTheCredentials();
//}, "c", "alt", "c" );

// fallback solution, because the function above doesn't work in all browsers
(function(){
document.addEventListener('keydown', function(e) {
// pressed alt+c
if (e.keyCode == 67 && !e.shiftKey && !e.ctrlKey && e.altKey && !e.metaKey) {
fillTheCredentials();
}
}, false);
document.addEventListener('keydown', function(e) {
// pressed alt+c
if (e.keyCode == 67 && !e.shiftKey && !e.ctrlKey && e.altKey && !e.metaKey) {
fillTheCredentials();
}
}, false);
}());
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class RhqIrcBotListener extends ListenerAdapter<RhqIrcBot> {
private static final Pattern JIRA_PATTERN = Pattern.compile("(?i)(" + JIRA_PROJECT + "\\d{1,5})");
private static final Pattern COMMIT_PATTERN = Pattern.compile("(?i)(\\!commit|cm)[ ]*([0-9a-f]{3,40})");
private static final Pattern ECHO_PATTERN = Pattern.compile("(?i)echo[ ]+(.+)");
private static final String COMMIT_LINK = "https://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=%s";
private static final String COMMIT_LINK = "https://github.com/rhq-project/rhq/commit/%s";
private static final String PTO_LINK = "https://mail.corp.redhat.com/home/ccrouch@redhat.com/JBoss%20ON%20OOO?fmt=rss&view=day&start=0day&end=0day";
private static final DateFormat monthFormat = new SimpleDateFormat("MMM");
private static final DateFormat dayInMonthFormat = new SimpleDateFormat("d");
Expand Down
22 changes: 9 additions & 13 deletions etc/samples/mbeans-on-as7-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<rhq.version>4.10.0-SNAPSHOT</rhq.version>
<rhq.version>4.12.0-SNAPSHOT</rhq.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -46,7 +46,7 @@
<plugin>
<groupId>org.rhq.maven.plugins</groupId>
<artifactId>rhq-agent-plugin-plugin</artifactId>
<version>0.5</version>
<version>0.6</version>
<extensions>true</extensions>
<configuration>
<archive>
Expand All @@ -65,30 +65,26 @@
<Build-Time>${buildTime}</Build-Time>
</manifestEntries>
</archive>
<host>127.0.0.1</host>
<port>7080</port>
<username>rhqadmin</username>
<password>rhqadmin</password>
<startScan>true</startScan>
<failOnError>false</failOnError>
<rhqVersion>${rhq.version}</rhqVersion>
</configuration>
<executions>
<execution>
<id>validate</id>
<goals>
<goal>validate</goal>
</goals>
<configuration>
<rhqVersion>${rhq.version}</rhqVersion>
</configuration>
</execution>
<execution>
<id>upload</id>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<host>127.0.0.1</host>
<port>7080</port>
<username>rhqadmin</username>
<password>rhqadmin</password>
<startScan>true</startScan>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@
class="SamplePluginServerComponent"
supportsManualAdd="true"
description="This is a sample resource type and should be removed.">

<!--
CHANGE: Categories are optional; this entire section may be removed if there is no need to further group
related child resources. Categories defined at this level can carry metadata on the category itself,
such as a display name and description.
-->
<subcategories>
<subcategory name="Category1" displayName="Sample Category 1"
description="This is a sample category that should be removed."/>
<subcategory name="Category2" >
<subcategory name="ChildCategory2a" />
</subcategory>
</subcategories>

<!--
CHANGE: The entire plugin configuration is optional. If there are properties specific to handling how the
resource component will connect to the resource, they should be added here. If the plugin-configuration
Expand Down
54 changes: 27 additions & 27 deletions etc/scripts/rhqctl-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,24 @@
# to auto load this script move this script to /etc/bash_completion.d/

_rhqctl() {
local opts agentServerStorage storageInstallSubopts agentInstallSubopts serverInstallSubopts upgradeSubopts dataMingratorSubopts
local cur prev opts agentServerStorage agentServerStorageStart serverStorage dataMingratorSubopts \
storageInstallSubopts agentInstallSubopts serverInstallSubopts upgradeSubopts booleanSubopts trueFalse first second
COMPREPLY=()

cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="console install start status stop restart upgrade"
opts="console install restart start status stop upgrade --help"
agentServerStorage="--agent --server --storage"
agentServerStorageStart="--agent --server --storage --start"
serverStorage="--server --storage"
dataMigratorSubopts="none estimate print-command do-it"

# the spaces in the beginning and in the end are important here
storageInstallSubopts=" --storage-config --storage-data-root-dir "
agentInstallSubopts=" --agent-auto-start --agent-config --agent-preference "
serverInstallSubopts=" --server-config "
upgradeSubopts=" --from-agent-dir --from-server-dir --agent-auto-start --run-data-migrator --storage-config --storage-data-root-dir --use-remote-storage-node "
booleanSubopts=" --agent-auto-start --use-remote-storage-node "
storageInstallSubopts=" --storage-data-root-dir "
agentInstallSubopts=" --agent-config --agent-preference "
#serverInstallSubopts=" --server-config "
upgradeSubopts=" --from-agent-dir --from-server-dir --start --run-data-migrator --storage-config --storage-data-root-dir --use-remote-storage-node "
booleanSubopts=" --use-remote-storage-node "
trueFalse="true false"

if [[ "${COMP_LINE}" =~ ^\.?rhqctl[[:space:]]*$ ]] ; then
Expand All @@ -40,6 +42,9 @@ _rhqctl() {
if [[ "x${prev}" == "x--run-data-migrator" ]] ; then
COMPREPLY=( $(compgen -W "${dataMigratorSubopts}" -- ${cur}) )
return 0
elif [[ "x${prev}" == "x--start" ]] ; then
COMPREPLY=( $(compgen -W "${upgradeSubopts}" -- ${cur}) )
return 0
else
checkForBooleanSubopt ${prev} && return 0
completePath ${cur}
Expand All @@ -50,35 +55,34 @@ _rhqctl() {
return 0
elif [[ "x${first}" == "xinstall" ]] ; then
second="${COMP_WORDS[2]}"
if [[ "x$second" == "x" ]] ; then
COMPREPLY=( $(compgen -W "${agentServerStorage}" -- ${cur}) )
if [[ "x$second" == "x" ]] || [[ "x${second}" == "x--" ]]; then
COMPREPLY=( $(compgen -W "${agentServerStorageStart}" -- ${cur}) )
return 0
fi

if [[ "x${second}" == "x--server" ]] ; then
if [[ "${serverInstallSubopts}" == *" ${prev} "* ]] ; then
completePath ${cur}
return 0
fi
COMPREPLY=( $(compgen -W "${serverInstallSubopts}" -- ${cur}) )
return 0
elif [[ "x${second}" == "x--agent" ]] ; then
#if [[ "x${second}" == "x--server" ]] ; then
# if [[ "${serverInstallSubopts}" == *" ${prev} "* ]] ; then
# completePath ${cur}
# return 0
# fi
# COMPREPLY=( $(compgen -W "${serverInstallSubopts} --start" -- ${cur}) )
# return 0
if [[ "x${second}" == "x--agent" ]] ; then
if [[ "${agentInstallSubopts}" == *" ${prev} "* ]] ; then
checkForBooleanSubopt ${prev} && return 0
completePath ${cur}
return 0
fi
COMPREPLY=( $(compgen -W "${agentInstallSubopts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${agentInstallSubopts} --start" -- ${cur}) )
return 0
elif [[ "x${second}" == "x--storage" ]] ; then
if [[ "${storageInstallSubopts}" == *" ${prev} "* ]] ; then
completePath ${cur}
return 0
fi
COMPREPLY=( $(compgen -W "${storageInstallSubopts}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${storageInstallSubopts} --start" -- ${cur}) )
return 0
fi
COMPREPLY=( $(compgen -W "${agentServerStorage}" -- ${cur}) )
COMPREPLY=( $(compgen -W "${agentServerStorageStart}" -- ${cur}) )
return 0
# fallback
elif [[ "${cur}" == * ]] ; then
Expand All @@ -88,12 +92,8 @@ _rhqctl() {
}

function completePath(){
if [[ "${cur}x" == *"/x" ]] ; then
toComplete="${cur}"
else
toComplete="${cur}*"
fi
COMPREPLY=( $(compgen -W "$( ls -1 ${toComplete} 2> /dev/null )" ) )
compopt -o nospace
COMPREPLY=( $(compgen -f "${cur}") )
}

function checkForBooleanSubopt(){
Expand Down
2 changes: 2 additions & 0 deletions modules/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#development build
/dev-container/
2 changes: 1 addition & 1 deletion modules/cli-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
<version>4.10.0-SNAPSHOT</version>
<version>4.12.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 9630968

Please sign in to comment.