Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
129 ghuddy 5
'|                ADMIN Page                         |
6
'|               Build Service                       |
7
'|                                                   |
119 ghuddy 8
'=====================================================
9
%>
10
<%
11
Option explicit
12
' Good idea to set when using redirect
129 ghuddy 13
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 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
Sub UpdateBuildInfo()
4209 dpurdie 44
   Dim fList, regexp
45
   Set regexp = new RegExp
46
   regexp.Global = True
119 ghuddy 47
 
4209 dpurdie 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
 
129 ghuddy 56
   On Error Resume Next
57
   OraDatabase.Parameters.Add "DATABASE_SERVER",           Request("database server"), ORAPARM_INPUT, ORATYPE_VARCHAR2
177 brianf 58
   OraDatabase.Parameters.Add "ARCHIVE_SERVER",            Request("archive server"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
129 ghuddy 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
4209 dpurdie 61
   OraDatabase.Parameters.Add "FAULT_EMAIL_ADDRESS_LIST",  fList,    ORAPARM_INPUT, ORATYPE_VARCHAR2
129 ghuddy 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
119 ghuddy 64
 
129 ghuddy 65
   objEH.TryORA ( OraSession )
119 ghuddy 66
 
129 ghuddy 67
   OraDatabase.ExecuteSQL _
4209 dpurdie 68
   "BEGIN PK_BUILDAPI.Update_Build_Service_Info ( " &_ 
69
                ":DATABASE_SERVER, " &_ 
70
                ":ARCHIVE_SERVER, " &_ 
71
                ":MAIL_SERVER, " &_
72
                ":BUILD_FAILURE_MAIL_SENDER, " &_ 
73
                ":FAULT_EMAIL_ADDRESS_LIST, " &_ 
74
                ":DISK_SPACE, " &_ 
75
                ":SBOM_MANAGEMENT ); END;"
129 ghuddy 76
 
77
   objEH.CatchORA ( OraSession )
78
 
79
   OraDatabase.Parameters.Remove "DATABASE_SERVER"
177 brianf 80
   OraDatabase.Parameters.Remove "ARCHIVE_SERVER"
129 ghuddy 81
   OraDatabase.Parameters.Remove "MAIL_SERVER"
82
   OraDatabase.Parameters.Remove "BUILD_FAILURE_MAIL_SENDER"
4209 dpurdie 83
   OraDatabase.Parameters.Remove "FAULT_EMAIL_ADDRESS_LIST"
129 ghuddy 84
   OraDatabase.Parameters.Remove "DISK_SPACE"
4209 dpurdie 85
   OraDatabase.Parameters.Remove "SBOM_MANAGEMENT"
119 ghuddy 86
End Sub
87
%>
88
<%
89
If Request("action") = "true" Then
129 ghuddy 90
   Call UpdateBuildInfo()
91
   If objEH.Finally Then
92
      Response.Redirect("admin_build_service.asp")
93
   End If
119 ghuddy 94
End If
95
%>
96
<html>
97
<head>
98
 
99
<title>Build Service Administration</title>
100
 
101
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
102
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
103
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
104
<link rel="stylesheet" href="images/navigation.css" type="text/css">
105
<script language="JavaScript" src="images/common.js"></script>
106
<!-- DROPDOWN MENUS -->
107
<!--#include file="_menu_def.asp"-->
108
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
109
</head>
110
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
111
<!-- MENU LAYERS -------------------------------------->
129 ghuddy 112
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 113
</div>
114
<!-- TIPS LAYERS -------------------------------------->
115
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
116
<!-- HEADER -->
117
<!--#include file="_header.asp"-->
118
 
129 ghuddy 119
   <%
120
   '-- FROM START ---------------------------------------------------------------------------------------------------------
5061 dpurdie 121
   Dim bReadOnly: bReadOnly = NOT canActionControl("ConfigureBuildService")
129 ghuddy 122
   objFormComponent.FormName = "UpdateBuildServiceConfig"
123
   objFormComponent.Action = ScriptName
124
   objFormComponent.OnSubmit = "ShowProgress();"
177 brianf 125
   ' Page Access Condition
126
   If bReadOnly Then
127
     objFormComponent.IsReadonlyAction = enumDB_YES
128
   End If
129
 
129 ghuddy 130
   Call objFormComponent.FormStart()
131
   %>
132
   <tr>
133
      <td background="images/bg_login.gif">
134
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
135
            <tr>
136
               <td><%=ProgressBar%></td>
137
               <td align="right">&nbsp;          </td>
138
            </tr>
139
         </table>
140
      </td>
141
   </tr>
142
   <tr>
143
      <td>
144
         <table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
145
            <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
146
            <%If NOT objEH.Finally Then%>
147
               <tr>
148
                  <td class="form_iname">&nbsp;</td>
149
                  <td>
150
                     <%objEH.DisplayMessage()%>
151
                  </td>
152
                  <td class="val_err"></td>
153
               </tr>
154
            <%End If%>
155
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
156
            <tr>
157
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">BUILD SERVICE</td>
158
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">CONFIGURATION</td>
159
            </tr>
160
            <%
177 brianf 161
 
129 ghuddy 162
            Dim rsQry, query
119 ghuddy 163
 
177 brianf 164
            query = "SELECT * FROM BUILD_SERVICE_CONFIG WHERE service NOT IN ('MUTEX','WEB SERVER')"
119 ghuddy 165
 
129 ghuddy 166
            Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
119 ghuddy 167
 
129 ghuddy 168
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
169
            %>
170
               <tr>
171
                  <td nowrap class="form_iname" valign="top"><%=rsQry("service")%></td>
172
                  <td nowrap valign="top">
173
                     <%If Len(rsQry("config")) < 60 Then%>
174
                        <%=objFormComponent.TextBox (rsQry("service"), rsQry("config"), "size='60' class='form_ivalue'" )%>
175
                     <%Else%>
176
                        <%=objFormComponent.TextArea (rsQry("service"), rsQry("config"), 5, 60, "class='form_ivalue'" )%>
177
                     <%End If%>
178
                  </td>
179
               </tr>
180
               <%
181
               rsQry.MoveNext()
182
            Wend
119 ghuddy 183
 
129 ghuddy 184
            rsQry.Close()
185
            Set rsQry = Nothing
186
            %>
187
            <tr>
188
               <td nowrap class="form_iname">&nbsp;</td>
189
               <td nowrap class="val_err">
177 brianf 190
               <%If bReadOnly Then%>
191
                  <input name="btn" type="submit" class="form_btn" value="Update" disabled>
192
               <%Else%>
129 ghuddy 193
                  <input name="btn" type="submit" class="form_btn" value="Update">
177 brianf 194
               <%End If%>
129 ghuddy 195
               </td>
196
            </tr>
197
         </table>
198
      </td>
119 ghuddy 199
  </tr>
200
  <%=objPMod.ComposeHiddenTags()%>
129 ghuddy 201
  <input type="hidden" name="action" value="true">
202
  <%
119 ghuddy 203
  Call objFormComponent.FormEnd()
204
  '-- FROM END ----------------------------------------------------------------------------------------------------------------
129 ghuddy 205
   %>
119 ghuddy 206
 
129 ghuddy 207
   <form name="run_level_schedule">
119 ghuddy 208
      <tr>
129 ghuddy 209
         <td background="images/bg_login.gif">
210
            <table width="100%"  border="0" cellspacing="0" cellpadding="0">
211
               <tr>
212
                  <td><%=ProgressBar%></td>
213
                  <td align="right">&nbsp;          </td>
214
               </tr>
215
            </table>
216
         </td>
119 ghuddy 217
      </tr>
218
      <tr>
129 ghuddy 219
         <td>
220
            <table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
221
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
222
               <%If NOT objEH.Finally Then%>
223
                  <tr>
224
                     <td class="form_iname">&nbsp;</td>
225
                     <td>
226
                        <%objEH.DisplayMessage()%>
227
                     </td>
228
                     <td class="val_err"></td>
229
                  </tr>
230
               <%End If%>
231
               <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
232
            </table>
233
            <table width="25%"  border="0" cellpadding="0">
234
               <!-- BUTTONS CONTROL +++++++++++++++++++ -->
235
               <tr>
177 brianf 236
                  <td>
237
                  <%
238
                  If bReadOnly Then
239
                    Call Action_Buttons ( "Add Schedule Disable" )
240
                  Else
241
                    Call Action_Buttons ( "Add Schedule" )
242
                  End If
243
                  %>
119 ghuddy 244
 
129 ghuddy 245
                  <%
246
                  Dim rsInfinite, infiniteValue
119 ghuddy 247
 
129 ghuddy 248
                  Set rsInfinite = OraDatabase.DbCreateDynaset( "select * from run_level_schedule where indefinite_pause is not null", ORADYN_DEFAULT )
119 ghuddy 249
 
129 ghuddy 250
                  infiniteValue = rsInfinite.RecordCount
119 ghuddy 251
 
177 brianf 252
                  If bReadOnly Then
253
                    If infiniteValue = 0 Then
129 ghuddy 254
                  %>
177 brianf 255
                     <td><%Call Action_Buttons ( "Indefinite Pause Disable" )%></td>
256
                  <%Else%>
257
                     <td><%Call Action_Buttons ( "Resume Disable" )%></td>
258
                  <%End If
259
                  Else
260
                    If infiniteValue = 0 Then
261
                  %>
129 ghuddy 262
                     <td><%Call Action_Buttons ( "Indefinite Pause" )%></td>
263
                  <%Else%>
264
                     <td><%Call Action_Buttons ( "Resume" )%></td>
265
                  <%End If
177 brianf 266
                  End If
119 ghuddy 267
 
129 ghuddy 268
                  rsInfinite.Close()
269
                  Set rsInfinite = Nothing
119 ghuddy 270
 
129 ghuddy 271
                  On Error Resume Next
272
                  objEH.TryORA ( OraSession )
119 ghuddy 273
 
129 ghuddy 274
                  OraDatabase.ExecuteSQL _
275
                  "BEGIN PK_BUILDAPI.DELETE_OUT_OF_DATE_SCHEDULE;   END;"
119 ghuddy 276
 
129 ghuddy 277
                  objEH.CatchORA ( OraSession )
119 ghuddy 278
 
129 ghuddy 279
                  %>
280
               </tr>
281
            </table>
282
            <%
283
            ' Load some action buttons
284
            Call objBtnControl.LoadActionButtons ( Array("btnDeleteSchedule"), OraDatabase )
285
            objBtnControl.ButtonSpacer = 1
177 brianf 286
            objBtnControl.ReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE
287
            if bReadOnly Then objBtnControl.IsReadonlyAction = enumDB_YES
129 ghuddy 288
            %>
289
            <%If infiniteValue <> 0 Then %>
290
               <table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
291
                  <tr>
292
                     <td nowrap class="body_rowg"><b><span class='err_alert'>WARNING!!!</span>Daemons Set To Indefinite Pause.<b></td>
293
                  </tr>
294
               </table>
295
            <%End If%>
119 ghuddy 296
 
129 ghuddy 297
            <!-- +++++++++++++++++++++++++++++++++++ -->
298
            <table width="50%"  border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
299
               <tr>
300
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED PAUSE</td>
301
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED RESUME</td>
302
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">REPEAT</td>
119 ghuddy 303
 
129 ghuddy 304
                  <td valign="top"></td>
305
               </tr>
119 ghuddy 306
 
5096 dpurdie 307
               <%Set rsQry = OraDatabase.DbCreateDynaset( "select rs.*," &_
308
                        " TO_CHAR(SCHEDULED_PAUSE ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_pause," &_
309
                        " TO_CHAR(SCHEDULED_RESUME ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_resume," &_
310
                        " TO_CHAR(SCHEDULED_PAUSE ,'HH:MI:SS AM') as fmt_pause_time," &_
311
                        " TO_CHAR(SCHEDULED_RESUME ,'HH:MI:SS AM') as fmt_resume_time," &_
312
                        " TO_CHAR(SCHEDULED_PAUSE ,'Dy HH:MI:SS AM') as fmt_pause_day," &_
313
                        " TO_CHAR(SCHEDULED_RESUME ,'Dy HH:MI:SS AM') as fmt_resume_day" &_
314
                        " from run_level_schedule rs order by rs.SCHEDULED_PAUSE", ORADYN_DEFAULT )
119 ghuddy 315
 
5096 dpurdie 316
 
129 ghuddy 317
               '--- Render rows ---
318
               Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
319
                  scheduled_id = rsQry("scheduled_id")
119 ghuddy 320
 
129 ghuddy 321
                  If NOT IsNull(rsQry("scheduled_pause")) Then
5096 dpurdie 322
                    Dim tpause,tresume, trepeat
323
                    If rsQry("repeat") = 1  Then
324
                        tpause = rsQry("fmt_pause_time")
325
                        tresume = rsQry("fmt_resume_time")
326
                        trepeat = "Daily"
327
                    ElseIf rsQry("repeat") = 7  Then
328
                        tpause = rsQry("fmt_pause_day")
329
                        tresume = rsQry("fmt_resume_day")
330
                        trepeat = "Weekly"
331
                    ElseIf rsQry("repeat") = 0  Then
332
                        tpause = rsQry("fmt_pause")
333
                        tresume = rsQry("fmt_resume")
334
                        trepeat = "Once Only"
335
                    Else
336
                        tpause = rsQry("fmt_pause")
337
                        tresume = rsQry("fmt_resume")
338
                        trepeat = rsQry("repeat")
339
                    End If
129 ghuddy 340
                  %>
119 ghuddy 341
 
129 ghuddy 342
                     <tr>
343
                        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
344
                     </tr>
345
                     <tr>
5096 dpurdie 346
                        <td nowrap class="body_rowg"><%=tpause%></td>
347
                        <td nowrap class="body_rowg"><%=tresume%></td>
348
                        <td nowrap class="body_rowg"><%=trepeat%></td>
129 ghuddy 349
                        <td nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnDeleteSchedule"), objAccessControl )%></td>
350
                     </tr>
351
                  <%
352
                  End If
353
                  rsQry.MoveNext
354
               Loop
119 ghuddy 355
 
129 ghuddy 356
               rsQry.Close()
357
               Set rsQry = Nothing
358
               %>
359
            </table>
360
         </td>
361
      </tr>
362
   </form>
119 ghuddy 363
 
364
</body>
365
</html>
366
<!-- FOOTER -->
367
<!--#include file="_footer.asp"-->
368
<%
369
Call Destroy_All_Objects
129 ghuddy 370
%>