Subversion Repositories DevTools

Rev

Rev 7240 | Rev 7245 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
6770 dpurdie 4
'   admin_build_machine.asp
5357 dpurdie 5
'=====================================================
6
%>
7
<%
8
Option explicit
9
' Good idea to set when using redirect
10
Response.Expires = 0    ' always load the page, dont store
11
%>
12
<!--#include file="common/conf.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/_form_window_common.asp"-->
18
<!--#include file="_action_buttons.asp"-->
19
<!--#include file="class/classActionButtonControl.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
6181 dpurdie 23
<!--#include file="_access_control_login_optional.asp"-->
5357 dpurdie 24
<!--#include file="_access_control_general.asp"-->
25
<%
26
'------------ Variable Definition -------------
27
Dim objBtnControl
5983 dpurdie 28
Dim bCanEdit
5357 dpurdie 29
'------------ Constants Declaration -----------
30
'------------ Variable Init -------------------
31
Set objBtnControl = New ActionButtonControl
5983 dpurdie 32
bCanEdit = canActionControl("ConfigureBuildService")
5357 dpurdie 33
'----------------------------------------------
7244 dpurdie 34
'-------------------------------------------------
35
Sub InsertJavaScript %>
36
<script type="text/javascript" charset="utf-8">
37
    $(document).ready(function(){
38
 
39
    	// Wire up the buttons
40
    	$('.btnEdit').click( function(){
41
            var el = $(this);
42
            var trel = el.closest("tr");
43
            var bmcon_id = trel.data("bmcon_id");
44
console.log("Edit:", bmcon_id);
45
           MM_openVixIFrame('wAddBuildMachine.asp?type=edit&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Edit Build Machine');
46
        });
47
 
48
    	$('.btnDel').click( function(){
49
            var el = $(this);
50
            var trel = el.closest("tr");
51
            var bmcon_id = trel.data("bmcon_id");
52
			var machine_name = trel.find('td:eq(2)').text();
53
			var url = '_DeleteBuildMachine.asp?bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>'
54
            vixConfirm('Remove Build Machine \''+ machine_name +'\' from this list?',{title:'Delete Build Machine', button:'Delete', url: url});
55
        });
56
 
57
    	$('.btnClone').click( function(){
58
            var el = $(this);
59
            var trel = el.closest("tr");
60
            var bmcon_id = trel.data("bmcon_id");
61
            MM_openVixIFrame('wAddBuildMachine.asp?type=clone&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Clone Build Machine');
62
console.log("Cfg", bmcon_id);
63
        });
64
 
65
    });
66
</script>
67
<%End Sub
68
'-------------------------------------------------
5357 dpurdie 69
%>
70
<html>
71
<head>
72
<title>Build Machine Administration</title>
73
<link rel="shortcut icon" href="<%=FavIcon%>"/>
74
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
75
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 76
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
77
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
78
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 79
<!--#include file="_jquery_includes.asp"-->
80
<!-- DROPDOWN MENUS -->
81
<!--#include file="_menu_def.asp"-->
6579 dpurdie 82
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
7244 dpurdie 83
<%Call InsertJavaScript %>
5357 dpurdie 84
</head>
85
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
86
<!-- HEADER -->
87
<!--#include file="_header.asp"-->
88
 
89
  <%
90
  '-- FROM START ---------------------------------------------------------------------------------------------------------
91
  objFormComponent.FormName = "BUILD_MACHINE"
92
  objFormComponent.Action = ScriptName
93
  objFormComponent.OnSubmit = "ShowProgress();"
94
  Call objFormComponent.FormStart()
95
  %>   
96
  <div class="div_table">
97
    <table border="0" cellspacing="0" cellpadding="0" class="center_table">
98
      <tr>
6793 dpurdie 99
        <td>
100
            <table width="100%"  border="0" cellspacing="1" cellpadding="2" class=stdBrown>
101
                <caption>Current List of Build Machines</caption>
102
                <thead>
103
                <tr>
7244 dpurdie 104
					<!-- BUILD_MACHINE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
105
					<th>DISPLAY NAME</th>
106
					<th>MACHINE HOSTNAME</th>
107
					<th>GBE_MACHTYPE</th>
108
					<th>ALLOW USE</th>
109
					<th width=250>DESCRIPTION</th>
110
					<th>Edit</th>         
111
					</tr>
6793 dpurdie 112
                </thead>
5357 dpurdie 113
          <%
114
          Dim rsQry
115
          Dim gbe_id, gbe_value
116
          Dim bmcon_id
117
          Dim display_name
118
          Dim machine_hostname, description, active, activeChecked
119
 
120
          Set rsQry = OraDatabase.DbCreateDynaset( "SELECT bm.bmcon_id, bm.display_name,bm.machine_hostname, bm.description, bm.gbe_id, bm.active, gb.gbe_value FROM BUILD_MACHINE_CONFIG bm, GBE_MACHTYPE gb WHERE bm.gbe_id = gb.gbe_id ORDER BY bm.display_name", ORADYN_DEFAULT )
121
          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
122
              bmcon_id = rsQry("bmcon_id")
123
              display_name = rsQry("display_name")
124
              machine_hostname = rsQry("machine_hostname")
125
              active = rsQry("active")
126
              If active = "Y" Then activeChecked = "checked" Else activeChecked = ""
127
              description = rsQry("description")
128
              gbe_id = rsQry("gbe_id")
129
              gbe_value = rsQry("gbe_value")
130
              %>
7244 dpurdie 131
              <tr style="vertical-align:top;" data-bmcon_id="<%=bmcon_id%>">
6793 dpurdie 132
                <td nowrap><%=display_name%></td>
133
                <td nowrap><%=machine_hostname%></td>
134
                <td nowrap><%=gbe_value%></td>
135
                <td nowrap><input type="checkbox" disabled <%=activeChecked%> ></td>
136
                <td wrap><%=description%></td>
7244 dpurdie 137
                <td nowrap class=tight>
138
				<%
139
                    BuildJsButton bCanEdit, "btnEdit", "Edit basic machine properties", "src='icons/i_edit.gif'"
140
                    BuildJsButton bCanEdit, "btnClone",  "Clone platform", "src='icons/i_clone.gif'"
141
                    BuildJsButton bCanEdit, "btnDel ", "Delete the build machine", "src='icons/i_remove.gif'"
142
                 %>
7240 dpurdie 143
				</td>
5357 dpurdie 144
              </tr> 
145
              <%
146
              rsQry.MoveNext()
147
          Wend
148
          rsQry.Close()
149
          Set rsQry = nothing
150
          %>
151
 
152
      <tr>
7244 dpurdie 153
		<td align=right nowrap colspan=6 class=tight>
154
		<% BuildEditButtonRaw bCanEdit, "Add Build Machine", "Add New Build Machine",TRUE, _
155
								 "src='icons/btn_add.gif' width='13' height='13' align='absmiddle' border='0' hspace='3'", _
156
								 "MM_openVixIFrame('wAddBuildMachine.asp','Add Build Machine')"%>
157
		</td>
5357 dpurdie 158
      </tr>
159
 
160
    </table>
161
    <%=objPMod.ComposeHiddenTags()%>
162
    <input type="hidden" name="action" value="true">
163
    <%Call objFormComponent.FormEnd()%>
164
    </table>
165
    </div>
5957 dpurdie 166
<!-- FOOTER -->
167
<!--#include file="_footer.asp"-->
5357 dpurdie 168
</body>
169
</html>