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