Subversion Repositories DevTools

Rev

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

Rev 5902 Rev 5925
Line 26... Line 26...
26
<%
26
<%
27
'------------ Variable Definition -------------
27
'------------ Variable Definition -------------
28
Dim ProblemsString
28
Dim ProblemsString
29
Dim OverideWarnings
29
Dim OverideWarnings
30
Dim bCanDelete
30
Dim bCanDelete
-
 
31
Dim bCanDestroy
31
'------------ Constants Declaration -----------
32
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
'------------ Variable Init -------------------
33
ProblemsString = NULL
34
ProblemsString = NULL
34
bCanDelete = FALSE
35
bCanDelete = FALSE
35
 
-
 
-
 
36
bCanDestroy = canShowControlInProject ("DestroyPackage")
36
OverideWarnings = "N"
37
OverideWarnings = "N"
37
If InStr( 1, Request("btn"), "YES", 1 ) > 0 Then OverideWarnings = "Y"
38
If  bCanDestroy AND InStr( 1, Request("btn"), "YES", 1 ) > 0 Then OverideWarnings = "Y"
38
'----------------------------------------------
39
'----------------------------------------------
39
%>
40
%>
40
<%
41
<%
41
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )
42
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )
42
 
43
 
43
   OraDatabase.Parameters.Add "PV_ID",             nPvId,             ORAPARM_INPUT,  ORATYPE_NUMBER
44
   OraDatabase.Parameters.Add "PV_ID",             nPvId,             ORAPARM_INPUT,  ORATYPE_NUMBER
44
   OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT,  ORATYPE_CHAR
45
   OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT,  ORATYPE_CHAR
45
   OraDatabase.Parameters.Add "PROBLEM_STRING",    NULL,              ORAPARM_OUTPUT, ORATYPE_VARCHAR2
46
   OraDatabase.Parameters.Add "PROBLEM_STRING",    NULL,              ORAPARM_OUTPUT, ORATYPE_VARCHAR2
46
 
47
 
47
   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
-
 
48
 
-
 
49
   objEH.TryORA ( OraSession )
48
   objEH.TryORA ( OraSession )
50
   On Error Resume Next
49
   On Error Resume Next
51
 
50
 
52
   OraDatabase.ExecuteSQL _
51
   OraDatabase.ExecuteSQL _
53
   "BEGIN "&_
52
   "BEGIN "&_
Line 136... Line 135...
136
'
135
'
137
'  Allow to proceed 
136
'  Allow to proceed 
138
'       If the user can perform any action in the project
137
'       If the user can perform any action in the project
139
'       OR the package looks like they created it and it not in use
138
'       OR the package looks like they created it and it not in use
140
'
139
'
141
bCanDelete = canShowControlInProject ( "DestroyPackage" )
140
bCanDelete = bCanDestroy
142
If NOT bCanDelete Then
141
 If NOT bCanDelete Then
143
    bCanDelete = CanDestroyPackage(objPMod.GetParamValue("pv_id"))
142
    bCanDelete = CanDestroyPackage(objPMod.GetParamValue("pv_id"))
144
End If
143
End If
145
 
144
 
146
If NOT bCanDelete Then
145
If NOT bCanDelete Then
147
 Call RaiseMsg(enum_MSG_ERROR, "You do not have access to delete this version of the package")
146
 Call RaiseMsg(enum_MSG_ERROR, "You do not have access to delete this version of the package")
Line 222... Line 221...
222
                                                ' Format problem report string to html
221
                                                ' Format problem report string to html
223
                                                Response.write Replace( Server.HTMLEncode( ProblemsString ), VBNewLine, "<br>" )
222
                                                Response.write Replace( Server.HTMLEncode( ProblemsString ), VBNewLine, "<br>" )
224
                                                %>
223
                                                %>
225
                                             </td>
224
                                             </td>
226
                                          </tr>
225
                                          </tr>
-
 
226
                                       <%If bCanDestroy Then %>
227
                                          <tr>
227
                                          <tr>
228
                                             <td background="images/bg_form_lightgray.gif" class="form_item">Do you still want to proceed ? </td>
228
                                             <td background="images/bg_form_lightgray.gif" class="form_item">
-
 
229
                                             <%=enum_IMG_Critical%>
-
 
230
                                             Destroying this package may delete it from an SBOM or the dependency list of another package.
-
 
231
                                             <p>Do you still want to proceed ? </td>
229
                                          </tr>
232
                                          </tr>
-
 
233
                                       <%End If%>
230
                                       </table>
234
                                       </table>
231
                                    </td>
235
                                    </td>
232
                                 </tr>
236
                                 </tr>
233
                                 <tr>
237
                                 <tr>
234
                                    <td width="1%">&nbsp;</td>
238
                                    <td width="1%">&nbsp;</td>
235
                                    <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
239
                                    <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
236
                                    <td nowrap width="100%" class="body_scol">
240
                                    <td nowrap width="100%" class="body_scol">
237
                                       <br>
241
                                       <br>
-
 
242
                                       <%If bCanDestroy Then %>
238
                                       <input type="submit" name="btn" value="  Yes  " class="form_btn">
243
                                       <input type="submit" name="btn" value="  Yes  " class="form_btn">
239
                                       <input type="reset" name="btn" value="   No   " class="form_btn" onClick="history.back();">
244
                                       <input type="reset" name="btn" value="   No   " class="form_btn" onClick="history.back();">
-
 
245
                                       <%End If%>
240
                                       <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
246
                                       <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
241
                                       <br><br>
247
                                       <br><br>
242
                                    </td>
248
                                    </td>
243
                                 </tr>
249
                                 </tr>
244
                                 <%=objPMod.ComposeHiddenTags()%>
250
                                 <%=objPMod.ComposeHiddenTags()%>