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