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
' Set rfile parameter. This is a return page after Login
25
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
26
objPMod.PersistInQryString("proj_id")
27
'------------ ACCESS CONTROL ------------------
28
%>
29
<!--#include file="_access_control_login.asp"-->
30
<!--#include file="_access_control_general.asp"-->
31
<!--#include file="_access_control_project.asp"-->
32
<%
33
'------------ Variable Definition -------------
34
Dim objSortHelper
35
Dim rsQry
36
Dim parRtagId
37
Dim parSourceRtagId
38
Dim query_string
39
Dim objBtnControl
129 ghuddy 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
      'outobjDetails.Item ("description") = rsQry("description")
71
      'outobjDetails.Item ("parent_rtag_id") = rsQry("parent_rtag_id")
72
      'outobjDetails.Item ("config_spec_branch") = rsQry("config_spec_branch")
73
      'outobjDetails.Item ("owner_email") = rsQry("owner_email")
74
      'If rsQry("assoc_mass_ref") <> "" Then
75
      'outobjDetails.Item ("massref_rtag_id") = rsQry("assoc_mass_ref")
76
      'End If
77
   Else
78
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
79
 
80
   End If
81
 
82
 
83
   rsQry.Close
84
   Set rsQry = Nothing
119 ghuddy 85
End Sub
86
'--------------------------------------------------------------------------------------------------------------------------
87
Sub DeleteDaemon(rcon_id_list)
88
 
129 ghuddy 89
   OraDatabase.Parameters.Add "RCON_ID_LIST",   rcon_id_list,    ORAPARM_INPUT, ORATYPE_VARCHAR2
119 ghuddy 90
 
129 ghuddy 91
   On Error Resume Next
92
   objEH.TryORA()
93
 
94
   OraDatabase.ExecuteSQL _
95
   "BEGIN  PK_BUILDAPI.DELETE_DAEMON(:RCON_ID_LIST);  END;"
96
 
97
   objEH.CatchORA ( OraSession )
98
 
99
   OraDatabase.Parameters.Remove "RCON_ID_LIST"
119 ghuddy 100
End Sub
101
'--------------------------------------------------------------------------------------------------------------------------
102
%>
103
<%
104
'------------ RUN BEFORE PAGE RENDER ----------
105
' --- Get Form details from DB ---
106
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
107
 
108
' --- Load Validation Rules ---
129 ghuddy 109
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )      ' Load Validation Rules
119 ghuddy 110
 
111
' --- Enter Form Validation Rule Changes here... ----
112
'----------------------------------------------------
113
 
114
' --- RUN onPostBack ---
115
If Request("action") <> "" Then
129 ghuddy 116
   If objForm.IsValidOnPostBack Then
117
 
151 ghuddy 118
      If objAccessControl.IsVisible("ConfigureRelease") Then
119
         Call DeleteDaemon(Request("rcon_id_list"))
120
      End If
129 ghuddy 121
 
122
      If objEH.Finally Then
123
         Call OpenInWindow ( "release_config.asp?rtag_id="& parRtagId )
124
      End If
125
 
126
   End If
127
 
119 ghuddy 128
End If
129
 
130
'----------------------------------------------
131
%>
132
 
133
<html>
151 ghuddy 134
   <head>
135
      <title>Release Manager</title>
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>
119 ghuddy 141
 
151 ghuddy 142
      <!-- DROPDOWN MENUS -->
119 ghuddy 143
 
144
 
151 ghuddy 145
      <!--#include file="_menu_def.asp"-->
146
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
119 ghuddy 147
 
151 ghuddy 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 ---->
119 ghuddy 159
 
151 ghuddy 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 objAccessControl.IsVisible("ConfigureRelease") 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 objAccessControl.IsVisible("ConfigureRelease") Then
213
                           Call Action_Buttons ( "Add Daemon" )
214
                        End If
119 ghuddy 215
 
151 ghuddy 216
                        ' Load some action buttons
217
                        Call objBtnControl.LoadActionButtons ( Array("btnEditDaemon", "btnDeleteDaemon"), OraDatabase )
218
                        objBtnControl.ButtonSpacer = 1
129 ghuddy 219
 
151 ghuddy 220
                        %>
119 ghuddy 221
 
151 ghuddy 222
                        <!-- +++++++++++++++++++++++++++++++++++ -->
119 ghuddy 223
 
151 ghuddy 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 HOSTNAME</td>
231
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON MODE</td>
232
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE_MACHTYPE</td>
155 ghuddy 233
                     <td valign="top"   wrap background="images/bg_table_col.gif" class="body_col">GBE_BUILDFILTER</td>
151 ghuddy 234
                     <%If objAccessControl.IsVisible("ConfigureRelease") 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
                  query_string = "select * from release_config rc, gbe_machtype gbe "&_
241
                  " where rc.rtag_id = "& parRtagId &" and gbe.gbe_id = rc.gbe_id order by daemon_mode"
242
                  Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
119 ghuddy 243
 
151 ghuddy 244
                  Dim daemon_mode, daemon
245
                  Dim cbtype
129 ghuddy 246
 
151 ghuddy 247
                  cbtype = "hidden"
248
                  If objAccessControl.IsVisible("ConfigureRelease") Then
249
                     cbtype = "checkbox"
250
                  End If
129 ghuddy 251
 
151 ghuddy 252
                  '--- Render rows ---
253
                  Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
254
                     rcon_id = rsQry("rcon_id")
255
                     daemon  = rsQry("daemon_hostname")
129 ghuddy 256
 
151 ghuddy 257
                     If rsQry("daemon_mode") = "M" Then
258
                        daemon_mode = "MASTER"
259
                     Else
260
                        daemon_mode = "SLAVE"
261
                     End If
262
                     %>
263
                     <tr>
264
                        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
265
                     </tr>
266
                     <tr>
267
                        <%If rsQry("daemon_mode") = "M" AND rsQry.RecordCount <> 1 Then%>
155 ghuddy 268
                           <td valign="top" align="center"><input type=<%=cbtype%> name="rcon_id_list" value="<%=rsQry("rcon_id")%>" disabled></td>
151 ghuddy 269
                        <%Else%>
155 ghuddy 270
                           <td valign="top" align="center"><input type=<%=cbtype%> name="rcon_id_list" value="<%=rsQry("rcon_id")%>"></td>
151 ghuddy 271
                        <%End If%>
155 ghuddy 272
                        <td valign="top"    nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
273
                        <td valign="top"    nowrap class="body_rowg"><%=daemon_mode%></td>
274
                        <td valign="top"    nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
275
                        <td valign="top"      wrap class="body_rowg"><%=rsQry("gbe_buildfilter")%></td>
151 ghuddy 276
                        <%If objAccessControl.IsVisible("ConfigureRelease") Then%>
155 ghuddy 277
                           <td valign="top" nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnEditDaemon", "btnDeleteDaemon"), objAccessControl )%></td>
151 ghuddy 278
                        <%End If%>
279
                     </tr>
280
                     <%
281
                     rsQry.MoveNext
282
                  Loop
283
                  rsQry.Close()
284
                  Set rsQry = nothing
285
                  %>
129 ghuddy 286
 
151 ghuddy 287
                  <tr>
288
                     <td class="form_iname">&nbsp;</td>
289
                     <td>&nbsp;</td>
290
                     <td class="val_err"></td>
291
                  </tr>
292
               </table>
129 ghuddy 293
 
294
 
151 ghuddy 295
            </td>
296
            <td background="images/lbox_bgside_white.gif">&nbsp;</td>
297
         </tr>
298
         <tr>
299
            <td background="images/bg_action_norm.gif" ></td>
300
            <td align="right" background="images/bg_action_norm.gif" >
119 ghuddy 301
 
151 ghuddy 302
               <%=objFormComponent.CancelButton ( "OK", "class='form_btn'", "dependencies.asp?rtag_id="& parRtagId )%>
303
               <%=objPMod.ComposeHiddenTags()%>
304
               <%If objAccessControl.IsVisible("ConfigureRelease") Then%>
305
                  <input name="btn" type="submit" class="form_btn" value="Delete">
306
               <%End If%>
307
               <input type="hidden" name="rcon_id_list" value="<%=Request("rcon_id_list")%>">
308
               <input type="hidden" name="action" value="true">
309
            </td>
310
            <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
311
         </tr>
312
         <tr>
313
            <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
314
            <td background="images/lbox_bg_blue.gif"></td>
315
            <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
316
         </tr>
129 ghuddy 317
      </table>
318
 
151 ghuddy 319
      <!-- ACTION BUTTONS ---------------------------------------------->
320
      <!-- ACTION BUTTONS END  ------------------------------------------></td>
321
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
119 ghuddy 322
  </tr>
129 ghuddy 323
  <tr>
119 ghuddy 324
    <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>
325
    <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
326
  </tr>
327
<%
328
Call objFormComponent.FormEnd()
329
'-- FROM END ----------------------------------------------------------------------------------------------------------------
129 ghuddy 330
%>
119 ghuddy 331
</table>
332
 
333
 
334
<!-- FOOTER -->
335
<!--#include file="_footer.asp"-->
336
</body>
337
</html>
338
<%
339
Call Destroy_All_Objects
129 ghuddy 340
%>