Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5071 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   sdk_add_release
5
'   Add and SDK to a given Release
6
'   Called with two parameters
7
'   The page will either:
8
'       add the SDKTAG to the Release - and then redirect to the dependencies tab
9
'   or
10
'       Fail in adding the SDK to the Release - and display a page of conflicting package-versions
11
'  
12
'=====================================================
13
%>
14
<%
15
Option explicit
16
' Good idea to set when using redirect
17
Response.Expires = 0   ' always load the page, dont store
18
%>
19
 
20
<!--#include file="common/conf.asp"-->
21
<!--#include file="common/globals.asp"-->
22
<!--#include file="common/formating.asp"-->
23
<!--#include file="common/qstr.asp"-->
24
<!--#include file="common/common_subs.asp"-->
25
<!--#include file="common/common_dbedit.asp"-->
26
<%
27
'------------ ACCESS CONTROL ------------------
28
%>
29
<!--#include file="_access_control_login.asp"-->
30
<!--#include file="_access_control_general.asp"-->
31
<!--#include file="_access_control_project.asp"-->
32
<%
33
'------------ Variable Definition -------------
34
Dim sdkAdded
35
Dim rsView
36
'------------ Constants Declaration -----------
37
'------------ Variable Init -------------------
38
sdkAdded = FALSE
39
 
40
'----------------------------------------------
41
%>
42
<%
43
'-------------------------------------------------
44
' Function:     AddReleaseSDK    
45
' Description:  Add the nominated sdktag to the release
46
' Returns:      Number of Packages Inserted
47
'                < 0 - Error. Conflict list populated
48
'                      rsView is set to a list of PV_ID that cause the conflict
49
'                = 0 - No packages inserted
50
'                > 0 - Number of packages inserted 
51
 
52
Function AddReleaseSDK   ( nRtagId, nSdktagId  )
53
    OraDatabase.Parameters.Add "RTAG_ID",        nRtagId,                   ORAPARM_INPUT, ORATYPE_NUMBER
54
    OraDatabase.Parameters.Add "SDKTAG_ID",      nSdktagId,                 ORAPARM_INPUT, ORATYPE_NUMBER
55
    OraDatabase.Parameters.Add "USER_ID",        objAccessControl.UserId,   ORAPARM_INPUT, ORATYPE_NUMBER
56
    OraDatabase.Parameters.Add "INSERT_COUNT",   NULL,                      ORAPARM_OUTPUT, ORATYPE_NUMBER
57
    OraDatabase.Parameters.Add "CONFLICT_LIST",  NULL,                      ORAPARM_OUTPUT, ORATYPE_CURSOR
58
 
59
    objEH.TryORA ( OraSession )
60
    On Error Resume Next
61
 
62
    OraDatabase.ExecuteSQL _
63
    " BEGIN "&_
64
    "    PK_RELEASE.ADD_RELEASE_SDK ( :RTAG_ID, :SDKTAG_ID, :USER_ID, :INSERT_COUNT, :CONFLICT_LIST ); "&_
65
    " END; "
66
 
67
    objEH.CatchORA ( OraSession )
68
 
69
     '  INSERT_COUNT < 0 - Error. Conflict list populated
70
     '  INSERT_COUNT = 0 - No packages inserted
71
     '  INSERT_COUNT > 0 - Number of packages inserted 
72
     AddReleaseSDK = OraDatabase.Parameters("INSERT_COUNT").Value
73
 
74
    ' NULL Conflict list indicates that the operation did not fail
75
    ' There may have been no items to insert 
76
    If NOT isNull(OraDatabase.Parameters("CONFLICT_LIST").Value) Then
77
        Set rsView = OraDatabase.Parameters("CONFLICT_LIST").Value
78
        AddReleaseSDK = -1
79
    End If
80
 
81
    OraDatabase.Parameters.Remove "RTAG_ID"
82
    OraDatabase.Parameters.Remove "REF_RTAG_ID"
83
    OraDatabase.Parameters.Remove "USER_ID"
84
    OraDatabase.Parameters.Remove "INSERT_COUNT"
85
    OraDatabase.Parameters.Remove "CONFLICT_LIST"
86
End Function
87
%>
88
<%
89
'-----------------------  MAIN LINE  ---------------------------
90
 
91
'------ ACCESS CONTROL ----------
92
'If NOT canShowControlInProject("AddReleaseSDK") Then
93
'   Err.Raise 8, "User not authorized to add an SDK.<br>"& objPMod.ComposeURL()
94
'End If
95
'--------------------------------
96
 
97
If (Request("rtag_id") <> "")  AND  (Request("sdktag_id") <> "") Then
98
 
99
   '--- Process submition ---
100
   sdkAdded = AddReleaseSDK ( Request("rtag_id"), Request("sdktag_id")  )
101
 
102
   If sdkAdded >= 0 Then
103
      Response.Redirect( "dependencies.asp?rtag_id="& Request("rtag_id") )
104
   End If
105
 
106
Else
107
 
108
   Err.Raise 8, "This page requires more paramaters to run.<br>"& objPMod.ComposeURL()
109
 
110
End If
111
 
112
'----------------------------------------------------------------
113
%>
114
 
115
 
116
<html>
117
<head>
118
<title>Release Manager</title>
119
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
120
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
121
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
122
<link rel="stylesheet" href="images/navigation.css" type="text/css">
123
<script language="JavaScript" src="images/common.js"></script>
124
 
125
</head>
126
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
127
<!-- BODY ---->
128
 
129
 
130
<table width="100%" height="98%"  border="0" cellpadding="0" cellspacing="0">
131
   <tr>
132
      <td align="center" valign="middle" background="images/bg_form_lightgray.gif">
133
         <table width="650" border="0" cellspacing="0" cellpadding="0">
134
            <tr>
135
               <td>
136
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
137
                     <tr>
138
                        <td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
139
                        <td background="images/lbox_bg_blue.gif"><!-- Heading -->
140
                        <img src="images/h_trsp_dot.gif" width="1" height="20">
141
                        <!-- END Heading --></td>
142
                        <td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
143
                     </tr>
144
                     <tr>
145
                        <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
146
                        <td bgcolor="#FFFFFF" valign="top">
147
                           <!-- Body -->
148
                           <table width="100%" border="0" cellspacing="1" cellpadding="2">
149
                              <form name="form" method="get" action="<%=ScriptName%>">
150
                                 <tr>
151
                                    <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="10"></td>
152
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
153
                                    <td nowrap width="100%" align="right" class="form_step"></td>
154
                                 </tr>
155
                                 <tr>
156
                                    <td width="1%">&nbsp;</td>
157
                                    <td colspan="2" width="1%" nowrap class="form_field">
158
                                       <table width="100%"  border="0" cellspacing="0" cellpadding="10">
159
                                          <tr>
160
                                             <td background="images/bg_form_lightbluedark.gif"><p class="err_ttl">Please note:</p></td>
161
                                          </tr>
162
<%While ((NOT rsView.BOF) AND (NOT rsView.EOF))%>
163
 
164
                                          <tr>
165
                                             <td background="images/bg_form_lightgray.gif" class="form_item">
166
                                                <%
167
                                                Response.write "PVID:" & rsView(0)
168
                                                %>
169
                                             </td>
170
                                          </tr>
171
<%rsView.MoveNext%>
172
<%WEnd%>
173
                                          <tr>
174
                                             <td background="images/bg_form_lightgray.gif" class="form_item">This action will be cancelled ? </td>
175
                                          </tr>
176
                                       </table>
177
                                    </td>
178
                                 </tr>
179
                                 <tr>
180
                                    <td width="1%">&nbsp;</td>
181
                                    <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
182
                                    <td nowrap width="100%" class="body_scol">
183
                                       <br>
184
                                       <input type="reset" name="btn" value="   OK   " class="form_btn" onClick="history.back();">
185
                                       <br><br>
186
                                    </td>
187
                                 </tr>
188
                                 <%=objPMod.ComposeHiddenTags()%>
189
                              </form>
190
                           </table>
191
                           <!-- END Body-->
192
                        </td>
193
                        <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
194
                     </tr>
195
                     <tr>
196
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
197
                        <td background="images/lbox_bg_blue.gif"></td>
198
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
199
                     </tr>
200
                  </table>
201
               </td>
202
            </tr>
203
         </table>
204
      </td>
205
   </tr>
206
</table>
207
</body>
208
</html>
209
 
210
 
211
<!-- DESTRUCTOR ------->
212
<!--#include file="common/destructor.asp"-->