Skip to content

Commit

Permalink
Merge branch 'i245-context' into release-1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Apr 28, 2011
2 parents ba5d969 + 67efd2a commit 2fae883
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public WebserviceFormAuthenticator(final String basePath, final String username,
}

String getInitialPath() {
return getBasePath() + "/menu/index";
return "/menu/index";
}

boolean isValidLoginRedirect(final HttpMethod method) {
Expand Down
1 change: 1 addition & 0 deletions rundeckapp/etc/config-defaults.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ server.hostname=localhost
server.http.port=4440
server.https.port=4443
server.reportservice.port=4435
server.web.context=
server.datastore.path=rundeck/data/grailsdb
default.admin.name=admin
default.admin.password=admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ loglevel.default=INFO

#rss.enabled if set to true enables RSS feeds that are public (non-authenticated)
rss.enabled=true
grails.serverURL=http://${server.hostname}:${server.http.port}
grails.serverURL=http://${server.hostname}:${server.http.port}${server.web.context}
dataSource.dbCreate = update
dataSource.url = jdbc:hsqldb:file:${server.datastore.path};shutdown=true

Expand Down
5 changes: 3 additions & 2 deletions rundeckapp/grails-app/conf/BootStrap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ class BootStrap {
URL url = new URL(grailsApplication.config.grails.serverURL)
hostname=url.getHost()
port=url.getPort().toString()
setup.getParameters().properties["framework.server.url"]=url.toExternalForm()
setup.getParameters().properties["framework.rundeck.url"]=url.toExternalForm()
def urlstr= url.toExternalForm().replaceAll('/+$','')
setup.getParameters().properties["framework.server.url"]=urlstr
setup.getParameters().properties["framework.rundeck.url"]= urlstr
}else{
//determine hostname
hostname=InetAddress.getLocalHost().getHostName()
Expand Down
2 changes: 0 additions & 2 deletions rundeckapp/grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ gui.menu.Admin=Admin

domain.ScheduledExecution.title=Job

app.wiki.help=/docs

BaseNodeFilters.title.project=Project
BaseNodeFilters.title.nodeInclude=Hostname
BaseNodeFilters.title.nodeIncludeName=Name
Expand Down
4 changes: 2 additions & 2 deletions rundeckapp/grails-app/views/common/_topbar.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ function doCreateProject(){
</span> &raquo;
<g:link action="logout" controller="user" title="Logout user: ${session.user}" params="${[refLink:controllerName&&actionName?createLink(controller:controllerName,action:actionName,params:params,absolute:true):'']}">logout</g:link>
</span>
<a href="${g.message(code:'app.wiki.help')}" class="help">
<a href="${resource(dir:'docs')}" class="help">
help
<img src="${resource(dir:'images',file:'icon-small-help.png')}" width="16px" height="16px" alt=""/>
</a>
</span>
</g:if>
<g:else>
<span class="headright">
<a href="${g.message(code:'app.wiki.help')}" class="help">
<a href="${resource(dir: 'docs')}" class="help">
help
<img src="${resource(dir:'images',file:'icon-small-help.png')}" width="16px" height="16px" alt=""/>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div>
<label class="left ${hasErrors(bean:option,field:'valuesUrl','fieldError')}"><g:radio name="valuesType" value="url" checked="${option?.valuesUrl || option?.valuesUrlString || params.valuesType=='url'?true:false}" id="vtrurl_${rkey}"/> Remote URL:</label>
<input type="url" class="right" name="valuesUrl" value="${option?.valuesUrlString? option.valuesUrlString : option?.valuesUrl }" size="60" placeholder="Remote URL" id="vurl_${rkey}"/>
<div class="info note right">A URL to a Remote JSON service. See <a href="${g.message(code:'app.wiki.help')}/RunDeck-Guide.html#option-model-provider" target="_blank">RunDeck Guide - Option model provider</a></div>
<div class="info note right">A URL to a Remote JSON service. See <a href="${resource(dir: 'docs')}/RunDeck-Guide.html#option-model-provider" target="_blank">RunDeck Guide - Option model provider</a></div>
<wdgt:eventHandler for="vurl_${rkey}" state="unempty" target="vtrurl_${rkey}" check="true" inline="true" action="keydown"/>
<wdgt:eventHandler for="vtrurl_${rkey}" state="unempty" target="vurl_${rkey}" focus="true" inline="true"/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class ExpandRunServer {
"server.https.port",
"server.hostname",
"server.reportservice.port",
"server.web.context",
"rdeck.base",
SERVER_DATASTORE_PATH,
"default.user.name",
Expand Down
5 changes: 4 additions & 1 deletion rundeckapp/src/java/com/dtolabs/rundeck/RunServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class RunServer {
File serverdir;
private static final String REALM_NAME = "rundeckrealm";
private static final String SYS_PROP_LOGIN_MODULE = "loginmodule.name";
public static final String SYS_PROP_WEB_CONTEXT = "server.web.context";
File configdir;
String loginmodulename;
private boolean useJaas;
Expand All @@ -52,6 +53,7 @@ public class RunServer {
private String keyPassword;
private String truststore;
private String truststorePassword;
private String appContext;
private static final String RUNDECK_SERVER_SERVER_DIR = "rundeck.server.serverDir";
private static final String RUNDECK_SERVER_CONFIG_DIR = "rundeck.server.configDir";

Expand All @@ -62,6 +64,7 @@ public static void main(final String[] args) throws Exception {
public RunServer() {
useJaas = null == System.getProperty(RUNDECK_JAASLOGIN) || Boolean.getBoolean(RUNDECK_JAASLOGIN);
loginmodulename = System.getProperty(SYS_PROP_LOGIN_MODULE, "rundecklogin");
appContext = System.getProperty(SYS_PROP_WEB_CONTEXT, "/");
}

/**
Expand Down Expand Up @@ -195,7 +198,7 @@ private WebAppContext createWebAppContext(final File webapp) throws IOException
if (!webapp.isDirectory() || !new File(webapp, "WEB-INF").isDirectory()) {
throw new RuntimeException("expected expanded webapp at location: " + webapp.getAbsolutePath());
}
final WebAppContext context = new WebAppContext(webapp.getAbsolutePath(), "/");
final WebAppContext context = new WebAppContext(webapp.getAbsolutePath(), appContext);
context.setTempDirectory(new File(serverdir, "work"));
return context;
}
Expand Down

0 comments on commit 2fae883

Please sign in to comment.