Subversion Repositories DevTools

Rev

Rev 6576 | Rev 6579 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6576 Rev 6577
Line 31... Line 31...
31
parRtagId = Request("rtag_id")
31
parRtagId = Request("rtag_id")
32
objPMod.PersistInQryString("rtag_id")
32
objPMod.PersistInQryString("rtag_id")
33
'----------------------------------------------
33
'----------------------------------------------
34
%>
34
%>
35
<%
35
<%
36
%>
-
 
37
<%
-
 
38
'------------ RUN BEFORE PAGE RENDER ----------
36
'------------ RUN BEFORE PAGE RENDER ----------
39
'----------------------------------------------------
37
'----------------------------------------------------
40
' --- RUN onPostBack ---
-
 
41
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
-
 
42
 
-
 
43
      If objEH.Finally Then
-
 
44
         Call OpenInWindow ( "release_config.asp?rtag_id="& parRtagId )
-
 
45
      End If
-
 
46
 
-
 
47
End If
-
 
48
'----------------------------------------------
-
 
49
Sub LeftPanelContent
38
Sub LeftPanelContent
50
%>
39
%>
-
 
40
<fieldset class="body_rowg fset">
-
 
41
    <legend>Display</legend>
-
 
42
    <input id="noScroll" type="checkbox" name="noScroll" value="1"> No Scroll
-
 
43
</fieldset>
-
 
44
<fieldset class="body_rowg fset">
-
 
45
    <legend>Export</legend>
-
 
46
    <input id="btnExport"  name="btn" type="submit" class="form_btn" value="Test Counts as CSV"><%=Quick_Help("h_export")%>
-
 
47
</fieldset>
51
<%
48
<%
52
End Sub
49
End Sub
53
 
50
 
54
Sub MainPanelContent
51
Sub MainPanelContent
55
    Dim pkgCount : pkgCount= 0
52
    Dim pkgCount : pkgCount= 0
Line 77... Line 74...
77
            <div class="rounded_box">
74
            <div class="rounded_box">
78
               <div style="background-color: white;border-left: white solid 10px;border-right: white solid 10px;">
75
               <div style="background-color: white;border-left: white solid 10px;border-right: white solid 10px;">
79
                    <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
76
                    <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
80
                    <!--#include file="messages/_msg_inline.asp"-->
77
                    <!--#include file="messages/_msg_inline.asp"-->
81
                    <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
78
                    <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
82
                    <table width="100%" class="embedded_table">
79
                    <table id="packageStats" width="100%" class="embedded_table">
-
 
80
                        <thead class="envGroup">
83
                       <tr class="body_col envGroup">
81
                           <tr class="body_col envGroup">
84
                          <td valign="top" nowrap>Package</td>
82
                              <td valign="top" nowrap>Package</td>
85
                          <td valign="top" nowrap>Version</td>
83
                              <td valign="top" nowrap>Version</td>
86
                          <td valign="top" nowrap>Test Count</td>
84
                              <td valign="top" nowrap>Test&nbsp;Count</td>
-
 
85
                              <td valign="top" nowrap>Build&nbsp;Duration</td>
87
                          <td valign="top" nowrap>Built</td>
86
                              <td valign="top" nowrap>Build&nbsp;Date</td>
88
                       </tr>
87
                           </tr>
-
 
88
                        </thead>
-
 
89
                        <tbody>
89
                        <%
90
                        <%
90
                        Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
91
                        Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
91
                            pkgCount = pkgCount + 1
92
                            pkgCount = pkgCount + 1
92
                            Dim tcount : tcount = NiceInt(rsQry("test_count"), 0)
93
                            Dim tcount : tcount = NiceInt(rsQry("test_count"), 0)
93
                            If tcount > 0 Then
94
                            If tcount > 0 Then
Line 102... Line 103...
102
                        %>
103
                        %>
103
                       <tr>
104
                       <tr>
104
                        <td nowrap class="body_rowg"><a href=<%=prefStr%>><%=rsQry("pkg_name")%></a></td>
105
                        <td nowrap class="body_rowg"><a href=<%=prefStr%>><%=rsQry("pkg_name")%></a></td>
105
                        <td nowrap class="body_rowg"><a href=<%=vrefStr%>><%=rsQry("pkg_version")%></a></td>
106
                        <td nowrap class="body_rowg"><a href=<%=vrefStr%>><%=rsQry("pkg_version")%></a></td>
106
                        <td nowrap class="body_rowg"><a href=<%=crefStr%>><%=rsQry("test_count")%></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>
107
                        <td nowrap class="body_rowg"><%=rsQry("lastBuild")%></td>
109
                        <td nowrap class="body_rowg"><%=rsQry("lastBuild")%></td>
108
                       </tr>
110
                       </tr>
109
                       <%
111
                       <%
110
                       rsQry.MoveNext
112
                       rsQry.MoveNext
111
                       Loop
113
                       Loop
112
                       %>
114
                       %>
113
                       <tr><td>&nbsp;</td></tr>
115
                        <tbody>
114
                       <tr><td td colspan=4>
116
                        <tfoot>
115
                            <table class=full_table>
-
 
116
                                <tr class="body_col envGroup"><td colspan=4>Summary</td></tr>
117
                            <tr class="body_col envGroup"><th colspan=4>Summary</th></tr>
117
                                <tr class="body_rowg"><td>Total Packages</td><td><%=pkgCount%></td></tr>
118
                            <tr class="body_rowg"><td colspan=3>Total Packages</td><td><%=pkgCount%></td></tr>
118
                                <tr class="body_rowg"><td>Total Packages with Tests</td><td><%=pkgTestCount%></td></tr>
119
                            <tr class="body_rowg"><td colspan=3>Total Packages with Tests</td><td><%=pkgTestCount%></td></tr>
119
                                <tr class="body_rowg"><td>Total Unit Tests</td><td><%=testCount%></td></tr>
120
                            <tr class="body_rowg"><td colspan=3>Total Unit Tests</td><td><%=testCount%></td></tr>
120
                            </table>
-
 
121
                       </td></tr>
121
                       </td></tr>
-
 
122
                        </tfoot>
122
                  </table>
123
                  </table>
123
               </div>
124
               </div>
124
            </div>
125
            </div>
125
         </td>
126
         </td>
126
      </tr>
127
      </tr>
Line 139... Line 140...
139
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
140
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
140
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
141
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
141
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
142
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
142
      <script language="JavaScript" src="images/common.js"></script>
143
      <script language="JavaScript" src="images/common.js"></script>
143
      <!-- DROPDOWN MENUS -->
144
      <!-- DROPDOWN MENUS -->
-
 
145
      <%bJqueryDataTables = TRUE%>
144
      <!--#include file="_jquery_includes.asp"-->
146
      <!--#include file="_jquery_includes.asp"-->
145
      <!--#include file="_menu_def.asp"-->
147
      <!--#include file="_menu_def.asp"-->
146
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
148
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
-
 
149
      <script language="JavaScript" src="images/tipster.js"></script>
-
 
150
      <script language="JavaScript" src="images/_help_tips.js"></script>
-
 
151
      <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.' +
-
 
153
                                                                  '<p>The data is to be integrated into other reports.' 
-
 
154
                                                                  );
-
 
155
      </script>
-
 
156
      <script type="text/javascript" charset="utf-8">
-
 
157
        var pkgStats = {};
-
 
158
        var pkgStatsScrollBody;
-
 
159
        var pkgStatsHeight = 0;
-
 
160
        var pkgStatsCurHeight = 0;
-
 
161
 
-
 
162
        $(document).ready(function() {
-
 
163
            // Create a basic DataTable
-
 
164
 
-
 
165
            pkgStats.table = $('#packageStats').DataTable( {
-
 
166
                    scrollY:        "65vh",
-
 
167
                    scrollCollapse: true,
-
 
168
                    paging:         false,
-
 
169
                });
-
 
170
 
-
 
171
            // Enable / disable full table display
-
 
172
            $('#noScroll').click(function(e){
-
 
173
                if ( pkgStats.Height === undefined ) {
-
 
174
                    pkgStats.ScrollBody = $('#packageStats').closest('.dataTables_scrollBody'); 
-
 
175
                    pkgStats.Height = pkgStats.ScrollBody.height();
-
 
176
                    pkgStats.CurHeight = pkgStatsHeight; 
-
 
177
                }
-
 
178
 
-
 
179
                if ( this.checked  ){
-
 
180
                    pkgStats.CurHeight = "100%";
-
 
181
                } else {
-
 
182
                    pkgStats.CurHeight = pkgStats.Height;
-
 
183
                }
-
 
184
                pkgStats.ScrollBody.css('max-height', pkgStats.CurHeight);
-
 
185
            });
-
 
186
 
-
 
187
            function copyToClipboard(string) {
-
 
188
                var $temp = $("<input>");
-
 
189
                $("body").append($temp);
-
 
190
                $temp.val(string).select();
-
 
191
                document.execCommand("copy");
-
 
192
                $temp.remove();
-
 
193
            }
-
 
194
 
-
 
195
            // Export Data
-
 
196
            $('#btnExport').click(function(e){
-
 
197
                var csv = [];
-
 
198
 
-
 
199
                //  Insert DateStamp as YYMMDD
-
 
200
                var date = new Date();
-
 
201
                var tstamp = (date.getFullYear() * 10000) + ((date.getMonth() + 1) * 100) + date.getDate()
-
 
202
                csv.push(tstamp);
-
 
203
 
-
 
204
                //  Insert Release ID
-
 
205
                csv.push(<%=DB_RTAG_ID%>);
-
 
206
                csv.push("<%=DB_PROJ_NAME%>::<%=DB_RTAG_NAME%>");
-
 
207
 
-
 
208
                // Generate a CSV representation of the data inthe table
-
 
209
                pkgStats.table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
-
 
210
                    var data = this.data();
-
 
211
                    csv.push($(data[0]).text(), $(data[2]).text());
-
 
212
                    });
-
 
213
                var csvString = csv.join(",");
-
 
214
                //console.log(csvString);
-
 
215
                copyToClipboard(csvString);
-
 
216
                vixConfirm("Data copied to Clipboard", {
-
 
217
                    title: "Notification",
-
 
218
                    icon : "images/i_info.png", 
-
 
219
                    cancel: false, 
-
 
220
                    button: null,
-
 
221
                    timeout : 100,
-
 
222
                    position : 'center', 
-
 
223
                    modal : false,
-
 
224
                    minHeight: 10, 
-
 
225
                    hide: {
-
 
226
                            effect: 'fade',
-
 
227
                            duration: 2000
-
 
228
                          }
-
 
229
                });
-
 
230
            });
-
 
231
        });
-
 
232
      </script>
-
 
233
 
147
   </head>
234
   </head>
148
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
235
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
149
      <!-- HEADER -->
236
      <!-- HEADER -->
150
      <!--#include file="_header.asp"-->
237
      <!--#include file="_header.asp"-->
151
      <!-- BODY ---->
238
      <!-- BODY ---->
152
      <table class="full_table">
239
      <table class="full_table">
153
         <tr>
240
         <tr>
154
            <td width="146px" class="panel_bg" valign="top">
241
            <td width="146px" class="panel_bg" valign="top">
155
                <%Call LeftPanelContent%>
242
                <%Call LeftPanelContent%>
156
            </td>
243
            </td>
157
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
244
            <td width="90%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
158
                <%Call MainPanelContent%>
245
                <%Call MainPanelContent%>
159
            </td>
246
            </td>
160
         </tr>
247
         </tr>
161
         <tr>
248
         <tr>
162
            <td class="panel_bg" valign="bottom" align="center" height="350">
249
            <td class="panel_bg" valign="bottom" align="center" height="350">