<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)jobs_cancel_confirm.jsp     1.5     03/05/16     SMI""
   * 
   */
 --%>
<%@ include file="/layout/toptags.jsp"%>
<!-- locale stuff -->
<html:html locale="true">
<!-- end locale -->

<!-- Place Java Script Here -->

<!-- HTML -->
<head>
<%@include file="/layout/page_head_section.jsp"%>
    <title>
        <bean:message  key="jobs.general.killjob.confirm.header"/>
    </title>
</head>

<div class="content-layout">

<%@include file="/layout/bodytag.jsp"%>
<%@include file="/layout/top.jsp"%>
<%@include file="/layout/breadcrumb.jsp"%>
<%@include file="/layout/spacer.jsp"%>

<html:form action="/root.menu.item4.item0cancelconfirm.do">
<input type="hidden" name="request_action" value="<%=request.getAttribute("request_action")%>">

<%@ include file="/layout/user_messages.jsp"%>

<%
com.sun.netstorage.array.mgmt.cfg.ui.forms.JobsForm myform = (com.sun.netstorage.array.mgmt.cfg.ui.forms.JobsForm)session.getAttribute("JobsForm");

%>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="jobs.general.killjob.confirm.header"/>
              </div>
            </td>
           
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></td>
    </tr>
  </table> 
 
<!-- spacer between two sections -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img alt border="0" height="8" width="1" src="images/general/dot.gif"></td>
  </tr>
</table>

<table>
  <tr><td>
    <table border="0" cellspacing="0" cellpadding="2" align="left" bgcolor="#9999CC">
      <tr><td>
        <table cellspacing="0" cellpadding="5" border="0"  bgcolor="#FFFFFF">
          <tr>
            <td valign="top"><img src="images/icons/warning_16.gif" width="16" height="16" alt='<bean:message key="icon.warning"/>' border="0"></td>
            <td>
              <div class="error-message-header-text">
                 <bean:message key="jobs.general.killjob.confirm.msg"/>
              </div>
            </td>

          </tr>
        </table>
      </td></tr>
    </table>
  </td></tr>
  <tr><td>
    <img src="/nsm/images/general/dot.gif" width="1" height="10" border="0">
  </td></tr>
</table>
    

<table border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td>
    <table>
    <tr>
    <td align="center" valign="middle">
       <table border="0" cellpadding="0" cellspacing="0" align="center">
          <tr>
             <td>
                <table border="0" cellpadding="1" cellspacing="0" class="button-link-enabled-text">
                  <tr>
                     <td>
                        <table>
                          <tr>
                            <td align="center" valign="middle" nowrap>                            
                              <component:button text="jobs.general.killjob" href="javascript:submitForm('killjobs');" title="jobs.general.killjob.title" isEnabled="<%=(myform != null && myform.getJobsToKill() != null && myform.getJobsToKill().size() > 0)%>" />
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                 </table>
              </td>                 
           </tr>
        </table>
      </td>

      <td align="left" valign="middle">
         <table border="0" cellpadding="0" cellspacing="0">
           <tr>
             <td>
               <table border="0" cellpadding="1" cellspacing="0" class="button-link-enabled-text">
                 <tr>
                    <td>
                      <table>
                        <tr>
                           <td align="center" valign="middle" nowrap>
                              <component:button text="button.cancel" href="root.menu.item4.item0.do" title="button.cancel" isEnabled="true" />
                           </td>
                         </tr>
                       </table>
                    </td>
                 </tr>
               </table>
             </td>                 
           </tr>
         </table>
       </td>
     </tr>     
     </table>
     </td>
  </tr>
  
   
</table>





   
    </td>
  </tr>
</table>

<!-- jobs selected to cancel -->

<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td nowrap>
              <div class="major-category-text">
                <bean:message key="jobs.general.killjob.title"/>
              </div>
            </td>
           
            <td valign="bottom" width="99%">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td class="property-separator" valign="bottom"><img alt border="0" height="2" src="/images/general/dot.gif" width="1"></td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td><img alt border="0" height="5" src="/images/general/dot.gif" width="1"></td>
    </tr>
  </table> 

  <!-- table that lists active jobs that can be canceled -->
<table class="back-table" border="0" cellspacing="0" cellpadding="1" width-"100%">
    <tr>
      <td>
        <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">
          <tr class="header-row">
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.jobid" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.array" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.description" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.percentcomplete" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.status" />
              </div>
            </td>
          </tr>
          <logic:present name="JobsForm" property="jobsToKill">
            <logic:iterate id="job" name="JobsForm" property="jobsToKill" type="com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface">
            <tr>
            <td>
              <div class="table-normal-text">
                  <bean:write name="job" property="id"/>
                </html:link>
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <bean:write name="job" property="array" />
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <component:partialTextDisplay textLength="35" 
                text='<%=((com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface)pageContext.getAttribute("job")).getDescription()%>' />
              </div>
            </td>
            <td align="right">
              <div class="table-normal-text">
                <bean:write name="job" property="percentComplete"/>
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <component:partialTextDisplay textLength="35" 
                text='<%=((com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface)pageContext.getAttribute("job")).getStatusKey()%>' />
              </div>
            </td>
          </tr>
          </logic:iterate>
	  <% if(myform != null && myform.getJobsToKill() != null && myform.getJobsToKill().size() == 0){
	  %>
	  <tr>
	    <td>
	    <div class="table-normal-text">
	     <bean:message key="jobs.general.killjob.noactivejobs"/>
	    </div>
	    </td>
	  </tr>
	  <% } %>
        </logic:present>
        </table>
      </td>
     </tr>
    </table>


<!-- table that list jobs that cannot be canceled since they are not active -->
<logic:present name="JobsForm" property="cantCancelCompleted">
<table>
 <tr>
      <td><img alt border="0" height="10" src="/images/general/dot.gif" width="1"></td>
    </tr>

     <tr>
	<td nowrap>
              <div class="major-category-text">
                <bean:message key="jobs.general.killjob.cannotkillcompleted.title"/>
              </div>
          </td>
     </tr>
     <tr>
     <td>
                <bean:message key="jobs.general.killjob.cannotkillcompleted.msg"/>
     </td>
     </tr>
</table>

<table class="back-table" border="0" cellspacing="0" cellpadding="1" width-"100%">
    <tr>
      <td>
        <table class="front-table" border="0" cellspacing="0" cellpadding="0" width="100%">
          <tr class="header-row">
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.jobid" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.array" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.description" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.percentcomplete" />
              </div>
            </td>
            <td nowrap>
              <div class="table-header-text">
                <bean:message key="jobs.general.status" />
              </div>
            </td>
          </tr>
            <logic:iterate id="job" name="JobsForm" property="cantCancelCompleted" type="com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface">
            <tr>
            <td>
              <div class="table-normal-text">
                  <bean:write name="job" property="id"/>
                </html:link>
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <bean:write name="job" property="array" />
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <component:partialTextDisplay textLength="35" 
                text='<%=((com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface)pageContext.getAttribute("job")).getDescription()%>' />
              </div>
            </td>
            <td align="right">
              <div class="table-normal-text">
                <bean:write name="job" property="percentComplete"/>
              </div>
            </td>
            <td>
              <div class="table-normal-text">
                <component:partialTextDisplay textLength="35" 
                text='<%=((com.sun.netstorage.array.mgmt.cfg.jobs.business.JobInterface)pageContext.getAttribute("job")).getStatusKey()%>' />
              </div>
            </td>
          </tr>
          </logic:iterate>
        </table>
      </td>
     </tr>
    </table>

</logic:present>


</html:form>
</body>
</div>
</html:html>
