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