Subversion Repositories DevTools

Rev

Blame | 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"-->
<!--#include file="_action_buttons.asp"-->

<!--#include file="class/classActionButtonControl.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 parRtagId
Dim parSourceRtagId
Dim query_string
Dim objBtnControl
Dim     rcon_id
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parRtagId = Request("rtag_id")
objPMod.PersistInQryString("rtag_id")
Set objBtnControl = New ActionButtonControl
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
        Dim rsQry, query
        
        
        OraDatabase.Parameters.Add "RTAG_ID",   parRtagId,              ORAPARM_INPUT, ORATYPE_NUMBER 
        
        query = _
        " SELECT * "&_
        "  FROM RELEASE_TAGS rt"&_
        " WHERE rt.RTAG_ID = :RTAG_ID"
        
        Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
        
        OraDatabase.Parameters.Remove "RTAG_ID"
        
        
        
        If rsQry.RecordCount > 0 Then
                outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
                outobjDetails.Item ("rtag_name") = rsQry("rtag_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. parRtagId="& parRtagId
                
        End If
        
        
        rsQry.Close
        Set rsQry = Nothing
End Sub
'--------------------------------------------------------------------------------------------------------------------------
Sub DeleteDaemon(rcon_id_list)

        objEH.Try()
                
        OraDatabase.Parameters.Add "RCON_ID_LIST",      rcon_id_list,   ORAPARM_INPUT, ORATYPE_VARCHAR2 
                
        OraSession.BeginTrans
                
        OraDatabase.ExecuteSQL _
        "BEGIN  PK_BUILDAPI.DELETE_DAEMON(:RCON_ID_LIST);  END;"        
        OraSession.CommitTrans
                
        objEH.Catch()
        OraDatabase.Parameters.Remove "RCON_ID_LIST"

End Sub
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------
' --- Get Form details from DB ---
Call GetFormDetails ( Request("rtag_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
        If objForm.IsValidOnPostBack Then
                
                Call DeleteDaemon(Request("rcon_id_list"))
                
                If objEH.Finally Then
                        Call OpenInWindow ( "release_config.asp?rtag_id="& parRtagId )
                End If
                
        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="images/common.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.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>ADMINISTER BUILD CONFIGURATION </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>
                <!-- BUTTONS CONTROL +++++++++++++++++++ -->
                <%Call Action_Buttons ( "Add Daemon" )
                
                 ' Load some action buttons
                 Call objBtnControl.LoadActionButtons ( Array("btnEditDaemon", "btnDeleteDaemon"), OraDatabase )
                 objBtnControl.ButtonSpacer = 1
                
                %>
                
                <!-- +++++++++++++++++++++++++++++++++++ -->            

                <table width="100%"  border="0" cellspacing="2" cellpadding="0">    
                        </td>
                        <td width="9%" valign="top"></td>
                  </tr>
                                  <tr>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"></td>                               
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON HOSTNAME</td>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON MODE</td>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE_MACHTYPE</td>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE_BUILDFILTER</td>
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ACTION</td>
                        <td valign="top">
                  </tr>
                        <%
                        query_string = "select * from release_config rc, gbe_machtype gbe "&_
                        " where rc.rtag_id = "& parRtagId &" and gbe.gbe_id = rc.gbe_id order by daemon_mode"
                        Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
                        
                        Dim daemon_mode, daemon
                        
                        '--- Render rows ---
                         Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                        rcon_id = rsQry("rcon_id")
                        daemon  =       rsQry("daemon_hostname")

                         If rsQry("daemon_mode") = "M" Then
                                daemon_mode = "MASTER"
                         Else
                                daemon_mode = "SLAVE"
                         End If

                                
                        %>
      <tr>
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
      </tr>                             
                 <tr>
                <%If rsQry("daemon_mode") = "M" AND rsQry.RecordCount <> 1 Then%>
                 <td align="center"><input type="checkbox" name="rcon_id_list" value="<%=rsQry("rcon_id")%>" disabled></td>
                <%Else%>
                 <td align="center"><input type="checkbox" name="rcon_id_list" value="<%=rsQry("rcon_id")%>"></td>
                <%End If%>
                 <td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
                 <td nowrap class="body_rowg"><%=daemon_mode%></td>
                 <td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
                 <td nowrap class="body_rowg"><%=rsQry("gbe_buildfilter")%></td>
                 <td nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnEditDaemon", "btnDeleteDaemon"), objAccessControl )%></td>
                 </tr>
                 <%
                        rsQry.MoveNext
                 Loop   
                                rsQry.Close()
                                Set rsQry = 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" >

                <%=objFormComponent.CancelButton ( "OK", "class='form_btn'", "dependencies.asp?rtag_id="& parRtagId )%>
                <%=objPMod.ComposeHiddenTags()%>
                <%If objAccessControl.IsActive("AdminView") Then%>
                <input name="btn" type="submit" class="form_btn" value="Delete">
                <%End If%>
                <input type="hidden" name="rcon_id_list" value="<%=Request("rcon_id_list")%>">
                <input type="hidden" name="action" value="true">
                </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
%>