Subversion Repositories DevTools

Rev

Rev 5207 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5207 Rev 5357
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|
4
'|
5
'|  wAddDaemonInstructionSimple.asp
5
'|  wAddDaemonInstructionSimple.asp
6
'|      Either ripple or terstbuild the current package
6
'|      Either ripple or terstbuild the current package
7
'|      This window has few options
7
'|      This window has few options
8
'|
8
'|
9
'=====================================================
9
'=====================================================
10
%>
10
%>
11
<%
11
<%
12
Option explicit
12
Option explicit
13
Response.Expires = 0
13
Response.Expires = 0
14
%>
14
%>
15
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/formating.asp"-->
18
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/qstr.asp"-->
19
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_subs.asp"-->
20
<!--#include file="common/_form_window_common.asp"-->
20
<!--#include file="common/_form_window_common.asp"-->
21
<!--#include file="common/common_dbedit.asp"-->
21
<!--#include file="common/common_dbedit.asp"-->
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"-->
27
<!--#include file="_access_control_login.asp"-->
28
<%
28
<%
29
'------------ VARIABLE DEFINITION -------------
29
'------------ VARIABLE DEFINITION -------------
30
Dim sMessage
30
Dim sMessage
31
Dim parPv_id
31
Dim parPv_id
32
Dim parOp_code
32
Dim parOp_code
33
Dim parRfile
33
Dim parRfile
34
Dim bPreventSubmit
34
Dim bPreventSubmit
35
Dim ripplePresent, rippleDisable, rippleChecked
35
Dim ripplePresent, rippleDisable, rippleChecked
36
Dim testPresent, testDisable, testChecked
36
Dim testPresent, testDisable, testChecked
37
 
37
 
38
'------------ CONSTANTS DECLARATION -----------
38
'------------ CONSTANTS DECLARATION -----------
39
 
39
 
40
 
40
 
41
'------------ VARIABLE INIT -------------------
41
'------------ VARIABLE INIT -------------------
42
sMessage = NULL
42
sMessage = NULL
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")
48
parRfile = Request("rfile")
48
parRfile = Request("rfile")
49
Set objFormCollector = CreateObject("Scripting.Dictionary")
49
Set objFormCollector = CreateObject("Scripting.Dictionary")
50
 
50
 
51
'------------ CONDITIONS ----------------------
51
'------------ CONDITIONS ----------------------
52
'----------------------------------------------
52
'----------------------------------------------
53
%>
53
%>
54
<%
54
<%
55
'------------------------------------------------------------------------------------------------------------------------------------------
55
'------------------------------------------------------------------------------------------------------------------------------------------
56
' For the specified Release, get a list of all that release's daemon configurations.
56
' For the specified Release, get a list of all that release's daemon configurations.
57
' Return True if at least one daemon configuration was found, else False
57
' Return True if at least one daemon configuration was found, else False
58
'------------------------------------------------------------------------------------------------------------------------------------------
58
'------------------------------------------------------------------------------------------------------------------------------------------
59
Function DaemonsAvailable(NNrtag_id)
59
Function DaemonsAvailable(NNrtag_id)
60
   Dim rsTemp, Query_String
60
   Dim rsTemp, Query_String
61
 
61
 
62
   DaemonsAvailable = True
62
   DaemonsAvailable = True
63
   Query_String = "SELECT * "&_
63
   Query_String = "SELECT * "&_
64
                  "  FROM release_config rc"&_
64
                  "  FROM release_config rc"&_
65
                  " WHERE rc.rtag_id = "& NNrtag_id
65
                  " WHERE rc.rtag_id = "& NNrtag_id
66
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
66
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
67
   If rsTemp.RecordCount = 0 Then
67
   If rsTemp.RecordCount = 0 Then
68
      DaemonsAvailable = False
68
      DaemonsAvailable = False
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
%>
74
%>
75
<%
75
<%
76
'------------ RUN BEFORE PAGE RENDER ----------
76
'------------ RUN BEFORE PAGE RENDER ----------
77
 
77
 
78
' Make sure we dont have any null strings or empty strings for our parameters
78
' Make sure we dont have any null strings or empty strings for our parameters
79
If IsNull(parOp_code) OR parOp_code = "" Then
79
If IsNull(parOp_code) OR parOp_code = "" Then
80
   parOp_code = "-1"
80
   parOp_code = "-1"
81
End If
81
End If
82
If IsNull(parRtag_id) OR parRtag_id = "" Then
82
If IsNull(parRtag_id) OR parRtag_id = "" Then
83
   parRtag_id = "0"
83
   parRtag_id = "0"
84
End If
84
End If
85
If IsNull(parRfile) OR parRfile = "" Then
85
If IsNull(parRfile) OR parRfile = "" Then
86
   parRfile = "dependencies.asp"
86
   parRfile = "dependencies.asp"
87
End If
87
End If
88
 
88
 
89
 
89
 
90
' Check if form submit is happening
90
' Check if form submit is happening
91
If CBool(Request("action")) Then
91
If CBool(Request("action")) Then
92
     If CInt(parOp_code) >= 0 Then
92
     If CInt(parOp_code) >= 0 Then
93
 
93
 
94
       Dim RepeatSeconds
94
       Dim RepeatSeconds
95
       Dim ScheduledDateTime
95
       Dim ScheduledDateTime
96
       Dim ReleaseMode
96
       Dim ReleaseMode
97
 
97
 
98
       ReleaseMode = GetReleaseMode(parRtag_id)
98
       ReleaseMode = GetReleaseMode(parRtag_id)
99
 
99
 
100
       ' determine if insert/update is enabled by permissions
100
       ' determine if insert/update is enabled by permissions
101
       if NOT UserCanAddOrEditThisDaemonInst(DB_PROJ_ID, ReleaseMode, parOp_code) Then
101
       if NOT UserCanAddOrEditThisDaemonInst(DB_PROJ_ID, ReleaseMode, parOp_code) Then
102
          ' redirect to an error message
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.")
103
          Call RaiseMsg(enum_MSG_ERROR, "You have been denied permission to add/update daemon instructions for the specified release.")
104
       End If
104
       End If
105
 
105
 
106
       ' do daemon instruction validation, continuing only if it passes
106
       ' do daemon instruction validation, continuing only if it passes
107
       If ValidateDaemonInstruction(parOp_code, parRtag_id, parPv_id) = True Then
107
       If ValidateDaemonInstruction(parOp_code, parRtag_id, parPv_id) = True Then
108
 
108
 
109
         RepeatSeconds = 0
109
         RepeatSeconds = 0
110
         ScheduledDateTime = ORA_SYSDATETIME
110
         ScheduledDateTime = ORA_SYSDATETIME
111
 
111
 
112
        ' We are adding a new record
112
        ' We are adding a new record
113
         objEH.TryORA ( OraSession )
113
         objEH.TryORA ( OraSession )
114
         On Error Resume Next
114
         On Error Resume Next
115
 
115
 
116
         OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.insert_daemon_inst( "& parOp_code & ", " &_
116
         OraDatabase.ExecuteSQL "BEGIN PK_BUILDAPI.insert_daemon_inst( "& parOp_code & ", " &_
117
                                                                        parRtag_id & ", " &_
117
                                                                        parRtag_id & ", " &_
118
                                                                        parPv_id & ", " &_
118
                                                                        parPv_id & ", " &_
119
                                                                        ScheduledDateTime & ", " &_
119
                                                                        ScheduledDateTime & ", " &_
120
                                                                        CStr(RepeatSeconds) & ", " &_
120
                                                                        CStr(RepeatSeconds) & ", " &_
121
                                                                        ORA_SYSDATETIME & ", " &_
121
                                                                        ORA_SYSDATETIME & ", " &_
122
                                                                        objAccessControl.UserId & "); END;"
122
                                                                        objAccessControl.UserId & "); END;"
123
         objEH.CatchORA ( OraSession )
123
         objEH.CatchORA ( OraSession )
124
         If objEH.Finally Then
124
         If objEH.Finally Then
125
            Call OpenInParentWindow (parRfile & "?rtag_id=" & parRtag_id & "&pv_id=" & parPv_id)
125
            Call OpenInParentWindow (parRfile & "?rtag_id=" & parRtag_id & "&pv_id=" & parPv_id)
126
            Call CloseWindow()
126
            Call CloseWindow()
127
         End If
127
         End If
128
       Else
128
       Else
129
        sMessage = "Invalid Request. "
129
        sMessage = "Invalid Request. "
130
       End If
130
       End If
131
    Else
131
    Else
132
        sMessage = "No action selected. "
132
        sMessage = "No action selected. "
133
    End If
133
    End If
134
End If
134
End If
135
 
135
 
136
' Prevent editing if build instruction is already present
136
' Prevent editing if build instruction is already present
137
testPresent   = DaemonInstructionPresent(parRtag_id, parPv_id, 1 )
137
testPresent   = DaemonInstructionPresent(parRtag_id, parPv_id, 1 )
138
ripplePresent = DaemonInstructionPresent(parRtag_id, parPv_id, 0 )
138
ripplePresent = DaemonInstructionPresent(parRtag_id, parPv_id, 0 )
139
 
139
 
140
If ripplePresent Then
140
If ripplePresent Then
141
    rippleDisable = " disabled"
141
    rippleDisable = " disabled"
142
Else
142
Else
143
    rippleChecked = " checked"
143
    rippleChecked = " checked"
144
End If
144
End If
145
 
145
 
146
If testPresent Then
146
If testPresent Then
147
    testDisable = " disabled"
147
    testDisable = " disabled"
148
End If
148
End If
149
 
149
 
150
If ripplePresent OR testPresent Then
150
If ripplePresent OR testPresent Then
151
    sMessage = sMessage & "Build Instruction already present"
151
    sMessage = sMessage & "Build Instruction already present"
152
End If
152
End If
153
 
153
 
154
If ripplePresent AND testPresent Then
154
If ripplePresent AND testPresent Then
155
    bPreventSubmit = true
155
    bPreventSubmit = true
156
End If
156
End If
157
 
157
 
158
     
158
     
159
'----------------------------------------------
159
'----------------------------------------------
160
%>
160
%>
161
<html>
161
<html>
162
   <head>
162
   <head>
163
      <title>Release Manager</title>
163
      <title>Release Manager</title>
164
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
164
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
165
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
165
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
166
      <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
166
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
167
      <script language="JavaScript" src="scripts/common.js"></script>
167
      <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
168
   </head>
168
      <script language="JavaScript" src="scripts/common.js"></script>
169
 
169
   </head>
170
   <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" >
170
 
171
      <table width="100%"  border="0" cellspacing="0" cellpadding="10">
171
   <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" >
172
         <tr>
172
      <table width="100%"  border="0" cellspacing="0" cellpadding="10">
173
            <td bgcolor="#FFFFFF" class="body_txt">
173
         <tr>
174
                <span class="body_h1">
174
            <td bgcolor="#FFFFFF" class="body_txt">
175
                    <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">
175
                <span class="body_h1">
176
                        &nbsp;Ripple or Test Build current Package
176
                    <img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">
177
                </span>
177
                        &nbsp;Ripple or Test Build current Package
178
                <br>Add a new Daemon Instruction to Ripple or Test Build current Package
178
                </span>
179
            </td>
179
                <br>Add a new Daemon Instruction to Ripple or Test Build current Package
180
         </tr>
180
            </td>
181
         <%
181
         </tr>
182
         '-- FROM START --------------------------------------------------------------------------------------------------------------
182
         <%
183
         objFormComponent.FormName = "DaemonInstruction"
183
         '-- FROM START --------------------------------------------------------------------------------------------------------------
184
         objFormComponent.Action = ScriptName &_
184
         objFormComponent.FormName = "DaemonInstruction"
185
                                   "?proj_id="& DB_PROJ_ID &_
185
         objFormComponent.Action = ScriptName &_
186
                                   "&rtag_id="& parRtag_id &_
186
                                   "?proj_id="& DB_PROJ_ID &_
187
                                   "&pv_id="  & parPv_id &_
187
                                   "&rtag_id="& parRtag_id &_
188
                                   "&rfile="  & parRfile
188
                                   "&pv_id="  & parPv_id &_
189
         objFormComponent.OnSubmit = "ShowProgress();"
189
                                   "&rfile="  & parRfile
190
         Call objFormComponent.FormStart()
190
         objFormComponent.OnSubmit = "ShowProgress();"
191
 
191
         Call objFormComponent.FormStart()
192
 
192
 
193
         %>
193
 
194
         <tr>
194
         %>
195
            <td background="images/bg_login.gif">
195
         <tr>
196
               <table class="embedded_table">
196
            <td background="images/bg_login.gif">
197
                  <tr>
197
               <table class="embedded_table">
198
                     <td><%=ProgressBar()%></td>
198
                  <tr>
199
                  </tr>
199
                     <td><%=ProgressBar()%></td>
200
               </table>
200
                  </tr>
201
            </td>
201
               </table>
202
         </tr>
202
            </td>
203
         <tr>
203
         </tr>
204
            <td>
204
         <tr>
205
               <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
205
            <td>
206
               <%Call Messenger ( sMessage , 3, "100%" )%>
206
               <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
207
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
207
               <%Call Messenger ( sMessage , 3, "100%" )%>
208
               <!--#include file="messages/_msg_inline.asp"-->
208
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
209
               <table class="embedded_table form_item">
209
               <!--#include file="messages/_msg_inline.asp"-->
210
                  <tr>
210
               <table class="embedded_table form_item">
211
                      <td class="nowrap form_align" >
211
                  <tr>
212
                        <input type="radio" name="op_code" value="0" <%=rippleChecked%><%=rippleDisable%>>
212
                      <td class="nowrap form_align" >
213
                            Ripple the current package. 
213
                        <input type="radio" name="op_code" value="0" <%=rippleChecked%><%=rippleDisable%>>
214
                            <td>This will cause a new package version to be created.<br>All packages that depend on this package will also be rippled.
214
                            Ripple the current package. 
215
                      <tr>
215
                            <td>This will cause a new package version to be created.<br>All packages that depend on this package will also be rippled.
216
                      <td class="nowrap form_align">
216
                      <tr>
217
                        <input type="radio" name="op_code" value="1" <%=testChecked%><%=testDisable%>>
217
                      <td class="nowrap form_align">
218
                            Test Build the current package. 
218
                        <input type="radio" name="op_code" value="1" <%=testChecked%><%=testDisable%>>
219
                            <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.
219
                            Test Build the current package. 
220
 
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.
221
                      </td>
221
 
222
                  </tr>
222
                      </td>
223
                     <td align="right" colspan=2 class=top_border background="images/bg_login.gif">
223
                  </tr>
224
                      <p>&nbsp;<p>
224
                     <td align="right" colspan=2 class=top_border background="images/bg_login.gif">
225
                        <%If DaemonsAvailable(parRtag_id) AND NOT bPreventSubmit Then%>
225
                      <p>&nbsp;<p>
226
                           <input name="btn" type="submit" class="form_btn" value="Add/Update">
226
                        <%If DaemonsAvailable(parRtag_id) AND NOT bPreventSubmit Then%>
227
                        <%Else%>
227
                           <input name="btn" type="submit" class="form_btn" value="Add/Update">
228
                           <input name="btn" type="submit" class="form_btn_disabled" value="Add/Update" disabled="disabled" >
228
                        <%Else%>
229
                        <%End If%>
229
                           <input name="btn" type="submit" class="form_btn_disabled" value="Add/Update" disabled="disabled" >
230
 
230
                        <%End If%>
231
                        <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
231
 
232
                  <tr>
232
                        <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
233
                  </tr>
233
                  <tr>
234
                  <tr>
234
                  </tr>
235
                     <td>
235
                  <tr>
236
                        <input type="hidden" id="rtag_id"     name="rtag_id"      value="<%=parRtag_id%>">
236
                     <td>
237
                        <input type="hidden" id="pv_id"       name="pv_id"        value="<%=parPv_id%>">
237
                        <input type="hidden" id="rtag_id"     name="rtag_id"      value="<%=parRtag_id%>">
238
                        <input type="hidden" id="rfile"       name="rfile"        value="<%=parRfile%>">
238
                        <input type="hidden" id="pv_id"       name="pv_id"        value="<%=parPv_id%>">
239
                     </td>
239
                        <input type="hidden" id="rfile"       name="rfile"        value="<%=parRfile%>">
240
                  </tr>
240
                     </td>
241
               </table>
241
                  </tr>
242
            </td>
242
               </table>
243
         </tr>
243
            </td>
244
         <%=objPMod.ComposeHiddenTags()%>
244
         </tr>
245
         <input type="hidden" name="action" value="true">
245
         <%=objPMod.ComposeHiddenTags()%>
246
 
246
         <input type="hidden" name="action" value="true">
247
         <%
247
 
248
         Call objFormComponent.FormEnd()
248
         <%
249
         '-- FROM END ----------------------------------------------------------------------------------------------------------------
249
         Call objFormComponent.FormEnd()
250
         %>
250
         '-- FROM END ----------------------------------------------------------------------------------------------------------------
251
      </table>
251
         %>
252
   </body>
252
      </table>
253
</html>
253
   </body>
254
<%
254
</html>
255
'------------ RUN AFTER PAGE RENDER -----------
255
<%
256
Set objFormCollector = Nothing
256
'------------ RUN AFTER PAGE RENDER -----------
257
'----------------------------------------------
257
Set objFormCollector = Nothing
258
Call Destroy_All_Objects
258
'----------------------------------------------
259
%>
259
Call Destroy_All_Objects
260
 
260
%>
261
 
261
 
-
 
262