incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r416462 - in /incubator/lokahi/lokahi/trunk/src: java/org/apache/lokahi/core/api/file/ www/Core/Environment/menu/ www/Core/File/ www/Core/Server/ www/Core/User/ www/Tomcat/Pool/ www/layout/menu/
Date Thu, 22 Jun 2006 20:42:49 GMT
Author: toback
Date: Thu Jun 22 13:42:48 2006
New Revision: 416462

URL: http://svn.apache.org/viewvc?rev=416462&view=rev
Log:
Fixed a bunch of broken links, and added the ability to delete multiple files.

Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/file/FileModel.java
    incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/global.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/File/list.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Server/delete.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/Server/update.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/User/details.vm
    incubator/lokahi/lokahi/trunk/src/www/Core/User/update.vm
    incubator/lokahi/lokahi/trunk/src/www/Tomcat/Pool/update.vm
    incubator/lokahi/lokahi/trunk/src/www/layout/menu/EntityTop.vm
    incubator/lokahi/lokahi/trunk/src/www/layout/menu/UserTop.vm

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/file/FileModel.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/file/FileModel.java?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/file/FileModel.java
(original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/file/FileModel.java
Thu Jun 22 13:42:48 2006
@@ -57,6 +57,11 @@
     JobPool.update(jp);
   }
 
+  public void updateFile(User u, Collection<File> fi, Function f) throws AuthorizationException,
TMCIllegalArgumentException, SQLException, IOException {
+     for (File file : fi) this.updateFile(u, fi, f);
+  }  //todo fix the quick hack so that we only create one jobpool for the list of files we
want to delete.
+
+
   public void updateFile(User u, File fi, Function f) throws AuthorizationException, TMCIllegalArgumentException,
SQLException, IOException {
     this.jpInit(f, u, fi.getName());
     if (u.isAllowed(f) && "UpdateFile".equals(f.getCommand())) {

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/global.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/global.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/global.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Environment/menu/global.vm Thu Jun 22 13:42:48
2006
@@ -18,48 +18,12 @@
 <select name=methodToCall onchange='OnChange(this);'>
 <option value="" selected>Select Action
 #if($page)
-<option value="$appRoot/Core/Pool/$page">&nbsp;Details&nbsp;</option>
+<option value="$appRoot/Core/Environment/$page">&nbsp;Details&nbsp;</option>
 #else
-<option value="$appRoot/Core/Pool/details.vm">&nbsp;Details&nbsp;</option>
-#end
-#if($User.isAllowed("AddHostingPool"))
-<option value="$appRoot/Core/Pool/add.vm">&nbsp;Add&nbsp;</option>
-#end
-#if($User.isAllowed("UpdateHostingPool"))
-<option value="$appRoot/Core/Pool/update.vm">&nbsp;Update&nbsp;</option>
-#end
-#if($User.isAllowed("DeleteHostingPool"))
-<option value="$appRoot/Core/Pool/delete.vm">&nbsp;Delete&nbsp;</option>
-#end
-#if($User.isAllowed("RestartApache"))
-<option value="$appRoot/Core/Pool/restartapache.vm">&nbsp;Restart Apache&nbsp;</option>
-#end
-#if($User.isAllowed("GracefulApache"))
-<option value="$appRoot/Core/Pool/gracefulapache.vm">&nbsp;Graceful Apache&nbsp;</option>
-#end
-#if($User.isAllowed("StopApache"))
-<option value="$appRoot/Core/Pool/stopapache.vm">&nbsp;Stop Apache&nbsp;</option>
-#end
-#if($User.isAllowed("StartApache"))
-<option value="$appRoot/Core/Pool/startapache.vm">&nbsp;Start Apache&nbsp;</option>
-#end
-#if($User.isAllowed("ConfigtestApache"))
-<option value="$appRoot/Core/Pool/configtestapache.vm">&nbsp;Configtest Apache&nbsp;</option>
-#end
-#if($User.isAllowed("DeployApacheConfig"))
-<option value="$appRoot/Core/Pool/deployapacheconf.vm">&nbsp;Deploy Apache Config&nbsp;</option>
-#end
-#if($User.isAllowed("RestartTomcat"))
-<option value="$appRoot/Core/Pool/restarttomcat.vm">&nbsp;Restart Tomcat&nbsp;</option>
-#end
-#if($User.isAllowed("StopTomcat"))
-<option value="$appRoot/Core/Pool/stoptomcat.vm">&nbsp;Stop Tomcat&nbsp;</option>
-#end
-#if($User.isAllowed("StartTomcat"))
-<option value="$appRoot/Core/Pool/starttomcat.vm">&nbsp;Start Tomcat&nbsp;</option>
-#end
-#if($User.isAllowed("DeployTomcatConfig"))
-<option value="$appRoot/Core/Pool/deploytomcatconf.vm">&nbsp;Deploy Tomcat Config&nbsp;</option>
+<option value="$appRoot/Core/Environment/details.vm">&nbsp;Details&nbsp;</option>
 #end
+<option value="$appRoot/Core/Environment/add.vm">&nbsp;Add&nbsp;</option>
+<option value="$appRoot/Core/Environment/update.vm">&nbsp;Update&nbsp;</option>
+<option value="$appRoot/Core/Environment/delete.vm">&nbsp;Delete&nbsp;</option>
 </select>
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/File/list.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/File/list.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/File/list.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/File/list.vm Thu Jun 22 13:42:48 2006
@@ -30,7 +30,7 @@
 #end
 #if ($User.isAllowed($deleteFunction))
 <form name="Form" method="post" action='$link.setAction("administration/$entity/Delete")'>
-<input type=hidden name="methodToCall" value="delete" >
+<input type=hidden name="methodToCall" value="DeleteFile" >
 #end
 <UL>
 #if ($collection.isEmpty())

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Server/delete.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Server/delete.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Server/delete.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Server/delete.vm Thu Jun 22 13:42:48 2006
@@ -19,6 +19,6 @@
 #set($methodToCall = "DeleteHardware")
 #set($buttonName = "Delete")
 #set ($function = "DeleteHardware")
-#parse("Core/Hardware/list.vm")
+#parse("Core/Server/list.vm")
 
 

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/Server/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/Server/update.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/Server/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/Server/update.vm Thu Jun 22 13:42:48 2006
@@ -24,7 +24,7 @@
 {
 	var myindex  = dropdown.selectedIndex;
 	var SelValue = dropdown.options[myindex].value;
-	var baseURL  = "$appRoot/Core/Hardware/update.vm?id=" + SelValue;
+	var baseURL  = "$appRoot/Core/Server/update.vm?id=" + SelValue;
 	top.location.href = baseURL;
 
 	return true;

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/User/details.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/User/details.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/User/details.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/User/details.vm Thu Jun 22 13:42:48 2006
@@ -18,6 +18,20 @@
 #set ($menu = "/layout/menu/UserTop.vm")
 #set ($pageSelected = "User")
 #parse("/layout/header.vm")
+<SCRIPT LANGUAGE=javascript>
+<!--
+function OnChange(dropdown)
+{
+	var myindex  = dropdown.selectedIndex;
+	var SelValue = dropdown.options[myindex].value;
+	var baseURL  = "$appRoot/Core/User/details.vm?id=" + SelValue;
+	top.location.href = baseURL;
+
+	return true;
+}
+//-->
+</SCRIPT>
+
 <div id="center">
 <div class="messagebox">
 #set ($id = $request.getParameter("id"))
@@ -45,13 +59,20 @@
 
 #if ($User.isAllowed("DeleteUser"))
   <form name="Form" method="post" action='$appRoot/administration/User/Delete.do'>
-  <input type=hidden name="methodToCall" value="delete" >
+  <input type=hidden name="methodToCall" value="DeleteUser" >
   <input type=hidden name=id value="$id">
   <input type="submit" value="Delete">
   </form>
 #end
 #else
- 	<BR>	Invalid Id. Could not find the User. <BR>
+  User:
+  #set ($us = $view.getAllUsers())
+               <select name=id onchange='OnChange(this);'>
+                          <option value="">Select one
+              			      #foreach ($u in $us)
+              			      <option value="$u.getPk()">$u.getName()</option>
+              			      #end
+              			      </select><BR>
 #end
 
 </div>

Modified: incubator/lokahi/lokahi/trunk/src/www/Core/User/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Core/User/update.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Core/User/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Core/User/update.vm Thu Jun 22 13:42:48 2006
@@ -13,11 +13,24 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ##
-## $Id: update.vm,v 1.1.1.1 2005/11/30 22:35:36 drtobes Exp $
+## $Id$
 ##
 #set ($menu = "/layout/menu/UserTop.vm")
 #set ($pageSelected = "User")
 #parse("/layout/header.vm")
+<SCRIPT LANGUAGE=javascript>
+<!--
+function OnChange(dropdown)
+{
+	var myindex  = dropdown.selectedIndex;
+	var SelValue = dropdown.options[myindex].value;
+	var baseURL  = "$appRoot/Core/User/update.vm?id=" + SelValue;
+	top.location.href = baseURL;
+
+	return true;
+}
+//-->
+</SCRIPT>
 <div id="center">
 <div class="messagebox">
 
@@ -44,7 +57,14 @@
 #end
 
 #else
- 	<BR>	Invalid Id. Could not find the User. <BR>
+  User:
+  #set ($us = $view.getAllUsers())
+               <select name=id onchange='OnChange(this);'>
+                          <option value="">Select one
+              			      #foreach ($u in $us)
+              			      <option value="$u.getPk()">$u.getName()</option>
+              			      #end
+              			      </select><BR>
 #end
 
 </div>

Modified: incubator/lokahi/lokahi/trunk/src/www/Tomcat/Pool/update.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/Tomcat/Pool/update.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/Tomcat/Pool/update.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/Tomcat/Pool/update.vm Thu Jun 22 13:42:48 2006
@@ -18,6 +18,8 @@
 #set ($menu = "/layout/menu/PoolTop.vm")
 #set ($pageSelected = "Pool")
 #parse("/layout/header.vm")
+<div align="center" class="contentbox">
+<br /><br />
 
 <div class="projectbox">
 <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="1">
@@ -81,6 +83,8 @@
 </form>
 </div>
 <br />
+</div>
+  <br />
 </div>
 #parse("/layout/footer.vm")
 

Modified: incubator/lokahi/lokahi/trunk/src/www/layout/menu/EntityTop.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/layout/menu/EntityTop.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/layout/menu/EntityTop.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/layout/menu/EntityTop.vm Thu Jun 22 13:42:48 2006
@@ -31,7 +31,7 @@
   #if($User.isAllowed("AddUser"))
     <li $!{ManageUserMenu}><a href="$appRoot/Core/User/index.vm">&nbsp;Manage
Users&nbsp;</a></li>
   #end
-    <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm">&nbsp;Manage
Assets&nbsp;</a></li>
+    <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm">&nbsp;Manage
Lokahi&nbsp;</a></li>
   </ul>
 #end
 </div>

Modified: incubator/lokahi/lokahi/trunk/src/www/layout/menu/UserTop.vm
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/www/layout/menu/UserTop.vm?rev=416462&r1=416461&r2=416462&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/www/layout/menu/UserTop.vm (original)
+++ incubator/lokahi/lokahi/trunk/src/www/layout/menu/UserTop.vm Thu Jun 22 13:42:48 2006
@@ -29,7 +29,7 @@
   #if($User.isAllowed("AddUser"))
     <li $!{ManageUserMenu}><a href="$appRoot/Core/User/index.vm">&nbsp;Manage
Users&nbsp;</a></li>
   #end
-    <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm">&nbsp;Manage
TMC&nbsp;</a></li>
+    <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm">&nbsp;Manage
Lokahi&nbsp;</a></li>
   </ul>
 #end
 </div>



Mime
View raw message