Subversion Repositories DevTools

Rev

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