Subversion Repositories DevTools

Rev

Rev 5506 | Rev 5590 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5506 Rev 5560
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|
4
'|
5
'|  wAddDaemonInstructionSimple.asp
5
'|  wAddDaemonInstruction.asp
6
'|      Either ripple or terstbuild the current package
6
'|      Either ripple or test-build the current package
7
'|      This window has few options
7
'|      This window has few options
8
'|
8
'|
9
'=====================================================
9
'=====================================================
10
%>
10
%>
11
<%
11
<%
Line 22... Line 22...
22
<!--#include file="common/daemon_instructions.asp"-->
22
<!--#include file="common/daemon_instructions.asp"-->
23
<%
23
<%
24
'------------ ACCESS CONTROL ------------------
24
'------------ ACCESS CONTROL ------------------
25
%>
25
%>
26
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_general.asp"-->
27
<!--#include file="_access_control_login.asp"-->
-
 
28
<%
27
<%
29
'------------ VARIABLE DEFINITION -------------
28
'------------ VARIABLE DEFINITION -------------
30
Dim sMessage
29
Dim sMessage, sMessageType
31
Dim parPv_id
30
Dim parPv_id
32
Dim parOp_code
31
Dim parOp_code
33
Dim parRfile
32
Dim parRfile
34
Dim bPreventSubmit
33
Dim bPreventSubmit
35
Dim ripplePresent, rippleDisable, rippleChecked
34
Dim ripplePresent, rippleDisable, rippleChecked
Line 38... Line 37...
38
'------------ CONSTANTS DECLARATION -----------
37
'------------ CONSTANTS DECLARATION -----------
39
 
38
 
40
 
39
 
41
'------------ VARIABLE INIT -------------------
40
'------------ VARIABLE INIT -------------------
42
sMessage = NULL
41
sMessage = NULL
-
 
42
sMessageType = 3
43
bPreventSubmit = False
43
bPreventSubmit = False
44
 
44
 
45
' collect all parameters from query string
45
' collect all parameters from query string
46
parPv_id = Request("pv_id")
46
parPv_id = Request("pv_id")
47
parOp_code = Request("op_code")
47
parOp_code = Request("op_code")
Line 69... Line 69...
69
   End If
69
   End If
70
 
70
 
71
   rsTemp.Close
71
   rsTemp.Close
72
   Set rsTemp = nothing
72
   Set rsTemp = nothing
73
End Function
73
End Function
-
 
74
'
-
 
75
' Add a lineof text to the System Message
-
 
76
'
-
 
77
Sub sMessageAdd(text)
-
 
78
    If NOT isNull(sMessage) Then
-
 
79
        sMessage = sMessage & "<br>"
-
 
80
    End If
-
 
81
    sMessage = sMessage & text
-
 
82
End Sub
74
%>
83
%>
75
<%
84
<%
76
'------------ RUN BEFORE PAGE RENDER ----------
85
'------------ RUN BEFORE PAGE RENDER ----------
77
 
86
 
78
' Make sure we dont have any null strings or empty strings for our parameters
87
' Make sure we dont have any null strings or empty strings for our parameters
Line 84... Line 93...
84
End If
93
End If
85
If IsNull(parRfile) OR parRfile = "" Then
94
If IsNull(parRfile) OR parRfile = "" Then
86
   parRfile = "dependencies.asp"
95
   parRfile = "dependencies.asp"
87
End If
96
End If
88
 
97
 
89
 
-
 
90
' Check if form submit is happening
98
' Check if form submit is happening
91
If CBool(Request("action")) Then
99
If CBool(Request("action")) Then
92
     If CInt(parOp_code) >= 0 Then
100
    If CInt(parOp_code) >= 0 Then
93
 
101
 
94
       Dim RepeatSeconds
102
       Dim RepeatSeconds
95
       Dim ScheduledDateTime
103
       Dim ScheduledDateTime
96
       Dim ReleaseMode
104
       Dim ReleaseMode
97
 
105
 
98
       ReleaseMode = GetReleaseMode(parRtag_id)
106
       ReleaseMode = GetReleaseMode(parRtag_id)
99
 
107
 
-
 
108
       If NOT objAccessControl.UserLogedIn Then
100
       ' determine if insert/update is enabled by permissions
109
            sMessage = "User is no longer logged in"
-
 
110
            sMessageType = 1
101
       if NOT UserCanAddOrEditThisDaemonInst(DB_PROJ_ID, ReleaseMode, parOp_code) Then
111
       ElseIf NOT UserCanAddOrEditThisDaemonInst(DB_PROJ_ID, ReleaseMode, parOp_code) Then
102
          ' redirect to an error message
-
 
103
          Call RaiseMsg(enum_MSG_ERROR, "You have been denied permission to add/update daemon instructions for the specified release.")
112
            sMessage = "You have been denied permission to add/update daemon instructions for the specified release."
-
 
113
            sMessageType = 1
104
       End If
114
       End If
105
 
115
 
106
       ' do daemon instruction validation, continuing only if it passes
-
 
107
       If ValidateDaemonInstruction(parOp_code, parRtag_id, parPv_id) = True Then
116
       If isNull(sMessage) Then
108
 
117
 
109
         RepeatSeconds = 0
118
           ' do daemon instruction validation, continuing only if it passes
110
         ScheduledDateTime = ORA_SYSDATETIME
119
           If ValidateDaemonInstruction(parOp_code, parRtag_id, parPv_id) = True Then
111
 
120
 
-
 
121
             RepeatSeconds = 0
-
 
122
             ScheduledDateTime = ORA_SYSDATETIME
-
 
123
 
112
        ' We are adding a new record
124
            ' We are adding a new record
113
         objEH.TryORA ( OraSession )
125
             objEH.TryORA ( OraSession )
114
         On Error Resume Next
126
             On Error Resume Next
115
 
127
 
116
         OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.insert_daemon_inst( "& parOp_code & ", " &_
128
             OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.insert_daemon_inst( "& parOp_code & ", " &_
117
                                                                        parRtag_id & ", " &_
129
                                                                            parRtag_id & ", " &_
118
                                                                        parPv_id & ", " &_
130
                                                                            parPv_id & ", " &_
119
                                                                        ScheduledDateTime & ", " &_
131
                                                                            ScheduledDateTime & ", " &_
120
                                                                        CStr(RepeatSeconds) & ", " &_
132
                                                                            CStr(RepeatSeconds) & ", " &_
121
                                                                        ORA_SYSDATETIME & ", " &_
133
                                                                            ORA_SYSDATETIME & ", " &_
122
                                                                        objAccessControl.UserId & "); END;"
134
                                                                            objAccessControl.UserId & "); END;"
123
         objEH.CatchORA ( OraSession )
135
             objEH.CatchORA ( OraSession )
124
         If objEH.Finally Then
136
             If objEH.Finally Then
125
            Call OpenInParentWindow (parRfile & "?rtag_id=" & parRtag_id & "&pv_id=" & parPv_id)
137
                Call OpenInParentWindowFromIFrame (parRfile & "?rtag_id=" & parRtag_id & "&pv_id=" & parPv_id)
126
            Call CloseWindow()
138
                Response.End
127
         End If
139
             End If
128
       Else
140
           Else
129
        sMessage = "Invalid Request. "
141
            sMessage = "Invalid Request."
-
 
142
            sMessageType = 1
-
 
143
           End If
130
       End If
144
       End If
131
    Else
145
    Else
132
        sMessage = "No action selected. "
146
        sMessage = "No action selected."
-
 
147
        sMessageType = 1
133
    End If
148
    End If
134
End If
149
End If
135
 
150
 
136
' Prevent editing if build instruction is already present
151
' Prevent editing if build instruction is already present
137
testPresent   = DaemonInstructionPresent(parRtag_id, parPv_id, 1 )
152
testPresent   = DaemonInstructionPresent(parRtag_id, parPv_id, 1 )
138
ripplePresent = DaemonInstructionPresent(parRtag_id, parPv_id, 0 )
153
ripplePresent = DaemonInstructionPresent(parRtag_id, parPv_id, 0 )
139
 
154
 
140
If ripplePresent Then
155
If ripplePresent Then
141
    rippleDisable = " disabled"
156
    rippleDisable = " disabled"
-
 
157
    sMessageAdd "Ripple Instruction already present"
142
Else
158
Else
143
    rippleChecked = " checked"
159
    rippleChecked = " checked"
144
End If
160
End If
145
 
161
 
146
If testPresent Then
162
If testPresent Then
147
    testDisable = " disabled"
163
    testDisable = " disabled"
148
End If
-
 
149
 
-
 
150
If ripplePresent OR testPresent Then
-
 
151
    sMessage = sMessage & "Build Instruction already present"
164
    sMessageAdd "Test Instruction already present"
152
End If
165
End If
153
 
166
 
154
If ripplePresent AND testPresent Then
167
If ripplePresent AND testPresent Then
155
    bPreventSubmit = true
168
    bPreventSubmit = true
-
 
169
    If sMessageType = 3 Then
-
 
170
        sMessageType = 2
-
 
171
    End If
156
End If
172
End If
157
 
-
 
158
     
-
 
159
'----------------------------------------------
173
'----------------------------------------------
160
%>
174
%>
161
<html>
175
<html>
162
   <head>
176
   <head>
163
      <title>Release Manager</title>
177
      <title>Release Manager</title>
164
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
178
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
165
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
179
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
166
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
180
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
167
      <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
181
      <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
168
      <script language="JavaScript" src="scripts/common.js"></script>
182
      <script language="JavaScript" src="scripts/common.js"></script>
-
 
183
      <!--#include file="_jquery_includes.asp"-->
-
 
184
      <script language="javascript">
-
 
185
        $(document).ready(function () {
-
 
186
            //  Cancel button must close this iFrame using a function provided by the parent
-
 
187
            $('#btn_cancel').on('click', function (e) {parent.closeIFrame()});
-
 
188
        });
-
 
189
 
-
 
190
   </script>
169
   </head>
191
   </head>
170
 
192
 
171
   <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" >
193
   <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0">
172
      <table width="100%"  border="0" cellspacing="0" cellpadding="10">
194
      <table width="600px"  border="0" cellspacing="0" cellpadding="10">
173
         <tr>
195
         <tr>
174
            <td bgcolor="#FFFFFF" class="body_txt">
196
            <td bgcolor="#FFFFFF" class="body_txt">
175
                <span class="body_h1">
197
                <span class="body_h1">
176
                    <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">
198
                    <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">
177
                        &nbsp;Ripple or Test Build current Package
199
                        &nbsp;Ripple or Test Build current Package
Line 192... Line 214...
192
 
214
 
193
 
215
 
194
         %>
216
         %>
195
         <tr>
217
         <tr>
196
            <td background="images/bg_login.gif">
218
            <td background="images/bg_login.gif">
197
               <table class="embedded_table">
219
               <table class="full_table">
198
                  <tr>
220
                  <tr>
199
                     <td><%=ProgressBar()%></td>
221
                     <td><%=ProgressBar()%></td>
200
                  </tr>
222
                  </tr>
201
               </table>
223
               </table>
202
            </td>
224
            </td>
203
         </tr>
225
         </tr>
204
         <tr>
226
         <tr>
205
            <td>
227
            <td>
206
               <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
228
               <!-- MESSAGE ++++++++++++++++++++++++++++++++++++++++++++++ -->
207
               <%Call Messenger ( sMessage , 3, "100%" )%>
229
               <%Call Messenger ( sMessage , sMessageType, "100%" )%>
208
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
230
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
209
               <!--#include file="messages/_msg_inline.asp"-->
231
               <!--#include file="messages/_msg_inline.asp"-->
210
               <table class="embedded_table form_item">
232
               <table class="full_table form_item">
211
                  <tr>
233
                  <tr>
212
                      <td class="nowrap form_align" >
234
                      <td class="nowrap form_align" >
213
                        <input type="radio" name="op_code" value="0" <%=rippleChecked%><%=rippleDisable%>>
235
                        <input type="radio" name="op_code" value="0" <%=rippleChecked%><%=rippleDisable%>>
214
                            Ripple the current package. 
236
                            Ripple the current package. 
215
                            <td>This will cause a new package version to be created.<br>All packages that depend on this package will also be rippled.
237
                      <td>This will cause a new package version to be created.<br>All packages that depend on this package will also be rippled.
-
 
238
                  </tr>
-
 
239
                  <tr>
-
 
240
                    <td colspan=2><hr width=80%>
-
 
241
                  </tr>
216
                      <tr>
242
                  <tr>
217
                      <td class="nowrap form_align">
243
                      <td class="nowrap form_align">
218
                        <input type="radio" name="op_code" value="1" <%=testChecked%><%=testDisable%>>
244
                        <input type="radio" name="op_code" value="1" <%=testChecked%><%=testDisable%>>
219
                            Test Build the current package. 
245
                            Test Build the current package. 
220
                            <td>No new version will be created, nor will a build ripple be propagated.<br>This will simply ensure that the current package can be built with<br>the current build machine configuration.
246
                       <td>No new version will be created, nor will a build ripple be propagated.<br>This will simply ensure that the current package can be built with<br>the current build machine configuration.
221
 
-
 
222
                      </td>
-
 
223
                  </tr>
247
                  </tr>
-
 
248
                  <tr>
224
                     <td align="right" colspan=2 class=top_border background="images/bg_login.gif">
249
                     <td align="right" colspan=2 class=top_border background="images/bg_login.gif">
225
                      <p>&nbsp;<p>
250
                      <p>&nbsp;<p>
-
 
251
                        <%
-
 
252
                            Dim disableText : disableText = ""
226
                        <%If DaemonsAvailable(parRtag_id) AND NOT bPreventSubmit Then%>
253
                            If NOT (DaemonsAvailable(parRtag_id) AND NOT bPreventSubmit) Then
227
                           <input name="btn" type="submit" class="form_btn" value="Add/Update">
254
                                disableText = "disabled=""disabled"""
228
                        <%Else%>
255
                            End If
229
                           <input name="btn" type="submit" class="form_btn_disabled" value="Add/Update" disabled="disabled" >
-
 
230
                        <%End If%>
256
                        %>
231
 
-
 
232
                        <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
257
                        <button name="btn" type="submit" <%=disableText%> >Add/Update</button>
233
                  <tr>
258
                        <button name="btn" type="reset" id="btn_cancel">Cancel</button>
234
                  </tr>
259
                  </tr>
235
                  <tr>
260
                  <tr>
236
                     <td>
261
                     <td>
237
                        <input type="hidden" id="rtag_id"     name="rtag_id"      value="<%=parRtag_id%>">
262
                        <input type="hidden" id="rtag_id"     name="rtag_id"      value="<%=parRtag_id%>">
238
                        <input type="hidden" id="pv_id"       name="pv_id"        value="<%=parPv_id%>">
263
                        <input type="hidden" id="pv_id"       name="pv_id"        value="<%=parPv_id%>">