Subversion Repositories DevTools

Rev

Rev 129 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                   Edit Project View Details    |
'|                                                   |
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0   ' always load the page, dont store
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_form_window_common.asp"-->
<%
' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
objPMod.PersistInQryString("proj_id")
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim objSortHelper
Dim rsQry
Dim parProjId
Dim parSourceRtagId
Dim   pvIdList, pvIds, PVS, i, aFullList
Dim ProblemsString
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parProjId = Request("proj_id")
objPMod.PersistInQryString("proj_id")
Set   pvIdList   =   Server.CreateObject("Scripting.Dictionary")
'----------------------------------------------
%>

<%
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )

   OraDatabase.Parameters.Add "PV_ID",             nPvId,             ORAPARM_INPUT,  ORATYPE_NUMBER
   OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT,  ORATYPE_CHAR
   OraDatabase.Parameters.Add "PROBLEM_STRING",    NULL,              ORAPARM_OUTPUT, ORATYPE_VARCHAR2

   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")

   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL _
   "BEGIN "&_
   " PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_
   "END; "

   objEH.CatchORA ( OraSession )

   outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").Value

   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS"
   OraDatabase.Parameters.Remove "PROBLEM_STRING"
End Sub
%>
<%
Sub MovePackage(nPvId, newRtagId)

   OraDatabase.Parameters.Add "PV_ID",          nPvId,    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "CURRENT_RTAG_ID",    Request("rtag_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "NEW_RTAG_ID",       newRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "USER_ID",          objAccessControl.UserId,    ORAPARM_INPUT, ORATYPE_NUMBER

   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")

   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL _
   "BEGIN "&_
   " PK_PACKAGE.MOVE_PACKAGE ( :PV_ID, :CURRENT_RTAG_ID, :NEW_RTAG_ID, :USER_ID ); "&_
   "END; "

   objEH.CatchORA ( OraSession )

   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "CURRENT_RTAG_ID"
   OraDatabase.Parameters.Remove "NEW_RTAG_ID"
   OraDatabase.Parameters.Remove "USER_ID"

End Sub
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Sub GetFormDetails ( parProjId, ByRef outobjDetails )
   Dim rsQry, query


   OraDatabase.Parameters.Add "PROJ_ID",    parProjId,      ORAPARM_INPUT, ORATYPE_NUMBER

   query = _
   " SELECT prj.* "&_
   "  FROM PROJECTS prj"&_
   " WHERE prj.PROJ_ID = :PROJ_ID"

   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )

   OraDatabase.Parameters.Remove "PROJ_ID"

   If rsQry.RecordCount > 0 Then
      outobjDetails.Item ("proj_id") = rsQry("proj_id")
      outobjDetails.Item ("proj_name") = rsQry("proj_name")
      'outobjDetails.Item ("description") = rsQry("description")
      'outobjDetails.Item ("parent_rtag_id") = rsQry("parent_rtag_id")
      'outobjDetails.Item ("config_spec_branch") = rsQry("config_spec_branch")
      'outobjDetails.Item ("owner_email") = rsQry("owner_email")
      'If rsQry("assoc_mass_ref") <> "" Then
      'outobjDetails.Item ("massref_rtag_id") = rsQry("assoc_mass_ref")
      'End If
   Else
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parProjId="& parProjId

   End If


   rsQry.Close
   Set rsQry = Nothing
End Sub

'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------
' --- Get Form details from DB ---
'Call GetFormDetails ( Request("proj_id"), objFormCollector )

' --- Load Validation Rules ---
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )      ' Load Validation Rules

' --- Enter Form Validation Rule Changes here... ----
'----------------------------------------------------

' --- RUN onPostBack ---
If Request("action") <> "" Then
   Dim decision
   decision = Left(Request("decision"), 1) 'Gets the decision based on the combo box selection

   aFullList = Split ( Replace( Request("pvIds"), " ", "" ), "," )

   If decision = 0 Then
      Call OpenInWindow ( "dependencies.asp?rtag_id="&Request("rtag_id") )
   ElseIf decision = 1 Then
      For Each PVS In aFullList
         If PVS <> "" Then Call DestroyPackage(PVS, "N", ProblemsString)
      Next
   ElseIf decision = 2 Then
      For Each PVS In aFullList
         If PVS <> "" Then Call MovePackage(PVS,Request("FRrtag_id"))
      Next
   End If

   If objEH.Finally Then
      Call OpenInWindow ( "_change_release_mode.asp?mode_code=3&rtag_id="&Request("rtag_id") )
   End If

End If

'----------------------------------------------
%>

<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
<script language="JavaScript" src="images/common.js"></script>
<script language="JavaScript" type="text/javascript">
<!--

function RequestDetails( option, paramString, rowId){

   if ( option == 2 )
   {
      var requestURL = 'RequestReleaseMoveCombo.asp';

      // Set ajax divname
      ajaxdivname = rowId;

      //Append the name to search for to the requestURL
      var url = requestURL + paramString;

      //Progress
      //alert(MM_findObj( rowId ));

      //MM_findObj( rowId ).options[0] = new Option('Loading...','');
      //MM_findObj( rowId ).selectedIndex = 0;
      rowId.options[0] = new Option('Loading...','');
      rowId.selectedIndex = 0;


      //Create the xmlHttp object to use in the request
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
      // This is non-blocking (asynchronous)
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);

      //Send the xmlHttp get to the specified url
      xmlHttp_Get(xmlHttp, url);

   }
   else
   {
      var requestURL = 'RequestReleaseMoveCombo.asp';
      // Set ajax divname
      ajaxdivname = rowId;

      //Append the name to search for to the requestURL
      var url = requestURL + '?proj_id=0';

      //Progress
      //alert(MM_findObj( rowId ));

      //MM_findObj( rowId ).options[0] = new Option('Loading...','');
      //MM_findObj( rowId ).selectedIndex = 0;
      //rowId.options[0] = new Option('Loading...','');
      //rowId.selectedIndex = 0;


      //Create the xmlHttp object to use in the request
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
      // This is non-blocking (asynchronous)
      xmlHttp = GetXmlHttpObject(stateComboChangeHandler);

      //Send the xmlHttp get to the specified url
      xmlHttp_Get(xmlHttp, url);
   }
}

//-->
</script>
<!-- DROPDOWN MENUS -->


<!--#include file="_menu_def.asp"-->
<script language="JavaScript1.2" src="images/popup_menu.js"></script>

</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.proj_name.focus();">
<!-- MENU LAYERS -------------------------------------->
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>
<!-- TIPS LAYERS -------------------------------------->
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
<!----------------------------------------------------->
<!-- HEADER -->
<!--#include file="_header.asp"-->
<!-- BODY ---->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <%
   '-- FROM START ---------------------------------------------------------------------------------------------------------
   objFormComponent.FormName = "FormName"
   objFormComponent.Action = ScriptName
   Call objFormComponent.FormStart()
   %>
   <tr>
      <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
      <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
         <table width="10" border="0" cellspacing="0" cellpadding="0">
            <tr>
               <td width="1%"></td>
               <td width="100%">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                     <tr>
                        <td nowrap class="body_txt">
                        </td>
                     </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                        <td nowrap class="form_ttl"><p>&nbsp;</p>
                           <p>EDIT RELEASE BEFORE CLOSING</p>
                        </td>
                        <td align="right" valign="bottom"></td>
                     </tr>
                  </table>
               </td>
               <td width="1%"></td>
            </tr>
            <tr>
               <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
               <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
               <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
            </tr>
            <tr>
               <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
               <td bgcolor="#FFFFFF" valign="top">

                  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                  <!--#include file="messages/_msg_inline.asp"-->
                  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                  <br>

                  <table width="100%"  border="0" cellspacing="2" cellpadding="0">

                     <tr>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">State</td>

                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package</td>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Version</td>
                        <td valign="top">
                     </tr>
                     <%
                     Dim currState
                     currState = ""
                     OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) )
                     OraDatabase.Parameters.Remove "RTAG_ID"

                     '--- Render rows ---
                     Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)

                        'Add   the   pv_ids   to   the   Array
                        pvIdList.Add   CStr(rsQry("pv_id")), rsQry("pkg_version")
                        ' -------- GROUP BY BASE VIEW  -----------------
                        If CStr(currState) <> CStr(rsQry("state")) Then
                        %>
                           <tr>
                              <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                           </tr>
                           <tr>
                              <td nowrap class="body_scol"><%=rsQry("state")%></td>
                              <td nowrap class="body_scol"></td>
                              <td nowrap class="body_scol"></td>
                           </tr>
                           <%
                           currState = CStr(rsQry("state"))
                        End If
                        %>

                        <tr>
                           <td nowrap class="body_rowg"></td>
                           <td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
                           <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
                        </tr>
                        <%
                        rsQry.MoveNext

                        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%>
                           <tr>
                              <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                           </tr>
                        <%End If
                     Loop
                     rsQry.Close()
                     Set rsQry = nothing

                     pvIds = pvIdList.Keys
                     For i = 0 to pvIdList.Count -1
                        PVS   =   PVS   +   pvIds(i)   +   ","
                     Next
                     Set pvIds = Nothing
                     %>
                     <tr>
                        <td class="form_iname">&nbsp;</td>
                        <td>&nbsp;</td>
                        <td class="val_err"></td>
                     </tr>
                  </table>
               </td>
               <td background="images/lbox_bgside_white.gif">&nbsp;</td>
            </tr>
            <tr>
               <td background="images/bg_action_norm.gif" ></td>
               <td align="right" background="images/bg_action_norm.gif" >
                  <a class="body_col">Select Decision: </a>
                  <select name="decision" id="decision" onChange="RequestDetails( this.value, '?proj_id=<%=Get_Proj_ID(Request("rtag_id"))%>&rtag_id=<%=Request("rtag_id")%>', FormName.FRrtag_id );" class="form_item">
                     <option value='0' selected>--None--</option>
                     <option value='1' >Delete All</option>
                     <option value='2' >Move All</option>
                  </select>

                  <a class="body_col">Select Destination: </a>
                  <select name="FRrtag_id" id="FRrtag_id" class="form_item">
                  </select>

                  <%=objFormComponent.SubmitButton ( "OK", "class='form_btn'" )%>&nbsp;
                  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", "dependencies.asp?rtag_id="&Request("rtag_id") )%>
                  <%=objPMod.ComposeHiddenTags()%>
                  <input type="hidden" name="decision" value="decision.value">
                  <%If Request("FRrtag_id") <> "" Then%>
                     <input type="hidden" name="FRrtag_id" value="FRrtag_id.value">
                  <%End If%>
                  <input type="hidden" name="action" value="true">
                  <input type="hidden" name="pvIds" value=<%=PVS%>>
               </td>
               <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
            </tr>
            <tr>
               <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
               <td background="images/lbox_bg_blue.gif"></td>
               <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
            </tr>
         </table>

         <!-- ACTION BUTTONS ---------------------------------------------->
         <!-- ACTION BUTTONS END  ------------------------------------------>
      </td>
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
   </tr>
   <tr>
      <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
      <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
   </tr>
   <%
   Call objFormComponent.FormEnd()
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
   %>
</table>

<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>
<%
Call Destroy_All_Objects
%>