Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|         View Release Licencing 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"-->
<%
' Make sure rtag_id is always present
If Request("rtag_id") = "" Then
        Response.Redirect("index.asp")
End If

' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "dependencies.asp" )
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------

'------------ Constants Declaration -----------

'------------ Variable Init -------------------


'--------------------------------------------------------------------------------------------------------------------------
'  release_licencing_query_string
'
'  DESCRIPTION
'     Constructs a query string using the provided release tag, designed to elicit
'     a list of PV_ID's, thier package names, versions and extensions, and licencing
'     associations from the release. Only those PV_IDs with one or more licencing
'     associations are returned.
'
'  INPUTS
'     NNrtag_id : The release tag to be used in the query string
'
Function release_licencing_query_string(NNrtag_id)

   release_licencing_query_string = "SELECT * FROM ("&_
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
                                    "        FROM release_content rc, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
                                    "       WHERE rc.rtag_id = "& CStr(NNrtag_id) &_
                                    "         AND pv.pv_id = rc.pv_id "&_
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
                                    "         AND lcng.licence (+) = lcs.licence "&_
                                    "      UNION "&_
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
                                    "        FROM work_in_progress wip, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
                                    "       WHERE wip.rtag_id = "& CStr(NNrtag_id) &_
                                    "         AND pv.pv_id = wip.pv_id "&_
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
                                    "         AND lcng.licence (+) = lcs.licence "&_
                                    "      UNION "&_
                                    "      SELECT pv.pv_id, pkg.pkg_name, pv.pkg_version, pv.v_ext, lcs.name AS licenceName"&_
                                    "        FROM planned pl, package_versions pv, packages pkg, licencing lcng, licences lcs"&_
                                    "       WHERE pl.rtag_id = "& CStr(NNrtag_id) &_
                                    "         AND pv.pv_id = pl.pv_id "&_
                                    "         AND pkg.pkg_id = pv.pkg_id "&_
                                    "         AND (pl.operation IS NULL OR pl.operation = 'R') "&_
                                    "         AND pv.pv_id (+) = lcng.pv_id "&_
                                    "         AND lcng.licence (+) = lcs.licence "&_
                                    ") ORDER BY UPPER(pkg_name), UPPER(v_ext), pv_id DESC, UPPER(licenceName)"
End Function


'--------------------------------------------------------------------------------------------------------------------------
'  PV_ID_ListHTML
'
'  DESCRIPTION
'     Constructs the HTML to render the rows of package names, versions and extensions, and licences
'
Function PV_ID_ListHTML
   Dim rsQry
   Dim html_string

   Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )

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

      ' BEGIN ROW
      html_string = html_string & "<tr>"

      ' PACKAGE NAME
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_name") & "</td>"

      ' PACKAGE VERSION
      If IsNull(rsQry("v_ext")) Then
         html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("pkg_version") & "</td>"
      Else
         html_string = html_string & "<td nowrap class='body_rowg'>" & Left(rsQry("pkg_version"), Len(rsQry("pkg_version")) - Len(rsQry("v_ext")) ) & "</td>"
      End If

      ' PACKAGE EXTENSION
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("v_ext") & "</td>"

      ' LICENCE NAME
      html_string = html_string & "<td nowrap class='body_rowg'>" & rsQry("licenceName") & "</td>"

      ' END ROW
      html_string = html_string & "</tr>"

      rsQry.MoveNext

      ' ROW SEPERATOR
      If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
         html_string = html_string & "<tr><td colspan='8' background='images/bg_table_border.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr>"
      End If
   Loop

   ' destroy objects
   rsQry.Close()
   Set rsQry = nothing

   ' return result
   PV_ID_ListHTML = html_string
End Function

'--------------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------
'------------ RUN BEFORE PAGE RENDER ----------



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

<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="images/common.js"></script>
<script language="JavaScript" src="scripts/remote_scripting.js"></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">
<!-- 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.Method = "post"
   objFormComponent.Action = ScriptName & "?rtag_id=" & parRtag_Id
   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>VIEW RELEASE LICENCING DETAILS</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 width="9%" valign="top"></td>
                        <tr>
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Name</td>
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Version</td>
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Extension</td>
                           <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Licences</td>
                           <td valign="top">
                        </tr>
                        <%=PV_ID_ListHTML()%>
                        <tr>
                           <td class="form_iname">&nbsp;</td>
                           <td>&nbsp;</td>
                           <td class="val_err"></td>
                        </tr>
                     </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" >
                  <input name="btn_submit" type="reset" class="form_btn" value="OK", onClick="history.back();">
               </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>
      </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
%>