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