Subversion Repositories DevTools

Rev

Rev 7244 | 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");
7245 dpurdie 52
			var machine_name = trel.find('td:eq(0)').text();
7244 dpurdie 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>
7245 dpurdie 110
					<th width=250>PLATFORMS</th>
7244 dpurdie 111
					<th>Edit</th>         
112
					</tr>
6793 dpurdie 113
                </thead>
5357 dpurdie 114
          <%
7245 dpurdie 115
          Dim rsQry, query
5357 dpurdie 116
          Dim gbe_id, gbe_value
117
          Dim bmcon_id
118
          Dim display_name
7245 dpurdie 119
          Dim machine_hostname, description, active, activeChecked, platforms
120
 
121
		  query = "SELECT" &_
122
                  "    bm.bmcon_id," &_
123
                  "    bm.display_name," &_
124
                  "    bm.machine_hostname," &_
125
                  "    bm.description," &_
126
                  "    bm.gbe_id," &_
127
                  "    bm.active," &_
128
                  "    gb.gbe_value," &_
129
                  "    LISTAGG(bp_name, ', ') WITHIN GROUP( ORDER BY bp_name ) AS platforms" &_
130
                  " FROM" &_
131
                  "    build_machine_config      bm," &_
132
                  "    gbe_machtype              gb," &_
133
                  "    build_platforms           bp," &_
134
                  "    build_platforms_config2   bpc2" &_
135
                  " WHERE" &_
136
                  "    bm.gbe_id = gb.gbe_id" &_
137
                  "    AND bpc2.bmcon_id (+) = bm.bmcon_id" &_
138
                  "    AND bp.bp_id (+) = bpc2.bp_id" &_
139
                  " GROUP BY" &_
140
                  "    bm.bmcon_id," &_
141
                  "    bm.display_name," &_
142
                  "    bm.machine_hostname," &_
143
                  "    bm.description," &_
144
                  "    bm.gbe_id," &_
145
                  "    bm.active," &_
146
                  "    gb.gbe_value" &_
147
                  " ORDER BY" &_
148
                  "    bm.display_name"
5357 dpurdie 149
 
7245 dpurdie 150
          Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
5357 dpurdie 151
          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
152
              bmcon_id = rsQry("bmcon_id")
153
              display_name = rsQry("display_name")
154
              machine_hostname = rsQry("machine_hostname")
155
              active = rsQry("active")
156
              If active = "Y" Then activeChecked = "checked" Else activeChecked = ""
157
              description = rsQry("description")
158
              gbe_id = rsQry("gbe_id")
159
              gbe_value = rsQry("gbe_value")
7245 dpurdie 160
              platforms = rsQry("platforms")
5357 dpurdie 161
              %>
7244 dpurdie 162
              <tr style="vertical-align:top;" data-bmcon_id="<%=bmcon_id%>">
6793 dpurdie 163
                <td nowrap><%=display_name%></td>
164
                <td nowrap><%=machine_hostname%></td>
165
                <td nowrap><%=gbe_value%></td>
166
                <td nowrap><input type="checkbox" disabled <%=activeChecked%> ></td>
167
                <td wrap><%=description%></td>
7245 dpurdie 168
                <td wrap><%=platforms%></td>
7244 dpurdie 169
                <td nowrap class=tight>
170
				<%
171
                    BuildJsButton bCanEdit, "btnEdit", "Edit basic machine properties", "src='icons/i_edit.gif'"
172
                    BuildJsButton bCanEdit, "btnClone",  "Clone platform", "src='icons/i_clone.gif'"
173
                    BuildJsButton bCanEdit, "btnDel ", "Delete the build machine", "src='icons/i_remove.gif'"
174
                 %>
7240 dpurdie 175
				</td>
5357 dpurdie 176
              </tr> 
177
              <%
178
              rsQry.MoveNext()
179
          Wend
180
          rsQry.Close()
181
          Set rsQry = nothing
182
          %>
183
 
184
      <tr>
7245 dpurdie 185
		<td align=right nowrap colspan=7 class=tight>
7244 dpurdie 186
		<% BuildEditButtonRaw bCanEdit, "Add Build Machine", "Add New Build Machine",TRUE, _
187
								 "src='icons/btn_add.gif' width='13' height='13' align='absmiddle' border='0' hspace='3'", _
188
								 "MM_openVixIFrame('wAddBuildMachine.asp','Add Build Machine')"%>
189
		</td>
5357 dpurdie 190
      </tr>
191
 
192
    </table>
193
    <%=objPMod.ComposeHiddenTags()%>
194
    <input type="hidden" name="action" value="true">
195
    <%Call objFormComponent.FormEnd()%>
196
    </table>
197
    </div>
5957 dpurdie 198
<!-- FOOTER -->
199
<!--#include file="_footer.asp"-->
5357 dpurdie 200
</body>
201
</html>