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