| 5357 |
dpurdie |
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="common/_form_window_common.asp"-->
|
|
|
21 |
<!--#include file="_action_buttons.asp"-->
|
|
|
22 |
|
|
|
23 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
24 |
|
|
|
25 |
<%
|
|
|
26 |
'------------ ACCESS CONTROL ------------------
|
|
|
27 |
%>
|
| 6181 |
dpurdie |
28 |
<!--#include file="_access_control_login_optional.asp"-->
|
| 5357 |
dpurdie |
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 |
Sub UpdateBuildInfo()
|
|
|
44 |
Dim fList, regexp
|
|
|
45 |
Set regexp = new RegExp
|
|
|
46 |
regexp.Global = True
|
|
|
47 |
|
|
|
48 |
' Convert the 'fault email address list' into a Nice comma seperated list
|
|
|
49 |
regexp.Pattern = "[ ,:]+"
|
|
|
50 |
fList = regexp.Replace(Request("fault email address list"), ",")
|
|
|
51 |
regexp.Pattern = ",$"
|
|
|
52 |
fList = regexp.Replace(fList, "")
|
|
|
53 |
regexp.Pattern = "^,"
|
|
|
54 |
fList = regexp.Replace(fList, "")
|
|
|
55 |
|
|
|
56 |
On Error Resume Next
|
|
|
57 |
OraDatabase.Parameters.Add "DATABASE_SERVER", Request("database server"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
58 |
OraDatabase.Parameters.Add "ARCHIVE_SERVER", Request("archive server"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
59 |
OraDatabase.Parameters.Add "MAIL_SERVER", Request("mail server"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
60 |
OraDatabase.Parameters.Add "BUILD_FAILURE_MAIL_SENDER", Request("build failure mail sender"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
61 |
OraDatabase.Parameters.Add "FAULT_EMAIL_ADDRESS_LIST", fList, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
62 |
OraDatabase.Parameters.Add "DISK_SPACE", Request("dpkg_archive disk space used"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
63 |
OraDatabase.Parameters.Add "SBOM_MANAGEMENT", Request("sbom management"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 6077 |
dpurdie |
64 |
OraDatabase.Parameters.Add "LXR_SERVER", Request("lxr server"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 5357 |
dpurdie |
65 |
|
|
|
66 |
objEH.TryORA ( OraSession )
|
|
|
67 |
|
|
|
68 |
OraDatabase.ExecuteSQL _
|
|
|
69 |
"BEGIN PK_BUILDAPI.Update_Build_Service_Info ( " &_
|
|
|
70 |
":DATABASE_SERVER, " &_
|
|
|
71 |
":ARCHIVE_SERVER, " &_
|
|
|
72 |
":MAIL_SERVER, " &_
|
|
|
73 |
":BUILD_FAILURE_MAIL_SENDER, " &_
|
|
|
74 |
":FAULT_EMAIL_ADDRESS_LIST, " &_
|
|
|
75 |
":DISK_SPACE, " &_
|
| 6077 |
dpurdie |
76 |
":SBOM_MANAGEMENT, " &_
|
|
|
77 |
":LXR_SERVER ); END;"
|
| 5357 |
dpurdie |
78 |
|
|
|
79 |
objEH.CatchORA ( OraSession )
|
|
|
80 |
|
|
|
81 |
OraDatabase.Parameters.Remove "DATABASE_SERVER"
|
|
|
82 |
OraDatabase.Parameters.Remove "ARCHIVE_SERVER"
|
|
|
83 |
OraDatabase.Parameters.Remove "MAIL_SERVER"
|
|
|
84 |
OraDatabase.Parameters.Remove "BUILD_FAILURE_MAIL_SENDER"
|
|
|
85 |
OraDatabase.Parameters.Remove "FAULT_EMAIL_ADDRESS_LIST"
|
|
|
86 |
OraDatabase.Parameters.Remove "DISK_SPACE"
|
|
|
87 |
OraDatabase.Parameters.Remove "SBOM_MANAGEMENT"
|
| 6077 |
dpurdie |
88 |
OraDatabase.Parameters.Remove "LXR_SERVER"
|
| 5357 |
dpurdie |
89 |
End Sub
|
|
|
90 |
%>
|
|
|
91 |
<%
|
|
|
92 |
If Request("action") = "true" Then
|
|
|
93 |
Call UpdateBuildInfo()
|
|
|
94 |
If objEH.Finally Then
|
| 5957 |
dpurdie |
95 |
Call Destroy_All_Objects
|
| 5357 |
dpurdie |
96 |
Response.Redirect("admin_build_service.asp")
|
|
|
97 |
End If
|
|
|
98 |
End If
|
|
|
99 |
%>
|
|
|
100 |
<html>
|
|
|
101 |
<head>
|
|
|
102 |
<title>Build Service Administration</title>
|
|
|
103 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
104 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
105 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
106 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
107 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
108 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 7288 |
dpurdie |
109 |
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
110 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
111 |
<!-- DROPDOWN MENUS -->
|
|
|
112 |
<!--#include file="_menu_def.asp"-->
|
| 6579 |
dpurdie |
113 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
114 |
</head>
|
| 6878 |
dpurdie |
115 |
<body>
|
| 5357 |
dpurdie |
116 |
<!-- HEADER -->
|
|
|
117 |
<!--#include file="_header.asp"-->
|
|
|
118 |
<!-- Body of the page -->
|
| 6878 |
dpurdie |
119 |
<div class="bg_grey">
|
| 7288 |
dpurdie |
120 |
<div id='divProgressBar' class='vixSpinner' style='visibility:hidden;'></div>
|
| 6878 |
dpurdie |
121 |
<table style='margin-left: auto;margin-right: auto;'>
|
| 5357 |
dpurdie |
122 |
<%
|
|
|
123 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
124 |
Dim bReadOnly: bReadOnly = NOT canActionControl("ConfigureBuildService")
|
|
|
125 |
objFormComponent.FormName = "UpdateBuildServiceConfig"
|
|
|
126 |
objFormComponent.Action = ScriptName
|
|
|
127 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
128 |
' Page Access Condition
|
|
|
129 |
If bReadOnly Then
|
|
|
130 |
objFormComponent.IsReadonlyAction = enumDB_YES
|
|
|
131 |
End If
|
|
|
132 |
|
|
|
133 |
Call objFormComponent.FormStart()
|
|
|
134 |
%>
|
|
|
135 |
<tr>
|
|
|
136 |
<td>
|
| 6916 |
dpurdie |
137 |
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="rounded_box lhsGrey rounded_box_pad">
|
| 6878 |
dpurdie |
138 |
<caption>Build Service Configuration</caption>
|
| 5357 |
dpurdie |
139 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
140 |
<%If NOT objEH.Finally Then%>
|
|
|
141 |
<tr>
|
|
|
142 |
<td class="form_iname"> </td>
|
|
|
143 |
<td>
|
|
|
144 |
<%objEH.DisplayMessage()%>
|
|
|
145 |
</td>
|
|
|
146 |
<td class="val_err"></td>
|
|
|
147 |
</tr>
|
|
|
148 |
<%End If%>
|
|
|
149 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 6878 |
dpurdie |
150 |
<thead>
|
|
|
151 |
<th class='tleft' nowrap>Item</th>
|
|
|
152 |
<th class='tleft' nowrap>Value</th>
|
|
|
153 |
</thead>
|
| 5357 |
dpurdie |
154 |
<%
|
|
|
155 |
|
|
|
156 |
Dim rsQry, query
|
|
|
157 |
|
|
|
158 |
query = "SELECT * FROM BUILD_SERVICE_CONFIG WHERE service NOT IN ('MUTEX','WEB SERVER')"
|
|
|
159 |
|
|
|
160 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
161 |
|
|
|
162 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
|
|
|
163 |
%>
|
|
|
164 |
<tr>
|
| 6878 |
dpurdie |
165 |
<td nowrap valign="top"><%=rsQry("service")%></td>
|
|
|
166 |
<td nowrap valign="top" >
|
| 5357 |
dpurdie |
167 |
<%If Len(rsQry("config")) < 60 Then%>
|
| 6878 |
dpurdie |
168 |
<%=objFormComponent.TextBox (rsQry("service"), rsQry("config"), "size='60'" )%>
|
| 5357 |
dpurdie |
169 |
<%Else%>
|
| 6878 |
dpurdie |
170 |
<%=objFormComponent.TextArea (rsQry("service"), rsQry("config"), 5, 60, "" )%>
|
| 5357 |
dpurdie |
171 |
<%End If%>
|
|
|
172 |
</td>
|
|
|
173 |
</tr>
|
|
|
174 |
<%
|
|
|
175 |
rsQry.MoveNext()
|
|
|
176 |
Wend
|
|
|
177 |
|
|
|
178 |
rsQry.Close()
|
|
|
179 |
Set rsQry = Nothing
|
|
|
180 |
%>
|
|
|
181 |
<tr>
|
| 6878 |
dpurdie |
182 |
<td nowrap> </td>
|
|
|
183 |
<td nowrap class="val_err hdr">
|
| 5357 |
dpurdie |
184 |
<%If bReadOnly Then%>
|
|
|
185 |
<input name="btn" type="submit" class="form_btn" value="Update" disabled>
|
|
|
186 |
<%Else%>
|
|
|
187 |
<input name="btn" type="submit" class="form_btn" value="Update">
|
|
|
188 |
<%End If%>
|
|
|
189 |
</td>
|
|
|
190 |
</tr>
|
|
|
191 |
</table>
|
|
|
192 |
</td>
|
|
|
193 |
</tr>
|
|
|
194 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
195 |
<input type="hidden" name="action" value="true">
|
|
|
196 |
<%
|
|
|
197 |
Call objFormComponent.FormEnd()
|
|
|
198 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
199 |
%>
|
|
|
200 |
<tr>
|
|
|
201 |
<td style="padding-top: 20px;">
|
| 6878 |
dpurdie |
202 |
<table width="100%" bgcolor="#FFCC00" class="embedded_table rounded_box">
|
|
|
203 |
<caption>Build Daemon Control</caption>
|
| 5357 |
dpurdie |
204 |
<form name="run_level_schedule">
|
|
|
205 |
<tr>
|
|
|
206 |
<td>
|
|
|
207 |
<fieldset>
|
| 7063 |
dpurdie |
208 |
<legend class="body_txt">Build Daemon Control</legend>
|
| 6878 |
dpurdie |
209 |
<table width="100%" class="embedded_table" >
|
| 5357 |
dpurdie |
210 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
211 |
<tr>
|
|
|
212 |
<td>
|
|
|
213 |
<%
|
| 7063 |
dpurdie |
214 |
If IndefPause Then
|
|
|
215 |
Call Action_Buttons_State ( "Resume", NOT bReadOnly )
|
|
|
216 |
Else
|
| 6786 |
dpurdie |
217 |
Call Action_Buttons_State ( "Indefinite Pause", NOT bReadOnly )
|
| 5357 |
dpurdie |
218 |
End If
|
|
|
219 |
%>
|
|
|
220 |
</tr>
|
|
|
221 |
</table>
|
|
|
222 |
</fieldset>
|
|
|
223 |
<%
|
|
|
224 |
On Error Resume Next
|
|
|
225 |
objEH.TryORA ( OraSession )
|
|
|
226 |
OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.DELETE_OUT_OF_DATE_SCHEDULE; END;"
|
|
|
227 |
objEH.CatchORA ( OraSession )
|
|
|
228 |
%>
|
|
|
229 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
230 |
<%
|
|
|
231 |
' Load some action buttons
|
|
|
232 |
Call objBtnControl.LoadActionButtons ( Array("btnDeleteSchedule"), OraDatabase )
|
|
|
233 |
objBtnControl.ButtonSpacer = 1
|
|
|
234 |
objBtnControl.ReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE
|
|
|
235 |
if bReadOnly Then objBtnControl.IsReadonlyAction = enumDB_YES
|
|
|
236 |
%>
|
|
|
237 |
|
|
|
238 |
<fieldset>
|
|
|
239 |
<legend class="body_txt">Scheduled Outages</legend>
|
|
|
240 |
|
| 6878 |
dpurdie |
241 |
<table width="100%" class="embedded_table stdGrey" border="0" cellspacing="1" cellpadding="2">
|
|
|
242 |
<thead>
|
|
|
243 |
<th>Scheduled Pause</th>
|
|
|
244 |
<th>Scheduled Resume</th>
|
|
|
245 |
<th>Repeat</th>
|
|
|
246 |
<th>Opr</th>
|
|
|
247 |
</thead>
|
| 5357 |
dpurdie |
248 |
|
|
|
249 |
<%Set rsQry = OraDatabase.DbCreateDynaset( "select rs.*," &_
|
|
|
250 |
" TO_CHAR(SCHEDULED_PAUSE ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_pause," &_
|
|
|
251 |
" TO_CHAR(SCHEDULED_RESUME ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_resume," &_
|
|
|
252 |
" TO_CHAR(SCHEDULED_PAUSE ,'HH:MI:SS AM') as fmt_pause_time," &_
|
|
|
253 |
" TO_CHAR(SCHEDULED_RESUME ,'HH:MI:SS AM') as fmt_resume_time," &_
|
|
|
254 |
" TO_CHAR(SCHEDULED_PAUSE ,'Dy HH:MI:SS AM') as fmt_pause_day," &_
|
|
|
255 |
" TO_CHAR(SCHEDULED_RESUME ,'Dy HH:MI:SS AM') as fmt_resume_day" &_
|
|
|
256 |
" from run_level_schedule rs order by rs.SCHEDULED_PAUSE", ORADYN_DEFAULT )
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
'--- Render rows ---
|
|
|
260 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
261 |
scheduled_id = rsQry("scheduled_id")
|
|
|
262 |
|
|
|
263 |
If NOT IsNull(rsQry("scheduled_resume")) Then
|
|
|
264 |
Dim tpause,tresume, trepeat
|
|
|
265 |
If rsQry("repeat") = 1 Then
|
|
|
266 |
tpause = rsQry("fmt_pause_time")
|
|
|
267 |
tresume = rsQry("fmt_resume_time")
|
|
|
268 |
trepeat = "Daily"
|
|
|
269 |
ElseIf rsQry("repeat") = 7 Then
|
|
|
270 |
tpause = rsQry("fmt_pause_day")
|
|
|
271 |
tresume = rsQry("fmt_resume_time")
|
|
|
272 |
trepeat = "Weekly"
|
|
|
273 |
ElseIf rsQry("repeat") = 0 Then
|
|
|
274 |
tpause = rsQry("fmt_pause")
|
|
|
275 |
tresume = rsQry("fmt_resume")
|
|
|
276 |
trepeat = "Once Only"
|
|
|
277 |
Else
|
|
|
278 |
tpause = rsQry("fmt_pause")
|
|
|
279 |
tresume = rsQry("fmt_resume")
|
|
|
280 |
trepeat = rsQry("repeat")
|
|
|
281 |
End If
|
|
|
282 |
%>
|
|
|
283 |
|
| 6878 |
dpurdie |
284 |
<tr class=lined>
|
|
|
285 |
<td nowrap><%=tpause%></td>
|
|
|
286 |
<td nowrap><%=tresume%></td>
|
|
|
287 |
<td nowrap><%=trepeat%></td>
|
|
|
288 |
<td nowrap><%Call objBtnControl.Render ( Array("btnDeleteSchedule"), objAccessControl )%></td>
|
| 5357 |
dpurdie |
289 |
</tr>
|
|
|
290 |
<%
|
|
|
291 |
End If
|
|
|
292 |
rsQry.MoveNext
|
|
|
293 |
Loop
|
|
|
294 |
|
|
|
295 |
rsQry.Close()
|
|
|
296 |
Set rsQry = Nothing
|
|
|
297 |
%>
|
| 6878 |
dpurdie |
298 |
<tr>
|
|
|
299 |
<td colspan=4><hr></td>
|
|
|
300 |
</tr>
|
|
|
301 |
<tr>
|
|
|
302 |
<% Call Action_Buttons_State ( "Add Schedule", NOT bReadOnly )%>
|
|
|
303 |
</tr>
|
| 5357 |
dpurdie |
304 |
</table>
|
|
|
305 |
</fieldset>
|
|
|
306 |
</td>
|
|
|
307 |
</tr>
|
|
|
308 |
</form>
|
|
|
309 |
</table>
|
|
|
310 |
</table>
|
| 6878 |
dpurdie |
311 |
</div>
|
| 5357 |
dpurdie |
312 |
<!-- FOOTER -->
|
|
|
313 |
<!--#include file="_footer.asp"-->
|
|
|
314 |
</body>
|
|
|
315 |
</html>
|