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
'|				    ADMIN Page			        	 |
6
'|                  Build	Service                  |
7
'|                                      			 |
8
'=====================================================
9
%>
10
<%
11
Option explicit
12
' Good idea to set when using redirect
13
Response.Expires = 0	' always load the page, dont store
14
%>
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/formating.asp"-->
18
<!--#include file="common/qstr.asp"-->
19
<!--#include file="common/common_subs.asp"-->
20
<!--#include file="sec/Crypt.asp"-->
21
<!--#include file="common/_form_window_common.asp"-->
22
<!--#include file="_action_buttons.asp"-->
23
 
24
<!--#include file="class/classActionButtonControl.asp"-->
25
 
26
<%
27
'------------ ACCESS CONTROL ------------------
28
%>
29
<!--#include file="_access_control_general.asp"-->
30
<%
31
'------------ Variable Definition -------------
32
Dim objBtnControl
33
Dim Query_String
34
Dim rsTemp
35
Dim scheduled_id
36
'------------ Constants Declaration -----------
37
'------------ Variable Init -------------------
38
Set objBtnControl = New ActionButtonControl
39
'----------------------------------------------
40
%>
41
 
42
 
43
 
44
<%
45
' Page Access Condition
46
If NOT objAccessControl.IsActive("ConfigureBuildService") Then
47
	Response.Redirect("message.asp?msg=401-9")
48
End If
49
%>
50
<%
51
Sub UpdateBuildInfo()
52
 
53
	On Error Resume Next
54
	OraDatabase.Parameters.Add "DATABASE_SERVER", 			Request("database server"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
55
	OraDatabase.Parameters.Add "WEB_SERVER", 				Request("web server"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
56
	OraDatabase.Parameters.Add "MAIL_SERVER", 				Request("mail server"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
57
	OraDatabase.Parameters.Add "BUILD_FAILURE_MAIL_SENDER", Request("build failure mail sender"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
58
	OraDatabase.Parameters.Add "DISK_SPACE",				Request("dpkg_archive disk space used"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
59
	OraDatabase.Parameters.Add "SBOM_MANAGEMENT",			Request("sbom management"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2 
60
 
61
	objEH.TryORA ( OraSession )
62
 
63
	OraDatabase.ExecuteSQL _
64
	"BEGIN PK_BUILDAPI.Update_Build_Service ( :DATABASE_SERVER, :WEB_SERVER, :MAIL_SERVER, :BUILD_FAILURE_MAIL_SENDER, :DISK_SPACE, :SBOM_MANAGEMENT ); END;"	
65
 
66
	objEH.CatchORA ( OraSession )
67
 
68
	OraDatabase.Parameters.Remove "DATABASE_SERVER"
69
	OraDatabase.Parameters.Remove "WEB_SERVER"
70
	OraDatabase.Parameters.Remove "MAIL_SERVER"
71
	OraDatabase.Parameters.Remove "BUILD_FAILURE_MAIL_SENDER"
72
	OraDatabase.Parameters.Remove "DISK_SPACE"
73
End Sub
74
%>
75
<%
76
If Request("action") = "true" Then
77
	Call UpdateBuildInfo()
78
	If objEH.Finally Then
79
		Response.Redirect("admin_build_service.asp")
80
	End If
81
End If
82
%>
83
<html>
84
<head>
85
 
86
<title>Build Service Administration</title>
87
 
88
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
89
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
90
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
91
<link rel="stylesheet" href="images/navigation.css" type="text/css">
92
<script language="JavaScript" src="images/common.js"></script>
93
<!-- DROPDOWN MENUS -->
94
<!--#include file="_menu_def.asp"-->
95
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
96
</head>
97
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
98
<!-- MENU LAYERS -------------------------------------->
99
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
100
</div>
101
<!-- TIPS LAYERS -------------------------------------->
102
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
103
<!-- HEADER -->
104
<!--#include file="_header.asp"-->
105
 
106
  <%
107
  '-- FROM START ---------------------------------------------------------------------------------------------------------
108
  objFormComponent.FormName = "UpdateBuildServiceConfig"
109
  objFormComponent.Action = ScriptName
110
  objFormComponent.OnSubmit = "ShowProgress();"
111
  Call objFormComponent.FormStart()
112
  %>   
113
  <tr>
114
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
115
      <tr>
116
        <td><%=ProgressBar%></td>
117
        <td align="right">&nbsp;          </td>
118
      </tr>
119
    </table></td>
120
  </tr>
121
  <tr>
122
    <td><table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
123
	  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
124
	  <%If NOT objEH.Finally Then%>
125
      <tr>
126
        <td class="form_iname">&nbsp;</td>
127
        <td>
128
		 <%objEH.DisplayMessage()%>
129
		</td>
130
        <td class="val_err"></td>
131
      </tr>
132
	  <%End If%>
133
	  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
134
      <tr>
135
        <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">BUILD SERVICE</td>
136
		<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">CONFIGURATION</td>
137
      </tr>
138
	  <%
139
	  Dim rsQry, query
140
 
141
	  query = "SELECT * FROM BUILD_SERVICE_CONFIG"
142
 
143
	  Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
144
 
145
 
146
 
147
	 While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
148
	 %>
149
	<tr>
150
		<td nowrap class="form_iname" valign="top"><%=rsQry("service")%></td>
151
		<td nowrap valign="top">
152
 
153
		<%If Len(rsQry("config")) < 60 Then%>
154
			<%=objFormComponent.TextBox (rsQry("service"), rsQry("config"), "size='60' class='form_ivalue'" )%>
155
		<%Else%>
156
			<%=objFormComponent.TextArea (rsQry("service"), rsQry("config"), 5, 60, "class='form_ivalue'" )%>
157
 
158
		<%End If%>
159
 
160
 
161
		</td>
162
    </tr>
163
	<%
164
	 	rsQry.MoveNext()	
165
	 Wend
166
 
167
	 rsQry.Close()
168
 
169
	 Set rsQry = Nothing 
170
 
171
	  %>
172
      <tr>
173
        <td nowrap class="form_iname">&nbsp;</td>
174
        <td nowrap class="val_err"><input name="btn" type="submit" class="form_btn" value="Update">
175
      </tr>
176
    </table></td>
177
  </tr>
178
  <%=objPMod.ComposeHiddenTags()%>
179
    <input type="hidden" name="action" value="true">
180
    <%
181
  Call objFormComponent.FormEnd()
182
  '-- FROM END ----------------------------------------------------------------------------------------------------------------
183
%>
184
 
185
<form name="run_level_schedule">
186
  <tr>
187
    <td background="images/bg_login.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
188
      <tr>
189
        <td><%=ProgressBar%></td>
190
        <td align="right">&nbsp;          </td>
191
      </tr>
192
    </table></td>
193
  </tr>
194
  <tr>
195
    <td><table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
196
	  <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
197
	  <%If NOT objEH.Finally Then%>
198
      <tr>
199
        <td class="form_iname">&nbsp;</td>
200
        <td>
201
		 <%objEH.DisplayMessage()%>
202
		</td>
203
        <td class="val_err"></td>
204
      </tr>
205
	  <%End If%>
206
	  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
207
		</table>
208
		<table width="25%"  border="0" cellpadding="0">
209
		<!-- BUTTONS CONTROL +++++++++++++++++++ -->
210
		<tr>
211
		<td><%Call Action_Buttons ( "Add Schedule" )%></td>
212
 
213
		<%
214
		Dim rsInfinite, infiniteValue
215
 
216
		Set rsInfinite = OraDatabase.DbCreateDynaset( "select * from run_level_schedule where indefinite_pause is not null", ORADYN_DEFAULT )
217
 
218
		infiniteValue = rsInfinite.RecordCount
219
 
220
		If infiniteValue = 0 Then
221
		%>
222
			<td><%Call Action_Buttons ( "Indefinite Pause" )%></td>
223
		<%Else%>
224
			<td><%Call Action_Buttons ( "Resume" )%></td>
225
 
226
		<%End If
227
 
228
		rsInfinite.Close()
229
		Set rsInfinite = Nothing
230
 
231
 
232
		objEH.TryORA ( OraSession )
233
 
234
		OraDatabase.ExecuteSQL _
235
		"BEGIN PK_BUILDAPI.DELETE_OUT_OF_DATE_SCHEDULE;   END;"
236
 
237
		objEH.CatchORA ( OraSession )
238
 
239
		%>
240
		</tr>
241
		</table>
242
		<%
243
		 ' Load some action buttons
244
		 Call objBtnControl.LoadActionButtons ( Array("btnDeleteSchedule"), OraDatabase )
245
		 objBtnControl.ButtonSpacer = 1
246
 
247
		%>
248
		<%If infiniteValue <> 0 Then %>
249
			<table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
250
			<tr>
251
			<td nowrap class="body_rowg"><b><span class='err_alert'>WARNING!!!</span>Daemons Set To Indefinite Pause.<b></td>
252
			</tr>
253
			</table>
254
		<%End If%>	
255
 
256
		<!-- +++++++++++++++++++++++++++++++++++ -->	
257
		<table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
258
		  <tr>
259
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED PAUSE</td>
260
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED RESUME</td>
261
			<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">REPEAT</td>
262
 
263
			<td valign="top"></td>
264
		  </tr>
265
 
266
 
267
 
268
			<%Set rsQry = OraDatabase.DbCreateDynaset( "select * from run_level_schedule", ORADYN_DEFAULT )
269
 
270
 
271
			'--- Render rows ---
272
			Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
273
			scheduled_id = rsQry("scheduled_id")	
274
 
275
			If NOT IsNull(rsQry("scheduled_pause")) Then
276
 
277
 
278
			%>
279
 
280
			  <tr>
281
				<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
282
			  </tr>	  			
283
				 <tr>
284
				 <td nowrap class="body_rowg"><%=rsQry("scheduled_pause")%></td>
285
				 <td nowrap class="body_rowg"><%=rsQry("scheduled_resume")%></td>
286
				 <td nowrap class="body_rowg"><%=rsQry("repeat")%></td>		 		 
287
				 <td nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnDeleteSchedule"), objAccessControl )%></td>
288
				 </tr>
289
				 <%
290
 
291
			End If
292
			rsQry.MoveNext
293
			Loop	
294
 
295
 
296
			rsQry.Close()
297
			Set rsQry = Nothing
298
			%>
299
 
300
 
301
		</table>
302
 
303
 
304
</form>
305
 
306
 
307
 
308
 
309
 
310
 
311
</body>
312
</html>
313
<!-- FOOTER -->
314
<!--#include file="_footer.asp"-->
315
<%
316
Call Destroy_All_Objects
317
%>