| 7568 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' _wform_change_in_manifest.asp
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/qstr.asp"-->
|
|
|
14 |
<!--#include file="common/common_subs.asp"-->
|
|
|
15 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
17 |
<%
|
|
|
18 |
'------------ ACCESS CONTROL ------------------
|
|
|
19 |
%>
|
|
|
20 |
<!--#include file="_access_control_login.asp"-->
|
|
|
21 |
<!--#include file="_access_control_general.asp"-->
|
|
|
22 |
<!--#include file="_access_control_project.asp"-->
|
|
|
23 |
<%
|
|
|
24 |
'------------ Variable Definition -------------
|
|
|
25 |
Dim parPv_id
|
|
|
26 |
Dim sMessage, sMessageType
|
|
|
27 |
Dim bCanEdit, submitDisabled
|
|
|
28 |
'------------ Constants Declaration -----------
|
|
|
29 |
'------------ Variable Init -------------------
|
|
|
30 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
31 |
parPv_id = QStrPar("pv_id")
|
|
|
32 |
sMessage = NULL
|
|
|
33 |
sMessageType = 3
|
|
|
34 |
submitDisabled = ""
|
|
|
35 |
bCanEdit = canActionControlInProject("ConfigureRelease") OR canActionControlInProject("EditNonCriticalInfoForLockedPackage") OR canActionControlInProject ("EditInManifest") OR canActionControl("MSMaintainer")
|
|
|
36 |
'----------------------------------------------
|
|
|
37 |
%>
|
|
|
38 |
<%
|
|
|
39 |
'------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
40 |
'
|
|
|
41 |
' Add a line of text to the System Message
|
|
|
42 |
' eLevel - 1 == Critical, 2==Warning, 3==Note
|
|
|
43 |
Sub sMessageAdd(eLevel, text)
|
|
|
44 |
If NOT isNull(sMessage) Then
|
|
|
45 |
sMessage = sMessage & "<br>"
|
|
|
46 |
End If
|
|
|
47 |
sMessage = sMessage & text
|
|
|
48 |
|
|
|
49 |
If eLevel < sMessageType Then
|
|
|
50 |
sMessageType = eLevel
|
|
|
51 |
End If
|
|
|
52 |
End Sub
|
|
|
53 |
|
|
|
54 |
Sub Get_Pkg_Info_With_Data ( NNpv_id )
|
|
|
55 |
Dim rsTemp, Query_String
|
|
|
56 |
|
|
|
57 |
Query_String = _
|
|
|
58 |
" SELECT pkg.pkg_name, pv.pkg_version, NVL(rc.IN_MANIFEST, 'N') as inManifest"&_
|
|
|
59 |
" FROM packages pkg, package_versions pv, Release_Content rc"&_
|
|
|
60 |
" WHERE pkg.pkg_id = pv.pkg_id"&_
|
|
|
61 |
" AND pv.pv_id = "& NNpv_id &_
|
|
|
62 |
" AND rc.pv_id(+) = pv.pv_id" &_
|
|
|
63 |
" AND rtag_id = " & DB_RTAG_ID
|
|
|
64 |
|
|
|
65 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
66 |
|
|
|
67 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
68 |
pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
|
|
|
69 |
pkgInfoHash.Add "pkg_version", (rsTemp.Fields("pkg_version"))
|
|
|
70 |
pkgInfoHash.Add "inManifest", (rsTemp.Fields("inManifest"))
|
|
|
71 |
End If
|
|
|
72 |
|
|
|
73 |
rsTemp.Close
|
|
|
74 |
Set rsTemp = nothing
|
|
|
75 |
End Sub
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
Sub Update_Data ( NNpv_id, cState )
|
|
|
79 |
Dim rsTemp, Query_String, sComments
|
|
|
80 |
Dim bUpdated
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
'-- Update database to change the eRef
|
|
|
84 |
objEH.TryORA ( OraSession )
|
|
|
85 |
On Error Resume Next
|
|
|
86 |
|
|
|
87 |
Query_String = "Select IN_MANIFEST from Release_Content where rtag_id = " & DB_RTAG_ID & " AND pv_id = " & NNpv_id
|
|
|
88 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
89 |
|
|
|
90 |
Dim Data: Data = rsTemp("IN_MANIFEST")
|
|
|
91 |
If IsNull(Data) Then Data = "N"
|
|
|
92 |
cState = Iif( cState = 1 ,"Y", "N")
|
|
|
93 |
Scomments = cState
|
|
|
94 |
bUpdated = ( UCase(cState) <> UCase( Data ) )
|
|
|
95 |
If bUpdated Then
|
|
|
96 |
rsTemp.Edit
|
|
|
97 |
rsTemp.Fields("IN_MANIFEST").Value = UCase(cState)
|
|
|
98 |
rsTemp.Update
|
|
|
99 |
|
|
|
100 |
' Indicate change to the build system
|
|
|
101 |
' May be overkill - perhaps a seperate field
|
|
|
102 |
OraDatabase.ExecuteSQL ("BEGIN PK_RELEASE.SET_RELEASE_MODIFIED("& DB_RTAG_ID & "); END; ")
|
|
|
103 |
|
|
|
104 |
End If
|
|
|
105 |
|
|
|
106 |
objEH.CatchORA ( OraSession )
|
|
|
107 |
On Error Goto 0
|
|
|
108 |
|
|
|
109 |
If bUpdated AND objEH.LastOraFailed = FALSE Then
|
|
|
110 |
'-- Log the change
|
|
|
111 |
sComments = "Set: "& sComments
|
|
|
112 |
call Log_Action ( NNpv_id, "inManifest", sComments )
|
|
|
113 |
End If
|
|
|
114 |
|
|
|
115 |
rsTemp.Close
|
|
|
116 |
Set rsTemp = nothing
|
|
|
117 |
End Sub
|
|
|
118 |
|
|
|
119 |
%>
|
|
|
120 |
<%
|
|
|
121 |
'Process submition
|
|
|
122 |
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
|
|
|
123 |
Call Update_Data ( parPv_id, Request("inManifest") )
|
|
|
124 |
If isNULL(sMessage) AND NOT objEH.LastOraFailed Then
|
|
|
125 |
Call ReloadParentWindow
|
|
|
126 |
Call CloseWindow
|
|
|
127 |
End If
|
|
|
128 |
End If
|
|
|
129 |
%>
|
|
|
130 |
<%
|
|
|
131 |
Call Get_Pkg_Info_With_Data ( parPv_id )
|
|
|
132 |
If NOT bCanEdit Then
|
|
|
133 |
Call sMessageAdd(1, "User does not have permission to edit this field")
|
|
|
134 |
submitDisabled = " disabled"
|
|
|
135 |
End If
|
|
|
136 |
%>
|
|
|
137 |
<html>
|
|
|
138 |
<head>
|
|
|
139 |
<title>Release Manager</title>
|
|
|
140 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
141 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
142 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
143 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
144 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
145 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
146 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
|
|
147 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
148 |
</head>
|
|
|
149 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
|
|
150 |
<form name="chowner" method="post" action="<%=scriptName%>" class="form_tight">
|
|
|
151 |
<table border="0" cellspacing="0" cellpadding="2" width="100%">
|
|
|
152 |
<tr>
|
|
|
153 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
154 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
155 |
<%Call Messenger ( sMessage , sMessageType, "100%" )%>
|
|
|
156 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
157 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
158 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
159 |
<tr>
|
|
|
160 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
|
|
|
161 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
162 |
<%=pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version")%></td>
|
|
|
163 |
</tr>
|
|
|
164 |
<tr>
|
|
|
165 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">External Reference</td>
|
|
|
166 |
|
|
|
167 |
<%
|
|
|
168 |
Dim FRinManifestYES, FRinManifestNO
|
|
|
169 |
If pkgInfoHash.Item ("inManifest") = "Y" Then
|
|
|
170 |
FRinManifestYES = "checked"
|
|
|
171 |
Else
|
|
|
172 |
FRinManifestNO = "checked"
|
|
|
173 |
End If
|
|
|
174 |
%>
|
|
|
175 |
<td nowrap width="100%" class="form_txt" background="images/bg_form_lightbluedark.gif">
|
|
|
176 |
Yes<input name="inManifest" type="radio" value="1" <%=FRinManifestYES%> <%=submitDisabled%>>
|
|
|
177 |
No <input name="inManifest" type="radio" value="0" <%=FRinManifestNO%> <%=submitDisabled%>>
|
|
|
178 |
</td>
|
|
|
179 |
</tr>
|
|
|
180 |
</table>
|
|
|
181 |
</td>
|
|
|
182 |
</tr>
|
|
|
183 |
<tr>
|
|
|
184 |
<td align="right">
|
|
|
185 |
<input type="submit" name="btn" value="Update" class="form_btn_comp" <%=submitDisabled%>>
|
|
|
186 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
|
|
187 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
188 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
189 |
<input type="hidden" name="action" value="true">
|
|
|
190 |
</td>
|
|
|
191 |
</tr>
|
|
|
192 |
</table>
|
|
|
193 |
</form>
|
|
|
194 |
</body>
|
|
|
195 |
</html>
|
|
|
196 |
<!-- DESTRUCTOR ------->
|
|
|
197 |
<!--#include file="common/destructor.asp"-->
|