Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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