Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'   admin_build_platforms.asp
'=====================================================
%>
<%
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="class/classActionButtonControl.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login_optional.asp"-->
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim objBtnControl
Dim bCanEdit
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
Set objBtnControl = New ActionButtonControl
bCanEdit = canActionControl("ConfigureBuildService")
'----------------------------------------------
'-------------------------------------------------
Sub InsertJavaScript %>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        // Wire up the buttons
        $('.btnEdit').click( function(){
            var el = $(this);
            var trel = el.closest("tr");
            var bp_id = trel.data("bp_id");
           MM_openVixIFrame('wAddBuildPlatform.asp?type=edit&bp_id=' + bp_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Edit Build Platform');
        });

        $('.btnDel').click( function(){
            var el = $(this);
            var trel = el.closest("tr");
            var bp_id = trel.data("bp_id");
                        var platform_name = trel.find('td:eq(0)').text();
                        var url = '_DeleteBuildPlatform.asp?bp_id=' + bp_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>'
            vixConfirm('Remove Build Platform \''+ platform_name +'\' from this list?',{title:'Delete Build Platform', button:'Delete', url: url});
        });
    });
</script>
<%End Sub
'-------------------------------------------------
%>
<html>
<head>
<title>Build Machine Administration</title>
<link rel="shortcut icon" href="<%=FavIcon%>"/>
<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?ver=<%=VixVerNum%>" type="text/css">
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
<script language="JavaScript" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
<!--#include file="_jquery_includes.asp"-->
<!-- DROPDOWN MENUS -->
<!--#include file="_menu_def.asp"-->
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
<%Call InsertJavaScript %>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
<!-- HEADER -->
<!--#include file="_header.asp"-->
  <%
  '-- FROM START ---------------------------------------------------------------------------------------------------------
  objFormComponent.FormName = "BUILD_PLATFORMS"
  objFormComponent.Action = ScriptName
  objFormComponent.OnSubmit = "ShowProgress();"
  Call objFormComponent.FormStart()
  %>   
  <div class="div_table">
    <table border="0" cellspacing="0" cellpadding="0" class="center_table">
      <tr>
        <td>
            <table width="100%"  border="0" cellspacing="1" cellpadding="2" class=stdBrown>
                <caption>Current List of Build Platforms</caption>
                <thead>
                <tr>
                <!-- BUILD_MACHINE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                                        <th>PLATFORM NAME</th>
                                        <th>ALLOW USE</th>
                                        <th width=250>DESCRIPTION</th>
                                        <th>MACHTYPES</th>
                                        <th>Edit</th>         
                </tr>
                </thead>

          <%
          Dim rsQry
          Dim bp_id
          Dim bp_name
          Dim description, active, activeChecked
          DIM Query          
                  Query =   "SELECT" &_
                    "    bp.bp_id," &_
                    "    bp_name," &_
                    "    bp_active," &_
                    "    bp_description," &_
                    "    LISTAGG(gbe_value, ', ') within group (order by gbe_value) as machTypes" &_
                    " FROM" &_
                    "    build_platforms bp," &_
                    "    gbe_machtype             gbe," &_
                    "    build_platforms_config   bpc" &_
                    " WHERE" &_
                    "    gbe.gbe_id(+) = bpc.gbe_id" &_
                    "    AND bpc.bp_id(+) = bp.bp_id" &_
                    " GROUP BY bp.bp_id, bp_name, bp_active, bp_description" &_
                    " ORDER BY upper(bp.bp_name)"

          Set rsQry = OraDatabase.DbCreateDynaset( Query, ORADYN_DEFAULT )
          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
              bp_id = rsQry("bp_id")
              bp_name = rsQry("bp_name")
              active = rsQry("bp_active")
              If active = "Y" Then activeChecked = "checked" Else activeChecked = ""
              description = rsQry("bp_description")
              %>
              <tr style="vertical-align:top;" data-bp_id="<%=bp_id%>">
                <td nowrap>
                                        <%=bp_name%>
                                </td>
                <td nowrap><input type="checkbox" disabled <%=activeChecked%> ></td>
                <td wrap><%=description%></td>
                <td wrap><%=rsQry("machTypes")%></td>
                <td nowrap class=tight>
                                <%
                    BuildJsButton bCanEdit, "btnEdit", "Edit Build Platform", "src='icons/i_edit.gif'"
                    BuildJsButton bCanEdit, "btnDel ", "Delete Build Platform", "src='icons/i_remove.gif'"
                 %>
                                </td>
              </tr> 
              <%
              rsQry.MoveNext()
          Wend
          rsQry.Close()
          Set rsQry = nothing
          %>
        
      <tr>
        <td align=right nowrap colspan=5 class=tight>
                <% BuildEditButtonRaw bCanEdit, "Add Build Platform", "Insert New Build Platform",TRUE, _
                                                                 "src='icons/btn_add.gif' width='13' height='13' align='absmiddle' border='0' hspace='3'", _
                                                                 "MM_openVixIFrame('wAddBuildPlatform.asp','Add Build Platform')"%>
      </tr>

    </table>
    <%=objPMod.ComposeHiddenTags()%>
    <input type="hidden" name="action" value="true">
    <%Call objFormComponent.FormEnd()%>
    </table>
    </div>
<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>