Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
5442 dpurdie 4
'   used_by.asp
119 ghuddy 5
'=====================================================
6
%>
7
<%
8
Option explicit
9
' Good idea to set when using redirect
129 ghuddy 10
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 11
%>
12
<!--#include file="common/conf.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/formating.asp"-->
15
<!--#include file="common/qstr.asp"-->
16
<!--#include file="common/common_subs.asp"-->
17
<!--#include file="common/common_dbedit.asp"-->
18
<!--#include file="_tabs.asp"-->
19
<!--#include file="common/_package_common.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_general.asp"-->
24
<%
25
'------------ Variable Definition -------------
26
Dim rsTemp, rsState
27
Dim projId
5925 dpurdie 28
Dim pkgId
145 ghuddy 29
Dim rsQry
30
Dim isDaemonEnabledRelease
119 ghuddy 31
'------------ Constants Declaration -----------
32
Const IMG_SVTREE = "<img src='images/i_vtree_small.gif' hspace='3' align='absmiddle' border='0'>"
33
Const IMG_WORLD = "<img src='images/i_foldero_small.gif' hspace='3' align='absmiddle' border='0'>"
34
Const IMG_GAP = "<img src='images/spacer.gif' width='20' height='1' border='0'>"
35
Const IMG_POINTER = "<img src='images/i_pointer.gif' border='0'>"
36
'------------ Variable Init -------------------
37
'----------------------------------------------
38
%>
39
<%
40
'-----------------------------------------------------------------------------------------------------------------------------
41
 
145 ghuddy 42
isDaemonEnabledRelease = is_daemon_enabled_release(parRtag_id, TRUE)
43
 
119 ghuddy 44
If Request("action") <> "" Then
129 ghuddy 45
   %>
46
   <!--#include file="_access_control_login.asp"-->
47
   <!--#include file="_access_control_project.asp"-->
48
   <%
49
   If ( parRtag_id <> "") AND (parPv_id <> "") Then
145 ghuddy 50
 
129 ghuddy 51
      Dim posComma, txt, posUnderscore, dpvId, pvId, value, pvIdList, apvIdList, strList
119 ghuddy 52
 
145 ghuddy 53
      If isDaemonEnabledRelease = FALSE Then
119 ghuddy 54
 
145 ghuddy 55
         Set pvIdList = CreateObject("Scripting.Dictionary")
56
         'On Error Resume Next
57
         txt = Mid(Request("ignore_warnings"), 1, len(Request("ignore_warnings")))
129 ghuddy 58
         posComma = InStr(txt, ",")
119 ghuddy 59
 
145 ghuddy 60
         While posComma <> 0
61
            'Response.Write(txt)
62
            value = Mid(txt, 1, posComma-1)
63
            posUnderscore = Instr(value, "_")
64
            pvId = Mid(value, 1, posUnderscore - 1)
65
            dpvId = Mid(value, posUnderscore + 1, posComma-1)
119 ghuddy 66
 
145 ghuddy 67
            Call SetIgnoreWarnings(dpvId, pvId, parRtag_id)
68
            pvIdList.Add CStr( pvId ), Empty
69
            txt = Mid(txt, posComma + 1, Len(txt))
70
            posComma = InStr(txt, ",")
71
         WEnd
119 ghuddy 72
 
145 ghuddy 73
         If posComma = 0 And Len(txt) > 0 Then
74
            posUnderscore = Instr(txt, "_")
75
            pvId = Mid(txt, 1, posUnderscore - 1)
76
            dpvId = Mid(txt, posUnderscore + 1)
77
            Call SetIgnoreWarnings(dpvId, pvId, parRtag_id)
78
            pvIdList.Add CStr( pvId ), Empty
79
         End if
119 ghuddy 80
 
145 ghuddy 81
         apvIdList = pvIdList.Keys
119 ghuddy 82
 
145 ghuddy 83
      End If
84
 
129 ghuddy 85
      Response.Redirect("used_by.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id)
86
   Else
87
      Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
4955 dpurdie 88
      Response.write QSTR_FullQuery
129 ghuddy 89
   End If
119 ghuddy 90
End If
91
%>
92
<html>
93
<title><%=Title(Request("rtag_id"))%></title>
5357 dpurdie 94
<link rel="shortcut icon" href="<%=FavIcon%>"/>
119 ghuddy 95
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
96
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
97
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
98
<link rel="stylesheet" href="images/navigation.css" type="text/css">
99
<script language="JavaScript" src="images/common.js"></script>
5925 dpurdie 100
<!-- TIPS -->
101
<script language="JavaScript" src="images/tipster.js"></script>
119 ghuddy 102
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
5085 dpurdie 103
<!--#include file="_jquery_includes.asp"-->
119 ghuddy 104
<script language="javascript">
105
<!--
106
function checkUncheckAll(theElement) {
129 ghuddy 107
   var theForm = theElement.form, z = 0;
108
   for(z=0; z<theForm.length;z++){
119 ghuddy 109
      if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall' && theForm[z].disabled != true){
129 ghuddy 110
         theForm[z].checked = theElement.checked;
111
      }
112
   }
113
}
119 ghuddy 114
//-->
115
</script>
116
<!-- DROPDOWN MENUS -->
117
<!--#include file="_menu_def.asp"-->
118
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
119
<script language="JavaScript" type="text/javascript">
120
<!--
5925 dpurdie 121
formTips.tips.thispackage       = stdTip(200, 'Used by this package', 'Display package and package versions that use exactly this version of this package' );
122
formTips.tips.thisproject       = stdTip(200, 'Used by this project', 'Display projects that use any version of this package' );
119 ghuddy 123
 
5926 dpurdie 124
//
125
//	Load/Hide/Show an Ajax expander
126
//	BaseId - Base for two IDs.
127
//			 IMG_BaseId - image to to toggle
128
//			 BaseId - Div to load data into
129
//	url - Url used to load subcontrol
130
function ToggleUsedByControl(baseId, url)
131
{
132
	var img, dmode;
133
	var imgel = MM_findObj("IMG_" + baseId);
134
	var divel = MM_findObj(baseId);
135
	var showing = divel.getAttribute("data-show");
136
	if(showing == 1)
137
	{
138
		img = "images/bt_minus.gif";
139
		dmode = 'block';
140
		showing = 2
141
	}
142
	else if(showing == 2)
143
	{
144
		img = "images/bt_plus.gif";
145
		dmode = 'none';
146
		showing = 1;
147
	}
148
	else
149
	{
150
		img = "images/bt_minus.gif";
151
		dmode = 'block';
152
		showing = 2;
119 ghuddy 153
 
5926 dpurdie 154
		// Set div name for ajax loading
155
		ajaxdivname = baseId;
119 ghuddy 156
 
5926 dpurdie 157
		//Create the xmlHttp object to use in the request
158
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
159
		// This is non-blocking (asynchronous)
160
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 161
 
5926 dpurdie 162
		//Send the xmlHttp get to the specified url
163
		xmlHttp_Get(xmlHttp, url);
164
	}
165
	// Update image and attributes
166
	imgel.src = img;
167
	divel.style.display = dmode;
168
	divel.setAttribute("data-show", showing);
119 ghuddy 169
}
170
//-->
171
</script>
172
</head>
173
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
174
<!-- MENU LAYERS -------------------------------------->
129 ghuddy 175
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 176
  <!----------------------------------------------------->
177
</div>
178
<!-- HEADER -->
179
<!--#include file="_header.asp"-->
180
<!-- BODY ---->
181
<table width="100%" border="0" cellspacing="0" cellpadding="0">
129 ghuddy 182
   <tr>
183
      <td valign="top" width="1" background="images/bg_bage.gif">
184
         <!-- LEFT -->
185
         <!--#include file="_environment.asp"-->
186
      </td>
187
      <td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
188
      <td valign="top" width="100%">
189
         <!-- MIDDLE -->
190
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
191
            <tr>
192
               <td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
185 brianf 193
		       <td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
129 ghuddy 194
               <td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
195
            </tr>
196
            <tr>
183 brianf 197
              <td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
187 brianf 198
              <td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
183 brianf 199
              <td background="images/bg_lght_gray.gif">&nbsp;</td>
200
            </tr>
201
            <tr>
129 ghuddy 202
               <td background="images/bg_lght_gray.gif">&nbsp;</td>
203
               <td valign="bottom" background="images/bg_lght_gray.gif">
204
                  <table width="100" border="0" cellspacing="0" cellpadding="0">
205
                     <tr>
4687 dpurdie 206
                        <td><IMG height="1" src="images/spacer.gif" width="0" alt="tab-left-margin" ></td>
129 ghuddy 207
                        <td>
208
                           <!-- TABS ------------------------------------->
209
                           <%Call Generate_Tab_Menu ( TABarray1, "Used by", "orange" )%>
210
                        </td>
211
                     </tr>
212
                  </table>
213
               </td>
214
               <td background="images/bg_lght_gray.gif">&nbsp;</td>
215
            </tr>
216
            <tr>
217
               <td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
218
               <td background="images/lbox_bg_orange.gif">
219
                  <!-- TAB ACTION BUTTONS ------------------------------------->
220
               </td>
221
               <td background="images/lbox_bg_orange.gif">&nbsp;</td>
222
            </tr>
223
            <tr>
224
               <td></td>
225
               <td valign="top">
226
                  <!-- DETAILS ------------------------------------------------->
227
                  <%
228
                  '-- FROM START ---------------------------------------------------------------------------------------------------------
229
                  objFormComponent.FormName = "FormName"
230
                  objFormComponent.Action = ScriptName&"?pv_id="&Request("pv_id")&"&rtag_id="&parRtag_id
231
                  Call objFormComponent.FormStart()
232
                  %>
233
                  <%If Request("rtag_id") <> "" Then%>
234
                     <br>
235
                     <span class="body_sect">Used by Packages In This Release</span>         <br>
236
                     <!-- USED BY ------------------------------------------------>
237
                     <table width="100%" border="0" cellspacing="1" cellpadding="3">
238
                        <tr>
145 ghuddy 239
                           <%If isDaemonEnabledRelease = FALSE Then%>
240
                              <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>
241
                           <%End If%>
129 ghuddy 242
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="1"></td>
243
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="1" class="form_field">Name</td>
244
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Version</td>
245
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Location</td>
246
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="1" class="form_field"></td>
247
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Version Used</td>
248
                           <td background="images/bg_form_lightbluedark.gif" nowrap width="25%" class="form_field">Last Modified</td>
249
                        </tr>
250
                        <%
145 ghuddy 251
                        OraDatabase.Parameters.Add "RTAG_ID", parRtag_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
252
                        OraDatabase.Parameters.Add "PKG_ID",  pkgInfoHash.Item("pkg_id"), ORAPARM_INPUT, ORATYPE_NUMBER
129 ghuddy 253
 
254
                        If pkgInfoHash.Item ("v_ext") <> "" Then
145 ghuddy 255
                           OraDatabase.Parameters.Add "V_EXT", pkgInfoHash.Item("v_ext"), ORAPARM_INPUT, ORATYPE_VARCHAR2
129 ghuddy 256
                        Else
145 ghuddy 257
                           OraDatabase.Parameters.Add "V_EXT", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2
129 ghuddy 258
                        End If
259
 
260
                        Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("UsedByPackagesInThisRelease.sql"), cint(0))
261
 
262
                        OraDatabase.Parameters.Remove "RTAG_ID"
263
                        OraDatabase.Parameters.Remove "PKG_ID"
264
                        OraDatabase.Parameters.Remove "V_EXT"
265
                        %>
266
                        <%If rsTemp.RecordCount < 1 Then%>
267
                           <tr>
145 ghuddy 268
                              <%If isDaemonEnabledRelease = FALSE Then%>
269
                                 <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
270
                              <%End If%>
129 ghuddy 271
                              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
272
                              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
273
                              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
274
                              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td><br>
275
                              <td background="images/bg_form_lightgray.gif" nowrap>&nbsp;</td>
276
                              <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
277
                              <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
278
                           </tr>
279
                        <%End If%>
280
                        <%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
281
                           <tr>
282
                              <%
283
                              Set rsState = OraDatabase.DbCreateDynaset( "select deprecated_state from release_content where rtag_id="&parRtag_id&" and pv_id="&rsTemp("pv_id"), cint(0))%>
284
 
145 ghuddy 285
                              <%If isDaemonEnabledRelease = FALSE Then%>
286
                                 <%If rsTemp("dpv_id") <> parPv_id And IsNull(rsTemp("ignore_warn")) Then%>
287
                                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>"></td>
288
                                 <%ElseIf rsTemp("dpv_id") = parPv_id And IsNull(rsTemp("ignore_warn")) OR NOT isNull(rsTemp("ignore_warn")) Then%>
289
                                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" disabled></td>
290
                                 <%Else%>
291
                                    <td background="images/bg_form_lightgray.gif" nowrap><input type="checkbox" name="ignore_warnings" value="<%=rsTemp("pv_id")%>_<%=rsTemp("dpv_id")%>" checked></td>
292
                                 <%End If%>
129 ghuddy 293
                              <%End If%>
145 ghuddy 294
 
295
                              <%If rsState("deprecated_state") <> "" AND rsTemp("pkg_state") = 0 Then%>
129 ghuddy 296
                                 <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( rsState("deprecated_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
297
                              <%Else%>
298
                                 <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( rsTemp("pkg_state"), rsTemp("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE )%></td>
299
                              <%End If%>
145 ghuddy 300
 
129 ghuddy 301
                              <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>
302
                              <td background="images/bg_form_lightgray.gif" class="form_item"><%=rsTemp("pkg_version")%></td>
303
                              <td background="images/bg_form_lightgray.gif" class="body_txt_gray" nowrap><%=GetEnvName(rsTemp("env_area"))%></td>
304
                              <td background="images/bg_form_lightgray.gif"><%=DefineStateIcon ( 0, "Y", rsTemp("ignore_warn"), rsTemp("is_patch_ignore"), pkgInfoHash.Item("build_type"), TRUE )%></td>
305
                              <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>
5632 dpurdie 306
                              <td background="images/bg_form_lightgray.gif" class="form_item"><a href="mailto:<%=rsTemp("user_email")%>" class="txt_linked"><%=enum_imgUser%><%=rsTemp("full_name")%></a>&nbsp;<%=DisplayDate ( rsTemp("modified_stamp") )%></td>
129 ghuddy 307
                           </tr>
308
                           <%rsTemp.MoveNext
309
                           rsTemp.Close()
310
                           rsState.Close()
311
 
312
                           Set rsState = nothing
313
                        WEnd
314
                        Set rsTemp = nothing
315
                        %>
316
                     </table>
145 ghuddy 317
                     <%If isDaemonEnabledRelease = FALSE Then%>
318
                        <input name="btn" type="submit" class="form_btn" value="Apply"><br>
319
                        <SPAN class="rep_small">NOTE: Click on Apply "To Ignore Warnings" On Packages Used By</SPAN><br>
320
                     <%End If%>
129 ghuddy 321
                     <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>
322
                     <input type="hidden" name="action" value="true">
323
                  <%End If%>
324
                  <%
325
                  Call objFormComponent.FormEnd()
326
                  '-- FROM END ----------------------------------------------------------------------------------------------------------------
327
                  %>
5926 dpurdie 328
                  <!-- Used by Projects ---------------------------------------->
329
                  <span class="body_sect" onClick="ToggleUsedByControl('PROJECT','RequestUsedByThisProjectSummary.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&pkg_id=<%=pkgInfoHash.Item ("pkg_id")%>&v_ext=<%=pkgInfoHash.Item ("v_ext")%>');">
330
						<img id=IMG_PROJECT src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3">
331
						Used by Projects
332
				  </span><%=Quick_Help("thisproject")%>
333
				  <DIV class="form_item" id="PROJECT" name="PROJECT" style="display:none;"><%=enumLOADING%></DIV>
334
                  <!-- Used by Packages ---------------------------------------->
129 ghuddy 335
                  <br>
5926 dpurdie 336
                  <span class="body_sect" onClick="ToggleUsedByControl('PKGSUMMARY','UsedByPackageSummary.asp?pv_id=<%=parPv_id%>');">
337
						<img id=IMG_PKGSUMMARY src="images/bt_plus.gif" border="0" align="absmiddle" hspace="3">
338
						Used by Packages
339
				  </span><%=Quick_Help("thispackage")%>
340
				  <DIV class="form_item" id="PKGSUMMARY" name="PKGSUMMARY" style="display:none;"><%=enumLOADING%></DIV>
129 ghuddy 341
 
5926 dpurdie 342
				  <p>
343
                  <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>
5925 dpurdie 344
                  <br>
129 ghuddy 345
                  <!-- END DETAILS ------------------------------------------------->
346
               </td>
347
               <td>&nbsp;</td>
348
            </tr>
349
         </table>
350
         <!-- END MIDDLE -------->
351
      </td>
352
   </tr>
119 ghuddy 353
</table>
354
<!-- FOOTER -->
355
<!--#include file="_footer.asp"-->
356
</body>
357
</html>
358
<%
359
Call Destroy_All_Objects
360
%>