Subversion Repositories DevTools

Rev

Rev 7245 | 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
           MM_openVixIFrame('wAddBuildMachine.asp?type=edit&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Edit Build Machine');
45
        });
46
 
47
    	$('.btnDel').click( function(){
48
            var el = $(this);
49
            var trel = el.closest("tr");
50
            var bmcon_id = trel.data("bmcon_id");
7245 dpurdie 51
			var machine_name = trel.find('td:eq(0)').text();
7244 dpurdie 52
			var url = '_DeleteBuildMachine.asp?bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>'
53
            vixConfirm('Remove Build Machine \''+ machine_name +'\' from this list?',{title:'Delete Build Machine', button:'Delete', url: url});
54
        });
55
 
56
    	$('.btnClone').click( function(){
57
            var el = $(this);
58
            var trel = el.closest("tr");
59
            var bmcon_id = trel.data("bmcon_id");
60
            MM_openVixIFrame('wAddBuildMachine.asp?type=clone&bmcon_id=' + bmcon_id + '&rfile=<%=scriptName%><%=objPMod.ComposeURL()%>','Clone Build Machine');
61
        });
62
 
63
    });
64
</script>
65
<%End Sub
66
'-------------------------------------------------
5357 dpurdie 67
%>
68
<html>
69
<head>
70
<title>Build Machine Administration</title>
71
<link rel="shortcut icon" href="<%=FavIcon%>"/>
72
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
73
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 74
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
75
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
76
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 77
<!--#include file="_jquery_includes.asp"-->
78
<!-- DROPDOWN MENUS -->
79
<!--#include file="_menu_def.asp"-->
6579 dpurdie 80
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
7244 dpurdie 81
<%Call InsertJavaScript %>
5357 dpurdie 82
</head>
83
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
84
<!-- HEADER -->
85
<!--#include file="_header.asp"-->
86
 
87
  <%
88
  '-- FROM START ---------------------------------------------------------------------------------------------------------
89
  objFormComponent.FormName = "BUILD_MACHINE"
90
  objFormComponent.Action = ScriptName
91
  objFormComponent.OnSubmit = "ShowProgress();"
92
  Call objFormComponent.FormStart()
93
  %>   
94
  <div class="div_table">
95
    <table border="0" cellspacing="0" cellpadding="0" class="center_table">
96
      <tr>
6793 dpurdie 97
        <td>
98
            <table width="100%"  border="0" cellspacing="1" cellpadding="2" class=stdBrown>
99
                <caption>Current List of Build Machines</caption>
100
                <thead>
101
                <tr>
7244 dpurdie 102
					<!-- BUILD_MACHINE DETAILS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
103
					<th>DISPLAY NAME</th>
104
					<th>MACHINE HOSTNAME</th>
105
					<th>GBE_MACHTYPE</th>
106
					<th>ALLOW USE</th>
107
					<th width=250>DESCRIPTION</th>
7245 dpurdie 108
					<th width=250>PLATFORMS</th>
7244 dpurdie 109
					<th>Edit</th>         
110
					</tr>
6793 dpurdie 111
                </thead>
5357 dpurdie 112
          <%
7245 dpurdie 113
          Dim rsQry, query
5357 dpurdie 114
          Dim gbe_id, gbe_value
115
          Dim bmcon_id
116
          Dim display_name
7245 dpurdie 117
          Dim machine_hostname, description, active, activeChecked, platforms
118
 
119
		  query = "SELECT" &_
120
                  "    bm.bmcon_id," &_
121
                  "    bm.display_name," &_
122
                  "    bm.machine_hostname," &_
123
                  "    bm.description," &_
124
                  "    bm.gbe_id," &_
125
                  "    bm.active," &_
126
                  "    gb.gbe_value," &_
127
                  "    LISTAGG(bp_name, ', ') WITHIN GROUP( ORDER BY bp_name ) AS platforms" &_
128
                  " FROM" &_
129
                  "    build_machine_config      bm," &_
130
                  "    gbe_machtype              gb," &_
131
                  "    build_platforms           bp," &_
132
                  "    build_platforms_config2   bpc2" &_
133
                  " WHERE" &_
134
                  "    bm.gbe_id = gb.gbe_id" &_
135
                  "    AND bpc2.bmcon_id (+) = bm.bmcon_id" &_
136
                  "    AND bp.bp_id (+) = bpc2.bp_id" &_
137
                  " GROUP BY" &_
138
                  "    bm.bmcon_id," &_
139
                  "    bm.display_name," &_
140
                  "    bm.machine_hostname," &_
141
                  "    bm.description," &_
142
                  "    bm.gbe_id," &_
143
                  "    bm.active," &_
144
                  "    gb.gbe_value" &_
145
                  " ORDER BY" &_
146
                  "    bm.display_name"
5357 dpurdie 147
 
7245 dpurdie 148
          Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
5357 dpurdie 149
          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
150
              bmcon_id = rsQry("bmcon_id")
151
              display_name = rsQry("display_name")
152
              machine_hostname = rsQry("machine_hostname")
153
              active = rsQry("active")
154
              If active = "Y" Then activeChecked = "checked" Else activeChecked = ""
155
              description = rsQry("description")
156
              gbe_id = rsQry("gbe_id")
157
              gbe_value = rsQry("gbe_value")
7245 dpurdie 158
              platforms = rsQry("platforms")
5357 dpurdie 159
              %>
7244 dpurdie 160
              <tr style="vertical-align:top;" data-bmcon_id="<%=bmcon_id%>">
6793 dpurdie 161
                <td nowrap><%=display_name%></td>
162
                <td nowrap><%=machine_hostname%></td>
163
                <td nowrap><%=gbe_value%></td>
164
                <td nowrap><input type="checkbox" disabled <%=activeChecked%> ></td>
165
                <td wrap><%=description%></td>
7245 dpurdie 166
                <td wrap><%=platforms%></td>
7244 dpurdie 167
                <td nowrap class=tight>
168
				<%
169
                    BuildJsButton bCanEdit, "btnEdit", "Edit basic machine properties", "src='icons/i_edit.gif'"
170
                    BuildJsButton bCanEdit, "btnClone",  "Clone platform", "src='icons/i_clone.gif'"
171
                    BuildJsButton bCanEdit, "btnDel ", "Delete the build machine", "src='icons/i_remove.gif'"
172
                 %>
7240 dpurdie 173
				</td>
5357 dpurdie 174
              </tr> 
175
              <%
176
              rsQry.MoveNext()
177
          Wend
178
          rsQry.Close()
179
          Set rsQry = nothing
180
          %>
181
 
182
      <tr>
7245 dpurdie 183
		<td align=right nowrap colspan=7 class=tight>
7244 dpurdie 184
		<% BuildEditButtonRaw bCanEdit, "Add Build Machine", "Add New Build Machine",TRUE, _
185
								 "src='icons/btn_add.gif' width='13' height='13' align='absmiddle' border='0' hspace='3'", _
186
								 "MM_openVixIFrame('wAddBuildMachine.asp','Add Build Machine')"%>
187
		</td>
5357 dpurdie 188
      </tr>
189
 
190
    </table>
191
    <%=objPMod.ComposeHiddenTags()%>
192
    <input type="hidden" name="action" value="true">
193
    <%Call objFormComponent.FormEnd()%>
194
    </table>
195
    </div>
5957 dpurdie 196
<!-- FOOTER -->
197
<!--#include file="_footer.asp"-->
5357 dpurdie 198
</body>
199
</html>