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