Subversion Repositories DevTools

Rev

Rev 6788 | Rev 7055 | 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
<!--
75
function checkUncheckAll(theElement) {
76
   var theForm = theElement.form, z = 0;
77
   for(z=0; z<theForm.length;z++){
78
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall' && theForm[z].disabled != true){
79
         theForm[z].checked = theElement.checked;
80
      }
81
   }
82
}
83
 
5947 dpurdie 84
//  Show users of this package
85
function showUsedBy(el){
86
    var url = el.value;
87
    var baseId = 'EXTENDED'; 
88
    var divel = MM_findObj(baseId);
89
    if (url)
90
    {
91
        // Show the DIV we are about to load
92
        divel.style.display = 'block';
93
        divel.innerHTML = '<%=enumLOADING%>';
5927 dpurdie 94
 
5947 dpurdie 95
        // Set div name for ajax loading
96
		ajaxdivname = baseId;
97
 
98
		//Create the xmlHttp object to use in the request
99
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
100
		// This is non-blocking (asynchronous)
101
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
102
 
103
		//Send the xmlHttp get to the specified url
104
		xmlHttp_Get(xmlHttp, url);
105
    }
106
    else
107
    {
108
        divel.style.display = 'none';
109
    }
110
}
111
 
5939 dpurdie 112
function matchValue(ename) {
113
    var el
114
    el = document.getElementsByName(ename);
115
    if (el[0] && el[0].checked) return 1;
116
    return 0;
117
} 
118
 
5927 dpurdie 119
//-->
120
</script>
121
    <%
5932 dpurdie 122
    If pkgInfoHash.Exists("pv_id") Then
5927 dpurdie 123
    '-- FROM START ---------------------------------------------------------------------------------------------------------
124
    objFormComponent.FormName = "FormName"
125
    objFormComponent.Action = ScriptName&"?pv_id="&Request("pv_id")&"&rtag_id="&parRtag_id
126
    Call objFormComponent.FormStart()
127
    %>
128
    <%If Request("rtag_id") <> "" Then%>
129
     <br>
5939 dpurdie 130
     <span class="body_sect">Used by Packages In This Release</span>
131
     <br>
5927 dpurdie 132
     <!-- USED BY ------------------------------------------------>
6790 dpurdie 133
     <table width="100%" border="0" cellspacing="1" cellpadding="3" class="stdGrey">
134
         <thead>
135
            <tr>
136
               <%If isDaemonEnabledRelease = FALSE Then%>
137
                  <th nowrap width="1"><INPUT type=checkbox name="checkall" value="Check All" onClick="checkUncheckAll(this);"></td>
138
               <%End If%>
139
               <th nowrap width="1"></td>
140
               <th nowrap width="1">Name</td>
141
               <th nowrap width="25%">Version</td>
142
               <th nowrap width="25%">Location</td>
143
               <th nowrap width="1"></td>
144
               <th nowrap width="25%">Version Used</td>
145
               <th nowrap width="25%">Last Modified</td>
146
            </tr>
147
         </thead>
5927 dpurdie 148
        <%
149
        OraDatabase.Parameters.Add "RTAG_ID", parRtag_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
150
        OraDatabase.Parameters.Add "PKG_ID",  pkgInfoHash.Item("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
5939 dpurdie 151
		OraDatabase.Parameters.Add "V_EXT",   EmptyToNull(pkgInfoHash.Item ("v_ext")), ORAPARM_INPUT, ORATYPE_VARCHAR2
5927 dpurdie 152
 
153
        Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("UsedByPackagesInThisRelease.sql"), cint(0))
154
 
155
        OraDatabase.Parameters.Remove "RTAG_ID"
156
        OraDatabase.Parameters.Remove "PKG_ID"
157
        OraDatabase.Parameters.Remove "V_EXT"
158
        %>
159
        <%If rsTemp.RecordCount < 1 Then%>
6790 dpurdie 160
           <tr>
6788 dpurdie 161
              <td nowrap>&nbsp;</td>
162
           <%If isDaemonEnabledRelease = FALSE Then%>
6790 dpurdie 163
              <td></td>
6788 dpurdie 164
           <%End If%>
6790 dpurdie 165
              <td colspan=6>Leaf Package - Is not used by any other package in this Release</td>
5927 dpurdie 166
           </tr>
6788 dpurdie 167
        <%Else%>
5927 dpurdie 168
        <%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
6790 dpurdie 169
           <tr>
5927 dpurdie 170
              <%If isDaemonEnabledRelease = FALSE Then%>
171
                 <%If rsTemp("dpv_id") <> parPv_id And IsNull(rsTemp("ignore_warn")) Then%>
6788 dpurdie 172
                    <td nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>"></td>
5927 dpurdie 173
                 <%ElseIf rsTemp("dpv_id") = parPv_id And IsNull(rsTemp("ignore_warn")) OR NOT isNull(rsTemp("ignore_warn")) Then%>
6788 dpurdie 174
                    <td nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" disabled></td>
5927 dpurdie 175
                 <%Else%>
6788 dpurdie 176
                    <td nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" checked></td>
5927 dpurdie 177
                 <%End If%>
178
              <%End If%>
179
 
6785 dpurdie 180
              <%If rsTemp("deprecated_state") <> "" AND rsTemp("pkg_state") = 0 Then%>
6788 dpurdie 181
                 <td><%=DefineStateIcon ( rsTemp("deprecated_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
5927 dpurdie 182
              <%Else%>
6788 dpurdie 183
                 <td><%=DefineStateIcon ( rsTemp("pkg_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
5927 dpurdie 184
              <%End If%>
185
 
6790 dpurdie 186
              <td nowrap><a href="used_by.asp?pv_id=<%=rsTemp("pv_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=rsTemp("pkg_name")%></a></td>
187
              <td nowrap><%=rsTemp("pkg_version")%></td>
188
              <td  nowrap><%=GetEnvName(rsTemp("env_area"))%></td>
189
              <td><%=DefineStateIcon ( 0, "Y", rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), pkgInfoHash.Item("build_type"), TRUE )%></td>
190
              <td nowrap <%If rsTemp("dpv_id") <> parPv_id Then%>class="err_alert"<%End If%>><%=pkgInfoHash.Item ("pkg_name") &" "& rsTemp("dpkg_version")%></td>
191
              <td nowrap><%=emailField(enum_imgUser & rsTemp("full_name"), rsTemp("user_email"))%>&nbsp;<%=DisplayDate ( rsTemp("modified_stamp") )%></td>
5927 dpurdie 192
           </tr>
193
           <%rsTemp.MoveNext
6788 dpurdie 194
 
5927 dpurdie 195
        WEnd
196
        %>
6790 dpurdie 197
           <tr>
198
              <td nowrap colspan=7>Total Packages: <%=rsTemp.RecordCount%></td>
6788 dpurdie 199
           </tr>
200
        <%End If%>
5927 dpurdie 201
     </table>
6788 dpurdie 202
     <%If rsTemp.RecordCount > 0 Then%>
5927 dpurdie 203
     <%If isDaemonEnabledRelease = FALSE Then%>
204
        <input name="btn" type="submit" class="form_btn" value="Apply"><br>
205
        <SPAN class="rep_small">NOTE: Click on Apply "To Ignore Warnings" On Packages Used By</SPAN><br>
206
     <%End If%>
207
     <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>
208
     <input type="hidden" name="action" value="true">
209
    <%End If%>
6788 dpurdie 210
     <%rsTemp.Close()%>
211
     <%Set rsTemp = nothing%>
6790 dpurdie 212
    <%End If%>
5927 dpurdie 213
    <%
214
    Call objFormComponent.FormEnd()
215
    '-- FROM END ----------------------------------------------------------------------------------------------------------------
216
    %>
5947 dpurdie 217
    <!-- Extended Searching ---------------------------------------->
5939 dpurdie 218
    <br>
5947 dpurdie 219
    <span class=body_txt>Extended Package Usage</span>
220
    <select class=body_txt onChange="showUsedBy(this);">
221
        <option value ="">Select one</option>
6126 dpurdie 222
 
5948 dpurdie 223
        <option disabled="disabled">Projects</option>
5947 dpurdie 224
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=2'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
225
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=1'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
226
        <option value='RequestUsedByThisProjectSummary.asp?pv_id=<%=parPv_id%>&mode=0'>Projects that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 227
 
5948 dpurdie 228
        <option disabled="disabled">Packages</option>
5947 dpurdie 229
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=2'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
230
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=1'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
231
        <option value='UsedByPackageSummary.asp?pv_id=<%=parPv_id%>&mode=0'>Packages that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 232
 
5948 dpurdie 233
        <option disabled="disabled">SDKs</option>
5947 dpurdie 234
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=2'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
235
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=1'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
236
        <option value='UsedBySDKSummary.asp?pv_id=<%=parPv_id%>&mode=0'>SDKs that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
6126 dpurdie 237
 
238
        <option disabled="disabled">SBOMS</option>
239
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=2'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%>&nbsp;<%=pkgInfoHash.Item("pkg_version")%>)</option>
240
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=1'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%><%=pkgInfoHash.Item("v_ext")%>)</option>
241
        <option value='UsedBySBOMSummary.asp?pv_id=<%=parPv_id%>&mode=0'>SBOMs that use: (<%=pkgInfoHash.Item("pkg_name")%>)</option>
242
 
5947 dpurdie 243
    </select>
244
    <DIV class="form_item" id="EXTENDED" style="display:none;"><%=enumLOADING%></DIV>
5927 dpurdie 245
    <p>
246
    <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>
247
    <br>
5932 dpurdie 248
<%End If%>