Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'   admin_build_machine.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="_action_buttons.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 bmcon_id = trel.data("bmcon_id");
           MM_openVixIFrame('wAddBuildMachine.asp?type=edit&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Edit Build Machine');
        });

        $('.btnDel').click( function(){
            var el = $(this);
            var trel = el.closest("tr");
            var bmcon_id = trel.data("bmcon_id");
                        var machine_name = trel.find('td:eq(0)').text();
                        var url = '_DeleteBuildMachine.asp?bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>'
            vixConfirm('Remove Build Machine \''+ machine_name +'\' from this list?',{title:'Delete Build Machine', button:'Delete', url: url});
        });

        $('.btnClone').click( function(){
            var el = $(this);
            var trel = el.closest("tr");
            var bmcon_id = trel.data("bmcon_id");
            MM_openVixIFrame('wAddBuildMachine.asp?type=clone&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Clone Build Machine');
        });

    });
</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="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_MACHINE"
  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 Machines</caption>
                <thead>
                <tr>
                                        <!-- BUILD_MACHINE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                                        <th>DISPLAY NAME</th>
                                        <th>MACHINE HOSTNAME</th>
                                        <th>GBE_MACHTYPE</th>
                                        <th>ALLOW USE</th>
                                        <th width=250>DESCRIPTION</th>
                                        <th width=250>PLATFORMS</th>
                                        <th>Edit</th>         
                                        </tr>
                </thead>
          <%
          Dim rsQry, query
          Dim gbe_id, gbe_value
          Dim bmcon_id
          Dim display_name
          Dim machine_hostname, description, active, activeChecked, platforms

                  query = "SELECT" &_
                  "    bm.bmcon_id," &_
                  "    bm.display_name," &_
                  "    bm.machine_hostname," &_
                  "    bm.description," &_
                  "    bm.gbe_id," &_
                  "    bm.active," &_
                  "    gb.gbe_value," &_
                  "    LISTAGG(bp_name, ', ') WITHIN GROUP( ORDER BY bp_name ) AS platforms" &_
                  " FROM" &_
                  "    build_machine_config      bm," &_
                  "    gbe_machtype              gb," &_
                  "    build_platforms           bp," &_
                  "    build_platforms_config2   bpc2" &_
                  " WHERE" &_
                  "    bm.gbe_id = gb.gbe_id" &_
                  "    AND bpc2.bmcon_id (+) = bm.bmcon_id" &_
                  "    AND bp.bp_id (+) = bpc2.bp_id" &_
                  " GROUP BY" &_
                  "    bm.bmcon_id," &_
                  "    bm.display_name," &_
                  "    bm.machine_hostname," &_
                  "    bm.description," &_
                  "    bm.gbe_id," &_
                  "    bm.active," &_
                  "    gb.gbe_value" &_
                  " ORDER BY" &_
                  "    bm.display_name"
          
          Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
              bmcon_id = rsQry("bmcon_id")
              display_name = rsQry("display_name")
              machine_hostname = rsQry("machine_hostname")
              active = rsQry("active")
              If active = "Y" Then activeChecked = "checked" Else activeChecked = ""
              description = rsQry("description")
              gbe_id = rsQry("gbe_id")
              gbe_value = rsQry("gbe_value")
              platforms = rsQry("platforms")
              %>
              <tr style="vertical-align:top;" data-bmcon_id="<%=bmcon_id%>">
                <td nowrap><%=display_name%></td>
                <td nowrap><%=machine_hostname%></td>
                <td nowrap><%=gbe_value%></td>
                <td nowrap><input type="checkbox" disabled <%=activeChecked%> ></td>
                <td wrap><%=description%></td>
                <td wrap><%=platforms%></td>
                <td nowrap class=tight>
                                <%
                    BuildJsButton bCanEdit, "btnEdit", "Edit basic machine properties", "src='icons/i_edit.gif'"
                    BuildJsButton bCanEdit, "btnClone",  "Clone platform", "src='icons/i_clone.gif'"
                    BuildJsButton bCanEdit, "btnDel ", "Delete the build machine", "src='icons/i_remove.gif'"
                 %>
                                </td>
              </tr> 
              <%
              rsQry.MoveNext()
          Wend
          rsQry.Close()
          Set rsQry = nothing
          %>
        
      <tr>
                <td align=right nowrap colspan=7 class=tight>
                <% BuildEditButtonRaw bCanEdit, "Add Build Machine", "Add New Build Machine",TRUE, _
                                                                 "src='icons/btn_add.gif' width='13' height='13' align='absmiddle' border='0' hspace='3'", _
                                                                 "MM_openVixIFrame('wAddBuildMachine.asp','Add Build Machine')"%>
                </td>
      </tr>

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