Skip to content
Browse files

SWITCHYARD-1277 update to AS console v1.5

  • Loading branch information...
1 parent e08d4f1 commit 011101604b1ac5a9def746e1673b1108a426a875 @rcernich rcernich committed Jan 29, 2013
Showing with 83 additions and 314 deletions.
  1. +2 −0 app/.gitignore
  2. +13 −106 app/pom.xml
  3. +0 −40 app/src/main/java/org/switchyard/console/application/App.gwt.xml
  4. +0 −26 app/src/main/java/org/switchyard/console/application/Development_FF.gwt.xml
  5. +0 −34 app/src/main/java/org/switchyard/console/application/client/AggregatedConsoleGinjector.java
  6. +0 −42 app/src/main/java/org/switchyard/console/application/client/AggregatedConsoleSingleton.java
  7. +1 −1 .../core/src/main/java/org/switchyard/console/components/client/extension/BaseComponentProvider.java
  8. +1 −1 ...nent/core/src/main/java/org/switchyard/console/components/client/extension/ComponentProvider.java
  9. +1 −1 ...e/src/main/java/org/switchyard/console/components/client/internal/ComponentProviderProxyImpl.java
  10. +1 −1 component/core/src/main/java/org/switchyard/console/components/client/model/Component.java
  11. +1 −1 ...rc/main/java/org/switchyard/console/components/client/ui/BaseComponentConfigurationPresenter.java
  12. +1 −1 ...re/src/main/java/org/switchyard/console/components/client/ui/ComponentConfigurationPresenter.java
  13. +2 −4 gwt/pom.xml
  14. +5 −4 gwt/src/main/java/org/switchyard/console/client/BeanFactory.java
  15. +3 −0 gwt/src/main/java/org/switchyard/console/client/NameTokens.java
  16. +2 −7 gwt/src/main/java/org/switchyard/console/client/gin/SwitchYardGinjector.java
  17. +1 −1 gwt/src/main/java/org/switchyard/console/client/model/ArtifactReferenceCategory.java
  18. +3 −3 gwt/src/main/java/org/switchyard/console/client/model/MessageMetrics.java
  19. +1 −1 gwt/src/main/java/org/switchyard/console/client/model/QNameCategory.java
  20. +3 −2 gwt/src/main/java/org/switchyard/console/client/model/SwitchYardStoreImpl.java
  21. +1 −1 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationPresenter.java
  22. +1 −1 gwt/src/main/java/org/switchyard/console/client/ui/artifacts/ArtifactPresenter.java
  23. +6 −0 gwt/src/main/java/org/switchyard/console/client/ui/common/GWTPTabPanel.java
  24. +1 −1 .../main/java/org/switchyard/console/client/ui/component/ComponentConfigurationPresenterFactory.java
  25. +6 −7 gwt/src/main/java/org/switchyard/console/client/ui/component/ComponentPresenter.java
  26. +1 −1 gwt/src/main/java/org/switchyard/console/client/ui/config/ConfigPresenter.java
  27. +11 −17 gwt/src/main/java/org/switchyard/console/client/ui/metrics/MetricsPresenter.java
  28. +9 −8 gwt/src/main/java/org/switchyard/console/client/ui/runtime/RuntimePresenter.java
  29. +5 −0 gwt/src/main/java/org/switchyard/console/client/ui/runtime/RuntimeView.java
  30. +1 −1 gwt/src/main/java/org/switchyard/console/client/ui/service/ServicePresenter.java
  31. +0 −1 pom.xml
View
2 app/.gitignore
@@ -0,0 +1,2 @@
+war/
+gwt-unitCache/
View
119 app/pom.xml
@@ -23,137 +23,44 @@
<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.console</groupId>
- <version>0.8.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-console-build</artifactId>
+ <version>1.5.1.Final</version>
+ <relativePath>../../../jbossas/console/build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+ <groupId>org.switchyard.console</groupId>
<artifactId>switchyard-console-application</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>SwitchYard: Management Console Application</name>
<description>Integrated AS7 console application, which includes the SwitchYard extension.</description>
- <properties>
- <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
- </properties>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.switchyard.console</groupId>
<artifactId>switchyard-console-extension</artifactId>
+ <version>${project.version}</version>
<scope>provided</scope>
</dependency>
- <!-- XXX: replace with proper AS dependency once console includes extension support. -->
<dependency>
<groupId>org.switchyard.console</groupId>
- <artifactId>switchyard-console-as7-core</artifactId>
- <classifier>module</classifier>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>console-spi</artifactId>
+ <artifactId>switchyard-console-extension</artifactId>
+ <version>${project.version}</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-dev</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
<build>
- <!-- Generate compiled stuff in the folder used for developing mode -->
- <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
- <!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- <!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org -->
- <configuration>
- <compileSourcesArtifacts>
- <compileSourcesArtifact>javax.validation:validation-api</compileSourcesArtifact>
- </compileSourcesArtifacts>
- <compileReport>false</compileReport>
- <hostedWebapp>${webappDirectory}</hostedWebapp>
- <htmlunit>FF3,IE7</htmlunit>
- <logLevel>TRACE</logLevel>
- <mode>htmlunit</mode>
- <runTarget>App.html</runTarget>
- <module>org.switchyard.console.application.App</module>
- <extraJvmArgs>-Xmx1024m</extraJvmArgs>
- <localWorkers>2</localWorkers>
- </configuration>
- </plugin>
- <!-- Copy static web files before executing gwt:run -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>exploded</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- <packagingExcludes>WEB-INF/**</packagingExcludes>
- <overlays>
- <overlay>
- <id>core-web-resources</id>
- <groupId>org.switchyard.console</groupId>
- <artifactId>switchyard-console-as7-core</artifactId>
- <classifier>module</classifier>
- <type>jar</type>
- <includes>
- <include>images/**</include>
- <include>*.html</include>
- </includes>
- </overlay>
- </overlays>
- </configuration>
- </plugin>
- <!-- Remove GWT tests -->
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <excludes>
- <exclude>**/GwtTest*.java</exclude>
- </excludes>
+ <!-- fixes the web mode problem -->
+ <fragmentCount>-1</fragmentCount>
+ <persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
</configuration>
</plugin>
</plugins>
</build>
- <profiles>
- <profile>
- <id>dev</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <configuration>
- <module>org.switchyard.console.application.Development_FF</module>
- <style>PRETTY</style>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
View
40 app/src/main/java/org/switchyard/console/application/App.gwt.xml
@@ -1,40 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source
- ~ Copyright 2011-2012 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.
- -->
-
-<module rename-to="app">
-
- <inherits name="org.switchyard.console.SwitchYard" />
-
- <set-configuration-property name="gin.ginjector"
- value="org.switchyard.console.application.client.AggregatedConsoleGinjector" />
-
- <replace-with class="org.switchyard.console.application.client.AggregatedConsoleSingleton">
- <when-type-is class="org.jboss.as.console.client.core.gin.GinjectorSingleton" />
- </replace-with>
-
- <!-- XXX: remove once this is in the core console module. -->
- <generate-with class="org.jboss.as.console.rebind.extensions.SubsystemExtensionProcessorGenerator">
- <when-type-assignable class="org.jboss.as.console.client.shared.SubsystemExtensionProcessor" />
- </generate-with>
-
- <!-- Specify the paths for translatable code -->
- <source path='client' />
- <source path='shared' />
-
-</module>
View
26 app/src/main/java/org/switchyard/console/application/Development_FF.gwt.xml
@@ -1,26 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source
- ~ Copyright 2011-2012 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.
- -->
-
-<module rename-to="app">
-
- <inherits name="org.switchyard.console.application.App" />
- <set-property name="user.agent" value="gecko1_8" />
- <set-property name="locale" value="en" />
-
-</module>
View
34 app/src/main/java/org/switchyard/console/application/client/AggregatedConsoleGinjector.java
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2012 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.switchyard.console.application.client;
-
-import org.jboss.as.console.client.core.gin.Composite;
-import org.switchyard.console.client.gin.SwitchYardGinjector;
-
-/**
- * AggregatedConsoleGinjector
- *
- * Ginjector interface which collects the core AS console and SwitchYard
- * specific Ginjectors.
- *
- * @author Rob Cernich
- */
-public interface AggregatedConsoleGinjector extends Composite, SwitchYardGinjector {
-
-}
View
42 app/src/main/java/org/switchyard/console/application/client/AggregatedConsoleSingleton.java
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2012 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.switchyard.console.application.client;
-
-import org.jboss.as.console.client.core.gin.Composite;
-import org.jboss.as.console.client.core.gin.GinjectorSingleton;
-
-import com.google.gwt.core.client.GWT;
-
-/**
- * AggregatedConsoleSingleton
- *
- * GinjectorSingleton that serves up the "aggregated" Ginjector.
- *
- * @author Rob Cernich
- */
-public class AggregatedConsoleSingleton implements GinjectorSingleton {
-
- private static final Composite INSTANCE = GWT.create(AggregatedConsoleGinjector.class);
-
- @Override
- public Composite getCoreUI() {
- return INSTANCE;
- }
-
-}
View
2 ...c/main/java/org/switchyard/console/components/client/extension/BaseComponentProvider.java
@@ -23,7 +23,7 @@
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter;
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter.ComponentConfigurationView;
-import com.google.gwt.event.shared.EventBus;
+import com.google.web.bindery.event.shared.EventBus;
/**
* BaseComponentProvider
View
2 ...e/src/main/java/org/switchyard/console/components/client/extension/ComponentProvider.java
@@ -21,7 +21,7 @@
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter;
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter.ComponentConfigurationView;
-import com.google.gwt.event.shared.EventBus;
+import com.google.web.bindery.event.shared.EventBus;
/**
* ComponentProvider
View
2 ...in/java/org/switchyard/console/components/client/internal/ComponentProviderProxyImpl.java
@@ -23,7 +23,7 @@
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter;
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter.ComponentConfigurationView;
-import com.google.gwt.event.shared.EventBus;
+import com.google.web.bindery.event.shared.EventBus;
/**
* ComponentProviderProxyImpl
View
2 component/core/src/main/java/org/switchyard/console/components/client/model/Component.java
@@ -48,7 +48,7 @@
/**
* @param types component activation types.
*/
- public void setgetActivationTypes(Set<String> types);
+ public void setActivationTypes(Set<String> types);
/**
* @return component properties.
View
2 ...java/org/switchyard/console/components/client/ui/BaseComponentConfigurationPresenter.java
@@ -18,7 +18,7 @@
*/
package org.switchyard.console.components.client.ui;
-import com.google.gwt.event.shared.EventBus;
+import com.google.web.bindery.event.shared.EventBus;
/**
* BaseComponentConfigurationPresenter
View
2 ...ain/java/org/switchyard/console/components/client/ui/ComponentConfigurationPresenter.java
@@ -20,7 +20,7 @@
import org.switchyard.console.components.client.model.Component;
-import com.google.gwt.event.shared.EventBus;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.PresenterWidget;
import com.gwtplatform.mvp.client.View;
View
6 gwt/pom.xml
@@ -33,11 +33,9 @@
<name>SwitchYard: AS7 Management Console Extension</name>
<description>AS7 management console extension supporting the SwitchYard runtime.</description>
<dependencies>
- <!-- XXX: replace with proper AS dependency once console includes extension support. -->
<dependency>
- <groupId>org.switchyard.console</groupId>
- <artifactId>switchyard-console-as7-core</artifactId>
- <classifier>module</classifier>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-console-core</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard.console</groupId>
View
9 gwt/src/main/java/org/switchyard/console/client/BeanFactory.java
@@ -18,6 +18,7 @@
*/
package org.switchyard.console.client;
+import org.jboss.as.console.spi.BeanFactoryExtension;
import org.switchyard.console.client.model.Application;
import org.switchyard.console.client.model.ArtifactReference;
import org.switchyard.console.client.model.ArtifactReferenceCategory;
@@ -32,9 +33,8 @@
import org.switchyard.console.client.model.Transformer;
import org.switchyard.console.components.client.model.Component;
-import com.google.gwt.autobean.shared.AutoBean;
-import com.google.gwt.autobean.shared.AutoBeanFactory;
-import com.google.gwt.autobean.shared.AutoBeanFactory.Category;
+import com.google.web.bindery.autobean.shared.AutoBean;
+import com.google.web.bindery.autobean.shared.AutoBeanFactory;
/**
* BeanFactory
@@ -43,7 +43,8 @@
*
* @author Rob Cernich
*/
-@Category({QNameCategory.class, ArtifactReferenceCategory.class})
+@BeanFactoryExtension
+@AutoBeanFactory.Category({QNameCategory.class, ArtifactReferenceCategory.class})
public interface BeanFactory extends AutoBeanFactory {
/**
View
3 gwt/src/main/java/org/switchyard/console/client/NameTokens.java
@@ -31,6 +31,9 @@
private NameTokens() {
}
+ /** The SwitchYard subsystem name. */
+ public static final String SUBSYSTEM = "switchyard";
+
/** The subpath for the SwitchYard system configuration view. */
public static final String SYSTEM_CONFIG_PRESENTER = "switchyard";
/** The subpath for the SwitchYard applications view. */
View
9 gwt/src/main/java/org/switchyard/console/client/gin/SwitchYardGinjector.java
@@ -19,10 +19,7 @@
package org.switchyard.console.client.gin;
-import org.jboss.as.console.client.shared.SubsystemExtension;
-import org.jboss.as.console.client.shared.SubsystemExtension.SubsystemGroupDefinition;
-import org.jboss.as.console.client.shared.SubsystemExtension.SubsystemItemDefinition;
-import org.switchyard.console.client.NameTokens;
+import org.jboss.as.console.spi.GinExtension;
import org.switchyard.console.client.ui.application.ApplicationPresenter;
import org.switchyard.console.client.ui.artifacts.ArtifactPresenter;
import org.switchyard.console.client.ui.config.ConfigPresenter;
@@ -41,10 +38,8 @@
*
* @author Rob Cernich
*/
-@SubsystemExtension(subsystem = "switchyard", groups = @SubsystemGroupDefinition(name = "SwitchYard", items =
-
-@SubsystemItemDefinition(presenter = NameTokens.SYSTEM_CONFIG_PRESENTER, name = NameTokens.SYSTEM_CONFIG_TEXT)), runtime = @SubsystemItemDefinition(presenter = NameTokens.RUNTIME_OPERATIONS_PRESENTER, name = NameTokens.RUNTIME_TEXT), metrics = @SubsystemItemDefinition(presenter = NameTokens.METRICS_PRESENTER, name = NameTokens.RUNTIME_TEXT))
@GinModules(SwitchYardClientModule.class)
+@GinExtension("org.switchyard.console.SwitchYard")
public interface SwitchYardGinjector extends Ginjector {
/**
View
2 gwt/src/main/java/org/switchyard/console/client/model/ArtifactReferenceCategory.java
@@ -18,7 +18,7 @@
*/
package org.switchyard.console.client.model;
-import com.google.gwt.autobean.shared.AutoBean;
+import com.google.web.bindery.autobean.shared.AutoBean;
/**
* QNameCategory
View
6 gwt/src/main/java/org/switchyard/console/client/model/MessageMetrics.java
@@ -18,7 +18,7 @@
*/
package org.switchyard.console.client.model;
-import com.google.gwt.autobean.shared.AutoBean.PropertyName;
+import com.google.web.bindery.autobean.shared.AutoBean.PropertyName;
/**
* MessageMetrics
@@ -87,13 +87,13 @@
* @return average processing time
*/
@PropertyName("averageTime")
- double getAverageProcessingTime();
+ Double getAverageProcessingTime();
/**
* @param value average processing time
*/
@PropertyName("averageTime")
- void setAverageProcessingTime(double value);
+ void setAverageProcessingTime(Double value);
/**
* Minimum processing time for a message in TimeUnit.MILLISECONDS.
View
2 gwt/src/main/java/org/switchyard/console/client/model/QNameCategory.java
@@ -20,7 +20,7 @@
import org.switchyard.console.client.NameTokens;
-import com.google.gwt.autobean.shared.AutoBean;
+import com.google.web.bindery.autobean.shared.AutoBean;
/**
* QNameCategory
View
5 gwt/src/main/java/org/switchyard/console/client/model/SwitchYardStoreImpl.java
@@ -43,11 +43,12 @@
import org.jboss.as.console.client.shared.subsys.Baseadress;
import org.jboss.dmr.client.ModelNode;
import org.switchyard.console.client.BeanFactory;
+import org.switchyard.console.client.NameTokens;
import org.switchyard.console.components.client.model.Component;
import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.autobean.shared.AutoBeanCodex;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.web.bindery.autobean.shared.AutoBeanCodex;
/**
* SwitchYardStoreImpl
@@ -68,7 +69,7 @@
private static final String READ_SERVICE = "read-service";
private static final String SERVICE_NAME = "service-name";
private static final String SHOW_METRICS = "show-metrics";
- private static final String SWITCHYARD = "switchyard";
+ private static final String SWITCHYARD = NameTokens.SUBSYSTEM;
private final DispatchAsync _dispatcher;
View
2 gwt/src/main/java/org/switchyard/console/client/ui/application/ApplicationPresenter.java
@@ -32,10 +32,10 @@
import org.switchyard.console.client.ui.runtime.RuntimePresenter;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
View
2 gwt/src/main/java/org/switchyard/console/client/ui/artifacts/ArtifactPresenter.java
@@ -31,10 +31,10 @@
import org.switchyard.console.client.ui.runtime.RuntimePresenter;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
View
6 gwt/src/main/java/org/switchyard/console/client/ui/common/GWTPTabPanel.java
@@ -162,4 +162,10 @@ public void setActiveTab(Tab tab) {
_tabBar.selectTab(_tabs.indexOf(tab), false);
}
+ @Override
+ public void changeTab(Tab tab, TabData tabData, String historyToken) {
+ // tab.setText(tabData.getLabel());
+ // tab.setTargetHistoryToken(historyToken);
+ }
+
}
View
2 ...va/org/switchyard/console/client/ui/component/ComponentConfigurationPresenterFactory.java
@@ -27,8 +27,8 @@
import org.switchyard.console.components.client.extension.ComponentProviders;
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter;
-import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
/**
* ComponentConfigurationPresenterFactory
View
13 gwt/src/main/java/org/switchyard/console/client/ui/component/ComponentPresenter.java
@@ -20,7 +20,7 @@
package org.switchyard.console.client.ui.component;
import org.jboss.as.console.client.Console;
-import org.jboss.as.console.client.shared.subsys.RevealStrategy;
+import org.jboss.as.console.spi.SubsystemExtension;
import org.switchyard.console.client.NameTokens;
import org.switchyard.console.client.model.SwitchYardStore;
import org.switchyard.console.client.ui.config.ConfigPresenter;
@@ -35,6 +35,7 @@
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.ContentSlot;
+import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
import com.gwtplatform.mvp.client.proxy.Place;
import com.gwtplatform.mvp.client.proxy.PlaceManager;
@@ -57,7 +58,8 @@
* The proxy type used by this presenter.
*/
@ProxyCodeSplit
-// @NameToken(NameTokens.COMPONENT_CONFIG_PRESENTER)
+ @NameToken(NameTokens.SYSTEM_CONFIG_PRESENTER)
+ @SubsystemExtension(name = "Runtime Details", group = "SwitchYard", key = "switchyard")
public interface MyProxy extends Proxy<ComponentPresenter>, Place {
}
@@ -108,7 +110,6 @@
}
private final PlaceManager _placeManager;
- private final RevealStrategy _revealStrategy;
private final SwitchYardStore _switchYardStore;
private final PresenterFactory _factory;
private ComponentConfigurationPresenter _presenterWidget;
@@ -120,17 +121,15 @@
* @param view the injected MyView.
* @param proxy the injected MyProxy.
* @param placeManager the injected PlaceManager.
- * @param revealStrategy the RevealStrategy
* @param switchYardStore the injected SwitchYardStore.
* @param factory the PresenterFactory for specialized component presenters.
*/
@Inject
public ComponentPresenter(EventBus eventBus, MyView view, MyProxy proxy, PlaceManager placeManager,
- RevealStrategy revealStrategy, SwitchYardStore switchYardStore, PresenterFactory factory) {
+ SwitchYardStore switchYardStore, PresenterFactory factory) {
super(eventBus, view, proxy);
_placeManager = placeManager;
- _revealStrategy = revealStrategy;
_switchYardStore = switchYardStore;
_factory = factory;
}
@@ -152,7 +151,7 @@ protected void onReset() {
@Override
protected void revealInParent() {
- RevealContentEvent.fire(getEventBus(), ConfigPresenter.TYPE_COMPONENT_CONTENT, this);
+ RevealContentEvent.fire(this, ConfigPresenter.TYPE_COMPONENT_CONTENT, this);
}
private void loadComponent(String componentName) {
View
2 gwt/src/main/java/org/switchyard/console/client/ui/config/ConfigPresenter.java
@@ -32,11 +32,11 @@
import org.switchyard.console.components.client.ui.ComponentConfigurationPresenter;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.ContentSlot;
View
28 gwt/src/main/java/org/switchyard/console/client/ui/metrics/MetricsPresenter.java
@@ -22,21 +22,21 @@
import java.util.List;
import org.jboss.as.console.client.Console;
-import org.jboss.as.console.client.domain.model.ServerInstance;
-import org.jboss.as.console.client.shared.state.CurrentServerSelection;
-import org.jboss.as.console.client.shared.state.ServerSelectionEvent;
+import org.jboss.as.console.client.plugins.RuntimeGroup;
+import org.jboss.as.console.client.shared.state.ServerSelectionChanged;
import org.jboss.as.console.client.shared.subsys.RevealStrategy;
+import org.jboss.as.console.spi.RuntimeExtension;
import org.jboss.ballroom.client.layout.LHSHighlightEvent;
import org.switchyard.console.client.NameTokens;
import org.switchyard.console.client.model.MessageMetrics;
import org.switchyard.console.client.model.ServiceMetrics;
import org.switchyard.console.client.model.SwitchYardStore;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
@@ -54,7 +54,7 @@
* @author Rob Cernich
*/
public class MetricsPresenter extends Presenter<MetricsPresenter.MyView, MetricsPresenter.MyProxy> implements
- ServerSelectionEvent.ServerSelectionListener {
+ ServerSelectionChanged.ChangeListener {
/**
* MyProxy
@@ -63,6 +63,7 @@
*/
@ProxyCodeSplit
@NameToken(NameTokens.METRICS_PRESENTER)
+ @RuntimeExtension(name = NameTokens.RUNTIME_TEXT, group = RuntimeGroup.METRICS, key = NameTokens.SUBSYSTEM)
public interface MyProxy extends Proxy<MetricsPresenter>, Place {
}
@@ -106,7 +107,6 @@
private final PlaceManager _placeManager;
private final RevealStrategy _revealStrategy;
- private final CurrentServerSelection _serverSelection;
private final SwitchYardStore _switchYardStore;
private String _serviceName;
@@ -118,17 +118,15 @@
* @param proxy the injected MyProxy.
* @param placeManager the injected PlaceManager.
* @param revealStrategy the RevealStrategy
- * @param serverSelection the server selection
* @param switchYardStore the injected SwitchYardStore.
*/
@Inject
public MetricsPresenter(EventBus eventBus, MyView view, MyProxy proxy, PlaceManager placeManager,
- RevealStrategy revealStrategy, CurrentServerSelection serverSelection, SwitchYardStore switchYardStore) {
+ RevealStrategy revealStrategy, SwitchYardStore switchYardStore) {
super(eventBus, view, proxy);
_placeManager = placeManager;
_revealStrategy = revealStrategy;
- _serverSelection = serverSelection;
_switchYardStore = switchYardStore;
}
@@ -148,7 +146,7 @@ public void onServiceSelected(ServiceMetrics serviceMetrics) {
}
@Override
- public void onServerSelection(String hostName, final ServerInstance server) {
+ public void onServerSelectionChanged(boolean isRunning) {
getView().clearMetrics();
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@@ -165,7 +163,7 @@ public void execute() {
protected void onBind() {
super.onBind();
getView().setPresenter(this);
- getEventBus().addHandler(ServerSelectionEvent.TYPE, this);
+ getEventBus().addHandler(ServerSelectionChanged.TYPE, this);
}
@Override
@@ -200,12 +198,8 @@ protected void revealInParent() {
}
private void loadMetrics() {
- if (!_serverSelection.isActive()) {
- Console.warning(Console.CONSTANTS.common_err_server_not_active());
- getView().setServices(null);
- getView().clearMetrics();
- return;
- }
+ getView().setServices(null);
+ getView().clearMetrics();
loadSystemMetrics();
loadServicesList();
loadServiceMetrics();
View
17 gwt/src/main/java/org/switchyard/console/client/ui/runtime/RuntimePresenter.java
@@ -19,24 +19,24 @@
package org.switchyard.console.client.ui.runtime;
-import org.jboss.as.console.client.domain.model.ServerInstance;
-import org.jboss.as.console.client.shared.state.ServerSelectionEvent;
+import org.jboss.as.console.client.plugins.RuntimeGroup;
+import org.jboss.as.console.client.shared.state.ServerSelectionChanged;
import org.jboss.as.console.client.shared.subsys.RevealStrategy;
+import org.jboss.as.console.spi.RuntimeExtension;
import org.jboss.ballroom.client.layout.LHSHighlightEvent;
import org.switchyard.console.client.NameTokens;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent.Type;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.RequestTabsHandler;
import com.gwtplatform.mvp.client.TabContainerPresenter;
import com.gwtplatform.mvp.client.TabView;
import com.gwtplatform.mvp.client.annotations.ContentSlot;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
import com.gwtplatform.mvp.client.annotations.RequestTabs;
-import com.gwtplatform.mvp.client.proxy.Place;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.gwtplatform.mvp.client.proxy.RevealContentHandler;
@@ -48,16 +48,17 @@
* @author Rob Cernich
*/
public class RuntimePresenter extends TabContainerPresenter<RuntimePresenter.MyView, RuntimePresenter.MyProxy>
- implements ServerSelectionEvent.ServerSelectionListener {
+ implements ServerSelectionChanged.ChangeListener {
/**
* MyProxy
*
* The proxy type associated with this presenter.
*/
@ProxyCodeSplit
- @NameToken(NameTokens.RUNTIME_PRESENTER)
- public interface MyProxy extends Proxy<RuntimePresenter>, Place {
+ @NameToken(NameTokens.RUNTIME_OPERATIONS_PRESENTER)
+ @RuntimeExtension(name = NameTokens.RUNTIME_TEXT, group = RuntimeGroup.OPERATiONS, key = NameTokens.SUBSYSTEM)
+ public interface MyProxy extends Proxy<RuntimePresenter> {
}
/**
@@ -111,7 +112,7 @@ public RuntimePresenter(EventBus eventBus, MyView view, MyProxy proxy, RevealStr
}
@Override
- public void onServerSelection(String hostName, final ServerInstance server) {
+ public void onServerSelectionChanged(boolean isRunning) {
// getView().refreshTabs();
}
View
5 gwt/src/main/java/org/switchyard/console/client/ui/runtime/RuntimeView.java
@@ -81,6 +81,11 @@ public void setActiveTab(Tab tab) {
}
@Override
+ public void changeTab(Tab tab, TabData tabData, String historyToken) {
+ _tabPanel.changeTab(tab, tabData, historyToken);
+ }
+
+ @Override
public void setInSlot(Object slot, Widget content) {
if (slot == RuntimePresenter.TYPE_SET_TAB_CONTENT) {
_tabPanel.setContent(content);
View
2 gwt/src/main/java/org/switchyard/console/client/ui/service/ServicePresenter.java
@@ -29,10 +29,10 @@
import org.switchyard.console.client.ui.runtime.RuntimePresenter;
import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
+import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
View
1 pom.xml
@@ -34,7 +34,6 @@
<name>SwitchYard: Console Parent</name>
<description>SwitchYard Management Console parent project.</description>
<modules>
- <module>as7-core</module>
<module>component</module>
<module>gwt</module>
<module>app</module>

0 comments on commit 0111016

Please sign in to comment.
Something went wrong with that request. Please try again.