Subversion Repositories DevTools

Rev

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

Rev 5506 Rev 5590
Line 22... Line 22...
22
<!--#include file="_access_control_project.asp"-->
22
<!--#include file="_access_control_project.asp"-->
23
<%
23
<%
24
'------------ Variable Definition -------------
24
'------------ Variable Definition -------------
25
Dim parFRpkg_id                     ' Currently selected Package
25
Dim parFRpkg_id                     ' Currently selected Package
26
Dim parFRpv_id                      ' Currently selected Package-Version
26
Dim parFRpv_id                      ' Currently selected Package-Version
-
 
27
Dim parFromPv_id
-
 
28
Dim parToRtag_id
-
 
29
Dim sMessage
27
'------------ Constants Declaration -----------
30
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
31
'------------ Variable Init -------------------
29
parFRpkg_id = QStrPar("FRpkg_id")
32
parFRpkg_id = QStrPar("FRpkg_id")
30
parFRpv_id = QStrPar("FRpv_id")
33
parFRpv_id = QStrPar("FRpv_id")
-
 
34
parFromPv_id = QStrPar("FromPv_id")
-
 
35
parToRtag_id = QStrPar("rtag_id")
-
 
36
sMessage = NULL
31
If parFRpkg_id = "" Then parFRpkg_id = "-1"
37
If parFRpkg_id = "" Then parFRpkg_id = "-1"
32
If parFRpv_id = "" Then parFRpv_id = "-1"
38
If parFRpv_id = ""  Then parFRpv_id = "-1"
33
'----------------------------------------------
39
'----------------------------------------------
34
%>
40
%>
35
<%
41
<%
36
'-------------------------------------------------
42
'-------------------------------------------------
37
' Function:         Get_Packages   
43
' Function:         Get_Packages   
Line 43... Line 49...
43
	Dim rsTemp, Query_String, tempLINK
49
	Dim rsTemp, Query_String, tempLINK
44
	Query_String = _
50
	Query_String = _
45
	"SELECT * FROM packages ORDER BY pkg_name ASC"
51
	"SELECT * FROM packages ORDER BY pkg_name ASC"
46
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
52
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
47
	
53
	
48
	Response.write "<select name='FRpkg_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
54
	Response.write "<select name='FRpkg_id' onChange=""MM_showProgressBar();MM_jumpMenu('window',this,0)"" class='form_item'>"
49
		Response.write "<option value=''>Select Package</option>"
55
		Response.write "<option value=''>Select Package</option>"
50
		While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
56
		While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
51
			tempLINK = scriptName &"?FRpkg_id="& rsTemp.Fields("pkg_id") & "&"& objPMod.ComposeURL()
57
			tempLINK = scriptName &"?FRpkg_id="& rsTemp.Fields("pkg_id") & "&"& objPMod.ComposeURL()
52
			If NNpkg_id = Cstr(rsTemp.Fields("pkg_id")) Then
58
			If NNpkg_id = Cstr(rsTemp.Fields("pkg_id")) Then
53
	        	Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("pkg_name")) &"</option>"
59
	        	Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("pkg_name")) &"</option>"
Line 72... Line 78...
72
	Dim rsTemp, Query_String, tempLINK, productId
78
	Dim rsTemp, Query_String, tempLINK, productId
73
	Query_String = _
79
	Query_String = _
74
	"SELECT pv_id, pkg_version FROM package_versions WHERE pkg_id = "& NNpkg_id &" ORDER BY pkg_version ASC"
80
	"SELECT pv_id, pkg_version FROM package_versions WHERE pkg_id = "& NNpkg_id &" ORDER BY pkg_version ASC"
75
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
81
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
76
	
82
	
77
	Response.write "<select name='FRpv_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
83
	Response.write "<select name='FRpv_id' onChange=""MM_showProgressBar();MM_jumpMenu('window',this,0)"" class='form_item'>"
78
		If NNpkg_id <> "-1" Then
84
		If NNpkg_id <> "-1" Then
79
			Response.write "<option value=''>Select Package Version</option>"
85
			Response.write "<option value=''>Select Package Version</option>"
80
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
86
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
81
				tempLINK = scriptName &"?FRpv_id="& rsTemp.Fields("pv_id") &"&FRpkg_id="& NNpkg_id &"&"& objPMod.ComposeURL()
87
				tempLINK = scriptName &"?FRpv_id="& rsTemp.Fields("pv_id") &"&FRpkg_id="& NNpkg_id &"&"& objPMod.ComposeURL()
82
				
88
				
Line 91... Line 97...
91
	Response.write "</select>"
97
	Response.write "</select>"
92
	
98
	
93
	rsTemp.Close
99
	rsTemp.Close
94
	Set rsTemp = nothing
100
	Set rsTemp = nothing
95
End Sub
101
End Sub
-
 
102
 
-
 
103
Function Import_Dependency ( NNFromPv_id, NNToRtag_id )
-
 
104
    Dim sqlStr, PvId, ii
-
 
105
    Dim ImportList, entry,  keys
-
 
106
    Set ImportList = CreateObject ("Scripting.Dictionary")
-
 
107
 
-
 
108
    '
-
 
109
    '   Generate a list of packages to be added
-
 
110
    '   The union will add the base package to the set - if its not present
-
 
111
    '
-
 
112
	sqlStr = "SELECT DISTINCT qry.DPV_ID"&_
-
 
113
    " FROM ("&_
-
 
114
 	"		SELECT dep.PV_ID, dep.DPV_ID, LEVEL AS LEVEL_NUM"&_
-
 
115
 	"		  FROM PACKAGE_DEPENDENCIES dep"&_
-
 
116
 	"		START WITH dep.PV_ID IN ( :PV_ID ) "&_
-
 
117
 	"		CONNECT BY PRIOR dep.DPV_ID = dep.PV_ID"&_
-
 
118
    "       UNION" &_
-
 
119
    "       SELECT" &_
-
 
120
    "           TO_NUMBER(:PV_ID), TO_NUMBER(:PV_ID), TO_NUMBER(0) " &_
-
 
121
    "       FROM DUAL" &_
-
 
122
 	"	) qry,"&_
-
 
123
 	"	PACKAGES pkg,"&_
-
 
124
	"	PACKAGE_VERSIONS pv"&_
-
 
125
 	" WHERE qry.PV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID"&_
-
 
126
	" and qry.dpv_id NOT IN (select pv_id from release_content where rtag_id = :RTAG_ID)"
-
 
127
 
-
 
128
	objEH.ErrorRedirect = FALSE
-
 
129
    objEH.TryORA ( OraSession )
-
 
130
    On Error Resume Next
-
 
131
 
-
 
132
	OraDatabase.Parameters.Add "PV_ID",   NNFromPv_id, 	ORAPARM_INPUT, ORATYPE_NUMBER 
-
 
133
	OraDatabase.Parameters.Add "RTAG_ID", NNToRtag_id, 	ORAPARM_INPUT, ORATYPE_NUMBER 
-
 
134
	OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
-
 
135
    OraDatabase.Parameters.Add "OPERATION","A", ORAPARM_INPUT, ORATYPE_CHAR
-
 
136
 
-
 
137
    Dim rsTemp
-
 
138
	Set rsTemp = OraDatabase.DbCreateDynaset( sqlStr, cint(0))
-
 
139
    If Err.Number = 0 Then
-
 
140
        While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
-
 
141
           entry = rsTemp("DPV_ID")
-
 
142
           If NOT ImportList.Exists(entry) Then
-
 
143
                ImportList.add entry, 1
-
 
144
           End If
-
 
145
           rsTemp.MoveNext
-
 
146
        WEnd
-
 
147
    End If
-
 
148
	rsTemp.Close
-
 
149
	Set rsTemp = nothing
-
 
150
 
-
 
151
    '
-
 
152
    '   Add each entry into the 'Pending Tab'
-
 
153
    '
-
 
154
    keys = ImportList.Keys
-
 
155
    For ii = 0 to ImportList.Count - 1
-
 
156
        entry = keys(ii)
-
 
157
	    OraDatabase.Parameters.Remove "PV_ID"
-
 
158
	    OraDatabase.Parameters.Add "PV_ID", entry, ORAPARM_INPUT, ORATYPE_NUMBER 
-
 
159
        If Err.Number = 0 Then
-
 
160
            OraDatabase.ExecuteSQL _
-
 
161
            "BEGIN  "&_
-
 
162
            "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, 7, :RTAG_ID, :USER_ID, :OPERATION );  "&_
-
 
163
            "END;"
-
 
164
        End If
-
 
165
    Next
-
 
166
	
-
 
167
	objEH.CatchORA ( OraSession )
-
 
168
     If objEH.Finally Then
-
 
169
        Call OpenInParentWindow ("dependencies.asp?rtag_id=" & NNToRtag_id)
-
 
170
        Call CloseWindow()
-
 
171
     End If
-
 
172
 
-
 
173
	
-
 
174
	OraDatabase.Parameters.Remove "PV_ID"
-
 
175
	OraDatabase.Parameters.Remove "RTAG_ID"
-
 
176
	OraDatabase.Parameters.Remove "USER_ID"
-
 
177
	OraDatabase.Parameters.Remove "OPERATION"
-
 
178
 
-
 
179
	Set ImportList = nothing
-
 
180
 
-
 
181
End Function
-
 
182
 
96
%>
183
%>
97
<%
184
<%
98
'Process submition
185
'Process submition
99
If CBool(QStrPar("action")) Then
186
If CBool(QStrPar("action")) Then
100
	%>
-
 
-
 
187
    If NOT objAccessControl.UserLogedIn Then
101
	<script language="JavaScript" type="text/javascript">
188
        sMessage = "User is no longer logged in"
102
	window.opener.location='_import_dependency.asp?FromPv_id=<%=Request.Form("FromPv_id")%>&<%=objPMod.ComposeURL()%>';
189
    ElseIf NOT( (parFromPv_id <> "") AND (parToRtag_id <> "")) Then
103
	</script>		
190
        sMessage = "Internal: Mandatory parameters are missing"
104
	<%
191
    Else
-
 
192
        Call Import_Dependency ( parFromPv_id, parToRtag_id )
-
 
193
        parFRpkg_id = "-1"
-
 
194
        parFRpv_id = "-1" 
105
	Call CloseWindow
195
    End If
106
End If
196
End If
107
%>
197
%>
108
<html>
198
<html>
109
<head>
199
<head>
110
<title>Release Manager</title>
200
<title>Release Manager</title>
Line 114... Line 204...
114
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
204
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
115
<link rel="stylesheet" href="images/navigation.css" type="text/css">
205
<link rel="stylesheet" href="images/navigation.css" type="text/css">
116
<script language="JavaScript" src="images/common.js"></script>
206
<script language="JavaScript" src="images/common.js"></script>
117
</head>
207
</head>
118
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
208
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
119
<form name="importrel" method="post" action="<%=scriptName%>">
209
<form class="form_tight" name="importrel" method="post" action="<%=scriptName%>">
120
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
210
  <table width="100%" border="0" cellspacing="0" cellpadding="2">
121
    <tr> 
211
    <tr> 
122
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_change_group_off.gif" width="22" height="25" hspace="5"></td>
-
 
123
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">Import Package Dependencies</td>
-
 
124
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
-
 
125
        <input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRpkg_id','Package Name','R','FRpv_id','Package Version','R');return document.MM_returnValue">
-
 
126
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
-
 
127
      </td>
-
 
128
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
-
 
129
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
-
 
130
    </tr>
-
 
131
    <tr> 
-
 
132
      <td height="100%" width="1%">&nbsp;</td>
-
 
133
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
212
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
-
 
213
         <!-- LOCAL MESSAGES ++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
214
         <%Call Messenger ( sMessage , 3, "100%" )%>
-
 
215
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
216
         <!--#include file="messages/_msg_inline.asp"-->
134
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
217
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
135
          <tr> 
218
          <tr> 
136
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
-
 
137
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
-
 
138
            <td nowrap width="100%">&nbsp; </td>
-
 
139
          </tr>
-
 
140
          <tr> 
-
 
141
            <td width="1%">&nbsp;</td>
-
 
142
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
219
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
143
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
220
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
144
              <%Call Get_Packages ( parFRpkg_id )%>
221
              <%Call Get_Packages ( parFRpkg_id )%>
145
            </td>
222
            </td>
146
          </tr>
223
          </tr>
147
          <tr> 
224
          <tr> 
148
            <td width="1%">&nbsp;</td>
-
 
149
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package Version </td>
225
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package Version </td>
150
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
226
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
151
              <%Call Get_Package_Versions ( parFRpkg_id, parFRpv_id )%>
227
              <%Call Get_Package_Versions ( parFRpkg_id, parFRpv_id )%>
152
			  <input type="hidden" name="FromPv_id" value="<%=parFRpv_id%>">
228
			  <input type="hidden" name="FromPv_id" value="<%=parFRpv_id%>">
153
			  <input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
229
			  <input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
154
              <input type="hidden" name="action" value="true">
230
              <input type="hidden" name="action" value="true">
155
            </td>
231
            </td>
156
          </tr>
232
          </tr>
157
          <tr> 
233
          <tr> 
158
            <td width="1%">&nbsp;</td>
-
 
159
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
-
 
160
            <td width="100%" class="form_txt"> 
234
            <td width="100%" class="form_txt" colspan="2"> 
161
              <p>Import all the dependencies of the specified package into the current Release in a recursive manner.
235
              <p>Import all the dependencies of the specified package into the current Release in a recursive manner.
162
               <br>The specified package will also be import - if it is not already present.
236
               <br>The specified package will also be import - if it is not already present.
163
               <p>Package Versions will be added to the 'Pending' tab of the Release. Duplicates <bold>MUST</bold> be removed from this list
237
               <p>Package Versions will be added to the 'Pending' tab of the Release. Duplicates <bold>MUST</bold> be removed from this list
164
                  before the versions are 'Released' into the body of the Release.
238
                  before the versions are 'Released' into the body of the Release.
165
              </p>
239
              </p>
Line 167... Line 241...
167
          </tr>
241
          </tr>
168
        </table>
242
        </table>
169
      </td>
243
      </td>
170
    </tr>
244
    </tr>
171
    <tr> 
245
    <tr> 
172
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
246
      <td><%=ProgressBar()%></td>
-
 
247
      <td align="right"> 
-
 
248
        <input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRpkg_id','Package Name','R','FRpv_id','Package Version','R');return document.MM_returnValue">
173
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
249
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
-
 
250
      </td>
174
    </tr>
251
    </tr>
175
  </table>
252
  </table>
176
</form>
253
</form>
177
</body>
254
</body>
178
</html>
255
</html>