Subversion Repositories DevTools

Rev

Rev 5957 | Rev 6052 | 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
'=====================================================
4
'|                                                   |
5
'|          Edit/View Build Configuration            |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/_form_window_common.asp"-->
20
<!--#include file="_action_buttons.asp"-->
21
 
22
<!--#include file="class/classActionButtonControl.asp"-->
23
<%
24
objPMod.PersistInQryString("proj_id")
25
'------------ ACCESS CONTROL ------------------
6048 dpurdie 26
%>
5357 dpurdie 27
<!--#include file="_access_control_login.asp"-->
28
<!--#include file="_access_control_project.asp"-->
29
<!--#include file="_access_control_general.asp"-->
30
<%
31
'------------ Variable Definition -------------
32
Dim objSortHelper
33
Dim rsQry
34
Dim parRtagId
35
Dim query_string
36
Dim objBtnControl
37
Dim rcon_id
38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
parRtagId = Request("rtag_id")
41
objPMod.PersistInQryString("rtag_id")
42
Set objBtnControl = New ActionButtonControl
43
'----------------------------------------------
44
%>
45
<%
46
'--------------------------------------------------------------------------------------------------------------------------
47
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
48
   Dim rsQry, query
49
 
50
 
51
   OraDatabase.Parameters.Add "RTAG_ID",    parRtagId,      ORAPARM_INPUT, ORATYPE_NUMBER
52
 
53
   query = _
54
   " SELECT * "&_
55
   "  FROM RELEASE_TAGS rt"&_
56
   " WHERE rt.RTAG_ID = :RTAG_ID"
57
 
58
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
59
 
60
   OraDatabase.Parameters.Remove "RTAG_ID"
61
 
62
 
63
 
64
   If rsQry.RecordCount > 0 Then
65
      outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
66
      outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
67
   Else
68
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
69
 
70
   End If
71
 
72
   rsQry.Close
73
   Set rsQry = Nothing
74
End Sub
75
'--------------------------------------------------------------------------------------------------------------------------
76
Sub DeleteDaemon(rcon_id_list)
77
 
78
   OraDatabase.Parameters.Add "RCON_ID_LIST",   rcon_id_list,    ORAPARM_INPUT, ORATYPE_VARCHAR2
79
 
80
   On Error Resume Next
81
   objEH.TryORA()
82
 
83
   OraDatabase.ExecuteSQL "BEGIN  PK_BUILDAPI.DELETE_DAEMON(:RCON_ID_LIST);  END;"
84
 
85
   objEH.CatchORA ( OraSession )
86
 
87
   OraDatabase.Parameters.Remove "RCON_ID_LIST"
88
End Sub
89
'--------------------------------------------------------------------------------------------------------------------------
90
Sub RemoveDaemon(rcon_id_list)
91
 
92
   OraDatabase.Parameters.Add "RCON_ID_LIST",   rcon_id_list,    ORAPARM_INPUT, ORATYPE_VARCHAR2
93
 
94
   On Error Resume Next
95
   objEH.TryORA()
96
 
97
   OraDatabase.ExecuteSQL "BEGIN  PK_BUILDAPI.REMOVE_DAEMON(:RCON_ID_LIST);  END;"
98
 
99
   objEH.CatchORA ( OraSession )
100
 
101
   OraDatabase.Parameters.Remove "RCON_ID_LIST"
102
End Sub
103
'--------------------------------------------------------------------------------------------------------------------------
104
%>
105
<%
106
'------------ RUN BEFORE PAGE RENDER ----------
107
' --- Get Form details from DB ---
108
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
109
 
110
' --- Enter Form Validation Rule Changes here... ----
111
'----------------------------------------------------
112
 
113
' --- RUN onPostBack ---
114
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
115
   If objForm.IsValidOnPostBack Then
116
      If canActionControlInProject("BuildConfiguration") Then
117
         If Request("btn") = "Delete" Then
118
             Call DeleteDaemon(Request("rcon_id_list"))
119
         ElseIf Request("btn") = "Unlink" Then
120
             Call RemoveDaemon(Request("rcon_id_list"))
121
        End If
122
      End If
123
 
124
      If objEH.Finally Then
125
         Call OpenInWindow ( "release_config.asp?rtag_id="& parRtagId )
126
      End If
127
 
128
   End If
129
 
130
End If
131
 
132
'----------------------------------------------
133
%>
134
 
135
<html>
136
   <head>
137
      <title>Release Manager</title>
138
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
139
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
140
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
141
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
142
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
143
      <script language="JavaScript" src="images/common.js"></script>
144
      <!--#include file="_jquery_includes.asp"-->
145
      <!-- DROPDOWN MENUS -->
146
      <!--#include file="_menu_def.asp"-->
147
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
148
   </head>
149
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
150
      <!-- MENU LAYERS -------------------------------------->
151
      <div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
152
      </div>
153
      <!-- TIPS LAYERS -------------------------------------->
154
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
155
      <!----------------------------------------------------->
156
      <!-- HEADER -->
157
      <!--#include file="_header.asp"-->
158
      <!-- BODY ---->
159
 
160
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
161
         <%
162
         '-- FROM START ---------------------------------------------------------------------------------------------------------
163
         objFormComponent.FormName = "FormName"
164
         objFormComponent.Action = ScriptName
165
         Call objFormComponent.FormStart()
166
         %>
167
         <tr>
168
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
169
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
170
               <table width="10" border="0" cellspacing="0" cellpadding="0">
171
                  <tr>
172
                     <td width="1%"></td>
173
                     <td width="100%">
174
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
175
                           <tr>
176
                              <td nowrap class="body_txt"></td>
177
                           </tr>
178
                        </table>
179
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
180
                           <tr>
181
                              <td nowrap class="form_ttl">
182
                                 <p>&nbsp;</p>
183
                                 <p>
184
                                    <%If canActionControlInProject("BuildConfiguration") Then%>
185
                                       ADMINISTER
186
                                    <%Else%>
187
                                       VIEW
188
                                    <%End If%>
189
                                    BUILD CONFIGURATION
190
                                 </p>
191
                              </td>
192
                              <td align="right" valign="bottom"></td>
193
                           </tr>
194
                        </table>
195
                     </td>
196
                     <td width="1%"></td>
197
                  </tr>
198
                  <tr>
199
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
200
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
201
                     <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
202
                  </tr>
203
                  <tr>
204
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
205
                     <td bgcolor="#FFFFFF" valign="top">
206
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
207
                        <!--#include file="messages/_msg_inline.asp"-->
208
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
209
                        <br>
210
                        <!-- BUTTONS CONTROL +++++++++++++++++++ -->
211
                        <%
212
                        If canActionControlInProject("BuildConfiguration") Then
213
                           Call Action_Buttons ( "Add Daemon" )
214
                        End If
215
 
216
                        ' Load some action buttons
217
                        Call objBtnControl.LoadActionButtons ( Array("btnEditDaemon", "btnRemoveDaemon", "btnDeleteDaemon"), OraDatabase )
218
                        objBtnControl.ButtonSpacer = 1
219
 
220
                        %>
221
 
222
                        <!-- +++++++++++++++++++++++++++++++++++ -->
223
 
224
                        <table width="100%"  border="0" cellspacing="2" cellpadding="0">
225
                     </td>
226
                     <td width="9%" valign="top"></td>
227
                  </tr>
228
                  <tr>
229
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"></td>
230
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON HOST</td>
231
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE_MACHTYPE</td>
232
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON MODE</td>
233
                     <td valign="top"   wrap background="images/bg_table_col.gif" class="body_col">GBE_BUILDFILTER</td>
234
                     <%If canActionControlInProject("BuildConfiguration") Then%>
235
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ACTION</td>
236
                     <%End If%>
237
                     <td valign="top">
238
                  </tr>
239
                  <%
240
 
241
                  query_string = "select rcon_id, display_name, rc.bmcon_id, daemon_mode, gbe_value, gbe_buildfilter " &_
242
                                 " from release_manager.release_config rc," &_
243
                                 "      release_manager.build_machine_config bm," &_
244
                                 "      release_manager.gbe_machtype gbe" &_
245
                                 " where rc.rtag_id=" & parRtagId &_
246
                                 "      and rc.bmcon_id=bm.bmcon_id(+)" &_
247
                                 "      and rc.gbe_id=gbe.gbe_id" &_
248
                                 " order by daemon_mode, bm.display_name"
249
                  Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
250
                  Dim daemon_mode, daemon, cbtype
251
 
252
                  cbtype = "hidden"
253
                  If canActionControlInProject("BuildConfiguration") Then
254
                     cbtype = "checkbox"
255
                  End If
256
 
257
                  '--- Render rows ---
258
                  Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
259
                     rcon_id = rsQry("rcon_id")
260
                     daemon  = rsQry("display_name")
261
                     If IsNull(daemon) Then
262
                         daemon = ""
263
                     End If
264
 
265
                     If rsQry("daemon_mode") = "M" Then
266
                        daemon_mode = "MASTER"
267
                     Else
268
                        daemon_mode = "SLAVE"
269
                     End If
270
                     %>
271
                     <tr>
272
                        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
273
                     </tr>
274
                     <tr>
275
                        <td valign="top" align="center"><input type=<%=cbtype%> name="rcon_id_list" value="<%=rsQry("rcon_id")%>"></td>
276
                        <td valign="top"    nowrap class="body_rowg"><%=daemon%></td>
277
                        <td valign="top"    nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
278
                        <td valign="top"    nowrap class="body_rowg"><%=daemon_mode%></td>
279
                        <td valign="top"      wrap class="body_rowg"><%=rsQry("gbe_buildfilter")%></td>
280
                        <%If canActionControlInProject("BuildConfiguration") Then%>
281
                           <td valign="top" nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnEditDaemon", "btnRemoveDaemon", "btnDeleteDaemon"), objAccessControl )%></td>
282
                        <%End If%>
283
                     </tr>
284
                     <%
285
                     rsQry.MoveNext
286
                  Loop
287
                  rsQry.Close()
288
                  Set rsQry = nothing
289
                  %>
290
 
291
                  <tr>
292
                     <td class="form_iname">&nbsp;</td>
293
                     <td>&nbsp;</td>
294
                     <td class="val_err"></td>
295
                  </tr>
296
               </table>
297
 
298
 
299
            </td>
300
            <td background="images/lbox_bgside_white.gif">&nbsp;</td>
301
         </tr>
302
         <tr>
303
            <td background="images/bg_action_norm.gif" ></td>
304
            <td align="right" background="images/bg_action_norm.gif" >
305
 
306
               <%=objFormComponent.CancelButton ( "OK", "class='form_btn'", "build_status.asp?rtag_id="& parRtagId )%>
307
               <%=objPMod.ComposeHiddenTags()%>
308
               <%If canActionControlInProject("BuildConfiguration") Then%>
309
                  <input name="btn" type="submit" class="form_btn" value="Unlink">
310
                  <input name="btn" type="submit" class="form_btn" value="Delete">
311
               <%End If%>
312
               <input type="hidden" name="rcon_id_list" value="<%=Request("rcon_id_list")%>">
313
               <input type="hidden" name="action" value="true">
314
            </td>
315
            <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
316
         </tr>
317
         <tr>
318
            <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
319
            <td background="images/lbox_bg_blue.gif"></td>
320
            <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
321
         </tr>
322
      </table>
323
 
324
      <!-- ACTION BUTTONS ---------------------------------------------->
325
      <!-- ACTION BUTTONS END  ------------------------------------------></td>
326
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
327
  </tr>
328
  <tr>
329
    <td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
330
    <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
331
  </tr>
332
<%
333
Call objFormComponent.FormEnd()
334
'-- FROM END ----------------------------------------------------------------------------------------------------------------
335
%>
336
</table>
337
<!-- FOOTER -->
338
<!--#include file="_footer.asp"-->
339
</body>
340
</html>