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>
5123 dpurdie 109
<!-- StyleSheet Extensions -->
110
<style>
111
.pagebody {margin-left:auto; margin-right:auto; width:50%;border-width: 0px;border-spacing: 2px; zbackground-color: rgb(255, 204, 0)}
112
.rounded_table {
113
border-style: solid;
114
border-top-width: 5px;
115
border-bottom-width: 5px;
116
xborder-radius: 13px;
117
border-color: #FFCC00;
118
border-left-width: 5px;
119
border-right-width: 5px;
120
border-spacing: 2px;
121
}
122
 
123
</style>
124
 
119 ghuddy 125
</head>
126
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
127
<!-- MENU LAYERS -------------------------------------->
129 ghuddy 128
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 129
</div>
130
<!-- TIPS LAYERS -------------------------------------->
131
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
132
<!-- HEADER -->
133
<!--#include file="_header.asp"-->
5123 dpurdie 134
<!-- Body of the page -->
135
<table class="pagebody">
129 ghuddy 136
   <%
137
   '-- FROM START ---------------------------------------------------------------------------------------------------------
5061 dpurdie 138
   Dim bReadOnly: bReadOnly = NOT canActionControl("ConfigureBuildService")
129 ghuddy 139
   objFormComponent.FormName = "UpdateBuildServiceConfig"
140
   objFormComponent.Action = ScriptName
141
   objFormComponent.OnSubmit = "ShowProgress();"
177 brianf 142
   ' Page Access Condition
143
   If bReadOnly Then
144
     objFormComponent.IsReadonlyAction = enumDB_YES
145
   End If
146
 
129 ghuddy 147
   Call objFormComponent.FormStart()
148
   %>
149
   <tr>
5123 dpurdie 150
      <td>
151
         <table width="100%"  class="embedded_table">
129 ghuddy 152
            <tr>
153
               <td><%=ProgressBar%></td>
154
               <td align="right">&nbsp;          </td>
155
            </tr>
156
         </table>
157
      </td>
158
   </tr>
159
   <tr>
160
      <td>
5123 dpurdie 161
         <table width="100%" bgcolor="#FFCC00" class="embedded_table rounded_table">
129 ghuddy 162
            <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
163
            <%If NOT objEH.Finally Then%>
164
               <tr>
165
                  <td class="form_iname">&nbsp;</td>
166
                  <td>
167
                     <%objEH.DisplayMessage()%>
168
                  </td>
169
                  <td class="val_err"></td>
170
               </tr>
171
            <%End If%>
172
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
173
            <tr>
174
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">BUILD SERVICE</td>
175
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">CONFIGURATION</td>
176
            </tr>
177
            <%
177 brianf 178
 
129 ghuddy 179
            Dim rsQry, query
119 ghuddy 180
 
177 brianf 181
            query = "SELECT * FROM BUILD_SERVICE_CONFIG WHERE service NOT IN ('MUTEX','WEB SERVER')"
119 ghuddy 182
 
129 ghuddy 183
            Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
119 ghuddy 184
 
129 ghuddy 185
            While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
186
            %>
187
               <tr>
188
                  <td nowrap class="form_iname" valign="top"><%=rsQry("service")%></td>
189
                  <td nowrap valign="top">
190
                     <%If Len(rsQry("config")) < 60 Then%>
191
                        <%=objFormComponent.TextBox (rsQry("service"), rsQry("config"), "size='60' class='form_ivalue'" )%>
192
                     <%Else%>
193
                        <%=objFormComponent.TextArea (rsQry("service"), rsQry("config"), 5, 60, "class='form_ivalue'" )%>
194
                     <%End If%>
195
                  </td>
196
               </tr>
197
               <%
198
               rsQry.MoveNext()
199
            Wend
119 ghuddy 200
 
129 ghuddy 201
            rsQry.Close()
202
            Set rsQry = Nothing
203
            %>
204
            <tr>
205
               <td nowrap class="form_iname">&nbsp;</td>
206
               <td nowrap class="val_err">
177 brianf 207
               <%If bReadOnly Then%>
208
                  <input name="btn" type="submit" class="form_btn" value="Update" disabled>
209
               <%Else%>
129 ghuddy 210
                  <input name="btn" type="submit" class="form_btn" value="Update">
177 brianf 211
               <%End If%>
129 ghuddy 212
               </td>
213
            </tr>
214
         </table>
215
      </td>
119 ghuddy 216
  </tr>
217
  <%=objPMod.ComposeHiddenTags()%>
129 ghuddy 218
  <input type="hidden" name="action" value="true">
219
  <%
119 ghuddy 220
  Call objFormComponent.FormEnd()
221
  '-- FROM END ----------------------------------------------------------------------------------------------------------------
129 ghuddy 222
   %>
5123 dpurdie 223
    <tr>
224
        <td style="padding-top: 20px;">
225
         <table width="100%" bgcolor="#FFCC00" class="embedded_table rounded_table">
119 ghuddy 226
 
129 ghuddy 227
   <form name="run_level_schedule">
119 ghuddy 228
      <tr>
129 ghuddy 229
         <td>
5123 dpurdie 230
          <fieldset>
231
          <legend class="body_txt">Build Daemon Control</legend>
232
            <table width="100%"  class="embedded_table">
129 ghuddy 233
               <!-- BUTTONS CONTROL +++++++++++++++++++ -->
234
               <tr>
177 brianf 235
                  <td>
5123 dpurdie 236
                  <table><tr><td>
177 brianf 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
 
5123 dpurdie 245
                  <td>
129 ghuddy 246
                  <%
247
                  Dim rsInfinite, infiniteValue
119 ghuddy 248
 
129 ghuddy 249
                  Set rsInfinite = OraDatabase.DbCreateDynaset( "select * from run_level_schedule where indefinite_pause is not null", ORADYN_DEFAULT )
119 ghuddy 250
 
129 ghuddy 251
                  infiniteValue = rsInfinite.RecordCount
119 ghuddy 252
 
177 brianf 253
                  If bReadOnly Then
254
                    If infiniteValue = 0 Then
129 ghuddy 255
                  %>
5123 dpurdie 256
                     <%Call Action_Buttons ( "Indefinite Pause Disable" )%></td>
177 brianf 257
                  <%Else%>
5123 dpurdie 258
                     <%Call Action_Buttons ( "Resume Disable" )%></td>
177 brianf 259
                  <%End If
260
                  Else
261
                    If infiniteValue = 0 Then
262
                  %>
5123 dpurdie 263
                     <%Call Action_Buttons ( "Indefinite Pause" )%></td>
129 ghuddy 264
                  <%Else%>
5123 dpurdie 265
                     <%Call Action_Buttons ( "Resume" )%></td>
129 ghuddy 266
                  <%End If
177 brianf 267
                  End If
119 ghuddy 268
 
129 ghuddy 269
                  rsInfinite.Close()
270
                  Set rsInfinite = Nothing
119 ghuddy 271
 
129 ghuddy 272
                  On Error Resume Next
273
                  objEH.TryORA ( OraSession )
119 ghuddy 274
 
129 ghuddy 275
                  OraDatabase.ExecuteSQL _
276
                  "BEGIN PK_BUILDAPI.DELETE_OUT_OF_DATE_SCHEDULE;   END;"
119 ghuddy 277
 
129 ghuddy 278
                  objEH.CatchORA ( OraSession )
119 ghuddy 279
 
129 ghuddy 280
                  %>
5123 dpurdie 281
                  </td></<tr></table>
129 ghuddy 282
               </tr>
283
            </table>
5123 dpurdie 284
            </fieldset>
129 ghuddy 285
            <%
286
            ' Load some action buttons
287
            Call objBtnControl.LoadActionButtons ( Array("btnDeleteSchedule"), OraDatabase )
288
            objBtnControl.ButtonSpacer = 1
177 brianf 289
            objBtnControl.ReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE
290
            if bReadOnly Then objBtnControl.IsReadonlyAction = enumDB_YES
129 ghuddy 291
            %>
292
            <%If infiniteValue <> 0 Then %>
5123 dpurdie 293
               <table width="100%"  class="embedded_table" bgcolor="#FFCC00">
129 ghuddy 294
                  <tr>
5123 dpurdie 295
                     <td nowrap class="body_rowg"><b><span class='err_alert'>WARNING!!! </span>Daemons Set To Indefinite Pause.<b></td>
129 ghuddy 296
                  </tr>
297
               </table>
298
            <%End If%>
119 ghuddy 299
 
129 ghuddy 300
            <!-- +++++++++++++++++++++++++++++++++++ -->
5123 dpurdie 301
            <fieldset>
302
            <legend class="body_txt">Scheduled Outages</legend>
303
 
304
            <table width="100%"  class="embedded_table" bgcolor="#FFCC00">
129 ghuddy 305
               <tr>
306
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED PAUSE</td>
307
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">SCHEDULED RESUME</td>
308
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">REPEAT</td>
5123 dpurdie 309
                  <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">OPR</td>
119 ghuddy 310
 
129 ghuddy 311
                  <td valign="top"></td>
312
               </tr>
119 ghuddy 313
 
5096 dpurdie 314
               <%Set rsQry = OraDatabase.DbCreateDynaset( "select rs.*," &_
315
                        " TO_CHAR(SCHEDULED_PAUSE ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_pause," &_
316
                        " TO_CHAR(SCHEDULED_RESUME ,'Dy DD-Mon-YY HH:MI:SS AM') as fmt_resume," &_
317
                        " TO_CHAR(SCHEDULED_PAUSE ,'HH:MI:SS AM') as fmt_pause_time," &_
318
                        " TO_CHAR(SCHEDULED_RESUME ,'HH:MI:SS AM') as fmt_resume_time," &_
319
                        " TO_CHAR(SCHEDULED_PAUSE ,'Dy HH:MI:SS AM') as fmt_pause_day," &_
320
                        " TO_CHAR(SCHEDULED_RESUME ,'Dy HH:MI:SS AM') as fmt_resume_day" &_
321
                        " from run_level_schedule rs order by rs.SCHEDULED_PAUSE", ORADYN_DEFAULT )
119 ghuddy 322
 
5096 dpurdie 323
 
129 ghuddy 324
               '--- Render rows ---
325
               Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
326
                  scheduled_id = rsQry("scheduled_id")
119 ghuddy 327
 
129 ghuddy 328
                  If NOT IsNull(rsQry("scheduled_pause")) Then
5096 dpurdie 329
                    Dim tpause,tresume, trepeat
330
                    If rsQry("repeat") = 1  Then
331
                        tpause = rsQry("fmt_pause_time")
332
                        tresume = rsQry("fmt_resume_time")
333
                        trepeat = "Daily"
334
                    ElseIf rsQry("repeat") = 7  Then
335
                        tpause = rsQry("fmt_pause_day")
336
                        tresume = rsQry("fmt_resume_day")
337
                        trepeat = "Weekly"
338
                    ElseIf rsQry("repeat") = 0  Then
339
                        tpause = rsQry("fmt_pause")
340
                        tresume = rsQry("fmt_resume")
341
                        trepeat = "Once Only"
342
                    Else
343
                        tpause = rsQry("fmt_pause")
344
                        tresume = rsQry("fmt_resume")
345
                        trepeat = rsQry("repeat")
346
                    End If
129 ghuddy 347
                  %>
119 ghuddy 348
 
129 ghuddy 349
                     <tr>
350
                        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
351
                     </tr>
352
                     <tr>
5096 dpurdie 353
                        <td nowrap class="body_rowg"><%=tpause%></td>
354
                        <td nowrap class="body_rowg"><%=tresume%></td>
355
                        <td nowrap class="body_rowg"><%=trepeat%></td>
129 ghuddy 356
                        <td nowrap class="body_rowg"><%Call objBtnControl.Render  ( Array("btnDeleteSchedule"), objAccessControl )%></td>
357
                     </tr>
358
                  <%
359
                  End If
360
                  rsQry.MoveNext
361
               Loop
119 ghuddy 362
 
129 ghuddy 363
               rsQry.Close()
364
               Set rsQry = Nothing
365
               %>
366
            </table>
5123 dpurdie 367
            </fieldset>
129 ghuddy 368
         </td>
369
      </tr>
370
   </form>
5123 dpurdie 371
</table>
372
</table>
119 ghuddy 373
 
5123 dpurdie 374
<!-- FOOTER -->
375
<!--#include file="_footer.asp"-->
119 ghuddy 376
</body>
377
</html>
378
<%
379
Call Destroy_All_Objects
129 ghuddy 380
%>