incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r419991 - in /incubator/lokahi/lokahi/trunk/src: java/org/apache/lokahi/core/agent/callable/tomcat/ java/org/apache/lokahi/core/agent/task/ java/org/apache/lokahi/core/api/server/ java/org/apache/lokahi/core/controller/task/ java/org/apache...
Date Fri, 07 Jul 2006 21:16:44 GMT
Author: toback
Date: Fri Jul  7 14:16:42 2006
New Revision: 419991

URL: http://svn.apache.org/viewvc?rev=419991&view=rev
Log:
added the stub job task and callable for the agent to update it's database of jvm information.

Some small changes to conditions for deletion, and updates.

Added the job updateTomcat to the deployment of jvm.conf files so the agent is triggered to update it's internal database.


Added:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java   (with props)
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java   (with props)
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm   (with props)
Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/server/HardwareModel.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/task/BuildDeployApacheConfig.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/EnvironmentAction.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/InstanceAction.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/entity/VirtualHostModel.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/worker/ApacheWorkerModel.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/gui/www/ApacheWorkerAction.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/ContextAction.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/TomcatWorkerAction.java
    incubator/lokahi/lokahi/trunk/src/www/Apache/Entity/modify.vm
    incubator/lokahi/lokahi/trunk/src/www/Apache/Worker/update.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/add.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/delete.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/details.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/list.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/indiv.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/update.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/File/add.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Instance/add.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Instance/confirm.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/add.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/delete.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deployapacheconf.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deploytomcatconf.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/details.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/list.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/menu/indiv.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Pool/update.vm

Added: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java?rev=419991&view=auto
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java (added)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java Fri Jul  7 14:16:42 2006
@@ -0,0 +1,33 @@
+/*
+* Copyright 2006  The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.lokahi.core.agent.callable.tomcat;
+
+import java.util.concurrent.Callable;
+
+/**
+ * @author Stephen Toback
+ * @version $Id$
+ */
+public class UpdateTomcatCallable  implements Callable<Boolean> {
+
+  public UpdateTomcatCallable() {
+  }
+
+  public Boolean call() throws Exception {
+    //todo load the file
+    return true;
+  }
+}

Propchange: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/callable/tomcat/UpdateTomcatCallable.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java?rev=419991&view=auto
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java (added)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java Fri Jul  7 14:16:42 2006
@@ -0,0 +1,48 @@
+/*
+* Copyright 2006  The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.lokahi.core.agent.task;
+
+import org.apache.lokahi.core.agent.AbstractAgentTask;
+import org.apache.lokahi.core.agent.callable.tomcat.UpdateTomcatCallable;
+import org.apache.lokahi.core.agent.util.TMCTaskException;
+import org.apache.lokahi.core.agent.dao.AgentJob;
+
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.ExecutionException;
+
+/**
+ * @author Stephen Toback
+ * @version $Id$
+ */
+public class UpdateTomcatTask extends AbstractAgentTask<Boolean> {
+
+  public UpdateTomcatTask(AgentJob j) {
+    this.setJobId(j.getPk());
+    this.setType(j.getType());
+    this.task = new FutureTask<Boolean>(new UpdateTomcatCallable());
+  }
+
+  public UpdateTomcatTask() {
+  }
+
+  public String getResult() throws TMCTaskException, ExecutionException, InterruptedException {
+    String ret = "Jvn info updated";
+    if (task.get())
+      ret = "JVM info failed to update.";
+    return ret;
+  }
+
+}

Propchange: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/task/UpdateTomcatTask.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/server/HardwareModel.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/server/HardwareModel.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/server/HardwareModel.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/server/HardwareModel.java Fri Jul  7 14:16:42 2006
@@ -105,8 +105,10 @@
 
   public void deployJvmConf(User u, Hardware h, JobPool jobPool) throws SQLException, IOException {
     Function f = Function.getFunction("PutFile");
-    Job j = new Job("/www/tmc/agent/jvm.conf", h, f, jobPool);
+    Job j = new Job("./jvm.conf", h, f, jobPool);
     j.setResult(this.buildJvmConf(h));
+    j = Job.store(j);
+    j = new Job(j, "", h, Function.getFunction("UpdateTomcat"), jobPool);
     Job.store(j);
   }
 

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/task/BuildDeployApacheConfig.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/task/BuildDeployApacheConfig.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/task/BuildDeployApacheConfig.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/task/BuildDeployApacheConfig.java Fri Jul  7 14:16:42 2006
@@ -19,6 +19,7 @@
 import org.apache.lokahi.core.api.function.Function;
 import org.apache.lokahi.core.api.job.Job;
 import org.apache.lokahi.core.api.jobpool.JobPool;
+import org.apache.lokahi.core.common.util.PropertiesFile;
 import org.apache.lokahi.httpd.api.worker.ApacheWorker;
 import org.apache.lokahi.httpd.api.worker.ApacheWorkerModel;
 
@@ -55,10 +56,10 @@
     try {
       Function f = Function.getFunction("PutFile");
       ApacheWorkerModel awm = new ApacheWorkerModel();
-      Job j = new Job(prereq, aw.getApache().getServerRoot() + "/conf/httpsd.conf", aw.getHardware(), f, jp);
+      Job j = new Job(prereq, aw.getApache().getServerRoot() + "/conf/" + PropertiesFile.getConstantValue("ApacheConfFile"), aw.getHardware(), f, jp);
       j.setResult(awm.buildConf(aw));
       j = Job.store(j);
-      j = new Job(j, aw.getApache().getServerRoot() + "/conf/workers.properties", aw.getHardware(), f, jp);
+      j = new Job(j, aw.getApache().getServerRoot() + "/conf/" + PropertiesFile.getConstantValue("WorkersProperties"), aw.getHardware(), f, jp);
       j.setResult(awm.buildWorkerProperties(aw));
       j = Job.store(j);
       if (j != null && graceful) {

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/EnvironmentAction.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/EnvironmentAction.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/EnvironmentAction.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/EnvironmentAction.java Fri Jul  7 14:16:42 2006
@@ -87,7 +87,7 @@
     if (name != null && !"".equals(name)) {
       e.setName(name);
     }
-    if (comment != null && !"".equals(comment)) {
+    if (comment != null) {
       e.setComment(comment);
     }
     return e;

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/InstanceAction.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/InstanceAction.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/InstanceAction.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/gui/www/InstanceAction.java Fri Jul  7 14:16:42 2006
@@ -87,7 +87,7 @@
     if (name != null && !"".equals(name)) {
       i.setName(name);
     }
-    if (comment != null && !"".equals(comment)) {
+    if (comment != null) {
       i.setComments(comment);
     }
     return i;

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/entity/VirtualHostModel.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/entity/VirtualHostModel.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/entity/VirtualHostModel.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/entity/VirtualHostModel.java Fri Jul  7 14:16:42 2006
@@ -82,7 +82,7 @@
   public void updateVirtualHost(User u, VirtualHost vh, Function f) throws AuthorizationException, TMCIllegalArgumentException, SQLException, IOException, TMCIllegalArgumentException {
     this.jpInit(f, u, vh.getName());
     if (u.isAllowed(f) && "UpdateVirtualHost".equals(f.getCommand())) {
-      if (vh.getPk() > 1 && vh.getName() != null && !"".equals(vh.getName())) {
+      if (vh.getPk() >= 1 && vh.getName() != null && !"".equals(vh.getName())) {
         VirtualHost.update(vh);
         HostingPool hp = vh.getHostingPool();
         ApachePool ap = hp.getApachePool();

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/worker/ApacheWorkerModel.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/worker/ApacheWorkerModel.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/worker/ApacheWorkerModel.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/api/worker/ApacheWorkerModel.java Fri Jul  7 14:16:42 2006
@@ -60,6 +60,21 @@
 //    }
 //  }
 
+  public void updateApacheWorker(User u, ApacheWorker aw, Function f) throws AuthorizationException, TMCIllegalArgumentException, SQLException, IOException, TMCIllegalArgumentException {
+	  this.jpInit(f, u, aw.getName());
+	  if (u.isAllowed(f) && "UpdateApacheWorker".equals(f.getCommand())) {
+		  	if (aw.getPk() >= 1 && aw.getName() != null && !"".equals(aw.getName())) {
+		  		ApacheWorker.update(aw);
+		  	} else {
+		  		throw new TMCIllegalArgumentException("ApacheWorker can not be null");
+		  	}
+	  } else {
+		  throw new AuthorizationException("User " + u.getName() + " Not allowed to " + f.getName());
+	  }
+	  jp.setState(State.COMPLETE);
+	  JobPool.update(jp);
+  }
+  
   public void gracefulApache(User u, Project p, ApacheWorker aw) throws SQLException, IOException, TMCIllegalArgumentException, AuthorizationException {
     this.gracefulApache(u, p, null, aw);
   }

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/gui/www/ApacheWorkerAction.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/gui/www/ApacheWorkerAction.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/gui/www/ApacheWorkerAction.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/httpd/gui/www/ApacheWorkerAction.java Fri Jul  7 14:16:42 2006
@@ -42,10 +42,15 @@
   public ActionMessages executeFunctions(DynaValidatorForm form, Function f, User user) {
     ActionMessages messages = new ActionMessages();
     try {
-      Collection<ApacheWorker> c = getMultiTemplate(form);
       ApacheWorkerModel awm = new ApacheWorkerModel();
-      awm.perform(f, new Class[]{user.getClass(), Collection.class, f.getClass()}, new Object[]{user, c, f});
-      messages = this.addMessage(messages, SUCCESS_MESSAGE, new ActionMessage("function.success." + f.getCommand()));
+      if ("AddApacheWorker".equalsIgnoreCase(f.getCommand()) || "UpdateApacheWorker".equalsIgnoreCase(f.getCommand())) {
+    	  ApacheWorker a = getTemplate(form);
+    	  awm.perform(f, new Class[]{user.getClass(), a.getClass(), f.getClass()}, new Object[]{user, a, f});
+      }
+      else {
+    	  Collection<ApacheWorker> c = getMultiTemplate(form);
+    	  awm.perform(f, new Class[]{user.getClass(), Collection.class, f.getClass()}, new Object[]{user, c, f});
+      }
     } catch (AuthorizationException e) {
       messages = this.addMessage(messages, new ActionMessage("error.notAuthorized"));
       if (logger.isInfoEnabled()) {

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/api/worker/TomcatWorkerModel.java Fri Jul  7 14:16:42 2006
@@ -81,6 +81,21 @@
     }
   }
 
+  public void updateTomcatWorker(User u, TomcatWorker tw, Function f) throws SQLException, AuthorizationException, TMCIllegalArgumentException {
+	  this.jpInit(f, u, tw.getName());
+	  if (u.isAllowed(f) && "UpdateTomcatWorker".equals(f.getCommand())) {
+		  if (tw.getPk() >= 1 && tw.getName() != null && !"".equals(tw.getName())) {
+			  TomcatWorker.update(tw);
+		  } else {
+	        throw new TMCIllegalArgumentException("TomcatWorker can not be null");
+	      }
+	  } else {
+		  throw new AuthorizationException("User " + u.getName() + " Not allowed to " + f.getName());
+	  }
+	  jp.setState(State.COMPLETE);
+	  JobPool.update(jp);
+  }
+  
   public void stopTomcat(User u, Collection<TomcatWorker> c, Function f) throws TMCException, TMCIllegalArgumentException, SQLException, NoSuchMethodException, IOException {
     Method m = TomcatWorkerModel.class.getMethod("stopTomcat", User.class, Project.class, JobPool.class, TomcatWorker.class);
     tomcatFunction(m, u, c, f);

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/ContextAction.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/ContextAction.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/ContextAction.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/ContextAction.java Fri Jul  7 14:16:42 2006
@@ -120,7 +120,7 @@
   public void update(DynaValidatorForm form, Function f, User u, TomcatContextModel tcm) throws SQLException, IOException, TMCIllegalArgumentException, AlreadyExistException, AuthorizationException {
     TomcatContext tc = TomcatContext.getTomcatContext(Integer.parseInt((String) form.get("contextId")));
     Project p = null;
-    if (!"-1".equals(form.get("projectId")))
+    if (!"".equals(form.get("projectId")))
       p = Project.getProject(Integer.parseInt((String) form.get("projectId")));
     tc.setName((String) form.get("contextName"));
     tc.setDocBase((String) form.get("docBase"));

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/TomcatWorkerAction.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/TomcatWorkerAction.java?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/TomcatWorkerAction.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/tomcat/gui/www/TomcatWorkerAction.java Fri Jul  7 14:16:42 2006
@@ -42,10 +42,14 @@
   public ActionMessages executeFunctions(DynaValidatorForm form, Function f, User user) {
     ActionMessages messages = new ActionMessages();
     try {
-      Collection<TomcatWorker> c = getMultiTemplate(form);
       TomcatWorkerModel twm = new TomcatWorkerModel();
-      twm.perform(f, new Class[]{user.getClass(), Collection.class, f.getClass()}, new Object[]{user, c, f});
-      messages = this.addMessage(messages, SUCCESS_MESSAGE, new ActionMessage("function.success." + f.getCommand()));
+      if ("AddTomcatWorker".equalsIgnoreCase(f.getCommand()) || "UpdateTomcatWorker".equalsIgnoreCase(f.getCommand())) {
+        TomcatWorker t = getTemplate(form);
+        twm.perform(f, new Class[]{user.getClass(), t.getClass(), f.getClass()}, new Object[]{user, t, f});
+      } else {
+        Collection<TomcatWorker> c = getMultiTemplate(form);
+        twm.perform(f, new Class[]{user.getClass(), Collection.class, f.getClass()}, new Object[]{user, c, f});
+      }
     } catch (AuthorizationException e) {
       messages = this.addMessage(messages, new ActionMessage("error.notAuthorized"));
       if (logger.isInfoEnabled()) {
@@ -95,7 +99,7 @@
       tw.setStateId(Integer.parseInt(stateId));
     }
     if (workerId != null && !"".equals(workerId)) {
-      tw.setWorkerId(Integer.parseInt(workerId));
+      tw.setTomcatId(Integer.parseInt(workerId));
     }
     tw.setName(name);
     return tw;

Modified: incubator/lokahi/lokahi/trunk/src/www/Apache/Entity/modify.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Apache/Entity/modify.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Apache/Entity/modify.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Apache/Entity/modify.vm Fri Jul  7 14:16:42 2006
@@ -81,8 +81,7 @@
   #set ($hps = $view.getHostingPools())
   <select name=hostingPoolId onchange='ToChange(this);'>
     #foreach ($hp in $hps)
-    #if (($hp == $vhost.getHostingPool() && !$hostingPoolId) || ($hostingPoolId && $hp ==
-    $view.getHostingPool($hostingPoolId)))
+    #if (($hp == $vhost.getHostingPool() && !$hostingPoolId) || ($hostingPoolId && $hp == $view.getHostingPool($hostingPoolId)))
     <option value="$hp.getPk()" selected>$hp.getName()</option>
       #else
     <option value="$hp.getPk()">$hp.getName()</option>

Modified: incubator/lokahi/lokahi/trunk/src/www/Apache/Worker/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Apache/Worker/update.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Apache/Worker/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Apache/Worker/update.vm Fri Jul  7 14:16:42 2006
@@ -20,7 +20,7 @@
 #parse("/layout/header.vm")
 
 <div align="center" class="contentbox">
-  <br/><br/>
+  <br /><br />
 
   <div class="projectbox">
     <table width="100%" border="0" cellspacing="0" cellpadding="1">
@@ -32,7 +32,7 @@
         </td>
       </tr>
     </table>
-    <br/>
+    <br />
 
     <div class="messagebox">
 
@@ -46,7 +46,7 @@
       <form name="Form" method="post" action='$link.setAction("administration/ApacheWorkerAction")'>
         <input type="hidden" id="id" name="id" value="$!{id}">
         <input type="hidden" id="methodToCall" name="methodToCall" value="$methodToCall">
-        Name: <input type="text" size="45" readonly id="name" name="name" value="$!{aw.getName()}"><BR>
+        Name: <input type="text" size="45" readonly id="name" name="name" value="$!{aw.getName()}"><br />
 
         Apache:
         #set($Apaches = $view.getApaches())
@@ -60,8 +60,8 @@
             #end
           #end
         </select>
-        <BR>
-        State: <input type="text" readonly id="state" name="state" value="$!{aw.getState().getName()}"><BR>
+        <br />
+        State: <input type="text" readonly id="state" name="state" value="$!{aw.getState().getName()}"><br />
         <input type="hidden" id="stateId" name="stateId" value="$!{aw.getStateId()}">
         Hardware:
         #set($hardware = $view.getHardwares())
@@ -74,7 +74,7 @@
           		  #end
           #end
         </select>
-        <BR>
+        <br />
         <input type="submit" value="update">
       </form>
       #else
@@ -86,14 +86,14 @@
           #foreach ($aw in $aws)
         <option value="$appRoot/Apache/Worker/update.vm?id=$aw.getPk()">$aw.getName()
           #end
-      </select><BR>
+      </select><br />
       <br />
       #end
       #end
     </div>
-    <br/>
+    <br />
   </div>
-  <br/>
+  <br />
 </div>
 #parse("/layout/footer.vm")
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/add.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/add.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/add.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/add.vm Fri Jul  7 14:16:42 2006
@@ -18,13 +18,29 @@
 #set ($menu = "/layout/menu/EntityTop.vm")
 #set ($pageSelected = "enviroment")
 #parse("/layout/header.vm")
-<div id="bigright">
-  <div class="messagebox">
+
+<div align="center" class="contentbox">
+  <br /><br />
+
+  <div class="projectbox">
+    <table width="100%" border="0" cellspacing="0" cellpadding="1">
+      <tr class="info" valign="top">
+        <td colspan=3>Administration - <b>Environment</b>
+        </td>
+        <td align="right">
+          #parse("Core/Environment/menu/global.vm")
+        </td>
+      </tr>
+    </table>
+    <br />
+
+    <div class="messagebox">
+    <br />
     <form name="Form" method="post" action='$link.setAction("administration/EnvironmentAction")'>
       <table>
         <tr>
           <td>
-            Name:
+            Name<font color="#FF0000">(*)</font>:
           </td>
           <td>
             <input type="text" id="envName" name="envName" value="$!{envName}">
@@ -43,6 +59,9 @@
       <input type="submit" value="submit">
     </form>
   </div>
+  <br />
+  </div>
+  <br />
 </div>
 #parse("/layout/footer.vm")
 

Added: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm?rev=419991&view=auto
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm (added)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm Fri Jul  7 14:16:42 2006
@@ -0,0 +1,31 @@
+##
+## Copyright 2006  The Apache Software Foundation
+##
+## Licensed under the Apache License, Version 2.0 (the "License");
+## you may not use this file except in compliance with the License.
+## You may obtain a copy of the License at
+##
+##     http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+## $Id$
+##
+<div class="messagebox">
+  #if ($User.isAllowed($function) && $methodToCall && $actionLink)
+  <br />
+
+  <form name="Form" method="post" action='$link.setAction($actionLink)'>
+    <input type=hidden name="methodToCall" value="$methodToCall">
+    <input type="submit" value="$buttonName"><br />
+    <br />
+    $methodToCall
+    <input type=hidden id=envId name=envId value="$individual.getPk()">&nbsp;&nbsp;
+    $individual.getName()
+  </form>
+  #end
+</div>
\ No newline at end of file

Propchange: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/confirm.vm
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/delete.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/delete.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/delete.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/delete.vm Fri Jul  7 14:16:42 2006
@@ -15,7 +15,7 @@
 ##
 ## $Id$
 ##
-#set($actionLink = "administration/Environment/Delete")
+#set($actionLink = "administration/EnvironmentAction")
 #set($methodToCall = "DeleteEnvironment")
 #set($buttonName = "Delete")
 #set ($function = "DeleteEnvironment")

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/details.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/details.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/details.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/details.vm Fri Jul  7 14:16:42 2006
@@ -18,11 +18,26 @@
 #set ($menu = "/layout/menu/EntityTop.vm")
 #set ($pageSelected = "enviroment")
 #parse("/layout/header.vm")
-<div id="bigright">
-  <div class="messagebox">
+
+<div align="center" class="contentbox">
+  <br /><br />
+
+  <div class="projectbox">
+    <table width="100%" border="0" cellspacing="0" cellpadding="1">
+      <tr class="info" valign="top">
+        <td colspan=3>Administration - <b>Environment</b>
+        </td>
+        <td align="right">
+          #parse("Core/Environment/menu/global.vm")
+        </td>
+      </tr>
+    </table>
+    <br />
+
+    <div class="messagebox">
     <SCRIPT LANGUAGE=javascript>
       <!--
-      function OnChange(dropdown)
+      function OnChangeIn(dropdown)
       {
         var myindex = dropdown.selectedIndex;
         var SelValue = dropdown.options[myindex].value;
@@ -40,6 +55,7 @@
 
     #if($id)
     #if ($User.isAllowed("ViewEnvironment") && $methodToCall == "ViewEnvironment")
+    <br />
     #set ($Environment = $view.getEnvironment($id))
     Name: $!{Environment.getName()}<br />
     Comments: <textarea readonly id="entry" name="entry" cols="40" rows="5"> $!{Environment.getComments()} </textarea>
@@ -59,18 +75,22 @@
     #end
 
     #else
+    <br />
     Environment:
     #set ($envs = $view.getEnvironments())
-    <select name=id onchange='OnChange(this);'>
+    <select name=id onchange='OnChangeIn(this);'>
       <option value="">Select one
         #foreach ($env in $envs)
       <option value="$env.getPk()">$env.getName()
         #end
     </select><br />
-
+	    <br />
 
     #end
   </div>
+  <br />
+  </div>
+  <br />
 </div>
 #parse("/layout/footer.vm")
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/list.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/list.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/list.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/list.vm Fri Jul  7 14:16:42 2006
@@ -29,6 +29,7 @@
 #end
 #end
 #set ($entity = "Environment")
+#set ($category = "Administration")
 #set ($usesEnv = "false")
 #set ($path = "Core/Environment")
 #if (! $currentPage)

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/indiv.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/indiv.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/indiv.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/indiv.vm Fri Jul  7 14:16:42 2006
@@ -18,45 +18,15 @@
 <select name=methodToCall onchange='OnChange(this);'>
   <option value="" selected>Select Action
     #if($page)
-  <option value="$appRoot/Core/Pool/$page?id=$!{ent.getPk()}">&nbsp;Details&nbsp;</option>
+  <option value="$appRoot/Core/Environment/$page?id=$!{ent.getPk()}">&nbsp;Details&nbsp;</option>
   #else
-  <option value="$appRoot/Core/Pool/details.vm?id=$!{ent.getPk()}">&nbsp;Details&nbsp;</option>
+  <option value="$appRoot/Core/Environment/details.vm?id=$!{ent.getPk()}">&nbsp;Details&nbsp;</option>
   #end
-  #if($User.isAllowed("UpdateHostingPool"))
-  <option value="$appRoot/Core/Pool/update.vm?id=$!{ent.getPk()}">&nbsp;Update&nbsp;</option>
+  #if($User.isAllowed("UpdateEnvironment"))
+  <option value="$appRoot/Core/Environment/update.vm?id=$!{ent.getPk()}">&nbsp;Update&nbsp;</option>
   #end
-  #if($User.isAllowed("DeleteHostingPool"))
-  <option value="$appRoot/Core/Pool/delete.vm?id=$!{ent.getPk()}">&nbsp;Delete&nbsp;</option>
-  #end
-  #if($User.isAllowed("RestartApache"))
-  <option value="$appRoot/Core/Pool/restartapache.vm?id=$!{ent.getPk()}">&nbsp;Restart Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("GracefulApache"))
-  <option value="$appRoot/Core/Pool/gracefulapache.vm?id=$!{ent.getPk()}">&nbsp;Graceful Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("StopApache"))
-  <option value="$appRoot/Core/Pool/stopapache.vm?id=$!{ent.getPk()}">&nbsp;Stop Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("StartApache"))
-  <option value="$appRoot/Core/Pool/startapache.vm?id=$!{ent.getPk()}">&nbsp;Start Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("ConfigtestApache"))
-  <option value="$appRoot/Core/Pool/configtestapache.vm?id=$!{ent.getPk()}">&nbsp;Configtest Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("DeployApacheConfig"))
-  <option value="$appRoot/Core/Pool/deployapacheconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Apache Config&nbsp;</option>
-  #end
-  #if($User.isAllowed("RestartTomcat"))
-  <option value="$appRoot/Core/Pool/restarttomcat.vm?id=$!{ent.getPk()}">&nbsp;Restart Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("StopTomcat"))
-  <option value="$appRoot/Core/Pool/stoptomcat.vm?id=$!{ent.getPk()}">&nbsp;Stop Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("StartTomcat"))
-  <option value="$appRoot/Core/Pool/starttomcat.vm?id=$!{ent.getPk()}">&nbsp;Start Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("DeployTomcatConfig"))
-  <option value="$appRoot/Core/Pool/deploytomcatconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Tomcat Config&nbsp;</option>
+  #if($User.isAllowed("DeleteEnvironment"))
+  <option value="$appRoot/Core/Environment/delete.vm?id=$!{ent.getPk()}">&nbsp;Delete&nbsp;</option>
   #end
 </select>
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/update.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/update.vm Fri Jul  7 14:16:42 2006
@@ -18,11 +18,26 @@
 #set ($menu = "/layout/menu/EntityTop.vm")
 #set ($pageSelected = "enviroment")
 #parse("/layout/header.vm")
-<div id="bigright">
-  <div class="messagebox">
+
+<div align="center" class="contentbox">
+  <br /><br />
+
+  <div class="projectbox">
+    <table width="100%" border="0" cellspacing="0" cellpadding="1">
+      <tr class="info" valign="top">
+        <td colspan=3>Administration - <b>Environment</b>
+        </td>
+        <td align="right">
+          #parse("Core/Environment/menu/global.vm")
+        </td>
+      </tr>
+    </table>
+    <br />
+
+    <div class="messagebox">
     <SCRIPT LANGUAGE=javascript>
       <!--
-      function OnChange(dropdown)
+      function OnChangeIn(dropdown)
       {
         var myindex = dropdown.selectedIndex;
         var SelValue = dropdown.options[myindex].value;
@@ -40,6 +55,7 @@
     #if ($User.isAllowed("UpdateEnvironment") && $methodToCall == "UpdateEnvironment")
     #if($id)
     #set ($Environment = $view.getEnvironment($id))
+    <br />
     <form name="Form" method="post" action='$link.setAction("administration/EnvironmentAction")'>
       <input type="hidden" id="id" name="id" value="$!{id}">
       <input type="hidden" id="methodToCall" name="methodToCall" value="$methodToCall">
@@ -47,21 +63,25 @@
       Comments: <textarea id="comments" name="comments" cols="40" rows="5"> $!{Environment.getComments()} </textarea>
       <br />
       <input type="submit" value="Update">
-
+	    <br />
     </form>
     #else
+    <br />
     Environment:
     #set ($envs = $view.getEnvironments())
-    <select name=id onchange='OnChange(this);'>
+    <select name=id onchange='OnChangeIn(this);'>
       <option value="">Select one
         #foreach ($env in $envs)
       <option value="$env.getPk()">$env.getName()
         #end
     </select><br />
-
+<br />
     #end
     #end
   </div>
+  <br />
+  </div>
+  <br />
 </div>
 #parse("/layout/footer.vm")
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/File/add.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/File/add.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/File/add.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/File/add.vm Fri Jul  7 14:16:42 2006
@@ -39,7 +39,7 @@
         <table>
           <tr>
             <td>
-              Name:
+              Name<font color="#FF0000">(*)</font>:
             </td>
             <td>
               <input type="text" id="name" name="name" value="$!{name}">
@@ -55,7 +55,7 @@
           </tr>
           <tr>
             <td>
-              Path:
+              Path<font color="#FF0000">(*)</font>:
             </td>
             <td>
               <input type="text" id="path" name="path" value="$!{path}">

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Instance/add.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Instance/add.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Instance/add.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Instance/add.vm Fri Jul  7 14:16:42 2006
@@ -24,7 +24,7 @@
   <div class="projectbox">
     <table width="100%" border="0" cellspacing="0" cellpadding="1">
       <tr class="info" valign="top">
-        <td colspan=3>Infrastructure - <b>Instance</b>
+        <td colspan=3>Administration - <b>Instance</b>
         </td>
         <td align="right">
           #parse("Core/Instance/menu/global.vm")
@@ -38,7 +38,7 @@
         <table>
           <tr>
             <td>
-              Name:
+              Name<font color="#FF0000">(*)</font>:
             </td>
             <td>
               <input type="text" id="instanceName" name="instanceName" value="$!{instanceName}">

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Instance/confirm.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Instance/confirm.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Instance/confirm.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Instance/confirm.vm Fri Jul  7 14:16:42 2006
@@ -24,7 +24,7 @@
 <input type="submit" value="$buttonName"><br />
 <br />
 $methodToCall
-<input type=hidden name=id value="$individual.getPk()" >&nbsp;&nbsp;
+<input type=hidden name=instanceId value="$individual.getPk()" >&nbsp;&nbsp;
 $individual.getName()
 </form>
 #end

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/add.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/add.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/add.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/add.vm Fri Jul  7 14:16:42 2006
@@ -33,6 +33,7 @@
     <div class="messagebox">
 
       <form name="Form" method="post" action='$link.setAction("administration/HostingPoolAction")'>
+      <br />
         <table>
           <tr>
             <td>
@@ -49,6 +50,7 @@
             <td>
               #set ($tps = $view.getTomcatPools())
               <select name=tomcatPoolId>
+              <option value=""> None
                 #foreach ($tp in $tps)
                 <option value="$tp.getPk()">$tp.getName()
                   #end
@@ -63,6 +65,7 @@
             <td>
               #set ($aps = $view.getApachePools())
               <select name=apachePoolId>
+              <option value=""> None
                 #foreach ($ap in $aps)
                 <option value="$ap.getPk()">$ap.getName()
                   #end

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/delete.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/delete.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/delete.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/delete.vm Fri Jul  7 14:16:42 2006
@@ -17,7 +17,7 @@
 ##
 #set($actionLink = "administration/HostingPool/Delete")
 #set($methodToCall = "DeleteHostingPool")
-#set($buttonName = "Delete")
+#set($buttonName = "Delete Hosting Pool")
 #set ($function = "DeleteHostingPool")
 #set ($currentPage = "delete.vm")
 #parse("Core/Pool/list.vm")

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deployapacheconf.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deployapacheconf.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deployapacheconf.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deployapacheconf.vm Fri Jul  7 14:16:42 2006
@@ -17,7 +17,7 @@
 ##
 #set($actionLink = "HostingPool/SubmitJobAction")
 #set($methodToCall = "DeployApacheConfig")
-#set($buttonName = "Build and Deploy Config")
+#set($buttonName = "Build and Deploy Apache Config")
 #set ($function = "DeployApacheConfig")
 #set ($currentPage = "deployapacheconf.vm")
 #parse("Core/Pool/list.vm")

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deploytomcatconf.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deploytomcatconf.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deploytomcatconf.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/deploytomcatconf.vm Fri Jul  7 14:16:42 2006
@@ -16,8 +16,8 @@
 ## $Id$
 ##
 #set($actionLink = "HostingPool/SubmitJobAction")
-#set($methodToCall = "BuildConfig")
-#set($buttonName = "Build Config")
+#set($methodToCall = "DeployTomcatConfig")
+#set($buttonName = "Build and Deploy Tomcat Config")
 #set ($function = "DeployTomcatConfig")
 #set ($currentPage = "deploytomcatconf.vm")
 #parse("/Core/Pool/list.vm")

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/details.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/details.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/details.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/details.vm Fri Jul  7 14:16:42 2006
@@ -58,8 +58,9 @@
     <td>Apache Pool:</td><td><a href="$appRoot/Apache/Pool/details.vm?id=$!{hp.getApachePool().getPk()}">$!{hp.getApachePool().getName()}</a>
   </td>
     <td align="right">
-      #set($ent = $hp.getApachePool())
-      #if ($ent)
+      #set($entAP = $hp.getApachePool())
+      #if ($entAP)
+      #set ($ent = $entAP)
       #parse("/Apache/Pool/menu/indiv.vm")
       #end
     </td></tr>
@@ -67,8 +68,9 @@
     <td>Tomcat Pool:</td><td><a href="$appRoot/Tomcat/Pool/details.vm?id=$!{hp.getTomcatPool().getPk()}">$!{hp.getTomcatPool().getName()}</a>
   </td>
     <td align="right">
-      #set($ent = $hp.getTomcatPool())
-      #if ($ent)
+      #set($entTP = $hp.getTomcatPool())
+      #if ($entTP)
+      #set ($ent = $entTP)
       #parse("/Tomcat/Pool/menu/indiv.vm")
       #end
     </td></tr>
@@ -108,8 +110,7 @@
     #end
   </td>
   <td align="right">
-    #if ($User.isAllowed("AddContext") || $User.isAllowed("DeleteVirtualHost", $vhost) ||
-    $User.isAllowed("ViewVirtualHost", $vhost) || $User.isAllowed("UpdateVirtualHost", $vhost))
+    #if ($User.isAllowed("AddContext") || $User.isAllowed("DeleteVirtualHost", $vhost) || $User.isAllowed("ViewVirtualHost", $vhost) || $User.isAllowed("UpdateVirtualHost", $vhost))
     <select name=methodToCall onchange='OnChange(this);'>
       <option value="" selected>Select Action
         #if ($User.isAllowed("AddContext"))

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/list.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/list.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/list.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/list.vm Fri Jul  7 14:16:42 2006
@@ -16,30 +16,30 @@
 ## $Id$
 ##
 #if (!$collection)
-#set ($menu = "/layout/menu/PoolTop.vm")
-#set ($pageSelected = "Pool")
-#parse("/layout/header.vm")
-#set ($plf = "true")
-#if ($request.getParameter("id"))
-#set ($id = $request.getParameter("id"))
-#set ($individual = $view.getHostingPool($id))
-#set ($indivPage = "/Core/Pool/confirm.vm")
-#else
-#set ($collection = $view.getHostingPools())
-#end
+	  #set ($menu = "/layout/menu/PoolTop.vm")
+  #set ($pageSelected = "Pool")
+  #parse("/layout/header.vm")
+  #set ($plf = "true")
+  #if ($request.getParameter("id"))
+    #set ($id = $request.getParameter("id"))
+    #set ($individual = $view.getHostingPool($id))
+    #set ($indivPage = "/Core/Pool/confirm.vm")
+  #else
+    #set ($collection = $view.getHostingPools())
+  #end
 #end
 #set ($entity = "HostingPool")
 #set ($usesEnv = "true")
 #set ($path = "Core/Pool")
 #if (! $currentPage)
-#set ($currentPage = "$appRoot/Core/Pool/list.vm")
+  #set ($currentPage = "$appRoot/Core/Pool/list.vm")
 #end
 
 
 #parse("/layout/list2.vm")
 <!--$plf-->
 #if ($plf)
-#parse("/layout/footer.vm")
+  #parse("/layout/footer.vm")
 #end
 
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/menu/indiv.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/menu/indiv.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/menu/indiv.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/menu/indiv.vm Fri Jul  7 14:16:42 2006
@@ -28,35 +28,39 @@
   #if($User.isAllowed("DeleteHostingPool"))
   <option value="$appRoot/Core/Pool/delete.vm?id=$!{ent.getPk()}">&nbsp;Delete&nbsp;</option>
   #end
-  #if($User.isAllowed("RestartApache"))
-  <option value="$appRoot/Core/Pool/restartapache.vm?id=$!{ent.getPk()}">&nbsp;Restart Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("GracefulApache"))
-  <option value="$appRoot/Core/Pool/gracefulapache.vm?id=$!{ent.getPk()}">&nbsp;Graceful Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("StopApache"))
-  <option value="$appRoot/Core/Pool/stopapache.vm?id=$!{ent.getPk()}">&nbsp;Stop Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("StartApache"))
-  <option value="$appRoot/Core/Pool/startapache.vm?id=$!{ent.getPk()}">&nbsp;Start Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("ConfigtestApache"))
-  <option value="$appRoot/Core/Pool/configtestapache.vm?id=$!{ent.getPk()}">&nbsp;Configtest Apache&nbsp;</option>
-  #end
-  #if($User.isAllowed("DeployApacheConfig"))
-  <option value="$appRoot/Core/Pool/deployapacheconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Apache Config&nbsp;</option>
-  #end
-  #if($User.isAllowed("RestartTomcat"))
-  <option value="$appRoot/Core/Pool/restarttomcat.vm?id=$!{ent.getPk()}">&nbsp;Restart Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("StopTomcat"))
-  <option value="$appRoot/Core/Pool/stoptomcat.vm?id=$!{ent.getPk()}">&nbsp;Stop Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("StartTomcat"))
-  <option value="$appRoot/Core/Pool/starttomcat.vm?id=$!{ent.getPk()}">&nbsp;Start Tomcat&nbsp;</option>
-  #end
-  #if($User.isAllowed("DeployTomcatConfig"))
-  <option value="$appRoot/Core/Pool/deploytomcatconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Tomcat Config&nbsp;</option>
+  #if ($ent.getApachePool())
+	    #if($User.isAllowed("RestartApache"))
+      <option value="$appRoot/Core/Pool/restartapache.vm?id=$!{ent.getPk()}">&nbsp;Restart Apache&nbsp;</option>
+    #end
+    #if($User.isAllowed("GracefulApache"))
+      <option value="$appRoot/Core/Pool/gracefulapache.vm?id=$!{ent.getPk()}">&nbsp;Graceful Apache&nbsp;</option>
+    #end
+    #if($User.isAllowed("StopApache"))
+      <option value="$appRoot/Core/Pool/stopapache.vm?id=$!{ent.getPk()}">&nbsp;Stop Apache&nbsp;</option>
+    #end
+    #if($User.isAllowed("StartApache"))
+      <option value="$appRoot/Core/Pool/startapache.vm?id=$!{ent.getPk()}">&nbsp;Start Apache&nbsp;</option>
+    #end
+    #if($User.isAllowed("ConfigtestApache"))
+      <option value="$appRoot/Core/Pool/configtestapache.vm?id=$!{ent.getPk()}">&nbsp;Configtest Apache&nbsp;</option>
+    #end
+    #if($User.isAllowed("DeployApacheConfig"))
+      <option value="$appRoot/Core/Pool/deployapacheconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Apache Config&nbsp;</option>
+    #end
+  #end
+  #if ($ent.getTomcatPool())
+    #if($User.isAllowed("RestartTomcat"))
+      <option value="$appRoot/Core/Pool/restarttomcat.vm?id=$!{ent.getPk()}">&nbsp;Restart Tomcat&nbsp;</option>
+    #end
+    #if($User.isAllowed("StopTomcat"))
+      <option value="$appRoot/Core/Pool/stoptomcat.vm?id=$!{ent.getPk()}">&nbsp;Stop Tomcat&nbsp;</option>
+    #end
+    #if($User.isAllowed("StartTomcat"))
+      <option value="$appRoot/Core/Pool/starttomcat.vm?id=$!{ent.getPk()}">&nbsp;Start Tomcat&nbsp;</option>
+    #end
+    #if($User.isAllowed("DeployTomcatConfig"))
+      <option value="$appRoot/Core/Pool/deploytomcatconf.vm?id=$!{ent.getPk()}">&nbsp;Deploy Tomcat Config&nbsp;</option>
+    #end
   #end
 </select>
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Pool/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Pool/update.vm?rev=419991&r1=419990&r2=419991&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Pool/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Pool/update.vm Fri Jul  7 14:16:42 2006
@@ -43,6 +43,7 @@
       #if ($User.isAllowed("UpdateHostingPool") && $methodToCall == "UpdateHostingPool")
       #if ($id)
       #set ($hp = $view.getHostingPool($id))
+      <br />
       <form name="Form" method="post" action='$link.setAction("administration/HostingPoolAction")'>
         <input type="hidden" id="id" name="id" value="$!{id}">
         <input type="hidden" id="methodToCall" name="methodToCall" value="$methodToCall">
@@ -56,7 +57,10 @@
         #end
         #end
         <select name=tomcatPoolId>
+          <option value="">None
+          #if ($hp.getTomcatPool())
           <option value="$!{hp.getTomcatPool().getPk()}">$!{hp.getTomcatPool().getName()}
+          #end
             #foreach ($tp in $tps)
           <option value="$tp.getPk()">$tp.getName()
             #end
@@ -70,7 +74,10 @@
         #end
         #end
         <select name=apachePoolId>
+        <option value="">None
+        #if ($hp.getApachePool())
           <option value="$!{hp.getApachePool().getPk()}">$!{hp.getApachePool().getName()}
+        #end
             #foreach ($ap in $aps)
           <option value="$ap.getPk()">$ap.getName()
             #end



Mime
View raw message