Subversion Repositories DevTools

Rev

Rev 5590 | Rev 5638 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5590 dpurdie 5
'|                    wAddSchedule
5357 dpurdie 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_login.asp"-->
24
<%
25
'------------ VARIABLE DEFINITION -------------
26
Dim rsQry
27
Dim rsTemp
28
Dim sMessage
29
Dim Query_String
30
'------------ CONSTANTS DECLARATION -----------
31
'------------ VARIABLE INIT -------------------
32
sMessage = NULL
33
 
34
Set objFormCollector = CreateObject("Scripting.Dictionary")
35
'------------ CONDITIONS ----------------------
36
'----------------------------------------------
37
%>
38
<%
39
'--------------------------------------------------------------------------------------------------------------------------
40
Function GetMachType ( ngbe_id )
5590 dpurdie 41
    Dim rsQry, query
42
 
43
    OraDatabase.Parameters.Add "gbe_id",   ngbe_id, ORAPARM_INPUT, ORATYPE_NUMBER 
44
 
45
    query = GetQuery ("GBE_MACHTYPECombo.sql")
46
 
47
    Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
48
    If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
49
        GetMachType = rsQry.GetRows()
50
    Else
51
        GetMachType = NULL
52
 
53
    End If
54
 
55
    rsQry.Close()
56
    Set rsQry = Nothing
57
 
58
    OraDatabase.Parameters.Remove "gbe_id"
5357 dpurdie 59
End Function
60
'--------------------------------------------------------------------------------------------------------------------------
61
Sub RenderRepeatCombo( cRepeat )
5590 dpurdie 62
    Response.Write "<select name='repeat_combo' class='form_item'>" 
5357 dpurdie 63
    Response.write "<option value='0'>Once Only</option>"
64
    Response.write "<option value='1'>Daily</option>"
65
    Response.write "<option value='7'>Weekly</option>"
5590 dpurdie 66
    Response.Write "</select>"  
5357 dpurdie 67
End Sub
68
'--------------------------------------------------------------------------------------------------------------------------
69
%>
70
<%
71
'------------ RUN BEFORE PAGE RENDER ----------
72
If CBool(Request("action")) Then
73
 
5590 dpurdie 74
    If Len(Request("repeat_combo")) > 1 Then
75
 
76
        Call DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )
77
 
78
    Else
79
        On Error Resume Next
80
        OraDatabase.Parameters.Add "SCHEDULED_PAUSE",   Request("scheduled_pause"),     ORAPARM_INPUT, ORATYPE_VARCHAR2
81
        OraDatabase.Parameters.Add "SCHEDULED_RESUME",  Request("scheduled_resume"),    ORAPARM_INPUT, ORATYPE_VARCHAR2
82
        OraDatabase.Parameters.Add "REPEAT",            Request("repeat_combo"),        ORAPARM_INPUT, ORATYPE_CHAR
83
        OraDatabase.Parameters.Add "INDEFINITE_PAUSE",  Request("indefinite_pause"),    ORAPARM_INPUT, ORATYPE_CHAR
84
 
85
        objEH.TryORA ( OraSession )
86
 
87
        OraDatabase.ExecuteSQL _
5357 dpurdie 88
           "BEGIN PK_BUILDAPI.Insert_Schedule_Info ( " &_
5636 dpurdie 89
                "TO_DATE(:SCHEDULED_PAUSE,'DY DD-MM-YYYY HH24:MI'), " &_
90
                "TO_DATE(:SCHEDULED_RESUME,'DY DD-MM-YYYY HH24:MI'), " &_
5357 dpurdie 91
                ":REPEAT, " &_
92
                ":INDEFINITE_PAUSE );" &_
93
            "END;"
5590 dpurdie 94
 
95
        objEH.CatchORA ( OraSession )
5357 dpurdie 96
 
5590 dpurdie 97
        OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"
98
        OraDatabase.Parameters.Remove "SCHEDULED_RESUME"
99
        OraDatabase.Parameters.Remove "REPEAT"
100
        OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"
5357 dpurdie 101
 
5590 dpurdie 102
        If objEH.Finally Then
103
            Call OpenInParentWindow ("admin_build_service.asp")
104
            Call CloseWindow()
5636 dpurdie 105
            Response.End
5590 dpurdie 106
        End If
5357 dpurdie 107
 
5590 dpurdie 108
        rsQry.Close()
109
        Set rsQry = nothing
110
    End If
111
 
5357 dpurdie 112
End If
113
 
114
 
115
'----------------------------------------------
116
%>
117
<html>
5590 dpurdie 118
    <head>
119
        <title>Release Manager</title>
5357 dpurdie 120
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
5590 dpurdie 121
        <meta http-equiv="Pragma" content="no-cache">
122
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
123
        <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
124
        <script language="JavaScript" src="scripts/common.js"></script>
5636 dpurdie 125
        <%bJqueryTimePicker = TRUE%>
126
        <!--#include file="_jquery_includes.asp"-->
127
        <script>
128
        $(document).ready(function(){
129
            $('#scheduled_pause').datetimepicker({
130
        		timeFormat: "HH:mm",
131
                dateFormat: "D dd-M-yy",
132
        		controlType: 'select',
133
        		oneLine: true,
134
        		timeInput: true,
135
                constrainInput: true,
136
                showOn: 'both',
137
                buttonImageOnly : true,
138
                buttonImage: "images/cal.gif",
139
                buttonText: "Select Date and Time",
140
                minDate : 0,
141
                changeYear : true, 
142
                yearRange : "0000:2099",
143
                changeMonth: true,
144
        		onClose : function(p1,p2){
145
                    checkForm();
146
        			 //console.log("scheduled_time", p1 );
147
        			},
148
        	    });
149
 
150
            $('#scheduled_resume').datetimepicker({
151
        		timeFormat: "HH:mm",
152
                dateFormat: "D dd-M-yy",
153
        		controlType: 'select',
154
        		oneLine: true,
155
        		timeInput: true,
156
                constrainInput: true,
157
                showOn: 'both',
158
                buttonImageOnly : true,
159
                buttonImage: "images/cal.gif",
160
                buttonText: "Select Date and Time",
161
                minDate : 0,
162
                changeYear : true, 
163
                yearRange : "0000:2099",
164
                changeMonth: true,
165
        		onClose : function(p1,p2){
166
                    checkForm();
167
        			 //console.log("scheduled_time", p1 );
168
        			},
169
        	    });
170
 
171
                checkForm();
172
 
173
        	});
174
 
175
        function checkForm() {
176
            var resume = $('#scheduled_resume').val().length;
177
            var pause = $('#scheduled_pause').val().length;
178
            var ok = ( resume > 0 && pause > 0);
179
 
180
            var but = $("#formSubmit");
181
            but.toggleClass("form_btn", ok);
182
            but.toggleClass("form_btn_disabled", !ok);
183
            but.prop("disabled", !ok );
184
        }
185
 
186
        </script>
187
        <style>
188
            #ui-datepicker-div {
189
                position: absolute !important;
190
                top: 0px !important;
191
                left: 0px !important;
192
                }
193
        </style>
5590 dpurdie 194
    </head>
195
    <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();">
196
        <table width="100%" border="0" cellspacing="0" cellpadding="10">
197
            <%
198
            '-- FROM START --------------------------------------------------------------------------------------------------------------
199
            objFormComponent.FormName = "run_level_schedule"
200
            objFormComponent.FormClass = "form_tight"
201
            objFormComponent.Action = ScriptName
202
            objFormComponent.OnSubmit = "ShowProgress();"
203
            Call objFormComponent.FormStart()
204
            %>
205
            <tr>
206
                <td>
207
                    <!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
208
                    <%Call Messenger ( sMessage , 3, "100%" )%>
209
                    <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
210
                    <!--#include file="messages/_msg_inline.asp"-->
211
                    <br>
5636 dpurdie 212
                    <table border="0">
5590 dpurdie 213
                        <tr>
5636 dpurdie 214
                            <td nowrap class="form_iname">Scheduled Pause</td>
215
                            <td nowrap class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue' id='scheduled_pause'" )%></td>
5590 dpurdie 216
                        </tr>
217
                        <tr>
5636 dpurdie 218
                            <td nowrap class="form_iname">Scheduled Resume</td>
219
                            <td nowrap class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue' id='scheduled_resume'" )%></td>
5590 dpurdie 220
                            </td>
221
                        </tr>
222
                        <tr>
5636 dpurdie 223
                            <td nowrap class="form_iname">Repeat</td>
224
                            <td nowrap class="form_item"><% Call RenderRepeatCombo("")%></td>
5590 dpurdie 225
                        </tr>
226
                    </table>
227
                </td>
228
            </tr>
229
            <tr>
5636 dpurdie 230
                <td style="height:100px">
231
                </td>
232
            </tr>
233
            <tr>
5590 dpurdie 234
                <td background="images/bg_login.gif">
235
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
236
                        <tr>
237
                            <td><%=ProgressBar()%></td>
238
                            <td align="right">
5636 dpurdie 239
                                <input name="btn" type="submit" class="form_btn" value="Add" id="formSubmit">
240
                                <input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();">
241
                            </td>
5590 dpurdie 242
                        </tr>
243
                    </table>
244
                </td>
245
            </tr>
5636 dpurdie 246
            <%=objPMod.ComposeHiddenTags()%>
247
            <input type="hidden" name="action" value="true">
248
            <%
249
            Call objFormComponent.FormEnd()
250
            '-- FROM END ----------------------------------------------------------------------------------------------------------------
251
            %>
5590 dpurdie 252
        </table>
253
    </body>
5357 dpurdie 254
</html>
255
<%
256
'------------ RUN AFTER PAGE RENDER -----------
257
Set objFormCollector = Nothing
258
'----------------------------------------------
259
Call Destroy_All_Objects
260
%>