[jbpm-commits] JBoss JBPM SVN: r4864 - in projects/gwt-console/trunk/gui: profiles/jbpm/src/main/resources/org/jboss/bpm/console/public and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed May 20 17:27:47 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-05-20 17:27:46 -0400 (Wed, 20 May 2009)
New Revision: 4864
Added:
projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/drools_logo.png
projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/jbpm_logo.png
Removed:
projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/images/
projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/images/jbpm_logo.png
Modified:
projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/console.config.js
projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/console.config.js
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
Log:
Fix JBPM-2271. Fix ui profile logo in final webapp.
Modified: projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/console.config.js
===================================================================
--- projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/console.config.js 2009-05-20 20:04:49 UTC (rev 4863)
+++ projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/console.config.js 2009-05-20 21:27:46 UTC (rev 4864)
@@ -1,8 +1,7 @@
var consoleConfig = {
profileName: "DroolsFlow Console",
- logo: "images/drools_logo.png",
- consoleServerUrl: "http://localhost:8080/gwt-console-server",
- reportServerUrl: "http://localhost:8080/report-server",
+ logo: "drools_logo.png",
+ serverWebContext: "/gwt-console-server",
overviewReportFile: "process_activity.rptdesign",
definitionReportFile: "definition_report.rptdesign",
instanceReportFile: "instance_report.rptdesign"
Copied: projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/drools_logo.png (from rev 4862, projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/images/drools_logo.png)
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/profiles/drools/src/main/resources/org/jboss/bpm/console/public/drools_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/console.config.js
===================================================================
--- projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/console.config.js 2009-05-20 20:04:49 UTC (rev 4863)
+++ projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/console.config.js 2009-05-20 21:27:46 UTC (rev 4864)
@@ -1,8 +1,7 @@
var consoleConfig = {
profileName: "jBPM Console",
- logo: "images/jbpm_logo.png",
- consoleServerUrl: "http://localhost:8080/gwt-console-server",
- reportServerUrl: "http://localhost:8080/report-server",
+ logo: "jbpm_logo.png",
+ serverWebContext: "/gwt-console-server",
overviewReportFile: "process_activity.rptdesign",
definitionReportFile: "definition_report.rptdesign",
instanceReportFile: "instance_report.rptdesign"
Deleted: projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/images/jbpm_logo.png
===================================================================
(Binary files differ)
Copied: projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/jbpm_logo.png (from rev 4862, projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/images/jbpm_logo.png)
===================================================================
(Binary files differ)
Property changes on: projects/gwt-console/trunk/gui/profiles/jbpm/src/main/resources/org/jboss/bpm/console/public/jbpm_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-05-20 20:04:49 UTC (rev 4863)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java 2009-05-20 21:27:46 UTC (rev 4864)
@@ -28,15 +28,12 @@
import com.google.gwt.core.client.GWT;
import com.mvc4g.client.Controller;
import com.mvc4g.client.ViewInterface;
-import org.gwt.mosaic.forms.client.builder.DefaultFormBuilder;
-import org.gwt.mosaic.forms.client.layout.FormLayout;
import org.gwt.mosaic.ui.client.WindowPanel;
import org.gwt.mosaic.ui.client.layout.*;
import org.jboss.bpm.console.client.Authentication;
import org.jboss.bpm.console.client.ConsoleConfig;
import org.jboss.bpm.console.client.URLBuilder;
import org.jboss.bpm.console.client.MainLayout;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
import org.jboss.bpm.console.client.util.ConsoleLog;
/**
@@ -63,15 +60,23 @@
config = new ConsoleConfig();
// setup
-
if (!GWT.isScript())
{
String proxyUrl = GWT.getModuleBaseURL() + "xhp";
config.setConsoleServerUrl(proxyUrl);
}
+ else
+ {
+ // extract host
+ String base = GWT.getHostPageBaseURL();
+ String protocol = base.substring(0, base.indexOf("//")+2);
+ String noProtocol = base.substring(base.indexOf(protocol)+protocol.length(), base.length());
+ String host = noProtocol.substring(0, noProtocol.indexOf("/"));
+ config.setConsoleServerUrl(protocol + host + config.getServerWebContext());
+ }
+
ConsoleLog.debug("Console server: " + config.getConsoleServerUrl());
- ConsoleLog.debug("Report server: " + config.getReportServerUrl());
urlBuilder = new URLBuilder(config);
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-05-20 20:04:49 UTC (rev 4863)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java 2009-05-20 21:27:46 UTC (rev 4864)
@@ -38,8 +38,7 @@
*/
public class ConsoleConfig
{
- private String consoleServerUrl;
- private String reportServerUrl;
+ private String serverWebContext;
private String overviewReportFile;
private String definitionReportFile;
@@ -48,21 +47,16 @@
private String profileName;
private String logo;
- public ConsoleConfig(String consoleServerUrl, String reportServerUrl)
- {
- this.consoleServerUrl = consoleServerUrl;
- this.reportServerUrl = reportServerUrl;
- }
+ private String consoleServerUrl;
public ConsoleConfig()
{
Dictionary theme = Dictionary.getDictionary("consoleConfig");
profileName = theme.get("profileName");
logo = theme.get("logo");
-
- consoleServerUrl = theme.get("consoleServerUrl");
- reportServerUrl = theme.get("reportServerUrl");
+ serverWebContext = theme.get("serverWebContext");
+
overviewReportFile = theme.get("overviewReportFile");
definitionReportFile = theme.get("definitionReportFile");
instanceReportFile = theme.get("instanceReportFile");
@@ -80,6 +74,8 @@
public String getConsoleServerUrl()
{
+ if(consoleServerUrl ==null)
+ throw new RuntimeException("Config not properly setup: console server URL is null");
return consoleServerUrl;
}
@@ -88,15 +84,15 @@
this.consoleServerUrl = consoleServerUrl;
}
- public String getReportServerUrl()
+ public String getServerWebContext()
{
- return reportServerUrl;
+ return serverWebContext;
}
- public void setReportServerUrl(String reportServerUrl)
+ public void setServerWebContext(String serverWebContext)
{
- this.reportServerUrl = reportServerUrl;
- }
+ this.serverWebContext = serverWebContext;
+ }
public String getOverviewReportFile()
{
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-05-20 20:04:49 UTC (rev 4863)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-05-20 21:27:46 UTC (rev 4864)
@@ -38,20 +38,16 @@
this.config = config;
}
- public String getConsoleServerUrl()
- {
- return config.getConsoleServerUrl();
- }
public String getProcessDefinitionsURL()
{
- return getConsoleServerUrl() + "/rs/process/definitions";
+ return config.getConsoleServerUrl() + "/rs/process/definitions";
}
public String getProcessInstancesURL(String processId)
{
String encodedId = URL.encode(processId);
- return getConsoleServerUrl() + "/rs/process/definitions/" + encodedId + "/instances";
+ return config.getConsoleServerUrl() + "/rs/process/definitions/" + encodedId + "/instances";
}
public String getUserInRoleURL(String[] possibleRoles)
@@ -63,124 +59,124 @@
if (i < possibleRoles.length - 1)
sb.append(",");
}
- return getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
+ return config.getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
}
public String getServerStatusURL()
{
- return getConsoleServerUrl() + "/rs/server/status";
+ return config.getConsoleServerUrl() + "/rs/server/status";
}
@Deprecated
public String getRemoveDefinitionURL(String processId)
{
String encodedId = URL.encode(processId);
- return getConsoleServerUrl() + "/rs/process/definitions/" + encodedId+ "/remove";
+ return config.getConsoleServerUrl() + "/rs/process/definitions/" + encodedId+ "/remove";
}
public String getProcessImageURL(String processId)
{
String encodedId = URL.encode(processId);
- return getConsoleServerUrl() + "/rs/jbpm3/definitions/" + encodedId+ "/image";
+ return config.getConsoleServerUrl() + "/rs/jbpm3/definitions/" + encodedId+ "/image";
}
public String getActiveNodeInfoURL(String instanceId)
{
- return getConsoleServerUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
+ return config.getConsoleServerUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
}
public String getStateChangeURL(String instanceId, ProcessInstanceRef.STATE state)
{
- return getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/state/" + state;
+ return config.getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/state/" + state;
}
public String getInstanceEndURL(String instanceId, ProcessInstanceRef.RESULT result)
{
- return getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/end/" + result;
+ return config.getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/end/" + result;
}
public String getInstanceDeleteURL(String instanceId)
{
- return getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/delete";
+ return config.getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/delete";
}
public String getStartNewInstanceURL(String processId)
{
String encodedID = URL.encode(processId);
- return getConsoleServerUrl() + "/rs/process/definitions/" + encodedID + "/instances/new";
+ return config.getConsoleServerUrl() + "/rs/process/definitions/" + encodedID + "/instances/new";
}
public String getUploadDefinitionURL()
{
- return getConsoleServerUrl() + "/rs/process/definitions/new";
+ return config.getConsoleServerUrl() + "/rs/process/definitions/new";
}
public String getTaskListURL(String idRef)
{
- return getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef);
+ return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef);
}
public String getParticipationTaskListURL(String idRef)
{
- return getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef) +"/participation";
+ return config.getConsoleServerUrl() + "/rs/tasks/" + URL.encode(idRef) +"/participation";
}
public String getTaskReleaseURL(long id)
{
- return getConsoleServerUrl() + "/rs/task/" + id + "/release";
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/release";
}
public String getTaskCompleteURL(long id)
{
- return getConsoleServerUrl() + "/rs/task/" + id + "/close";
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/close";
}
public String getTaskCompleteURL(long id, String outcome)
{
- return getConsoleServerUrl() + "/rs/task/" + id + "/close/" + URL.encode(outcome);
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/close/" + URL.encode(outcome);
}
public String getTaskAssignURL(long id, String idRef)
{
- return getConsoleServerUrl() + "/rs/task/" + id + "/assign/" + URL.encode(idRef);
+ return config.getConsoleServerUrl() + "/rs/task/" + id + "/assign/" + URL.encode(idRef);
}
public String getExecutionSignalUrl(TokenReference tok)
{
- return getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition/default";
+ return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition/default";
}
public String getExecutionSignalUrl(TokenReference tok, String signal)
{
String encodedSignal = URL.encode(signal);
- return getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
+ return config.getConsoleServerUrl() + "/rs/process/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
}
public String getAvailableActorsUrl(String actorId)
{
- return getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
+ return config.getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
}
public String getProcessDefinitionByNameURL(String name)
{
- return getConsoleServerUrl() + "/rs/process/definitions/" + name;
+ return config.getConsoleServerUrl() + "/rs/process/definitions/" + name;
}
public String getDeployTestHarnessUrl()
{
- return getConsoleServerUrl() + "/rs/test/deploy/harness";
+ return config.getConsoleServerUrl() + "/rs/test/deploy/harness";
}
public String getUndeployTestHarnessUrl()
{
- return getConsoleServerUrl() + "/rs/test/undeploy/harness";
+ return config.getConsoleServerUrl() + "/rs/test/undeploy/harness";
}
public String getOverviewReportUrl()
{
String name = URL.encode(config.getOverviewReportFile());
- String url = config.getReportServerUrl() + "/rs/report/view/" + name;
+ String url = config.getConsoleServerUrl() + "/rs/report/view/" + name;
if (!GWT.isScript())
url += "?id=birt";
return url;
@@ -190,7 +186,7 @@
{
String reportName = URL.encode(name);
String reportFileName = URL.encode(config.getDefinitionReportFile());
- String url = config.getReportServerUrl() + "/rs/report/view/" + reportFileName + "?name=" + reportName;
+ String url = config.getConsoleServerUrl() + "/rs/report/view/" + reportFileName + "?name=" + reportName;
if (!GWT.isScript())
url += "&id=birt";
return url;
More information about the jbpm-commits
mailing list