| Line 24... |
Line 24... |
| 24 |
<!--#include file="_access_control_general.asp"-->
|
24 |
<!--#include file="_access_control_general.asp"-->
|
| 25 |
<!--#include file="_access_control_action_project.asp"-->
|
25 |
<!--#include file="_access_control_action_project.asp"-->
|
| 26 |
<%
|
26 |
<%
|
| 27 |
'------------ Variable Definition -------------
|
27 |
'------------ Variable Definition -------------
|
| 28 |
Dim parRtagId
|
28 |
Dim parRtagId
|
| - |
|
29 |
Dim pkgCount : pkgCount= 0
|
| - |
|
30 |
Dim pkgTestCount : pkgTestCount= 0
|
| - |
|
31 |
Dim testCount: testCount = 0
|
| 29 |
'------------ Constants Declaration -----------
|
32 |
'------------ Constants Declaration -----------
|
| 30 |
'------------ Variable Init -------------------
|
33 |
'------------ Variable Init -------------------
|
| 31 |
parRtagId = Request("rtag_id")
|
34 |
parRtagId = Request("rtag_id")
|
| 32 |
objPMod.PersistInQryString("rtag_id")
|
35 |
objPMod.PersistInQryString("rtag_id")
|
| 33 |
'----------------------------------------------
|
36 |
'----------------------------------------------
|
| 34 |
%>
|
37 |
%>
|
| 35 |
<%
|
38 |
<%
|
| 36 |
'------------ RUN BEFORE PAGE RENDER ----------
|
39 |
'------------ RUN BEFORE PAGE RENDER ----------
|
| - |
|
40 |
'
|
| - |
|
41 |
' Generate table data as JSON
|
| - |
|
42 |
' Could generate via AJAX call too, but for the amount of data in the table
|
| - |
|
43 |
'
|
| - |
|
44 |
Sub GenerateData
|
| - |
|
45 |
Dim rsQry
|
| - |
|
46 |
|
| - |
|
47 |
OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
48 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("release_stats.sql"), 0 )
|
| - |
|
49 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| - |
|
50 |
|
| - |
|
51 |
Response.Write "<script type=""text/javascript"" charset=""utf-8"">" + vbCRLF
|
| - |
|
52 |
Response.Write "var dataSet = [" + vbCRLF
|
| - |
|
53 |
|
| - |
|
54 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| - |
|
55 |
pkgCount = pkgCount + 1
|
| - |
|
56 |
Dim tcount : tcount = NiceInt(rsQry("test_count"), 0)
|
| - |
|
57 |
If tcount > 0 Then
|
| - |
|
58 |
pkgTestCount = pkgTestCount + 1
|
| - |
|
59 |
testCount = testCount + tcount
|
| - |
|
60 |
End If
|
| - |
|
61 |
|
| - |
|
62 |
Dim vrefStr, prefStr, crefStr
|
| - |
|
63 |
Dim buildTime, lastBuild
|
| - |
|
64 |
|
| - |
|
65 |
crefStr = "unit_test_log.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtagId
|
| - |
|
66 |
prefStr = "view_by_version.asp?pkg_id=" & rsQry("pkg_id") & "&listby=1"
|
| - |
|
67 |
vrefStr = "dependencies.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtagId
|
| - |
|
68 |
buildTime = rsQry("build_time")
|
| - |
|
69 |
If isNull(buildTime) Then buildTime = ""
|
| - |
|
70 |
lastBuild = rsQry("lastBuild")
|
| - |
|
71 |
If isNull(lastBuild) Then lastBuild = ""
|
| - |
|
72 |
|
| - |
|
73 |
Response.Write "["
|
| - |
|
74 |
Response.Write """<a href=" + prefStr + ">" + rsQry("pkg_name") + "</a>"""
|
| - |
|
75 |
Response.Write ",""<a href=" + vrefStr + ">" + rsQry("pkg_version") + "</a>"""
|
| - |
|
76 |
Response.Write ",""<a href=" + crefStr + ">" + rsQry("test_count") + "</a>"""
|
| - |
|
77 |
Response.Write ",""" + buildTime + """"
|
| - |
|
78 |
Response.Write ",""" + lastBuild + """"
|
| - |
|
79 |
Response.Write "]," + vbCRLF
|
| - |
|
80 |
rsQry.MoveNext
|
| - |
|
81 |
Loop
|
| - |
|
82 |
Response.Write "]" + vbCRLF
|
| - |
|
83 |
Response.Write "</script>" + vbCRLF
|
| - |
|
84 |
rsQry.close
|
| - |
|
85 |
Set rsQry = nothing
|
| - |
|
86 |
End Sub
|
| - |
|
87 |
|
| 37 |
'----------------------------------------------------
|
88 |
'----------------------------------------------------
|
| 38 |
Sub LeftPanelContent
|
89 |
Sub LeftPanelContent
|
| 39 |
%>
|
90 |
%>
|
| 40 |
<fieldset class="body_rowg fset">
|
91 |
<fieldset class="body_rowg fset">
|
| 41 |
<legend>Display</legend>
|
92 |
<legend>Display</legend>
|
| 42 |
<input id="noScroll" type="checkbox" name="noScroll" value="1"> No Scroll
|
93 |
<input id="noScroll" type="checkbox" name="noScroll" value="1"> No Scroll
|
| - |
|
94 |
<br><input id="noCots" type="checkbox" name="noCots" value="1"> Ignore Cots
|
| 43 |
</fieldset>
|
95 |
</fieldset>
|
| 44 |
<fieldset class="body_rowg fset">
|
96 |
<fieldset class="body_rowg fset">
|
| 45 |
<legend>Export</legend>
|
97 |
<legend>Export</legend>
|
| 46 |
<input id="btnExport" name="btn" type="submit" class="form_btn" value="Test Counts as CSV"><%=Quick_Help("h_export")%>
|
98 |
<input id="btnExport" name="btn" type="submit" class="form_btn" value="Test Counts as CSV"><%=Quick_Help("h_export")%>
|
| 47 |
</fieldset>
|
99 |
</fieldset>
|
| 48 |
<%
|
100 |
<%
|
| 49 |
End Sub
|
101 |
End Sub
|
| 50 |
|
102 |
|
| 51 |
Sub MainPanelContent
|
103 |
Sub MainPanelContent
|
| 52 |
Dim pkgCount : pkgCount= 0
|
- |
|
| 53 |
Dim pkgTestCount : pkgTestCount= 0
|
- |
|
| 54 |
Dim testCount: testCount = 0
|
- |
|
| 55 |
Dim rsQry
|
- |
|
| 56 |
|
- |
|
| 57 |
OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
- |
|
| 58 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("release_stats.sql"), 0 )
|
- |
|
| 59 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
- |
|
| 60 |
|
- |
|
| 61 |
%>
|
104 |
%>
|
| 62 |
<table class="embedded_table" style="margin-bottom:20px">
|
105 |
<table class="embedded_table" style="margin-bottom:20px">
|
| 63 |
<tr>
|
106 |
<tr>
|
| 64 |
<td>
|
107 |
<td>
|
| 65 |
<!-- Box Title -->
|
108 |
<!-- Box Title -->
|
| Line 84... |
Line 127... |
| 84 |
<td valign="top" nowrap>Test Count</td>
|
127 |
<td valign="top" nowrap>Test Count</td>
|
| 85 |
<td valign="top" nowrap>Build Duration</td>
|
128 |
<td valign="top" nowrap>Build Duration</td>
|
| 86 |
<td valign="top" nowrap>Build Date</td>
|
129 |
<td valign="top" nowrap>Build Date</td>
|
| 87 |
</tr>
|
130 |
</tr>
|
| 88 |
</thead>
|
131 |
</thead>
|
| 89 |
<tbody>
|
- |
|
| 90 |
<%
|
132 |
</table>
|
| 91 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
- |
|
| 92 |
pkgCount = pkgCount + 1
|
- |
|
| 93 |
Dim tcount : tcount = NiceInt(rsQry("test_count"), 0)
|
- |
|
| 94 |
If tcount > 0 Then
|
- |
|
| 95 |
pkgTestCount = pkgTestCount + 1
|
- |
|
| 96 |
testCount = testCount + tcount
|
133 |
<table width="100%" class="embedded_table">
|
| 97 |
End If
|
- |
|
| 98 |
|
- |
|
| 99 |
Dim vrefStr, prefStr, crefStr
|
- |
|
| 100 |
crefStr = "unit_test_log.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtagId
|
- |
|
| 101 |
prefStr = "view_by_version.asp?pkg_id=" & rsQry("pkg_id") & "&listby=1"
|
- |
|
| 102 |
vrefStr = "dependencies.asp?pv_id=" & rsQry("pv_id") & "&rtag_id=" & parRtagId
|
- |
|
| 103 |
%>
|
- |
|
| 104 |
<tr>
|
- |
|
| 105 |
<td nowrap class="body_rowg"><a href=<%=prefStr%>><%=rsQry("pkg_name")%></a></td>
|
- |
|
| 106 |
<td nowrap class="body_rowg"><a href=<%=vrefStr%>><%=rsQry("pkg_version")%></a></td>
|
- |
|
| 107 |
<td nowrap class="body_rowg"><a href=<%=crefStr%>><%=rsQry("test_count")%></a></td>
|
- |
|
| 108 |
<td nowrap class="body_rowg"><a href=<%=crefStr%>><%=rsQry("build_time")%></a></td>
|
- |
|
| 109 |
<td nowrap class="body_rowg"><%=rsQry("lastBuild")%></td>
|
- |
|
| 110 |
</tr>
|
- |
|
| 111 |
<%
|
- |
|
| 112 |
rsQry.MoveNext
|
- |
|
| 113 |
Loop
|
- |
|
| 114 |
%>
|
- |
|
| 115 |
<tbody>
|
- |
|
| 116 |
<tfoot>
|
- |
|
| 117 |
<tr class="body_col envGroup"><th colspan=4>Summary</th></tr>
|
134 |
<tr class="body_col envGroup"><th colspan=4>Summary</th></tr>
|
| 118 |
<tr class="body_rowg"><td colspan=3>Total Packages</td><td><%=pkgCount%></td></tr>
|
135 |
<tr class="body_rowg"><td colspan=3>Total Packages</td><td id="pkgCount"></td></tr>
|
| 119 |
<tr class="body_rowg"><td colspan=3>Total Packages with Tests</td><td><%=pkgTestCount%></td></tr>
|
136 |
<tr class="body_rowg"><td colspan=3>Total Packages with Tests</td><td id="pkgTestCount"></td></tr>
|
| 120 |
<tr class="body_rowg"><td colspan=3>Total Unit Tests</td><td><%=testCount%></td></tr>
|
137 |
<tr class="body_rowg"><td colspan=3>Total Unit Tests</td><td id="testCount"></td></tr>
|
| 121 |
</td></tr>
|
- |
|
| 122 |
</tfoot>
|
- |
|
| 123 |
</table>
|
138 |
</table>
|
| 124 |
</div>
|
139 |
</div>
|
| 125 |
</div>
|
140 |
</div>
|
| 126 |
</td>
|
141 |
</td>
|
| 127 |
</tr>
|
142 |
</tr>
|
| 128 |
</table>
|
143 |
</table>
|
| 129 |
<%
|
144 |
<%
|
| 130 |
rsQry.close
|
- |
|
| 131 |
Set rsQry = nothing
|
- |
|
| 132 |
End Sub
|
145 |
End Sub
|
| 133 |
%>
|
146 |
%>
|
| 134 |
<NOSCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/VarDump.vbs"></NOSCRIPT>
|
147 |
<NOSCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/VarDump.vbs"></NOSCRIPT>
|
| 135 |
<html>
|
148 |
<html>
|
| 136 |
<head>
|
149 |
<head>
|
| 137 |
<title>Release Manager</title>
|
150 |
<title>Release Manager</title>
|
| 138 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
151 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| 139 |
<meta http-equiv="Pragma" content="no-cache">
|
152 |
<meta http-equiv="Pragma" content="no-cache">
|
| 140 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
153 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 141 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
154 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
| 142 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
155 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
| 143 |
<script language="JavaScript" src="images/common.js"></script>
|
156 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 144 |
<!-- DROPDOWN MENUS -->
|
157 |
<!-- DROPDOWN MENUS -->
|
| 145 |
<%bJqueryDataTables = TRUE%>
|
158 |
<%bJqueryDataTables = TRUE%>
|
| 146 |
<!--#include file="_jquery_includes.asp"-->
|
159 |
<!--#include file="_jquery_includes.asp"-->
|
| 147 |
<!--#include file="_menu_def.asp"-->
|
160 |
<!--#include file="_menu_def.asp"-->
|
| 148 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
161 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
| 149 |
<script language="JavaScript" src="images/tipster.js"></script>
|
162 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
| 150 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
163 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
| 151 |
<script language="JavaScript" type="text/JavaScript">
|
164 |
<script language="JavaScript" type="text/JavaScript">
|
| 152 |
formTips.tips.h_export = stdTip(300, 'Export Test Count', 'Unit test counts will be copied to the users clipboard is CSV format.' +
|
165 |
formTips.tips.h_export = stdTip(300, 'Export Test Count', 'Unit test counts will be copied to the users clipboard is CSV format.' +
|
| 153 |
'<p>The data is to be integrated into other reports.'
|
166 |
'<p>The data is to be integrated into other reports.'
|
| 154 |
);
|
167 |
);
|
| 155 |
</script>
|
168 |
</script>
|
| - |
|
169 |
<%Call GenerateData%>
|
| 156 |
<script type="text/javascript" charset="utf-8">
|
170 |
<script type="text/javascript" charset="utf-8">
|
| 157 |
var pkgStats = {};
|
171 |
var pkgStats = {};
|
| 158 |
var pkgStatsScrollBody;
|
172 |
var pkgStatsScrollBody;
|
| 159 |
var pkgStatsHeight = 0;
|
173 |
var pkgStatsHeight = 0;
|
| 160 |
var pkgStatsCurHeight = 0;
|
174 |
var pkgStatsCurHeight = 0;
|
| 161 |
|
175 |
|
| 162 |
$(document).ready(function() {
|
176 |
$(document).ready(function() {
|
| 163 |
// Create a basic DataTable
|
- |
|
| 164 |
|
177 |
|
| - |
|
178 |
// Create a basic DataTable
|
| - |
|
179 |
// The populate it
|
| 165 |
pkgStats.table = $('#packageStats').DataTable( {
|
180 |
pkgStats.table = $('#packageStats').DataTable( {
|
| - |
|
181 |
dom: "lfrti",
|
| 166 |
scrollY: "65vh",
|
182 |
scrollY: "65vh",
|
| 167 |
scrollCollapse: true,
|
183 |
scrollCollapse: true,
|
| 168 |
paging: false,
|
184 |
paging: false,
|
| - |
|
185 |
language : { info: "Showing _TOTAL_ entries" }
|
| 169 |
});
|
186 |
});
|
| - |
|
187 |
insertAllData(false);
|
| - |
|
188 |
|
| - |
|
189 |
//
|
| - |
|
190 |
// Filter data and insert into the table
|
| - |
|
191 |
function insertAllData(filterCots) {
|
| - |
|
192 |
var ii;
|
| - |
|
193 |
pkgStats.table.clear();
|
| - |
|
194 |
pkgStats.info = {};
|
| - |
|
195 |
pkgStats.info.total = 0;
|
| - |
|
196 |
pkgStats.info.withTests = 0;
|
| - |
|
197 |
pkgStats.info.testCount = 0;
|
| - |
|
198 |
|
| - |
|
199 |
for (ii = 0; ii < dataSet.length; ii++) {
|
| - |
|
200 |
var vdata = $(dataSet[ii][1]).text();
|
| - |
|
201 |
if( !( filterCots && ( vdata.match(/.cots$/) || vdata.match(/.tool$/))) ){
|
| - |
|
202 |
pkgStats.table.row.add( dataSet[ii]);
|
| - |
|
203 |
pkgStats.info.total ++;
|
| - |
|
204 |
var count = parseInt($(dataSet[ii][2]).text());
|
| - |
|
205 |
if ( !isNaN(count) && count > 0 ) {
|
| - |
|
206 |
pkgStats.info.withTests++;
|
| - |
|
207 |
pkgStats.info.testCount += count;
|
| - |
|
208 |
}
|
| - |
|
209 |
}
|
| - |
|
210 |
}
|
| - |
|
211 |
pkgStats.table.draw();
|
| - |
|
212 |
|
| - |
|
213 |
$('#pkgCount').text(pkgStats.info.total);
|
| - |
|
214 |
$('#pkgTestCount').text(pkgStats.info.withTests);
|
| - |
|
215 |
$('#testCount').text(pkgStats.info.testCount);
|
| - |
|
216 |
}
|
| 170 |
|
217 |
|
| 171 |
// Enable / disable full table display
|
218 |
// Enable / disable full table display
|
| 172 |
$('#noScroll').click(function(e){
|
219 |
$('#noScroll').click(function(e){
|
| 173 |
if ( pkgStats.Height === undefined ) {
|
220 |
if ( pkgStats.Height === undefined ) {
|
| 174 |
pkgStats.ScrollBody = $('#packageStats').closest('.dataTables_scrollBody');
|
221 |
pkgStats.ScrollBody = $('#packageStats').closest('.dataTables_scrollBody');
|
| Line 179... |
Line 226... |
| 179 |
if ( this.checked ){
|
226 |
if ( this.checked ){
|
| 180 |
pkgStats.CurHeight = "100%";
|
227 |
pkgStats.CurHeight = "100%";
|
| 181 |
} else {
|
228 |
} else {
|
| 182 |
pkgStats.CurHeight = pkgStats.Height;
|
229 |
pkgStats.CurHeight = pkgStats.Height;
|
| 183 |
}
|
230 |
}
|
| - |
|
231 |
// work on Datatables 1.10.12 ++, but not on 1.10.8, although lots else works better
|
| 184 |
pkgStats.ScrollBody.css('max-height', pkgStats.CurHeight);
|
232 |
pkgStats.ScrollBody.css('max-height', pkgStats.CurHeight);
|
| - |
|
233 |
pkgStats.ScrollBody.css('height', pkgStats.CurHeight);
|
| - |
|
234 |
});
|
| - |
|
235 |
|
| - |
|
236 |
// Hide / Show the the COTS packages
|
| - |
|
237 |
$('#noCots').click(function(e){
|
| - |
|
238 |
insertAllData(this.checked);
|
| 185 |
});
|
239 |
});
|
| 186 |
|
240 |
|
| 187 |
function copyToClipboard(string) {
|
241 |
function copyToClipboard(string) {
|
| 188 |
var $temp = $("<input>");
|
242 |
var $temp = $("<input>");
|
| 189 |
$("body").append($temp);
|
243 |
$("body").append($temp);
|
| Line 203... |
Line 257... |
| 203 |
|
257 |
|
| 204 |
// Insert Release ID
|
258 |
// Insert Release ID
|
| 205 |
csv.push(<%=DB_RTAG_ID%>);
|
259 |
csv.push(<%=DB_RTAG_ID%>);
|
| 206 |
csv.push("<%=DB_PROJ_NAME%>::<%=DB_RTAG_NAME%>");
|
260 |
csv.push("<%=DB_PROJ_NAME%>::<%=DB_RTAG_NAME%>");
|
| 207 |
|
261 |
|
| 208 |
// Generate a CSV representation of the data inthe table
|
262 |
// Generate a CSV representation of the data in the table
|
| 209 |
pkgStats.table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
263 |
pkgStats.table.rows().eq(0).each( function (index) {
|
| - |
|
264 |
var row = pkgStats.table.row(index);
|
| 210 |
var data = this.data();
|
265 |
var data = row.data();
|
| 211 |
csv.push($(data[0]).text(), $(data[2]).text());
|
266 |
csv.push($(data[0]).text(), $(data[2]).text());
|
| 212 |
});
|
267 |
});
|
| - |
|
268 |
|
| - |
|
269 |
// Generate a CSV representation of the data inthe table
|
| - |
|
270 |
// pkgStats.table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
|
| - |
|
271 |
// var data = this.data();
|
| - |
|
272 |
// csv.push($(data[0]).text(), $(data[2]).text());
|
| - |
|
273 |
// });
|
| 213 |
var csvString = csv.join(",");
|
274 |
var csvString = csv.join(",");
|
| 214 |
//console.log(csvString);
|
275 |
//console.log(csvString);
|
| 215 |
copyToClipboard(csvString);
|
276 |
copyToClipboard(csvString);
|
| 216 |
vixConfirm("Data copied to Clipboard", {
|
277 |
vixConfirm("Data copied to Clipboard", {
|
| 217 |
title: "Notification",
|
278 |
title: "Notification",
|