Subversion Repositories DevTools

Rev

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