posted 15 years ago
<html>
<head>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page import="java.io.*"%>
<%-- Uncomment below lines to add portlet taglibs to jsp
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
<%PortletPreferences prefs = renderRequest.getPreferences();%>
--%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<portlet:defineObjects />
<script language="JavaScript" type="text/JavaScript" >
var ceattribute= new Array("WorstRespTime","CEAppDir","TotalCPUs","MaxRunningJobs","CE","WaitingJobs","MaxCPUTime","LRMSVersion","MaxTotalJobs","CEStatus","LRMS","CEVOs","AssignedJobSlots","FreeCPUs","RunningJobs","EstRespTime","FreeJobSlots","Cluster","TotalJobs","Priority","CEDefaultSE","JobManager","MaxWCTime","CloseCE","CloseSE","SMPSize","Processor","OSVersion","VMemory","CFP2000","TmpDir","OSRelease","ClockSpeed","LogicalCPU","OutboundIP","OS","Tag","CINT2000","WNTmpDir","CPUVendor","PhysicalCPU","InboundIP","Memory","VORunningJobs","VOTotalJobs","VOWorstRespTime","VOEstRespTime","VOCEVOs","VOFreeJobSlots","VOWaitingJobs");
var seattribute= new Array("AvailableSpace","Path","SEVOs","UsedSpace","SESite","SEType","SEArch","SEName","SE","Protocol");
var buttonselected="ce";
function fillCEAttribute()
{
document.getElementById('attributelist').length = 0;
buttonselected="ce";
for (var i=0; i < ceattribute.length;++i)
{
if(i==0)
addOption(document.getElementById("attributelist"), ceattribute[i], ceattribute[i],true);
else
addOption(document.getElementById("attributelist"), ceattribute[i], ceattribute[i],false);
}
}
function fillSEAttribute()
{
buttonselected="se";
document.getElementById('attributelist').length = 0;
for (var i=0; i < seattribute.length;++i)
{
if(i==0)
addOption(document.getElementById("attributelist"), seattribute[i], seattribute[i],true);
else
addOption(document.getElementById("attributelist"), seattribute[i], seattribute[i],false);
}
}
function addOption(selectbox, value, text,selected)
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
optn.selected=selected;
selectbox.options.add(optn);
}
function showAttribute()
{
}
</script>
</head>
<body onload="fillCEAttribute();">
<!--<form action="<portlet:actionURL><portlet:param name="page" value="Helloworld2.jsp"/></portlet:actionURL>"-->
<form action="<portlet:actionURL></portlet:actionURL>"
method="GET">
<input type="button" name="querybutton" value="CE" onclick="fillCEAttribute()"/>
<input type="button" name="querybutton" value="SE" onclick="fillSEAttribute()"/><br><br>
<select multiple="3" size="5" name="attributelist" id="attributelist">
</select><br><br>
<input type="submit" value="Get Attribute" name="name" />
</form>
<%
String list=request.getParameter("attributelist");
out.print(list);
%>
</body></html>