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>
5190 dpurdie 149
      <!--#include file="_jquery_includes.asp"-->
151 ghuddy 150
      <!-- DROPDOWN MENUS -->
151
      <!--#include file="_menu_def.asp"-->
152
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
153
   </head>
154
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
155
      <!-- MENU LAYERS -------------------------------------->
156
      <div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
157
      </div>
158
      <!-- TIPS LAYERS -------------------------------------->
159
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
160
      <!----------------------------------------------------->
161
      <!-- HEADER -->
162
      <!--#include file="_header.asp"-->
163
      <!-- BODY ---->
119 ghuddy 164
 
151 ghuddy 165
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
166
         <%
167
         '-- FROM START ---------------------------------------------------------------------------------------------------------
168
         objFormComponent.FormName = "FormName"
169
         objFormComponent.Action = ScriptName
170
         Call objFormComponent.FormStart()
171
         %>
172
         <tr>
173
            <td width="1" background="images/bg_home_orange.gif" valign="top"></td>
174
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
175
               <table width="10" border="0" cellspacing="0" cellpadding="0">
176
                  <tr>
177
                     <td width="1%"></td>
178
                     <td width="100%">
179
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
180
                           <tr>
181
                              <td nowrap class="body_txt"></td>
182
                           </tr>
183
                        </table>
184
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
185
                           <tr>
186
                              <td nowrap class="form_ttl">
187
                                 <p>&nbsp;</p>
188
                                 <p>
5061 dpurdie 189
                                    <%If canActionControlInProject("BuildConfiguration") Then%>
151 ghuddy 190
                                       ADMINISTER
191
                                    <%Else%>
192
                                       VIEW
193
                                    <%End If%>
194
                                    BUILD CONFIGURATION
195
                                 </p>
196
                              </td>
197
                              <td align="right" valign="bottom"></td>
198
                           </tr>
199
                        </table>
200
                     </td>
201
                     <td width="1%"></td>
202
                  </tr>
203
                  <tr>
204
                     <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
205
                     <td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
206
                     <td align="right" valign="top"  background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
207
                  </tr>
208
                  <tr>
209
                     <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
210
                     <td bgcolor="#FFFFFF" valign="top">
211
                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
212
                        <!--#include file="messages/_msg_inline.asp"-->
213
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
214
                        <br>
215
                        <!-- BUTTONS CONTROL +++++++++++++++++++ -->
216
                        <%
5061 dpurdie 217
                        If canActionControlInProject("BuildConfiguration") Then
151 ghuddy 218
                           Call Action_Buttons ( "Add Daemon" )
219
                        End If
119 ghuddy 220
 
151 ghuddy 221
                        ' Load some action buttons
4293 dpurdie 222
                        Call objBtnControl.LoadActionButtons ( Array("btnEditDaemon", "btnRemoveDaemon", "btnDeleteDaemon"), OraDatabase )
151 ghuddy 223
                        objBtnControl.ButtonSpacer = 1
129 ghuddy 224
 
151 ghuddy 225
                        %>
119 ghuddy 226
 
151 ghuddy 227
                        <!-- +++++++++++++++++++++++++++++++++++ -->
119 ghuddy 228
 
151 ghuddy 229
                        <table width="100%"  border="0" cellspacing="2" cellpadding="0">
230
                     </td>
231
                     <td width="9%" valign="top"></td>
232
                  </tr>
233
                  <tr>
234
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"></td>
161 iaugusti 235
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON HOST</td>
236
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE_MACHTYPE</td>
151 ghuddy 237
                     <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DAEMON MODE</td>
155 ghuddy 238
                     <td valign="top"   wrap background="images/bg_table_col.gif" class="body_col">GBE_BUILDFILTER</td>
5061 dpurdie 239
                     <%If canActionControlInProject("BuildConfiguration") Then%>
151 ghuddy 240
                        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">ACTION</td>
241
                     <%End If%>
242
                     <td valign="top">
243
                  </tr>
244
                  <%
161 iaugusti 245
 
4293 dpurdie 246
                  query_string = "select rcon_id, display_name, rc.bmcon_id, daemon_mode, gbe_value, gbe_buildfilter " &_
247
                                 " from release_manager.release_config rc," &_
248
                                 "      release_manager.build_machine_config bm," &_
249
                                 "      release_manager.gbe_machtype gbe" &_
250
                                 " where rc.rtag_id=" & parRtagId &_
251
                                 "      and rc.bmcon_id=bm.bmcon_id(+)" &_
252
                                 "      and rc.gbe_id=gbe.gbe_id" &_
253
                                 " order by daemon_mode, bm.display_name"
151 ghuddy 254
                  Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
4293 dpurdie 255
                  Dim daemon_mode, daemon, cbtype
119 ghuddy 256
 
151 ghuddy 257
                  cbtype = "hidden"
5061 dpurdie 258
                  If canActionControlInProject("BuildConfiguration") Then
151 ghuddy 259
                     cbtype = "checkbox"
260
                  End If
129 ghuddy 261
 
151 ghuddy 262
                  '--- Render rows ---
263
                  Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
264
                     rcon_id = rsQry("rcon_id")
161 iaugusti 265
                     daemon  = rsQry("display_name")
4293 dpurdie 266
                     If IsNull(daemon) Then
4295 dpurdie 267
                         daemon = ""
4293 dpurdie 268
                     End If
129 ghuddy 269
 
151 ghuddy 270
                     If rsQry("daemon_mode") = "M" Then
271
                        daemon_mode = "MASTER"
272
                     Else
273
                        daemon_mode = "SLAVE"
274
                     End If
275
                     %>
276
                     <tr>
277
                        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
278
                     </tr>
279
                     <tr>
4997 dpurdie 280
                        <td valign="top" align="center"><input type=<%=cbtype%> name="rcon_id_list" value="<%=rsQry("rcon_id")%>"></td>
4293 dpurdie 281
                        <td valign="top"    nowrap class="body_rowg"><%=daemon%></td>
161 iaugusti 282
                        <td valign="top"    nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
155 ghuddy 283
                        <td valign="top"    nowrap class="body_rowg"><%=daemon_mode%></td>
284
                        <td valign="top"      wrap class="body_rowg"><%=rsQry("gbe_buildfilter")%></td>
5061 dpurdie 285
                        <%If canActionControlInProject("BuildConfiguration") Then%>
4293 dpurdie 286
                           <td valign="top" nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnEditDaemon", "btnRemoveDaemon", "btnDeleteDaemon"), objAccessControl )%></td>
151 ghuddy 287
                        <%End If%>
288
                     </tr>
289
                     <%
290
                     rsQry.MoveNext
291
                  Loop
292
                  rsQry.Close()
293
                  Set rsQry = nothing
294
                  %>
129 ghuddy 295
 
151 ghuddy 296
                  <tr>
297
                     <td class="form_iname">&nbsp;</td>
298
                     <td>&nbsp;</td>
299
                     <td class="val_err"></td>
300
                  </tr>
301
               </table>
129 ghuddy 302
 
303
 
151 ghuddy 304
            </td>
305
            <td background="images/lbox_bgside_white.gif">&nbsp;</td>
306
         </tr>
307
         <tr>
308
            <td background="images/bg_action_norm.gif" ></td>
309
            <td align="right" background="images/bg_action_norm.gif" >
119 ghuddy 310
 
4670 dpurdie 311
               <%=objFormComponent.CancelButton ( "OK", "class='form_btn'", "build_status.asp?rtag_id="& parRtagId )%>
151 ghuddy 312
               <%=objPMod.ComposeHiddenTags()%>
5061 dpurdie 313
               <%If canActionControlInProject("BuildConfiguration") Then%>
4295 dpurdie 314
                  <input name="btn" type="submit" class="form_btn" value="Unlink">
151 ghuddy 315
                  <input name="btn" type="submit" class="form_btn" value="Delete">
316
               <%End If%>
317
               <input type="hidden" name="rcon_id_list" value="<%=Request("rcon_id_list")%>">
318
               <input type="hidden" name="action" value="true">
319
            </td>
320
            <td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
321
         </tr>
322
         <tr>
323
            <td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
324
            <td background="images/lbox_bg_blue.gif"></td>
325
            <td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
326
         </tr>
129 ghuddy 327
      </table>
328
 
151 ghuddy 329
      <!-- ACTION BUTTONS ---------------------------------------------->
330
      <!-- ACTION BUTTONS END  ------------------------------------------></td>
331
      <td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
119 ghuddy 332
  </tr>
129 ghuddy 333
  <tr>
119 ghuddy 334
    <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>
335
    <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
336
  </tr>
337
<%
338
Call objFormComponent.FormEnd()
339
'-- FROM END ----------------------------------------------------------------------------------------------------------------
129 ghuddy 340
%>
119 ghuddy 341
</table>
342
 
343
 
344
<!-- FOOTER -->
345
<!--#include file="_footer.asp"-->
346
</body>
347
</html>
348
<%
349
Call Destroy_All_Objects
129 ghuddy 350
%>