You are viewing a plain text version of this content. The canonical link for it is here.
Posted to lokahi-commits@incubator.apache.org by to...@apache.org on 2006/06/22 20:42:49 UTC
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/
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"> Details </option>
+<option value="$appRoot/Core/Environment/$page"> Details </option>
#else
-<option value="$appRoot/Core/Pool/details.vm"> Details </option>
-#end
-#if($User.isAllowed("AddHostingPool"))
-<option value="$appRoot/Core/Pool/add.vm"> Add </option>
-#end
-#if($User.isAllowed("UpdateHostingPool"))
-<option value="$appRoot/Core/Pool/update.vm"> Update </option>
-#end
-#if($User.isAllowed("DeleteHostingPool"))
-<option value="$appRoot/Core/Pool/delete.vm"> Delete </option>
-#end
-#if($User.isAllowed("RestartApache"))
-<option value="$appRoot/Core/Pool/restartapache.vm"> Restart Apache </option>
-#end
-#if($User.isAllowed("GracefulApache"))
-<option value="$appRoot/Core/Pool/gracefulapache.vm"> Graceful Apache </option>
-#end
-#if($User.isAllowed("StopApache"))
-<option value="$appRoot/Core/Pool/stopapache.vm"> Stop Apache </option>
-#end
-#if($User.isAllowed("StartApache"))
-<option value="$appRoot/Core/Pool/startapache.vm"> Start Apache </option>
-#end
-#if($User.isAllowed("ConfigtestApache"))
-<option value="$appRoot/Core/Pool/configtestapache.vm"> Configtest Apache </option>
-#end
-#if($User.isAllowed("DeployApacheConfig"))
-<option value="$appRoot/Core/Pool/deployapacheconf.vm"> Deploy Apache Config </option>
-#end
-#if($User.isAllowed("RestartTomcat"))
-<option value="$appRoot/Core/Pool/restarttomcat.vm"> Restart Tomcat </option>
-#end
-#if($User.isAllowed("StopTomcat"))
-<option value="$appRoot/Core/Pool/stoptomcat.vm"> Stop Tomcat </option>
-#end
-#if($User.isAllowed("StartTomcat"))
-<option value="$appRoot/Core/Pool/starttomcat.vm"> Start Tomcat </option>
-#end
-#if($User.isAllowed("DeployTomcatConfig"))
-<option value="$appRoot/Core/Pool/deploytomcatconf.vm"> Deploy Tomcat Config </option>
+<option value="$appRoot/Core/Environment/details.vm"> Details </option>
#end
+<option value="$appRoot/Core/Environment/add.vm"> Add </option>
+<option value="$appRoot/Core/Environment/update.vm"> Update </option>
+<option value="$appRoot/Core/Environment/delete.vm"> Delete </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"> Manage Users </a></li>
#end
- <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm"> Manage Assets </a></li>
+ <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm"> Manage Lokahi </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"> Manage Users </a></li>
#end
- <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm"> Manage TMC </a></li>
+ <li $!{AdminMenu}><a href="$appRoot/Core/Entity/index.vm"> Manage Lokahi </a></li>
</ul>
#end
</div>