Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    	Build Status Information     |
6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
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
<!--#include file="class/classActionButtonControl.asp"-->
22
<%
23
' Set rfile parameter. This is a return page after Login
24
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
25
objPMod.PersistInQryString("proj_id")
26
'------------ ACCESS CONTROL ------------------
27
%>
28
<!--#include file="_access_control_general.asp"-->
29
<%
30
'------------ Variable Definition -------------
31
Dim objSortHelper
32
Dim rsQry
33
Dim parRtagId
34
Dim parSourceRtagId
35
Dim query_string
36
Dim objBtnControl
37
Dim	rcon_id
38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
parRtagId = Request("rtag_id")
41
objPMod.PersistInQryString("rtag_id")
42
Set objBtnControl = New ActionButtonControl
43
'----------------------------------------------
44
%>
45
<%
46
'--------------------------------------------------------------------------------------------------------------------------
47
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
48
	Dim rsQry, query
49
 
50
 
51
	OraDatabase.Parameters.Add "RTAG_ID", 	parRtagId,		ORAPARM_INPUT, ORATYPE_NUMBER 
52
 
53
	query = _
54
	" SELECT * "&_
55
	"  FROM RELEASE_TAGS rt"&_
56
	" WHERE rt.RTAG_ID = :RTAG_ID"
57
 
58
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
59
 
60
	OraDatabase.Parameters.Remove "RTAG_ID"
61
 
62
 
63
 
64
	If rsQry.RecordCount > 0 Then
65
		outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
66
		outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
67
		'outobjDetails.Item ("description") = rsQry("description")
68
		'outobjDetails.Item ("parent_rtag_id") = rsQry("parent_rtag_id")
69
		'outobjDetails.Item ("config_spec_branch") = rsQry("config_spec_branch")
70
		'outobjDetails.Item ("owner_email") = rsQry("owner_email")
71
		'If rsQry("assoc_mass_ref") <> "" Then
72
		'outobjDetails.Item ("massref_rtag_id") = rsQry("assoc_mass_ref")
73
		'End If
74
	Else
75
		Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
76
 
77
	End If
78
 
79
 
80
	rsQry.Close
81
	Set rsQry = Nothing
82
End Sub
83
'--------------------------------------------------------------------------------------------------------------------------
84
Sub RipplePackage (flag)
85
 
86
  On Error Resume Next
87
  objEH.ErrorRedirect = TRUE
88
 
89
	OraDatabase.Parameters.Add "PV_ID_LIST", 		Request("pv_id_list"),	ORAPARM_INPUT, ORATYPE_VARCHAR2
90
	OraDatabase.Parameters.Add "RTAG_ID", 		parRtag_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
91
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId,	ORAPARM_INPUT, ORATYPE_NUMBER 
92
 
93
 
94
	objEH.TryORA ( OraSession )
95
 
96
	If flag Then
97
		OraDatabase.ExecuteSQL _
98
		"BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
99
	Else
100
		OraDatabase.ExecuteSQL _
101
		"BEGIN  UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
102
	End If
103
 
104
	objEH.CatchORA ( OraSession )
105
 
106
 
107
	OraDatabase.Parameters.Remove "PV_ID_LIST"
108
	OraDatabase.Parameters.Remove "RTAG_ID"
109
	OraDatabase.Parameters.Remove "USER_ID"
110
 
111
End Sub
112
'--------------------------------------------------------------------------------------------------------------------------
113
Function Get_Daemon_Mode( cMode )
114
 
115
	If cMode = "S" Then
116
		Get_Daemon_Mode = "Slave"
117
	ElseIf cMode = "M" Then
118
		Get_Daemon_Mode = "Master"
119
	End If
120
 
121
End Function
122
'--------------------------------------------------------------------------------------------------------------------------
123
Function Get_Run_Level( nLevel )
124
 
125
	If nLevel <= 1 Then
126
		Get_Run_Level = "Cannot Continue"
127
	ElseIf nLevel = 2 Then
128
		Get_Run_Level = "Paused"
129
	ElseIf nLevel = 3 Then 
130
		Get_Run_Level = "Actively engaged in a build"
131
	ElseIf nLevel = 4 Then
132
		Get_Run_Level = "Idle"
133
	ElseIf nLevel >= 5 Then
134
		Get_Run_Level = "Waiting"
135
	Else
136
		Get_Run_Level = "<span class='err_alert'>Unknown!</span>"
137
	End If
138
 
139
End Function
140
'--------------------------------------------------------------------------------------------------------------------------
141
Function Get_Package_Name( sPackageName )
142
 
143
	If IsNull(sPackageName) Then
144
		Get_Package_Name = "None"
145
	Else
146
		Get_Package_Name = sPackageName
147
	End If
148
 
149
End Function
150
'--------------------------------------------------------------------------------------------------------------------------
151
%>
152
<%
153
'------------ RUN BEFORE PAGE RENDER ----------
154
' --- Get Form details from DB ---
155
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
156
 
157
' --- Load Validation Rules ---
158
'Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description", "config_spec_branch"), OraDatabase )		' Load Validation Rules
159
 
160
' --- Enter Form Validation Rule Changes here... ----
161
'----------------------------------------------------
162
 
163
' --- RUN onPostBack ---
164
If Request("action") <> "" Then
165
 
166
	If objEH.Finally Then
167
		If Request("action") = "include" Then
168
		  Call RipplePackage (True)
169
		Else
170
			Call OpenInWindow ( "dependencies.asp?rtag_id="& parRtagId )
171
		End If
172
	End If
173
 
174
End If
175
 
176
'----------------------------------------------
177
%>
178
<html>
179
	<head>
180
		<title>Release Manager</title>
181
		<meta http-equiv="Pragma" content="no-cache">
182
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
183
		<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
184
		<link rel="stylesheet" href="images/navigation.css" type="text/css">
185
		<script language="JavaScript" src="images/common.js"></script>
186
		<!-- DROPDOWN MENUS -->
187
		<!--#include file="_menu_def.asp"-->
188
		<script language="JavaScript1.2" src="images/popup_menu.js"></script>
189
	</head>
190
	<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="isChecked('pv_id_list','submit');">
191
		<!-- MENU LAYERS -------------------------------------->
192
		<div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)"></div>
193
		<!-- TIPS LAYERS -------------------------------------->
194
		<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
195
		<!----------------------------------------------------->
196
		<!-- HEADER -->
197
		<!--#include file="_header.asp"-->
198
		<!-- BODY ---->
199
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
200
			<%
201
			'-- FORM START ---------------------------------------------------------------------------------------------------------
202
			objFormComponent.FormName = "FormName"
203
			objFormComponent.Action = ScriptName &"?rtag_id="& parRtagId
204
			Call objFormComponent.FormStart()
205
			%>
206
			<tr>
207
				<td width="1" background="images/bg_home_orange.gif" valign="top">
208
				</td>
209
				<td width="100%" rowspan="1" align="center" valign="top" bgcolor="#EEEFEF"><table width="10" border="0" cellspacing="0" cellpadding="0">
210
						<tr>
211
							<td width="1%"></td>
212
							<td width="100%">
213
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
214
									<tr>
215
										<td nowrap class="body_txt">
216
										</td>
217
									</tr>
218
								</table>
219
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
220
									<tr>
221
										<td nowrap class="form_ttl"><p>&nbsp;</p>
222
											<p>BUILD STATUS INFORMATION</p>
223
										</td>
224
										<td align="right" valign="bottom"></td>
225
									</tr>
226
								</table>
227
							</td>
228
							<td width="1%"></td>
229
						</tr>
230
						<tr>
231
							<td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
232
							<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
233
							<td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
234
						</tr>
235
						<tr>
236
							<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
237
							<td bgcolor="#FFFFFF" valign="top">
238
								<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
239
								<!--#include file="messages/_msg_inline.asp"-->
240
								<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
241
								<br>
242
								<!-- BUTTONS CONTROL +++++++++++++++++++ -->
243
								<!-- +++++++++++++++++++++++++++++++++++ -->
244
								<table width="100%" border="0" cellspacing="2" cellpadding="0">
245
									<span class='err_alert'>
246
										<font size='2'><b>Packages Excluded From Build (Daemon Build Failure)</b></font>
247
									</span>
248
							</td>
249
							<td width="1%" valign="top"></td>
250
						</tr>
251
						<tr>
252
							<td background="images/bg_table_col.gif" class="body_col"></td>
253
							<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE NAME</td>
254
							<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">PACKAGE VERSION</td>
255
						</tr>
256
					<%
257
					query_string = "select * from do_not_ripple dnr, package_versions pv, packages pkg "&_
258
					" where dnr.rtag_id = "& parRtagId &" and pv.pv_id = dnr.pv_id and pkg.pkg_id = pv.pkg_id order by pkg_name"
259
					Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
260
 
261
 
262
					'--- Render rows ---
263
					Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
264
 
265
					%>
266
						<tr>
267
							<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
268
						</tr>
269
						<tr>
270
							<td nowrap width="1%">
271
								<input type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" id="pv_id_list" onClick="isChecked('pv_id_list','submit');">
272
							</td>
273
							<td nowrap class="body_rowg"><%=rsQry("pkg_name")%></td>
274
							<td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
275
						</tr>
276
						<%
277
		 				rsQry.MoveNext
278
					Loop
279
					%>
280
					</table>
281
				</td>
282
				<td background="images/lbox_bgside_white.gif">&nbsp;</td>
283
			</tr>
284
			<%If rsQry.RecordCount > 0 Then%>
285
			<tr>
286
				<td background="images/bg_action_norm.gif"></td>
287
				<td align="right" background="images/bg_action_norm.gif">
288
					<%
289
					Response.Write(objFormComponent.SubmitButton ( "Include", "name='submit' id='submit' class='form_btn' disabled style='color:silver' onClick='return confirmAction(""Are you sure you want to include these packages for building?"")'" ))
290
					Response.Write(objPMod.ComposeHiddenTags())
291
					%>
292
				</td>
293
				<td background="images/bg_action_norm.gif"><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
294
			</tr>
295
			<%End If%>
296
			<tr>
297
				<td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
298
				<td background="images/lbox_bg_blue.gif"></td>
299
				<td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
300
			</tr>
301
		</table>
302
		<!-- ACTION BUTTONS ---------------------------------------------->
303
		<input type="hidden" name="action" value="include"> 
304
		<!-- ACTION BUTTONS END  ------------------------------------------>
305
		</td>
306
		<td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
307
		</tr>
308
		<%
309
		Call objFormComponent.FormEnd()
310
		rsQry.Close()
311
		Set rsQry = nothing	
312
		'-- FORM END ----------------------------------------------------------------------------------------------------------------
313
		%>
314
		<tr>
315
			<td width="1" background="images/bg_home_orange.gif" valign="top">
316
			</td>
317
			<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
318
				<table width="10" border="0" cellspacing="0" cellpadding="0">
319
					<tr>
320
						<td width="1%"></td>
321
						<td width="100%">
322
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
323
								<tr>
324
									<td nowrap class="form_ttl"><p>&nbsp;</p>
325
										<p>DAEMON STATUS INFORMATION
326
										</p>
327
									</td>
328
									<td align="right" valign="bottom"></td>
329
								</tr>
330
							</table>
331
						</td>
332
						<td width="1%"></td>
333
					</tr>
334
					<tr>
335
						<td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
336
						<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
337
						<td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
338
					</tr>
339
					<tr>
340
						<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
341
						<td bgcolor="#FFFFFF" valign="top">
342
							<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
343
							<!--#include file="messages/_msg_inline.asp"-->
344
							<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
345
							<br>
346
							<!-- BUTTONS CONTROL +++++++++++++++++++ -->
347
							<!-- +++++++++++++++++++++++++++++++++++ -->
348
							<table width="100%" border="0" cellspacing="2" cellpadding="0">
349
						</td>
350
						<td width="9%" valign="top"></td>
351
					</tr>
352
					<tr>
353
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Hostname</td>
354
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">GBE Machtype</td>
355
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Mode</td>
356
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Run Level</td>
357
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Current Package</td>
358
						<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Switch State</td>
359
					</tr>
360
					<%
361
 
362
					query_string = "select * from release_config rc, run_level rl, packages pkg, gbe_machtype gm "&_
363
					" where rc.rtag_id = "& parRtagId &" and rc.rcon_id = rl.rcon_id(+) and "&_
364
					" pkg.pkg_id(+) = rl.current_pkg_id_being_built and gm.gbe_id = rc.gbe_id order by rc.daemon_hostname"
365
					Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )
366
 
367
					'--- Render rows ---
368
					Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
369
 
370
					rcon_id = rsQry("rcon_id")
371
 
372
					%>
373
					<tr>
374
						<td colspan="6" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
375
					</tr>
376
					<tr>
377
						<td nowrap class="body_rowg"><%=rsQry("daemon_hostname")%></td>
378
						<td nowrap class="body_rowg"><%=rsQry("gbe_value")%></td>
379
						<td nowrap class="body_rowg"><%=Get_Daemon_Mode(rsQry("daemon_mode"))%></td>
380
						<td nowrap class="body_rowg"><%=Get_Run_Level(rsQry("current_run_level"))%></td>
381
						<td nowrap class="body_rowg"><%=Get_Package_Name(rsQry("pkg_name"))%></td>
382
						<td nowrap class="body_rowg">
383
					<%If NOT IsNull(rsQry("current_run_level")) Then
384
							If objAccessControl.UserLogedIn Then
385
								If IsNull(rsQry("pause")) Then
386
									Call Action_Buttons ( "Daemon Pause" )
387
								Else
388
									Call Action_Buttons ( "Daemon Resume" )
389
								End If
390
							Else
391
								If IsNull(rsQry("pause")) Then
392
									Call Action_Buttons ( "Daemon Pause Disabled" )
393
								Else
394
									Call Action_Buttons ( "Daemon Resume Disabled" )
395
								End If
396
							End If
397
						Else%>
398
							Unavailable
399
					<%End If%>
400
						</td>
401
					</tr>
402
					<%
403
		 			rsQry.MoveNext
404
					Loop	
405
		 			rsQry.Close()
406
					Set rsQry = nothing	
407
					%>
408
				</table>
409
			</td>
410
			<td background="images/lbox_bgside_white.gif">&nbsp;</td>
411
		</tr>
412
		<tr>
413
			<input type="hidden" name="action" value="true">
414
			<%=objPMod.ComposeHiddenTags()%>
415
			<td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
416
			<td background="images/lbox_bg_blue.gif"></td>
417
			<td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
418
		</tr>
419
		</table> 
420
		<!-- ACTION BUTTONS ---------------------------------------------->
421
		<!-- ACTION BUTTONS END  ------------------------------------------> </td>
422
		<td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
423
		</tr>
424
		<tr>
425
			<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>
426
			<td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="350"></td>
427
		</tr>
428
		</table> 
429
		<!-- FOOTER -->
430
		<!--#include file="_footer.asp"-->
431
	</body>
432
</html>
433
<%
434
Call Destroy_All_Objects
435
%>