Subversion Repositories DevTools

Rev

Rev 6612 | Rev 6785 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5927 dpurdie 1
<%
2
'=====================================================
3
'   _used_by.asp
4
'   Core Implementation.
5
'   Needs to be used via a wrapper
6
'=====================================================
7
%>
8
<%
9
'------------ Variable Definition -------------
10
Dim rsTemp, rsState
11
Dim projId
12
Dim pkgId
13
Dim rsQry
14
Dim isDaemonEnabledRelease
15
'------------ Constants Declaration -----------
16
Const IMG_SVTREE = "<img src='images/i_vtree_small.gif' hspace='3' align='absmiddle' border='0'>"
17
Const IMG_WORLD = "<img src='images/i_foldero_small.gif' hspace='3' align='absmiddle' border='0'>"
18
Const IMG_GAP = "<img src='images/spacer.gif' width='20' height='1' border='0'>"
19
Const IMG_POINTER = "<img src='images/i_pointer.gif' border='0'>"
20
'------------ Variable Init -------------------
21
'----------------------------------------------
22
%>
23
<%
24
'-----------------------------------------------------------------------------------------------------------------------------
25
If pageIsEmbedded Then
26
    isDaemonEnabledRelease = TRUE
27
Else
28
    isDaemonEnabledRelease = is_daemon_enabled_release(parRtag_id, TRUE)
29
End If
30
 
31
If Request("action") <> "" AND NOT pageIsEmbedded Then
32
   %>
33
   <!--#include file="_access_control_login.asp"-->
34
   <!--#include file="_access_control_project.asp"-->
35
   <%
36
   If ( parRtag_id <> "") AND (parPv_id <> "") Then
37
 
38
      Dim posComma, txt, posUnderscore, dpvId, pvId, value, pvIdList, apvIdList, strList
39
 
40
      If isDaemonEnabledRelease = FALSE Then
41
 
42
         Set pvIdList = CreateObject("Scripting.Dictionary")
43
         'On Error Resume Next
44
         txt = Mid(Request("ignore_warnings"), 1, len(Request("ignore_warnings")))
45
         posComma = InStr(txt, ",")
46
 
47
         While posComma <> 0
48
            'Response.Write(txt)
49
            value = Mid(txt, 1, posComma-1)
50
            posUnderscore = Instr(value, "_")
51
            pvId = Mid(value, 1, posUnderscore - 1)
52
            dpvId = Mid(value, posUnderscore + 1, posComma-1)
53
 
54
            Call SetIgnoreWarnings(dpvId, pvId, parRtag_id)
55
            pvIdList.Add CStr( pvId ), Empty
56
            txt = Mid(txt, posComma + 1, Len(txt))
57
            posComma = InStr(txt, ",")
58
         WEnd
59
 
60
         If posComma = 0 And Len(txt) > 0 Then
61
            posUnderscore = Instr(txt, "_")
62
            pvId = Mid(txt, 1, posUnderscore - 1)
63
            dpvId = Mid(txt, posUnderscore + 1)
64
            Call SetIgnoreWarnings(dpvId, pvId, parRtag_id)
65
            pvIdList.Add CStr( pvId ), Empty
66
         End if
67
 
68
         apvIdList = pvIdList.Keys
69
 
70
      End If
71
 
5957 dpurdie 72
      Call Destroy_All_Objects
5927 dpurdie 73
      Response.Redirect("used_by.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id)
74
   Else
75
      Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
76
      Response.write QSTR_FullQuery
77
   End If
78
End If
79
%>
80
<script language="javascript">
81
<!--
82
function checkUncheckAll(theElement) {
83
   var theForm = theElement.form, z = 0;
84
   for(z=0; z<theForm.length;z++){
85
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall' && theForm[z].disabled != true){
86
         theForm[z].checked = theElement.checked;
87
      }
88
   }
89
}
90
 
5947 dpurdie 91
//  Show users of this package
92
function showUsedBy(el){
93
    var url = el.value;
94
    var baseId = 'EXTENDED'; 
95
    var divel = MM_findObj(baseId);
96
    if (url)
97
    {
98
        // Show the DIV we are about to load
99
        divel.style.display = 'block';
100
        divel.innerHTML = '<%=enumLOADING%>';
5927 dpurdie 101
 
5947 dpurdie 102
        // Set div name for ajax loading
103
		ajaxdivname = baseId;
104
 
105
		//Create the xmlHttp object to use in the request
106
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
107
		// This is non-blocking (asynchronous)
108
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
109
 
110
		//Send the xmlHttp get to the specified url
111
		xmlHttp_Get(xmlHttp, url);
112
    }
113
    else
114
    {
115
        divel.style.display = 'none';
116
    }
117
}
118
 
5939 dpurdie 119
function matchValue(ename) {
120
    var el
121
    el = document.getElementsByName(ename);
122
    if (el[0] && el[0].checked) return 1;
123
    return 0;
124
} 
125
 
5927 dpurdie 126
//-->
127
</script>
128
    <%
5932 dpurdie 129
    If pkgInfoHash.Exists("pv_id") Then
5927 dpurdie 130
    '-- FROM START ---------------------------------------------------------------------------------------------------------
131
    objFormComponent.FormName = "FormName"
132
    objFormComponent.Action = ScriptName&"?pv_id="&Request("pv_id")&"&rtag_id="&parRtag_id
133
    Call objFormComponent.FormStart()
134
    %>
135
    <%If Request("rtag_id") <> "" Then%>
136
     <br>
5939 dpurdie 137
     <span class="body_sect">Used by Packages In This Release</span>
138
     <br>
5927 dpurdie 139
     <!-- USED BY ------------------------------------------------>
140
     <table width="100%" border="0" cellspacing="1" cellpadding="3">
141
        <tr>
142
           <%If isDaemonEnabledRelease = FALSE Then%>
143
              <td background="images/bg_form_lightbluedark.gif" nowrap width="1" class="form_field"><INPUT type=checkbox name="checkall" value="Check All" onClick="checkUncheckAll(this);"></td>
144
           <%End If%>
145
           <td background="images/bg_form_lightbluedark.gif" nowrap width="1"></td>
146
           <td background="images/bg_form_lightbluedark.gif" nowrap width="1" class="form_field">Name</td>
147
           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Version</td>
148
           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Location</td>
149
           <td background="images/bg_form_lightbluedark.gif" nowrap width="1" class="form_field"></td>
150
           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Version Used</td>
151
           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Last Modified</td>
152
        </tr>
153
        <%
154
        OraDatabase.Parameters.Add "RTAG_ID", parRtag_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
155
        OraDatabase.Parameters.Add "PKG_ID",  pkgInfoHash.Item("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
5939 dpurdie 156
		OraDatabase.Parameters.Add "V_EXT",   EmptyToNull(pkgInfoHash.Item ("v_ext")), ORAPARM_INPUT, ORATYPE_VARCHAR2
5927 dpurdie 157
 
158
        Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("UsedByPackagesInThisRelease.sql"), cint(0))
159
 
160
        OraDatabase.Parameters.Remove "RTAG_ID"
161
        OraDatabase.Parameters.Remove "PKG_ID"
162
        OraDatabase.Parameters.Remove "V_EXT"
163
        %>
164
        <%If rsTemp.RecordCount < 1 Then%>
165
           <tr>
166
              <%If isDaemonEnabledRelease = FALSE Then%>
167
                 <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
168
              <%End If%>
169
              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
170
              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
171
              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
172
              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td><br>
173
              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
174
              <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
175
              <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
176
           </tr>
177
        <%End If%>
178
        <%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
179
           <tr>
5939 dpurdie 180
              <% Set rsState = OraDatabase.DbCreateDynaset( "select deprecated_state from release_content where rtag_id="&parRtag_id&" and pv_id="&rsTemp("pv_id"), cint(0))%>
5927 dpurdie 181
              <%If isDaemonEnabledRelease = FALSE Then%>
182
                 <%If rsTemp("dpv_id") <> parPv_id And IsNull(rsTemp("ignore_warn")) Then%>
183
                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>"></td>
184
                 <%ElseIf rsTemp("dpv_id") = parPv_id And IsNull(rsTemp("ignore_warn")) OR NOT isNull(rsTemp("ignore_warn")) Then%>
185
                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" disabled></td>
186
                 <%Else%>
187
                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" checked></td>
188
                 <%End If%>
189
              <%End If%>
190
 
191
              <%If rsState("deprecated_state") <> "" AND rsTemp("pkg_state") = 0 Then%>
192
                 <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( rsState("deprecated_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
193
              <%Else%>
194
                 <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( rsTemp("pkg_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
195
              <%End If%>
196
 
197
              <td background="images/bg_form_lightgray.gif" nowrap><a href="used_by.asp?pv_id=<%=rsTemp("pv_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=rsTemp("pkg_name")%></a></td>
198
              <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("pkg_version")%></td>
199
              <td background="images/bg_form_lightgray.gif" class="body_txt_gray" nowrap><%=GetEnvName(rsTemp("env_area"))%></td>
200
              <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( 0, "Y", rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), pkgInfoHash.Item("build_type"), TRUE )%></td>
201
              <td background="images/bg_form_lightgray.gif" <%If rsTemp("dpv_id") <> parPv_id Then%>class="err_alert"<%Else%>class="form_item"<%End If%>><%=pkgInfoHash.Item ("pkg_name") &" "& rsTemp("dpkg_version")%></td>
6612 dpurdie 202
              <td background="images/bg_form_lightgray.gif" class="form_item"><%=emailField(enum_imgUser & rsTemp("full_name"), rsTemp("user_email"))%>&nbsp;<%=DisplayDate ( rsTemp("modified_stamp") )%></td>
5927 dpurdie 203
           </tr>
204
           <%rsTemp.MoveNext
205
           rsTemp.Close()
206
           rsState.Close()
207
 
208
           Set rsState = nothing
209
        WEnd
210
        Set rsTemp = nothing
211
        %>
212
     </table>
213
     <%If isDaemonEnabledRelease = FALSE Then%>
214
        <input name="btn" type="submit" class="form_btn" value="Apply"><br>
215
        <SPAN class="rep_small">NOTE: Click on Apply "To Ignore Warnings" On Packages Used By</SPAN><br>
216
     <%End If%>
217
     <SPAN class="rep_small">NOTE: Versions in <SPAN class="err_alert">RED</SPAN> are different from <%=pkgInfoHash.Item("pkg_name") &" "& pkgInfoHash.Item("pkg_version")%></span>
218
     <input type="hidden" name="action" value="true">
219
    <%End If%>
220
    <%
221
    Call objFormComponent.FormEnd()
222
    '-- FROM END ----------------------------------------------------------------------------------------------------------------
223
    %>
5947 dpurdie 224
    <!-- Extended Searching ---------------------------------------->
5939 dpurdie 225
    <br>
5947 dpurdie 226
    <span class=body_txt>Extended Package Usage</span>
227
    <select class=body_txt onChange="showUsedBy(this);">
228
        <option value ="">Select one</option>
6126 dpurdie 229
 
5948 dpurdie 230
        <option disabled="disabled">Projects</option>
5947 dpurdie 231
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=2'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
232
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=1'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
233
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=0'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 234
 
5948 dpurdie 235
        <option disabled="disabled">Packages</option>
5947 dpurdie 236
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=2'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
237
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=1'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
238
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=0'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 239
 
5948 dpurdie 240
        <option disabled="disabled">SDKs</option>
5947 dpurdie 241
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=2'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
242
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=1'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
243
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=0'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 244
 
245
        <option disabled="disabled">SBOMS</option>
246
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=2'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
247
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=1'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
248
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=0'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
249
 
5947 dpurdie 250
    </select>
251
    <DIV class="form_item" id="EXTENDED" style="display:none;"><%=enumLOADING%></DIV>
5927 dpurdie 252
    <p>
253
    <div class="rep_small">NOTE: Versions in <SPAN class="err_alert">RED</SPAN> are different from <%=pkgInfoHash.Item("pkg_name") &" "& pkgInfoHash.Item("pkg_version")%></span>
254
    <br>
5932 dpurdie 255
<%End If%>