forked from jboss-switchyard/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
3,614 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.project | ||
/.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/target | ||
/.project | ||
/.settings | ||
/.gwt | ||
/.classpath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
1. Eclipse configuration | ||
1. Import using Import... "Existing Maven Projects" | ||
2. After importing, open project properties. | ||
1. On the Google->Web Application page: | ||
1. Ensure "This project has a WAR directory" is checked. | ||
2. Change the WAR directory to point to | ||
${project.build.directory}/${project.build.finalName} (e.g. | ||
"target/switchyard-console-gwt-0.1.0-SNAPSHOT"). | ||
3. Make sure "Launch and deploy from this directory..." is checked. | ||
2. On the Google->Web Toolkit page: | ||
1. Ensure "Use Google Web Toolkit" is checked. | ||
2. Ensure "Use specific SDK" is selected and is pointing to the | ||
maven dependencies (e.g. ~/.m2/repository/com/google/gwt/...). | ||
3. To run you can do one of the following: | ||
1. Right-click project and select Run as->Web Application. This will | ||
launch the application from within Eclipse. | ||
2. Right-click module file (e.g. Application.gwt.xml) and select | ||
Run as->GWT application. This will launch an external GWT console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<!-- POM file generated with GWT webAppCreator --> | ||
<parent> | ||
<artifactId>switchyard-console-parent</artifactId> | ||
<groupId>org.switchyard</groupId> | ||
<version>0.2.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.switchyard</groupId> | ||
<artifactId>switchyard-console-gwt</artifactId> | ||
<packaging>war</packaging> | ||
<version>0.2.0-SNAPSHOT</version> | ||
<name>SwitchYard: Management Console Application</name> | ||
<description>Management console application for SwitchYard</description> | ||
|
||
<properties> | ||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> | ||
<gwt.plugin.version>${gwt.version}</gwt.plugin.version> | ||
<asConsoleIncludesDirectory>${project.build.directory}/dependency/as-console</asConsoleIncludesDirectory> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-console</artifactId> <version>1.0.0.Beta9</version> | ||
<type>java-source</type> <classifier>sources</classifier> </dependency> --> | ||
|
||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-servlet</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-user</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.code.gwt-log</groupId> | ||
<artifactId>gwt-log</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.gwtplatform</groupId> | ||
<artifactId>gwtp-all</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-beans</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>net.sourceforge.htmlunit</groupId> | ||
<artifactId>crawl_htmlunit</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.inject</groupId> | ||
<artifactId>guice</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt.inject</groupId> | ||
<artifactId>gin</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mycila.com.google.inject.extensions</groupId> | ||
<artifactId>guice-assisted-inject</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-dev</artifactId> | ||
<type>jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss</groupId> | ||
<artifactId>jboss-dmr</artifactId> | ||
<version>1.0.0.Beta5</version> | ||
<type>jar</type> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-controller-client</artifactId> | ||
<version>7.0.0.Beta3</version> | ||
<type>jar</type> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<!-- Generate compiled stuff in the folder used for developing mode --> | ||
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> | ||
|
||
<plugins> | ||
|
||
<!-- Dependencies from JBoss AS 7 Console --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>unpack-jboss-as-sources</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-console</artifactId> | ||
<version>1.0.0.Beta9</version> | ||
<classifier>sources</classifier> | ||
<type>jar</type> | ||
<includes>org/jboss/dmr/**,org/jboss/as/console/client/widgets/**,org/jboss/as/console/client/auth/**,org/jboss/as/console/client/core/*.*,org/jboss/as/console/client/core/message/*.*,org/jboss/as/console/client/shared/*.*,org/jboss/as/console/client/shared/dispatch/**,org/jboss/as/console/client/Build.java,org/jboss/as/console/server/proxy/**,gwt-proxy.properties</includes> | ||
<excludes>org/jboss/as/console/client/shared/BeanFactory.java,org/jboss/as/console/client/widgets/forms/Form.java</excludes> | ||
<outputDirectory>${asConsoleIncludesDirectory}/java</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>unpack-jboss-as-resources</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-console</artifactId> | ||
<version>1.0.0.Beta9</version> | ||
<classifier>resources</classifier> | ||
<type>jar</type> | ||
<includes>images/**,*.css</includes> | ||
<outputDirectory>${webappDirectory}</outputDirectory> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Add JBoss AS 7 Console source to build path --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>1.5</version> | ||
<executions> | ||
<execution> | ||
<id>add-source</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${asConsoleIncludesDirectory}/java</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<!-- GWT Maven Plugin --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>gwt-maven-plugin</artifactId> | ||
<version>${gwt.plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>resources</goal> | ||
<goal>compile</goal> | ||
<goal>test</goal> | ||
<goal>i18n</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org --> | ||
<configuration> | ||
<compileReport>false</compileReport> | ||
<hostedWebapp>${webappDirectory}</hostedWebapp> | ||
<htmlunit>FF3,IE7</htmlunit> | ||
<i18nMessagesBundle>org.switchyard.console.client.Messages</i18nMessagesBundle> | ||
<logLevel>TRACE</logLevel> | ||
<mode>htmlunit</mode> | ||
<runTarget>SwitchYard.html</runTarget> | ||
</configuration> | ||
</plugin> | ||
|
||
<!-- Copy static web files before executing gwt:run --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.1.1</version> | ||
<executions> | ||
<execution> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exploded</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Remove GWT tests --> | ||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/GwtTest*.java</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.2.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.2.0/distro-source/core/src/gwt-module.dtd"> | ||
<module rename-to="Framework"> | ||
<!-- Inherit the core Web Toolkit stuff. --> | ||
<inherits name='com.google.gwt.user.User'/> | ||
<inherits name='com.google.gwt.user.theme.chrome.ChromeResources'/> | ||
<inherits name="com.google.gwt.editor.Editor"/> | ||
<inherits name="org.jboss.dmr.DMR"/> | ||
<inherits name="com.google.gwt.i18n.I18N"/> | ||
|
||
<inherits name='com.gwtplatform.mvp.Mvp' /> | ||
|
||
<!-- | ||
<define-configuration-property name="gin.ginjector" is-multi-valued="false" /> | ||
<set-configuration-property name="gin.ginjector" | ||
value="org.jboss.as.console.client.core.gin.CoreUI" /> | ||
--> | ||
|
||
<!-- Add gwt-log support, default level `DEBUG` --> | ||
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" /> | ||
<inherits name="com.google.gwt.autobean.AutoBean"/> | ||
<inherits name="com.google.gwt.json.JSON"/> | ||
|
||
<set-property name="log_ConsoleLogger" value="ENABLED" /> | ||
<set-property name="log_GWTLogger" value="ENABLED" /> | ||
<set-property name="log_SystemLogger" value="ENABLED" /> | ||
|
||
<!-- Loggers Disabled by default --> | ||
<set-property name="log_DivLogger" value="DISABLED" /> | ||
<set-property name="log_FirebugLogger" value="DISABLED" /> | ||
<set-property name="log_WindowLogger" value="DISABLED" /> | ||
|
||
<set-configuration-property name="log_pattern" value="%d [%-5p] %m%n" /> | ||
|
||
<!-- | ||
<generate-with class="org.jboss.as.console.rebind.forms.PropertyMetaDataGenerator"> | ||
<when-type-assignable class="org.jboss.as.console.client.widgets.forms.PropertyMetaData" /> | ||
</generate-with> | ||
--> | ||
|
||
<!--define-property name="locale" values="default" /--> | ||
|
||
<property-provider name="locale"> | ||
var locale_value = ""; | ||
var cookieName = "as7_ui_locale"; | ||
|
||
var theCookie=" "+document.cookie; | ||
var ind=theCookie.indexOf(" "+cookieName+"="); | ||
if (ind==-1) ind=theCookie.indexOf(";"+cookieName+"="); | ||
|
||
if (ind==-1 || cookieName=="") { | ||
locale_value = "en"; | ||
} | ||
else { | ||
var ind1=theCookie.indexOf(";",ind+1); | ||
if (ind1==-1) ind1=theCookie.length; | ||
locale_value = unescape(theCookie.substring(ind+cookieName.length+2,ind1)); | ||
} | ||
|
||
return locale_value; | ||
</property-provider> | ||
|
||
<extend-property name="locale" values="en"/> | ||
<extend-property name="locale" values="de"/> | ||
|
||
<!-- Specify the app entry point class. | ||
<entry-point class='org.jboss.as.console.client.Console'/> | ||
--> | ||
|
||
</module> |
47 changes: 47 additions & 0 deletions
47
gwt/src/main/java/org/jboss/as/console/client/Console.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source | ||
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors | ||
* as indicated by the @author tags. All rights reserved. | ||
* See the copyright.txt in the distribution for a | ||
* full listing of individual contributors. | ||
* | ||
* This copyrighted material is made available to anyone wishing to use, | ||
* modify, copy, or redistribute it subject to the terms and conditions | ||
* of the GNU Lesser General Public License, v. 2.1. | ||
* This program is distributed in the hope that it will be useful, but WITHOUT A | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* You should have received a copy of the GNU Lesser General Public License, | ||
* v.2.1 along with this distribution; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301, USA. | ||
*/ | ||
|
||
package org.jboss.as.console.client; | ||
|
||
import org.jboss.as.console.client.core.UIConstants; | ||
import org.jboss.as.console.client.core.UIMessages; | ||
import org.switchyard.console.client.gin.SwitchYardGinjector; | ||
|
||
import com.google.gwt.core.client.GWT; | ||
|
||
/** | ||
* Console | ||
* | ||
* Bridge code for imported org.jboss.as.console source. | ||
* | ||
* @author Rob Cernich | ||
*/ | ||
public final class Console { | ||
|
||
/** The MODULES. */ | ||
public final static SwitchYardGinjector MODULES = org.switchyard.console.client.Console.MODULES; | ||
/** The CONSTANTS. */ | ||
public final static UIConstants CONSTANTS = GWT.create(UIConstants.class); | ||
/** The MESSAGES. */ | ||
public final static UIMessages MESSAGES = GWT.create(UIMessages.class); | ||
|
||
private Console() { | ||
} | ||
|
||
} |
Oops, something went wrong.