| 119 |
ghuddy |
1 |
<%
|
|
|
2 |
'===================================================================
|
| 141 |
ghuddy |
3 |
' Package Common
|
| 119 |
ghuddy |
4 |
'===================================================================
|
|
|
5 |
%>
|
|
|
6 |
<!--#include file="../class/classTemplateManager.asp"-->
|
|
|
7 |
<!--#include file="../class/classTabControl.asp"-->
|
|
|
8 |
<!--#include file="../class/classActionButtonControl.asp"-->
|
| 147 |
ghuddy |
9 |
<!--#include file="daemon_instructions.asp"-->
|
| 119 |
ghuddy |
10 |
<%
|
|
|
11 |
'------------ VARIABLE DEFINITION -------------
|
|
|
12 |
Dim parPv_id
|
| 141 |
ghuddy |
13 |
Dim nEnvTab ' remember environment tab
|
| 119 |
ghuddy |
14 |
Dim objBtnControl
|
|
|
15 |
Dim aTabBtnsDef
|
|
|
16 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
17 |
'------------ VARIABLE INIT -------------------
|
|
|
18 |
parPv_id = Request("pv_id")
|
|
|
19 |
Set objBtnControl = New ActionButtonControl
|
|
|
20 |
'------------ CONDITIONS ----------------------
|
|
|
21 |
'----------------------------------------------
|
|
|
22 |
%>
|
|
|
23 |
<%
|
|
|
24 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
25 |
|
|
|
26 |
'--- Make sure rtag_id is always present
|
|
|
27 |
If (Request("rtag_id") = "") AND (Request("pv_id") = "") Then Response.Redirect("index.asp")
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
'--- Rebuild Environment
|
|
|
31 |
If (Request("rtag_id") <> "") Then
|
| 141 |
ghuddy |
32 |
Call Rebuild_Environment ( parRtag_id )
|
| 119 |
ghuddy |
33 |
End If
|
|
|
34 |
|
|
|
35 |
'--- Persist following parameters between postbacks
|
|
|
36 |
objPMod.PersistInQryString ( aPersistList(enumPAR_RTAG_ID) )
|
|
|
37 |
objPMod.PersistInQryString ( aPersistList(enumPAR_PV_ID) )
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
'--- Get Environment (lefthand side menu) tab
|
|
|
41 |
nEnvTab = GetEnvTab ( Request("envtab") )
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
'--- Get Package General Information
|
|
|
45 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
46 |
If Request("pv_id") <> "" Then
|
| 141 |
ghuddy |
47 |
Call Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )
|
| 119 |
ghuddy |
48 |
|
| 141 |
ghuddy |
49 |
' Make sure pv_id exists as it may be removed
|
|
|
50 |
If pkgInfoHash.Item("pv_id") = "" Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
|
| 119 |
ghuddy |
51 |
|
|
|
52 |
Else
|
| 141 |
ghuddy |
53 |
If (ScriptName <> "dependencies.asp") AND (ScriptName <> "find.asp")Then Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
|
| 119 |
ghuddy |
54 |
End If
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
'----------------------------------------------
|
|
|
58 |
%>
|
|
|
59 |
<%
|
|
|
60 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
61 |
Sub RenderPackageProperties ()
|
|
|
62 |
%>
|
|
|
63 |
|
| 141 |
ghuddy |
64 |
<tr>
|
|
|
65 |
<td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
|
| 119 |
ghuddy |
66 |
|
| 141 |
ghuddy |
67 |
<td valign="bottom" background="images/bg_lght_gray.gif" nowrap class="body_txt">
|
|
|
68 |
<%
|
|
|
69 |
If pkgInfoHash.Item ("is_patch") = "Y" Then
|
|
|
70 |
'--- PATCH ---
|
|
|
71 |
Response.write "<br><a href='patches.asp?pv_id="& pkgInfoHash.Item ("patch_parent_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked'><img src='icons/i_caretone.gif' hspace='2' border='0' align='absmiddle'>Back To "& pkgInfoHash.Item ("pkg_name") &"</a><br><br>"
|
| 119 |
ghuddy |
72 |
|
| 141 |
ghuddy |
73 |
If pkgInfoHash.Item ("is_obsolete") = "Y" Then
|
|
|
74 |
Dim rsTemp
|
|
|
75 |
Set rsTemp = OraDatabase.DbCreateDynaset( "select patch_obsoleted_by from package_patches where patch_id ="&pkgInfoHash.Item ("pv_id"), cint(0))
|
| 119 |
ghuddy |
76 |
|
| 141 |
ghuddy |
77 |
If rsTemp("patch_obsoleted_by") <> "" Then
|
| 119 |
ghuddy |
78 |
|
| 141 |
ghuddy |
79 |
Set rsTemp = OraDatabase.DbCreateDynaset( "select pkg_version from package_versions where pv_id ="&rsTemp("patch_obsoleted_by"), cint(0))
|
|
|
80 |
Call Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( "<b>Obsoleted by patch "& rsTemp("pkg_version") & ". </b> " ) & NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )
|
| 119 |
ghuddy |
81 |
|
| 141 |
ghuddy |
82 |
rsTemp.Close()
|
|
|
83 |
Set rsTemp = nothing
|
|
|
84 |
Else
|
|
|
85 |
Call Messenger ( "<SPAN class='err_alert'><b>Patch Is Obsolete!</b></SPAN><br>"& NewLine_To_BR( pkgInfoHash.Item ("obsolete_comments") ), 3, "100%" )
|
|
|
86 |
End If
|
|
|
87 |
Response.write enum_imgPatchObsolete
|
|
|
88 |
Else
|
|
|
89 |
Response.write enum_imgPatch
|
|
|
90 |
End If
|
| 119 |
ghuddy |
91 |
|
|
|
92 |
|
| 141 |
ghuddy |
93 |
If pkgInfoHash.Item ("dlocked") = "Y" Then
|
|
|
94 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'></SPAN>"
|
|
|
95 |
Else
|
|
|
96 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_version") &"</SPAN>"
|
|
|
97 |
End If
|
|
|
98 |
Else
|
|
|
99 |
'--- PACKAGE ---
|
|
|
100 |
If pkgInfoHash.Item ("dlocked") = "Y" Then
|
|
|
101 |
If pkgInfoHash.Item ("deprecated_state") = 6 Then
|
|
|
102 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'>"&enum_imgDeprecated&"</SPAN>"
|
|
|
103 |
ElseIf pkgInfoHash.Item ("product_state") = 4 Then
|
|
|
104 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'>"&enum_imgProductRejected&"</SPAN>"
|
|
|
105 |
Else
|
|
|
106 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"<img src='images/i_locked.gif' width='12' height='14' border='0' hspace='5' align='top'></SPAN>"
|
|
|
107 |
End If
|
|
|
108 |
Else
|
|
|
109 |
Response.write "<SPAN class='lbox_ttl'>"& pkgInfoHash.Item ("pkg_name") &" "& pkgInfoHash.Item ("pkg_version") &"</SPAN>"
|
|
|
110 |
End If
|
|
|
111 |
End If
|
|
|
112 |
%>
|
|
|
113 |
<br><br>
|
|
|
114 |
</td>
|
| 119 |
ghuddy |
115 |
|
| 141 |
ghuddy |
116 |
<td background="images/bg_lght_gray.gif"> </td>
|
|
|
117 |
</tr>
|
|
|
118 |
<tr>
|
|
|
119 |
<td background="images/bg_lght_gray.gif"></td>
|
| 147 |
ghuddy |
120 |
<td background="images/bg_lght_gray.gif" style=color:Red>
|
|
|
121 |
<%=GetOpCodeListForRtagIdAndPvId( "NOTE: '", Request("rtag_id"), pkgInfoHash.Item("pv_id"), "' has been requested" )%>
|
|
|
122 |
<td>
|
|
|
123 |
</tr>
|
| 119 |
ghuddy |
124 |
<%
|
|
|
125 |
End Sub
|
|
|
126 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
127 |
Sub RenderPackageState ()
|
| 141 |
ghuddy |
128 |
If (pkgInfoHash.Item ("dlocked") = "Y") Then
|
|
|
129 |
Response.write "<b>Status:</b> Released<br>"
|
|
|
130 |
Else
|
|
|
131 |
Response.write "<b>Status: </b>Not released<br>"
|
|
|
132 |
End If
|
| 119 |
ghuddy |
133 |
End Sub
|
|
|
134 |
|
|
|
135 |
'---------------------------------------------------------------
|
|
|
136 |
Sub Config_Spec (NNRtag_id, NNPv_id)
|
| 141 |
ghuddy |
137 |
OraDatabase.Parameters.Add "RTAG_ID", NNRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
138 |
OraDatabase.Parameters.Add "PV_ID", NNPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 119 |
ghuddy |
139 |
|
|
|
140 |
|
|
|
141 |
|
| 141 |
ghuddy |
142 |
If NNRtag_id <> "" Then
|
|
|
143 |
If pkgInfoHash.Item ("dlocked") <> "Y" Then
|
|
|
144 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec.sql"), cint(0))
|
|
|
145 |
Else
|
|
|
146 |
Set rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))
|
|
|
147 |
End If
|
|
|
148 |
Else
|
|
|
149 |
If pkgInfoHash.Item ("dlocked") <> "Y" Then
|
|
|
150 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec_nortag.sql"), cint(0))
|
|
|
151 |
Else
|
|
|
152 |
Set rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec_nortag.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))
|
|
|
153 |
End If
|
|
|
154 |
End If
|
| 119 |
ghuddy |
155 |
|
| 141 |
ghuddy |
156 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
157 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 119 |
ghuddy |
158 |
|
|
|
159 |
End Sub
|
|
|
160 |
|
|
|
161 |
'---------------------------------------------------------------
|
|
|
162 |
' Function: Config_Spec_Template
|
|
|
163 |
'
|
|
|
164 |
' Purpose: Generates HTML to display the config spec to use
|
|
|
165 |
' to create a view loaded with the particular package version.
|
|
|
166 |
'
|
|
|
167 |
' Arguments: dlocked : dlocked state of the package version
|
|
|
168 |
' config_branch : The branch, or null
|
|
|
169 |
' pkg_label : The package label
|
|
|
170 |
' src_path : The source path for the package
|
|
|
171 |
' Notes:
|
|
|
172 |
'
|
|
|
173 |
Sub Config_Spec_Template (dlocked, config_branch, pkg_label, src_path)
|
|
|
174 |
|
| 141 |
ghuddy |
175 |
Dim Template
|
| 119 |
ghuddy |
176 |
|
| 141 |
ghuddy |
177 |
If (pkg_label <> "" AND src_path <> "") Then
|
|
|
178 |
If (dlocked <> "Y" AND NOT IsNull(config_branch) AND config_branch <> "" ) Then
|
|
|
179 |
Template = "element * CHECKEDOUT <br>" & _
|
|
|
180 |
"element .../lost+found -none <br>" & _
|
|
|
181 |
"element * .../" & config_branch & "/LATEST <br>" & _
|
|
|
182 |
"element * " & pkg_label & " -mkbranch " & config_branch & "<br>" & _
|
|
|
183 |
"element * /main/0 -mkbranch " & config_branch & "<br>" & _
|
|
|
184 |
"load " & chr(34) & src_path & chr(34)
|
|
|
185 |
Else
|
|
|
186 |
Template = "element * CHECKEDOUT <br>" & _
|
|
|
187 |
"element .../lost+found -none <br>" & _
|
|
|
188 |
"element * " & pkg_label &"<br>" & _
|
|
|
189 |
"load " & chr(34) & src_path & chr(34)
|
|
|
190 |
End If
|
|
|
191 |
Else
|
|
|
192 |
Template = "UNAVAILABLE - missing label and/or source path"
|
|
|
193 |
End If
|
| 119 |
ghuddy |
194 |
|
| 141 |
ghuddy |
195 |
Response.write "<tr>"
|
|
|
196 |
Response.write "<td nowrap class='body_txt'><b>Config Specs: </b></td>"
|
|
|
197 |
Response.write "<td nowrap class='body_txt'>"& Template &"</td>"
|
|
|
198 |
Response.write "<td nowrap class='body_txt'></td>"
|
|
|
199 |
Response.write "</tr>"
|
| 119 |
ghuddy |
200 |
|
|
|
201 |
End Sub
|
|
|
202 |
|
|
|
203 |
'---------------------------------------------------------------
|
|
|
204 |
' Function: Jats_Commands
|
|
|
205 |
'
|
|
|
206 |
' Purpose: Generates HTML for displaying the JATS commands for extracting
|
|
|
207 |
' a view for the package version, and for building the targets
|
|
|
208 |
' within a previously extracted view for the package version.
|
|
|
209 |
'
|
|
|
210 |
' Arguments: dlocked : dlocked state of the package version
|
|
|
211 |
' config_branch : The branch, or null
|
|
|
212 |
' pkg_label : The package label
|
|
|
213 |
' src_path : The source path for the package
|
|
|
214 |
' Notes:
|
|
|
215 |
'
|
|
|
216 |
Sub Jats_Commands (dlocked, config_branch, pkg_label, src_path)
|
|
|
217 |
|
| 141 |
ghuddy |
218 |
Dim Template1, Template2
|
| 119 |
ghuddy |
219 |
|
| 141 |
ghuddy |
220 |
If (pkg_label <> "" AND src_path <> "") Then
|
|
|
221 |
If (dlocked <> "Y" AND NOT IsNull(config_branch) AND config_branch <> "" ) Then
|
|
|
222 |
Template1 = "jats release -extract " & pkg_label & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34) &" -branch "& config_branch
|
|
|
223 |
Else
|
|
|
224 |
Template1 = "jats release -extract " & pkg_label & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34)
|
|
|
225 |
End If
|
|
|
226 |
Template2 = "jats release -test " & pkgInfoHash.Item("pkg_label") & " -path " & chr(34) & Replace(src_path, "\", "/") & chr(34)
|
|
|
227 |
Else
|
|
|
228 |
Template1 = "UNAVAILABLE - missing label and/or source path"
|
|
|
229 |
Template2 = "UNAVAILABLE - missing label and/or source path"
|
|
|
230 |
End If
|
| 119 |
ghuddy |
231 |
|
| 141 |
ghuddy |
232 |
Response.write "<tr>"
|
|
|
233 |
Response.write "<td nowrap class='body_txt'><b>JATS Extract: </b></td>"
|
|
|
234 |
Response.write "<td nowrap class='body_txt'>" & Template1 & "</td>"
|
|
|
235 |
Response.write "<td nowrap class='body_txt'></td>"
|
|
|
236 |
Response.write "</tr>"
|
|
|
237 |
Response.write "<tr>"
|
|
|
238 |
Response.write "<td nowrap class='body_txt'><b>JATS Test: </b></td>"
|
|
|
239 |
Response.write "<td nowrap class='body_txt'>" & Template2 & "</td>"
|
|
|
240 |
Response.write "<td nowrap class='body_txt'></td>"
|
|
|
241 |
Response.write "</tr>"
|
| 119 |
ghuddy |
242 |
|
|
|
243 |
End Sub
|
|
|
244 |
|
|
|
245 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
246 |
%>
|