<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Complex Header</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<!-- jQuery Datatables -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/u/bs-3.3.6/jq-2.2.3,dt-1.10.12,cr-1.3.2,fc-3.2.2,fh-3.1.2,sc-1.4.2/datatables.min.css"/>
</head>
<body>
    <div class="container">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">Complex Header Grid</h3>
            </div>
            <div class="panel-body">
                <div id="reportTable"></div>
                <div id="errorMsgDiv"></div>
            </div>
        </div>
    </div>
    <!-- jQuery 2.2.2 -->
    <!-- Bootstrap 3.3.5 -->
    <!-- jQuery Datatables -->
    <script type="text/javascript" src="https://cdn.datatables.net/u/bs-3.3.6/jq-2.2.3,dt-1.10.12,cr-1.3.2,fc-3.2.2,fh-3.1.2,sc-1.4.2/datatables.min.js"></script>
    <script type="text/javascript">
        "use strict"
        $ = jQuery.noConflict();
    </script>
    <!-- Lodash js -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.13.1/lodash.min.js"></script>
</body>
</html>
 
html, body {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
    /* font-size: 90%; */
}
.reportTable th, .reportTable td {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11px !important;
}
.nav-link {
    text-decoration: underline;
}
.control-sidebar-menu>li>span {
    display: block;
    padding: 10px 15px;
}
#showOnNewMessageBtn {
    font-size: 12px;
    padding: 10px 15px;
}
.select2 {
    width: 300px;
}
#statusMessageDiv {
    padding-top: 5px;
    font-weight: bold;
}
.error {
    color: red;
}
.c3-text.c3-empty {
    font-size : 11px !important;
    fill: #000000 !important;
}
/*cell alignment*/
.ct-align {
    text-align: center;
}
.rt-align {
    text-align: right;
}
.lt-align {
    text-align: left;
}
.xera-grid {
    width: 100%;
}
.dataTables_wrapper {
    margin-left: 5px;
    margin-right: 5px;
}
.xera-grid thead tr th {
    text-align: center;
    font-weight: bold;
}
.xera-grid tfoot tr th {
    font-weight: bold;
}
.table-hover>tbody>tr:hover {
    background-color: #adb7f8 !important;
}
.summary-row {
    font-weight: bold;
}
.link {
    text-decoration: underline !important;
    color: #0033ff !important;
}
.rtlink {
    text-align: right;
    text-decoration: underline;
    text-roll-over-color: #529924;
    text-selected-color: #7dd3eb;
    color: #0033ff;
}
.red-color {
    color: #FF0000;
}
.green-color {
    color: #008000;
}
/*icons*/
table.xera-grid span.inboundEntrypoint {
    background-image: url('../img/inbound_entry_point.gif');
}
table.xera-grid span.outdialEntrypoint {
    background-image: url('../img/inbound_entry_point.gif');
}
table.xera-grid span.inboundQueue {
    background-image: url('../img/inbound_queue.gif');
}
table.xera-grid span.outdialQueue {
    background-image: url('../img/outbound_queue.gif');
}
table.xera-grid span.site {
    background-image: url('../img/site_open.gif');
}
table.xera-grid span.team {
    background-image: url('../img/teams_open.gif');
}
table.xera-grid span.agent {
    background-image: url('../img/agents_open.gif');
}
table.xera-grid span.skill {
    background-image: url('../img/skill.gif');
}
table.xera-grid span.voice {
    background-image: url('../img/phone.png');
}
table.xera-grid span.email {
    background-image: url('../img/email.png');
}
table.xera-grid span.fax {
    background-image: url('../img/fax.png');
}
table.xera-grid span.chat {
    background-image: url('../img/chat.png');
}
table.xera-grid span.video {
    background-image: url('../img/video.png');
}
table.xera-grid span.date {
    background-image: url('../img/date.png');
}
table.xera-grid span.monitor {
    background-image: url('../img/tab_go.png');
}
table.xera-grid span.logOut {
    background-image: url('../img/logout.gif');
}
table.xera-grid span.availableIcon {
    background-image: url('../img/agent_available.png');
}
table.xera-grid span.idleIcon {
    background-image: url('../img/agent_idle.png');
}
table.xera-grid span.connectedIcon {
    background-image: url('../img/agent_connected_talk.png');
}
table.xera-grid span.connectedOnHoldIcon {
    background-image: url('../img/agent_connected_hold.png');
}
table.xera-grid span.outDialIcon {
    background-image: url('../img/agent_outdial.png');
}
table.xera-grid span.wrapUpIcon {
    background-image: url('../img/agent_wrapup.png');
}
table.xera-grid span.reservedIcon {
    background-image: url('../img/agent_reserved.png');
}
table.xera-grid span.onHoldIcon {
    background-image: url('../img/agent_connected_hold.png');
}
table.xera-grid span.agentNotrespondingIcon {
    background-image: url('../img/agent_notresponding.png ');
}
/* Levels */
table.xera-grid td.level-1 {
    padding-left: 20px;
}
table.xera-grid td.level-2 {
    padding-left: 40px;
}
table.xera-grid td.level-3 {
    padding-left: 80px;
}
table.xera-grid td.level-4 {
    padding-left: 100px;
}
table.xera-grid td.level-5 {
    padding-left: 160px;
}
table.xera-grid td.level-6 {
    padding-left: 190px;
}
table.xera-grid td.level-7 {
    padding-left: 210px;
}
table.xera-grid td.level-8 {
    padding-left: 240px;
}
table.xera-grid td.level-9 {
    padding-left: 270px;
}
table.xera-grid td.level-10 {
    padding-left: 300px;
}
table.xera-grid span.indenter {
    display: inline-block;
    margin: 0;
    padding: 0;
    text-align: right;
    /* Disable text selection of nodes (for better D&D UX) */
    user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    -webkit-user-select: none;
    /* Force content-box box model for indenter (Bootstrap compatibility) */
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    width: 19px;
}
table.xera-grid span.indenter a {
    background-position: left center;
    background-repeat: no-repeat;
    display: inline-block;
    text-decoration: none;
    width: 19px;
}
table.xera-grid span {
    background-position: center left;
    background-repeat: no-repeat;
    display: inline-block;
    padding: .2em 0 .2em 1.5em;
}
table.xera-grid span.file {
    background-image:
        url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKOgiihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQIV2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4trRCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC);
}
table.xera-grid span.folder {
    background-image:
        url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLxZO7ihRBFIa/6u0ZW7GHBUV0UQQTZzd3QdhMQxOfwMRXEANBMNQX0MzAzFAwEzHwARbNFDdwEd31Mj3X7a6uOr9BtzNjYjKBJ6nicP7v3KqcJFaxhBVtZUAK8OHlld2st7Xl3DJPVONP+zEUV4HqL5UDYHr5xvuQAjgl/Qs7TzvOOVAjxjlC+ePSwe6DfbVegLVuT4r14eTr6zvA8xSAoBLzx6pvj4l+DZIezuVkG9fY2H7YRQIMZIBwycmzH1/s3F8AapfIPNF3kQk7+kw9PWBy+IZOdg5Ug3mkAATy/t0usovzGeCUWTjCz0B+Sj0ekfdvkZ3abBv+U4GaCtJ1iEm6ANQJ6fEzrG/engcKw/wXQvEKxSEKQxRGKE7Izt+DSiwBJMUSm71rguMYhQKrBygOIRStf4TiFFRBvbRGKiQLWP29yRSHKBTtfdBmHs0BUpgvtgF4yRFR+NUKi0XZcYjCeCG2smkzLAHkbRBmP0/Uk26O5YnUActBp1GsAI+S5nRJJJal5K1aAMrq0d6Tm9uI6zjyf75dAe6tx/SsWeD//o2/Ab6IH3/h25pOAAAAAElFTkSuQmCC);
}
table.xera-grid tr.collapsed span.indenter a {
    background-image:
        url(data:image/png;base64,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);
}
table.xera-grid tr.expanded span.indenter a {
    background-image:
        url(data:image/png;base64,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);
}
table.xera-grid tr span.indenter a {
    outline: none;
    /* Expander shows outline after upgrading to 3.0 (#141) */
}
table.xera-grid thead tr {
    height: 2.5em;
}
table.xera-grid th, table.xera-grid td {
    white-space: nowrap;
    padding: 5px 5px 0 0;
}
.popover, .popover-title, .popover-content {
    z-index: 10003000 !important;
}
 
var gridData = {
  "metaData": {
    "groups": [
      {
        "header": "Group-1",
        "groupKey": "group1GP"
      },
      {
        "header": "Group-2",
        "groupKey": "group2GP"
      },
      {
        "header": "Group-3",
        "groupKey": "group3GP"
      },
      {
        "header": "Group-4",
        "groupKey": "group4GP"
      },
      {
        "header": "Group-5",
        "groupKey": "group5GP"
      },
      {
        "header": "Group-6",
        "groupKey": "grou6GP"
      },
      {
        "header": "Group-7",
        "groupKey": "group7GP"
      },
      {
        "header": "Group-8",
        "groupKey": "group8GP"
      },
      {
        "header": "Group-9",
        "groupKey": "group9GP"
      },
      {
        "header": "Group-10",
        "groupKey": "group10GP"
      },
      {
        "header": "Group-11",
        "groupKey": "group11GP"
      },
      {
        "header": "Group-12",
        "groupKey": "group12GP"
      },
      {
        "header": "Group-13",
        "groupKey": "group13GP"
      },
      {
        "header": "Group-14",
        "groupKey": "group14GP"
      },
      {
        "header": "Group-15",
        "groupKey": "group15GP"
      },
      {
        "header": "Group-16",
        "groupKey": "group16GP"
      }
    ],
    "fields": [
      {
        "data": "key",
        "draggable": false,
        "width": 150,
        "header": "Date",
        "sortable": true,
        "align": "lt"
      },
      {
        "data": "loginCount",
        "draggable": true,
        "width": 100,
        "header": "Login Count",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "callsHandled",
        "draggable": true,
        "width": 100,
        "header": "Calls Handled",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "staffHours",
        "draggable": true,
        "width": 100,
        "header": "Staff Hours",
        "sortable": false,
        "align": "rt"
      },
      {
        "data": "initialLoginTime",
        "draggable": true,
        "width": 150,
        "header": "Initial Login Time",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "finalLogoutTime",
        "draggable": true,
        "width": 150,
        "header": "Final Logout Time",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "occupancy",
        "draggable": true,
        "width": 100,
        "header": "Occupancy",
        "sortable": false,
        "align": "rt"
      },
      {
        "data": "idleCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group1GP"
      },
      {
        "data": "tIdleTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group1GP"
      },
      {
        "data": "avgIdleTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group1GP"
      },
      {
        "data": "availableCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group2GP"
      },
      {
        "data": "tAvailableTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group2GP"
      },
      {
        "data": "avgAvailableTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group2GP"
      },
      {
        "data": "ringingCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group3GP"
      },
      {
        "data": "tRingingTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group3GP"
      },
      {
        "data": "avgRingingTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group3GP"
      },
      {
        "data": "holdCount",
        "draggable": true,
        "width": 80,
        "header": "Hold Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "connectedCount",
        "draggable": true,
        "width": 100,
        "header": "Connected Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "tTalkTime",
        "draggable": true,
        "width": 100,
        "header": "Total Talk Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "tHoldTime",
        "draggable": true,
        "width": 100,
        "header": "Total Hold Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "tConnectedTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "avgHoldTime",
        "draggable": true,
        "width": 120,
        "header": "Average Hold Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "avgConnectedTime",
        "draggable": true,
        "width": 120,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group4GP"
      },
      {
        "data": "outDialRingingCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group10GP"
      },
      {
        "data": "tOutDialRingingTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group10GP"
      },
      {
        "data": "avgOutDialRingingTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group10GP"
      },
      {
        "data": "outDialAttemptedCount",
        "draggable": true,
        "width": 120,
        "header": "Attempted Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "outDialConnectedCount",
        "draggable": true,
        "width": 120,
        "header": "Connected Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "outDialHoldCount",
        "draggable": true,
        "width": 120,
        "header": "Hold Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "tOutDialTalkTime",
        "draggable": true,
        "width": 120,
        "header": "Total Talk Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "tOutDialHoldTime",
        "draggable": true,
        "width": 120,
        "header": "Total Hold Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "tOutDialConnectedTime",
        "draggable": true,
        "width": 120,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "avgOutDialHoldTime",
        "draggable": true,
        "width": 120,
        "header": "Average Hold Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "avgOutDialConnectedTime",
        "draggable": true,
        "width": 150,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group11GP"
      },
      {
        "data": "disconnectedCount",
        "draggable": true,
        "width": 120,
        "header": "Disconnected Count",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "wrapUpCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group5GP"
      },
      {
        "data": "tWrapUpTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group5GP"
      },
      {
        "data": "avgWrapUpTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group5GP"
      },
      {
        "data": "outDialWrapUpCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group12GP"
      },
      {
        "data": "tOutDialWrapUpTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group12GP"
      },
      {
        "data": "avgOutDialWrapUpTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group12GP"
      },
      {
        "data": "notRespondingCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "grou6GP"
      },
      {
        "data": "tNotRespondingTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "grou6GP"
      },
      {
        "data": "avgNotRespondingTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "grou6GP"
      },
      {
        "data": "consultAnswerCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group7GP"
      },
      {
        "data": "tConsultAnswerTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group7GP"
      },
      {
        "data": "avgConsultAnswerTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group7GP"
      },
      {
        "data": "consultRequestCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group8GP"
      },
      {
        "data": "tConsultRequestTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group8GP"
      },
      {
        "data": "avgConsultRequestTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group8GP"
      },
      {
        "data": "consultCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group9GP"
      },
      {
        "data": "tConsultTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group9GP"
      },
      {
        "data": "avgConsultTime",
        "draggable": true,
        "width": 100,
        "header": "Average Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group9GP"
      },
      {
        "data": "conferenceCount",
        "draggable": true,
        "width": 120,
        "header": "Conference",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "ctqRequestCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group13GP"
      },
      {
        "data": "totalCtqRequestTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group13GP"
      },
      {
        "data": "ctqAnswerCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group14GP"
      },
      {
        "data": "totalCtqAnswerTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group14GP"
      },
      {
        "data": "outdialCtqRequestCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group15GP"
      },
      {
        "data": "totalOutdialCtqReqTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group15GP"
      },
      {
        "data": "outdialCtqAnswerCount",
        "draggable": true,
        "width": 80,
        "header": "Count",
        "sortable": true,
        "align": "rt",
        "groupKey": "group16GP"
      },
      {
        "data": "totalOutdialCtqAnsTime",
        "draggable": true,
        "width": 100,
        "header": "Total Time",
        "sortable": true,
        "align": "rt",
        "groupKey": "group16GP"
      },
      {
        "data": "agentToAgentXferCount",
        "draggable": true,
        "width": 120,
        "header": "Agent Transfer",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "agentToQueueRequestCount",
        "draggable": true,
        "width": 120,
        "header": "Agent Requeue",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "blindXferCount",
        "draggable": true,
        "width": 120,
        "header": "Blind Transfer",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "avgHandleTime",
        "draggable": true,
        "width": 150,
        "header": "Inbound Avg Handle Time",
        "sortable": true,
        "align": "rt"
      },
      {
        "data": "outDialAvgHandleTime",
        "draggable": true,
        "width": 150,
        "header": "Outdial Avg Handle Time",
        "sortable": true,
        "align": "rt"
      }
    ]
  },
  "sortColumn": "key",
  "summaryrow": {
    "avgWrapUpTime": "00:01:19",
    "consultRequestCount": "9",
    "avgIdleTime": "00:13:02",
    "connectedCount": "218",
    "occupancy": "0.12",
    "outDialAttemptedCount": "333",
    "outDialConnectedCount": "298",
    "holdCount": "11",
    "consultCount": "9",
    "tConsultTime": "00:14:11",
    "ringingCount": "221",
    "outDialHoldCount": "2",
    "tConsultAnswerTime": "00:00:00",
    "agentToQueueRequestCount": "0",
    "outdialCtqAnswerCount": "0",
    "ctqRequestCount": "0",
    "avgConsultTime": "00:01:35",
    "notRespondingCount": "0",
    "tOutDialConnectedTime": "07:50:18",
    "avgConsultAnswerTime": "00:00:00",
    "avgNotRespondingTime": "00:00:00",
    "avgConsultRequestTime": "00:01:35",
    "totalCtqRequestTime": "00:00:00",
    "tOutDialTalkTime": "07:44:29",
    "avgOutDialConnectedTime": "00:01:35",
    "agentToAgentXferCount": "13",
    "outDialRingingCount": "333",
    "avgHoldTime": "00:02:00",
    "tOutDialWrapUpTime": "02:42:10",
    "availableCount": "313",
    "tOutDialHoldTime": "00:05:49",
    "totalOutdialCtqAnsTime": "00:00:00",
    "callsHandled": "516",
    "staffHours": "374:02:58",
    "totalCtqAnswerTime": "00:00:00",
    "outdialCtqRequestCount": "0",
    "disconnectedCount": "44",
    "avgRingingTime": "00:00:02",
    "avgHandleTime": "00:09:41",
    "tTalkTime": "29:57:03",
    "tOutDialRingingTime": "02:14:58",
    "avgOutDialRingingTime": "00:00:24",
    "consultAnswerCount": "0",
    "conferenceCount": "7",
    "tRingingTime": "00:07:16",
    "key": "Total",
    "tHoldTime": "00:21:58",
    "blindXferCount": "5",
    "tAvailableTime": "153:01:04",
    "wrapUpCount": "221",
    "avgOutDialWrapUpTime": "00:00:29",
    "tConsultRequestTime": "00:14:11",
    "totalOutdialCtqReqTime": "00:00:00",
    "ctqAnswerCount": "0",
    "outDialWrapUpCount": "333",
    "avgAvailableTime": "00:29:20",
    "loginCount": "98",
    "tConnectedTime": "30:19:00",
    "tNotRespondingTime": "00:00:00",
    "avgConnectedTime": "00:08:21",
    "outDialAvgHandleTime": "00:02:07",
    "avgOutDialHoldTime": "00:02:55",
    "tIdleTime": "172:56:47",
    "idleCount": "796",
    "tWrapUpTime": "04:51:24"
  },
  "sortOrder": "asc",
  "expandRows": true,
  "rows": [
    {
      "avgWrapUpTime": "00:00:00",
      "consultRequestCount": "0",
      "avgIdleTime": "00:30:38",
      "connectedCount": "0",
      "occupancy": "0.0",
      "outDialAttemptedCount": "0",
      "outDialConnectedCount": "0",
      "holdCount": "0",
      "consultCount": "0",
      "tConsultTime": "00:00:00",
      "ringingCount": "0",
      "outDialHoldCount": "0",
      "tConsultAnswerTime": "00:00:00",
      "agentToQueueRequestCount": "0",
      "outdialCtqAnswerCount": "0",
      "children": [
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:33:44",
          "connectedCount": "0",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "21-Apr-16 07:57:22",
          "ctqRequestCount": "0",
          "finalLogoutTime": "21-Apr-16 16:26:44",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 44998,
            "beginTimestamp": 1461211200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461297600000,
            "timestamp": 1461211200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "0",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "0",
          "icon": "date",
          "staffHours": "07:52:09",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "21-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:00:00",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:00:00",
          "loginCount": "2",
          "rowId": 2,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "07:52:09",
          "idleCount": "14",
          "tWrapUpTime": "00:00:00"
        },
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:30:38",
          "connectedCount": "0",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "22-Apr-16 08:09:29",
          "ctqRequestCount": "0",
          "finalLogoutTime": "22-Apr-16 16:25:13",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 44998,
            "beginTimestamp": 1461297600000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461384000000,
            "timestamp": 1461297600000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "0",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "0",
          "icon": "date",
          "staffHours": "07:39:36",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "22-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:00:00",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:00:00",
          "loginCount": "2",
          "rowId": 3,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "07:39:36",
          "idleCount": "15",
          "tWrapUpTime": "00:00:00"
        },
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:32:28",
          "connectedCount": "0",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "25-Apr-16 09:55:05",
          "ctqRequestCount": "0",
          "finalLogoutTime": "25-Apr-16 16:29:30",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 44998,
            "beginTimestamp": 1461556800000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461643200000,
            "timestamp": 1461556800000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "0",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "0",
          "icon": "date",
          "staffHours": "05:57:06",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "25-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:00:00",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:00:00",
          "loginCount": "2",
          "rowId": 4,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "05:57:06",
          "idleCount": "11",
          "tWrapUpTime": "00:00:00"
        },
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:25:43",
          "connectedCount": "0",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "26-Apr-16 08:00:59",
          "ctqRequestCount": "0",
          "finalLogoutTime": "26-Apr-16 14:15:13",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 44998,
            "beginTimestamp": 1461643200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461729600000,
            "timestamp": 1461643200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "0",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "0",
          "icon": "date",
          "staffHours": "05:34:17",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "26-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:00:00",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:00:00",
          "loginCount": "2",
          "rowId": 5,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "05:34:17",
          "idleCount": "13",
          "tWrapUpTime": "00:00:00"
        }
      ],
      "ctqRequestCount": "0",
      "avgConsultTime": "00:00:00",
      "notRespondingCount": "0",
      "tOutDialConnectedTime": "00:00:00",
      "avgConsultAnswerTime": "00:00:00",
      "avgNotRespondingTime": "00:00:00",
      "avgConsultRequestTime": "00:00:00",
      "totalCtqRequestTime": "00:00:00",
      "tOutDialTalkTime": "00:00:00",
      "avgOutDialConnectedTime": "00:00:00",
      "agentToAgentXferCount": "0",
      "outDialRingingCount": "0",
      "avgHoldTime": "00:00:00",
      "tOutDialWrapUpTime": "00:00:00",
      "availableCount": "0",
      "tOutDialHoldTime": "00:00:00",
      "totalOutdialCtqAnsTime": "00:00:00",
      "callsHandled": "0",
      "icon": "agent",
      "staffHours": "27:03:08",
      "totalCtqAnswerTime": "00:00:00",
      "outdialCtqRequestCount": "0",
      "disconnectedCount": "0",
      "avgRingingTime": "00:00:00",
      "avgHandleTime": "00:00:00",
      "tTalkTime": "00:00:00",
      "tOutDialRingingTime": "00:00:00",
      "avgOutDialRingingTime": "00:00:00",
      "consultAnswerCount": "0",
      "conferenceCount": "0",
      "tRingingTime": "00:00:00",
      "key": "Agent-1",
      "tHoldTime": "00:00:00",
      "blindXferCount": "0",
      "tAvailableTime": "00:00:00",
      "wrapUpCount": "0",
      "avgOutDialWrapUpTime": "00:00:00",
      "tConsultRequestTime": "00:00:00",
      "totalOutdialCtqReqTime": "00:00:00",
      "ctqAnswerCount": "0",
      "outDialWrapUpCount": "0",
      "avgAvailableTime": "00:00:00",
      "loginCount": "8",
      "rowId": 1,
      "tConnectedTime": "00:00:00",
      "tNotRespondingTime": "00:00:00",
      "avgConnectedTime": "00:00:00",
      "outDialAvgHandleTime": "00:00:00",
      "avgOutDialHoldTime": "00:00:00",
      "tIdleTime": "27:03:08",
      "idleCount": "53",
      "tWrapUpTime": "00:00:00"
    },
    {
      "avgWrapUpTime": "00:00:07",
      "consultRequestCount": "0",
      "avgIdleTime": "00:00:07",
      "connectedCount": "2",
      "occupancy": "0.0",
      "outDialAttemptedCount": "0",
      "outDialConnectedCount": "0",
      "holdCount": "0",
      "consultCount": "0",
      "tConsultTime": "00:00:00",
      "ringingCount": "3",
      "outDialHoldCount": "0",
      "tConsultAnswerTime": "00:00:00",
      "agentToQueueRequestCount": "0",
      "outdialCtqAnswerCount": "0",
      "children": [
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:00:03",
          "connectedCount": "0",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "22-Apr-16 22:08:03",
          "ctqRequestCount": "0",
          "finalLogoutTime": "23-Apr-16 10:07:24",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 127369,
            "beginTimestamp": 1461297600000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461384000000,
            "timestamp": 1461297600000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "2",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "0",
          "icon": "date",
          "staffHours": "01:51:20",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "22-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "01:51:15",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:55:37",
          "loginCount": "2",
          "rowId": 7,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:00:06",
          "idleCount": "2",
          "tWrapUpTime": "00:00:00"
        },
        {
          "avgWrapUpTime": "00:00:09",
          "consultRequestCount": "0",
          "avgIdleTime": "00:00:15",
          "connectedCount": "1",
          "occupancy": "0.01",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "2",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "22-Apr-16 22:25:47",
          "ctqRequestCount": "0",
          "finalLogoutTime": "24-Apr-16 09:02:38",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 127369,
            "beginTimestamp": 1461384000000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461470400000,
            "timestamp": 1461384000000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "3",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "1",
          "icon": "date",
          "staffHours": "11:51:42",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:04",
          "avgHandleTime": "00:05:19",
          "tTalkTime": "00:05:01",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:07",
          "key": "23-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "11:45:45",
          "wrapUpCount": "2",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "03:55:15",
          "loginCount": "2",
          "rowId": 8,
          "tConnectedTime": "00:05:01",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:05:01",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:00:30",
          "idleCount": "2",
          "tWrapUpTime": "00:00:18"
        },
        {
          "avgWrapUpTime": "00:00:03",
          "consultRequestCount": "0",
          "avgIdleTime": "00:00:01",
          "connectedCount": "1",
          "occupancy": "0.0",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "1",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "23-Apr-16 22:15:42",
          "ctqRequestCount": "0",
          "finalLogoutTime": "24-Apr-16 09:02:38",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 127369,
            "beginTimestamp": 1461470400000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461556800000,
            "timestamp": 1461470400000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "1",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "1",
          "icon": "date",
          "staffHours": "09:02:38",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "1",
          "avgRingingTime": "00:00:04",
          "avgHandleTime": "00:00:06",
          "tTalkTime": "00:00:03",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:04",
          "key": "24-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "09:02:27",
          "wrapUpCount": "1",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "09:02:27",
          "loginCount": "1",
          "rowId": 9,
          "tConnectedTime": "00:00:03",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:03",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:00:01",
          "idleCount": "1",
          "tWrapUpTime": "00:00:03"
        }
      ],
      "ctqRequestCount": "0",
      "avgConsultTime": "00:00:00",
      "notRespondingCount": "0",
      "tOutDialConnectedTime": "00:00:00",
      "avgConsultAnswerTime": "00:00:00",
      "avgNotRespondingTime": "00:00:00",
      "avgConsultRequestTime": "00:00:00",
      "totalCtqRequestTime": "00:00:00",
      "tOutDialTalkTime": "00:00:00",
      "avgOutDialConnectedTime": "00:00:00",
      "agentToAgentXferCount": "0",
      "outDialRingingCount": "0",
      "avgHoldTime": "00:00:00",
      "tOutDialWrapUpTime": "00:00:00",
      "availableCount": "6",
      "tOutDialHoldTime": "00:00:00",
      "totalOutdialCtqAnsTime": "00:00:00",
      "callsHandled": "2",
      "icon": "agent",
      "staffHours": "22:45:40",
      "totalCtqAnswerTime": "00:00:00",
      "outdialCtqRequestCount": "0",
      "disconnectedCount": "1",
      "avgRingingTime": "00:00:04",
      "avgHandleTime": "00:02:43",
      "tTalkTime": "00:05:04",
      "tOutDialRingingTime": "00:00:00",
      "avgOutDialRingingTime": "00:00:00",
      "consultAnswerCount": "0",
      "conferenceCount": "0",
      "tRingingTime": "00:00:12",
      "key": "Agent-2",
      "tHoldTime": "00:00:00",
      "blindXferCount": "0",
      "tAvailableTime": "22:39:26",
      "wrapUpCount": "3",
      "avgOutDialWrapUpTime": "00:00:00",
      "tConsultRequestTime": "00:00:00",
      "totalOutdialCtqReqTime": "00:00:00",
      "ctqAnswerCount": "0",
      "outDialWrapUpCount": "0",
      "avgAvailableTime": "03:46:34",
      "loginCount": "5",
      "rowId": 6,
      "tConnectedTime": "00:05:04",
      "tNotRespondingTime": "00:00:00",
      "avgConnectedTime": "00:02:32",
      "outDialAvgHandleTime": "00:00:00",
      "avgOutDialHoldTime": "00:00:00",
      "tIdleTime": "00:00:37",
      "idleCount": "5",
      "tWrapUpTime": "00:00:21"
    },
    {
      "avgWrapUpTime": "00:00:11",
      "consultRequestCount": "0",
      "avgIdleTime": "00:02:19",
      "connectedCount": "11",
      "occupancy": "0.01",
      "outDialAttemptedCount": "8",
      "outDialConnectedCount": "8",
      "holdCount": "0",
      "consultCount": "0",
      "tConsultTime": "00:00:00",
      "ringingCount": "11",
      "outDialHoldCount": "0",
      "tConsultAnswerTime": "00:00:00",
      "agentToQueueRequestCount": "0",
      "outdialCtqAnswerCount": "0",
      "children": [
        {
          "avgWrapUpTime": "00:00:10",
          "consultRequestCount": "0",
          "avgIdleTime": "00:02:28",
          "connectedCount": "1",
          "occupancy": "0.01",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "1",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "21-Apr-16 11:26:29",
          "ctqRequestCount": "0",
          "finalLogoutTime": "21-Apr-16 21:55:39",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 42536,
            "beginTimestamp": 1461211200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461297600000,
            "timestamp": 1461211200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "9",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "1",
          "icon": "date",
          "staffHours": "08:27:02",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:07",
          "avgHandleTime": "00:06:32",
          "tTalkTime": "00:06:21",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:07",
          "key": "21-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "07:48:17",
          "wrapUpCount": "1",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:52:02",
          "loginCount": "6",
          "rowId": 11,
          "tConnectedTime": "00:06:21",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:06:21",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:32:07",
          "idleCount": "13",
          "tWrapUpTime": "00:00:10"
        },
        {
          "avgWrapUpTime": "00:00:15",
          "consultRequestCount": "0",
          "avgIdleTime": "00:02:43",
          "connectedCount": "2",
          "occupancy": "0.0",
          "outDialAttemptedCount": "2",
          "outDialConnectedCount": "2",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "2",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "24-Apr-16 07:15:27",
          "ctqRequestCount": "0",
          "finalLogoutTime": "25-Apr-16 01:15:17",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:01:28",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 42536,
            "beginTimestamp": 1461470400000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461556800000,
            "timestamp": 1461470400000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:01:28",
          "avgOutDialConnectedTime": "00:00:44",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "2",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:22",
          "availableCount": "6",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "4",
          "icon": "date",
          "staffHours": "16:44:32",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "1",
          "avgRingingTime": "00:00:07",
          "avgHandleTime": "00:01:02",
          "tTalkTime": "00:01:34",
          "tOutDialRingingTime": "00:00:07",
          "avgOutDialRingingTime": "00:00:04",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:15",
          "key": "24-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "16:29:22",
          "wrapUpCount": "2",
          "avgOutDialWrapUpTime": "00:00:11",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "2",
          "avgAvailableTime": "02:44:54",
          "loginCount": "1",
          "rowId": 12,
          "tConnectedTime": "00:01:34",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:47",
          "outDialAvgHandleTime": "00:00:55",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:10:53",
          "idleCount": "4",
          "tWrapUpTime": "00:00:31"
        },
        {
          "avgWrapUpTime": "00:00:10",
          "consultRequestCount": "0",
          "avgIdleTime": "00:01:42",
          "connectedCount": "2",
          "occupancy": "0.01",
          "outDialAttemptedCount": "5",
          "outDialConnectedCount": "5",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "2",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "24-Apr-16 07:15:27",
          "ctqRequestCount": "0",
          "finalLogoutTime": "25-Apr-16 17:27:06",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:02:34",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 42536,
            "beginTimestamp": 1461556800000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461643200000,
            "timestamp": 1461556800000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:02:34",
          "avgOutDialConnectedTime": "00:00:31",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "5",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:52",
          "availableCount": "10",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "7",
          "icon": "date",
          "staffHours": "10:49:23",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "3",
          "avgRingingTime": "00:00:06",
          "avgHandleTime": "00:01:06",
          "tTalkTime": "00:01:51",
          "tOutDialRingingTime": "00:00:14",
          "avgOutDialRingingTime": "00:00:03",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:11",
          "key": "25-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "10:26:24",
          "wrapUpCount": "2",
          "avgOutDialWrapUpTime": "00:00:10",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "5",
          "avgAvailableTime": "01:02:38",
          "loginCount": "3",
          "rowId": 13,
          "tConnectedTime": "00:01:51",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:55",
          "outDialAvgHandleTime": "00:00:41",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:16:57",
          "idleCount": "10",
          "tWrapUpTime": "00:00:21"
        },
        {
          "avgWrapUpTime": "00:00:10",
          "consultRequestCount": "0",
          "avgIdleTime": "00:02:57",
          "connectedCount": "6",
          "occupancy": "0.01",
          "outDialAttemptedCount": "1",
          "outDialConnectedCount": "1",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "6",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "26-Apr-16 07:12:06",
          "ctqRequestCount": "0",
          "finalLogoutTime": "26-Apr-16 17:14:46",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:42",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 42536,
            "beginTimestamp": 1461643200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461729600000,
            "timestamp": 1461643200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:42",
          "avgOutDialConnectedTime": "00:00:42",
          "agentToAgentXferCount": "1",
          "outDialRingingCount": "1",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:00:10",
          "availableCount": "9",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "7",
          "icon": "date",
          "staffHours": "10:02:40",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "3",
          "avgRingingTime": "00:00:07",
          "avgHandleTime": "00:01:22",
          "tTalkTime": "00:07:08",
          "tOutDialRingingTime": "00:00:47",
          "avgOutDialRingingTime": "00:00:47",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:39",
          "key": "26-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "1",
          "tAvailableTime": "09:40:24",
          "wrapUpCount": "6",
          "avgOutDialWrapUpTime": "00:00:10",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "1",
          "avgAvailableTime": "01:04:29",
          "loginCount": "1",
          "rowId": 14,
          "tConnectedTime": "00:07:08",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:01:11",
          "outDialAvgHandleTime": "00:00:52",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:11:47",
          "idleCount": "4",
          "tWrapUpTime": "00:01:02"
        }
      ],
      "ctqRequestCount": "0",
      "avgConsultTime": "00:00:00",
      "notRespondingCount": "0",
      "tOutDialConnectedTime": "00:04:45",
      "avgConsultAnswerTime": "00:00:00",
      "avgNotRespondingTime": "00:00:00",
      "avgConsultRequestTime": "00:00:00",
      "totalCtqRequestTime": "00:00:00",
      "tOutDialTalkTime": "00:04:45",
      "avgOutDialConnectedTime": "00:00:36",
      "agentToAgentXferCount": "1",
      "outDialRingingCount": "8",
      "avgHoldTime": "00:00:00",
      "tOutDialWrapUpTime": "00:01:24",
      "availableCount": "34",
      "tOutDialHoldTime": "00:00:00",
      "totalOutdialCtqAnsTime": "00:00:00",
      "callsHandled": "19",
      "icon": "agent",
      "staffHours": "46:03:37",
      "totalCtqAnswerTime": "00:00:00",
      "outdialCtqRequestCount": "0",
      "disconnectedCount": "7",
      "avgRingingTime": "00:00:06",
      "avgHandleTime": "00:01:43",
      "tTalkTime": "00:16:55",
      "tOutDialRingingTime": "00:01:08",
      "avgOutDialRingingTime": "00:00:09",
      "consultAnswerCount": "0",
      "conferenceCount": "0",
      "tRingingTime": "00:01:11",
      "key": "Agent-3",
      "tHoldTime": "00:00:00",
      "blindXferCount": "1",
      "tAvailableTime": "44:24:27",
      "wrapUpCount": "11",
      "avgOutDialWrapUpTime": "00:00:11",
      "tConsultRequestTime": "00:00:00",
      "totalOutdialCtqReqTime": "00:00:00",
      "ctqAnswerCount": "0",
      "outDialWrapUpCount": "8",
      "avgAvailableTime": "01:18:22",
      "loginCount": "11",
      "rowId": 10,
      "tConnectedTime": "00:16:55",
      "tNotRespondingTime": "00:00:00",
      "avgConnectedTime": "00:01:32",
      "outDialAvgHandleTime": "00:00:46",
      "avgOutDialHoldTime": "00:00:00",
      "tIdleTime": "01:11:44",
      "idleCount": "31",
      "tWrapUpTime": "00:02:03"
    },
    {
      "avgWrapUpTime": "00:01:35",
      "consultRequestCount": "4",
      "avgIdleTime": "00:04:46",
      "connectedCount": "26",
      "occupancy": "0.31",
      "outDialAttemptedCount": "213",
      "outDialConnectedCount": "190",
      "holdCount": "4",
      "consultCount": "4",
      "tConsultTime": "00:07:55",
      "ringingCount": "26",
      "outDialHoldCount": "2",
      "tConsultAnswerTime": "00:00:00",
      "agentToQueueRequestCount": "0",
      "outdialCtqAnswerCount": "0",
      "children": [
        {
          "avgWrapUpTime": "00:02:31",
          "consultRequestCount": "0",
          "avgIdleTime": "00:04:10",
          "connectedCount": "3",
          "occupancy": "0.27",
          "outDialAttemptedCount": "58",
          "outDialConnectedCount": "52",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "3",
          "outDialHoldCount": "1",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "21-Apr-16 08:04:00",
          "ctqRequestCount": "0",
          "finalLogoutTime": "21-Apr-16 16:37:09",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "01:22:16",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 37610,
            "beginTimestamp": 1461211200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461297600000,
            "timestamp": 1461211200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "01:20:39",
          "avgOutDialConnectedTime": "00:01:35",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "58",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:15:04",
          "availableCount": "5",
          "tOutDialHoldTime": "00:01:37",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "55",
          "icon": "date",
          "staffHours": "07:59:32",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "5",
          "avgRingingTime": "00:00:01",
          "avgHandleTime": "00:11:27",
          "tTalkTime": "00:26:47",
          "tOutDialRingingTime": "00:24:27",
          "avgOutDialRingingTime": "00:00:25",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:03",
          "key": "21-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:07:13",
          "wrapUpCount": "3",
          "avgOutDialWrapUpTime": "00:00:16",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "58",
          "avgAvailableTime": "00:01:27",
          "loginCount": "2",
          "rowId": 16,
          "tConnectedTime": "00:26:47",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:08:56",
          "outDialAvgHandleTime": "00:01:52",
          "avgOutDialHoldTime": "00:01:37",
          "tIdleTime": "05:16:08",
          "idleCount": "76",
          "tWrapUpTime": "00:07:34"
        },
        {
          "avgWrapUpTime": "00:01:14",
          "consultRequestCount": "0",
          "avgIdleTime": "00:04:37",
          "connectedCount": "5",
          "occupancy": "0.37",
          "outDialAttemptedCount": "42",
          "outDialConnectedCount": "37",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "5",
          "outDialHoldCount": "1",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "22-Apr-16 08:07:25",
          "ctqRequestCount": "0",
          "finalLogoutTime": "22-Apr-16 16:32:11",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "01:33:14",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 37610,
            "beginTimestamp": 1461297600000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461384000000,
            "timestamp": 1461297600000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "01:29:02",
          "avgOutDialConnectedTime": "00:02:31",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "42",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:16:52",
          "availableCount": "9",
          "tOutDialHoldTime": "00:04:12",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "42",
          "icon": "date",
          "staffHours": "07:41:55",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "5",
          "avgRingingTime": "00:00:01",
          "avgHandleTime": "00:11:57",
          "tTalkTime": "00:53:34",
          "tOutDialRingingTime": "00:17:28",
          "avgOutDialRingingTime": "00:00:25",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:04",
          "key": "22-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:29:40",
          "wrapUpCount": "5",
          "avgOutDialWrapUpTime": "00:00:24",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "42",
          "avgAvailableTime": "00:03:18",
          "loginCount": "2",
          "rowId": 17,
          "tConnectedTime": "00:53:34",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:10:43",
          "outDialAvgHandleTime": "00:02:59",
          "avgOutDialHoldTime": "00:04:12",
          "tIdleTime": "04:04:53",
          "idleCount": "53",
          "tWrapUpTime": "00:06:09"
        },
        {
          "avgWrapUpTime": "00:01:26",
          "consultRequestCount": "2",
          "avgIdleTime": "00:04:17",
          "connectedCount": "9",
          "occupancy": "0.39",
          "outDialAttemptedCount": "31",
          "outDialConnectedCount": "31",
          "holdCount": "2",
          "consultCount": "2",
          "tConsultTime": "00:02:18",
          "ringingCount": "9",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "23-Apr-16 08:17:44",
          "ctqRequestCount": "0",
          "finalLogoutTime": "23-Apr-16 16:45:51",
          "avgConsultTime": "00:01:09",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:51:26",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:01:09",
          "params": {
            "fname": "showAdrReport",
            "agentId": 37610,
            "beginTimestamp": 1461384000000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461470400000,
            "timestamp": 1461384000000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:51:26",
          "avgOutDialConnectedTime": "00:01:40",
          "agentToAgentXferCount": "2",
          "outDialRingingCount": "31",
          "avgHoldTime": "00:01:40",
          "tOutDialWrapUpTime": "00:13:19",
          "availableCount": "13",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "40",
          "icon": "date",
          "staffHours": "07:53:32",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "1",
          "avgRingingTime": "00:00:01",
          "avgHandleTime": "00:13:20",
          "tTalkTime": "01:43:40",
          "tOutDialRingingTime": "00:12:13",
          "avgOutDialRingingTime": "00:00:24",
          "consultAnswerCount": "0",
          "conferenceCount": "2",
          "tRingingTime": "00:00:09",
          "key": "23-Apr-2016",
          "tHoldTime": "00:03:21",
          "blindXferCount": "0",
          "tAvailableTime": "01:11:10",
          "wrapUpCount": "9",
          "avgOutDialWrapUpTime": "00:00:26",
          "tConsultRequestTime": "00:02:18",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "31",
          "avgAvailableTime": "00:05:28",
          "loginCount": "2",
          "rowId": 18,
          "tConnectedTime": "01:47:01",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:11:53",
          "outDialAvgHandleTime": "00:02:05",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "03:25:17",
          "idleCount": "48",
          "tWrapUpTime": "00:12:56"
        },
        {
          "avgWrapUpTime": "00:01:38",
          "consultRequestCount": "2",
          "avgIdleTime": "00:06:10",
          "connectedCount": "9",
          "occupancy": "0.35",
          "outDialAttemptedCount": "26",
          "outDialConnectedCount": "23",
          "holdCount": "2",
          "consultCount": "2",
          "tConsultTime": "00:05:37",
          "ringingCount": "9",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "25-Apr-16 08:59:20",
          "ctqRequestCount": "0",
          "finalLogoutTime": "25-Apr-16 15:59:20",
          "avgConsultTime": "00:02:48",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:22:49",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:02:48",
          "params": {
            "fname": "showAdrReport",
            "agentId": 37610,
            "beginTimestamp": 1461556800000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461643200000,
            "timestamp": 1461556800000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:22:49",
          "avgOutDialConnectedTime": "00:01:00",
          "agentToAgentXferCount": "1",
          "outDialRingingCount": "26",
          "avgHoldTime": "00:03:15",
          "tOutDialWrapUpTime": "00:08:11",
          "availableCount": "14",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "32",
          "icon": "date",
          "staffHours": "07:00:00",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "3",
          "avgRingingTime": "00:00:01",
          "avgHandleTime": "00:12:55",
          "tTalkTime": "01:35:02",
          "tOutDialRingingTime": "00:09:32",
          "avgOutDialRingingTime": "00:00:22",
          "consultAnswerCount": "0",
          "conferenceCount": "1",
          "tRingingTime": "00:00:10",
          "key": "25-Apr-2016",
          "tHoldTime": "00:06:30",
          "blindXferCount": "0",
          "tAvailableTime": "00:22:24",
          "wrapUpCount": "9",
          "avgOutDialWrapUpTime": "00:00:19",
          "tConsultRequestTime": "00:05:37",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "26",
          "avgAvailableTime": "00:01:36",
          "loginCount": "1",
          "rowId": 19,
          "tConnectedTime": "01:41:31",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:11:17",
          "outDialAvgHandleTime": "00:01:21",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "04:00:44",
          "idleCount": "39",
          "tWrapUpTime": "00:14:40"
        },
        {
          "avgWrapUpTime": "00:00:00",
          "consultRequestCount": "0",
          "avgIdleTime": "00:05:05",
          "connectedCount": "0",
          "occupancy": "0.17",
          "outDialAttemptedCount": "56",
          "outDialConnectedCount": "47",
          "holdCount": "0",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "0",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "26-Apr-16 08:05:30",
          "ctqRequestCount": "0",
          "finalLogoutTime": "26-Apr-16 16:30:16",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "01:00:58",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 37610,
            "beginTimestamp": 1461643200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461729600000,
            "timestamp": 1461643200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "01:00:58",
          "avgOutDialConnectedTime": "00:01:18",
          "agentToAgentXferCount": "0",
          "outDialRingingCount": "56",
          "avgHoldTime": "00:00:00",
          "tOutDialWrapUpTime": "00:18:16",
          "availableCount": "1",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "47",
          "icon": "date",
          "staffHours": "07:51:17",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "4",
          "avgRingingTime": "00:00:00",
          "avgHandleTime": "00:00:00",
          "tTalkTime": "00:00:00",
          "tOutDialRingingTime": "00:23:41",
          "avgOutDialRingingTime": "00:00:25",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:00",
          "key": "26-Apr-2016",
          "tHoldTime": "00:00:00",
          "blindXferCount": "0",
          "tAvailableTime": "00:07:00",
          "wrapUpCount": "0",
          "avgOutDialWrapUpTime": "00:00:20",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "56",
          "avgAvailableTime": "00:07:00",
          "loginCount": "2",
          "rowId": 20,
          "tConnectedTime": "00:00:00",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:00:00",
          "outDialAvgHandleTime": "00:01:41",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "06:01:23",
          "idleCount": "71",
          "tWrapUpTime": "00:00:00"
        }
      ],
      "ctqRequestCount": "0",
      "avgConsultTime": "00:01:59",
      "notRespondingCount": "0",
      "tOutDialConnectedTime": "05:10:43",
      "avgConsultAnswerTime": "00:00:00",
      "avgNotRespondingTime": "00:00:00",
      "avgConsultRequestTime": "00:01:59",
      "totalCtqRequestTime": "00:00:00",
      "tOutDialTalkTime": "05:04:54",
      "avgOutDialConnectedTime": "00:01:38",
      "agentToAgentXferCount": "3",
      "outDialRingingCount": "213",
      "avgHoldTime": "00:02:28",
      "tOutDialWrapUpTime": "01:11:42",
      "availableCount": "42",
      "tOutDialHoldTime": "00:05:49",
      "totalOutdialCtqAnsTime": "00:00:00",
      "callsHandled": "216",
      "icon": "agent",
      "staffHours": "38:26:17",
      "totalCtqAnswerTime": "00:00:00",
      "outdialCtqRequestCount": "0",
      "disconnectedCount": "18",
      "avgRingingTime": "00:00:01",
      "avgHandleTime": "00:12:42",
      "tTalkTime": "04:39:03",
      "tOutDialRingingTime": "01:27:20",
      "avgOutDialRingingTime": "00:00:25",
      "consultAnswerCount": "0",
      "conferenceCount": "3",
      "tRingingTime": "00:00:27",
      "key": "Agent-4",
      "tHoldTime": "00:09:51",
      "blindXferCount": "0",
      "tAvailableTime": "02:17:27",
      "wrapUpCount": "26",
      "avgOutDialWrapUpTime": "00:00:20",
      "tConsultRequestTime": "00:07:55",
      "totalOutdialCtqReqTime": "00:00:00",
      "ctqAnswerCount": "0",
      "outDialWrapUpCount": "213",
      "avgAvailableTime": "00:03:16",
      "loginCount": "9",
      "rowId": 15,
      "tConnectedTime": "04:48:54",
      "tNotRespondingTime": "00:00:00",
      "avgConnectedTime": "00:11:07",
      "outDialAvgHandleTime": "00:02:01",
      "avgOutDialHoldTime": "00:02:55",
      "tIdleTime": "22:48:25",
      "idleCount": "287",
      "tWrapUpTime": "00:41:19"
    },
    {
      "avgWrapUpTime": "00:03:15",
      "consultRequestCount": "1",
      "avgIdleTime": "00:04:08",
      "connectedCount": "15",
      "occupancy": "0.09",
      "outDialAttemptedCount": "2",
      "outDialConnectedCount": "2",
      "holdCount": "3",
      "consultCount": "1",
      "tConsultTime": "00:01:17",
      "ringingCount": "16",
      "outDialHoldCount": "0",
      "tConsultAnswerTime": "00:00:00",
      "agentToQueueRequestCount": "0",
      "outdialCtqAnswerCount": "0",
      "children": [
        {
          "avgWrapUpTime": "00:02:27",
          "consultRequestCount": "1",
          "avgIdleTime": "00:03:34",
          "connectedCount": "7",
          "occupancy": "0.1",
          "outDialAttemptedCount": "1",
          "outDialConnectedCount": "1",
          "holdCount": "1",
          "consultCount": "1",
          "tConsultTime": "00:01:17",
          "ringingCount": "7",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "21-Apr-16 12:27:04",
          "ctqRequestCount": "0",
          "finalLogoutTime": "21-Apr-16 21:12:15",
          "avgConsultTime": "00:01:17",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:16",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:01:17",
          "params": {
            "fname": "showAdrReport",
            "agentId": 41799,
            "beginTimestamp": 1461211200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461297600000,
            "timestamp": 1461211200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:16",
          "avgOutDialConnectedTime": "00:00:16",
          "agentToAgentXferCount": "1",
          "outDialRingingCount": "1",
          "avgHoldTime": "00:01:18",
          "tOutDialWrapUpTime": "00:00:16",
          "availableCount": "12",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "8",
          "icon": "date",
          "staffHours": "08:08:34",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "1",
          "avgRingingTime": "00:00:05",
          "avgHandleTime": "00:06:35",
          "tTalkTime": "00:27:40",
          "tOutDialRingingTime": "00:00:29",
          "avgOutDialRingingTime": "00:00:29",
          "consultAnswerCount": "0",
          "conferenceCount": "1",
          "tRingingTime": "00:00:33",
          "key": "21-Apr-2016",
          "tHoldTime": "00:01:18",
          "blindXferCount": "0",
          "tAvailableTime": "06:52:23",
          "wrapUpCount": "7",
          "avgOutDialWrapUpTime": "00:00:16",
          "tConsultRequestTime": "00:01:17",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "1",
          "avgAvailableTime": "00:34:22",
          "loginCount": "2",
          "rowId": 22,
          "tConnectedTime": "00:28:58",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:04:08",
          "outDialAvgHandleTime": "00:00:32",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:28:31",
          "idleCount": "8",
          "tWrapUpTime": "00:17:09"
        },
        {
          "avgWrapUpTime": "00:00:48",
          "consultRequestCount": "0",
          "avgIdleTime": "00:04:53",
          "connectedCount": "3",
          "occupancy": "0.05",
          "outDialAttemptedCount": "1",
          "outDialConnectedCount": "1",
          "holdCount": "1",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "3",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "22-Apr-16 12:38:15",
          "ctqRequestCount": "0",
          "finalLogoutTime": "22-Apr-16 20:59:25",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:01:34",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 41799,
            "beginTimestamp": 1461297600000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461384000000,
            "timestamp": 1461297600000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:01:34",
          "avgOutDialConnectedTime": "00:01:34",
          "agentToAgentXferCount": "1",
          "outDialRingingCount": "1",
          "avgHoldTime": "00:04:30",
          "tOutDialWrapUpTime": "00:00:09",
          "availableCount": "8",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "4",
          "icon": "date",
          "staffHours": "07:44:46",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:04",
          "avgHandleTime": "00:07:29",
          "tTalkTime": "00:15:33",
          "tOutDialRingingTime": "00:00:21",
          "avgOutDialRingingTime": "00:00:21",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:13",
          "key": "22-Apr-2016",
          "tHoldTime": "00:04:30",
          "blindXferCount": "1",
          "tAvailableTime": "06:40:57",
          "wrapUpCount": "3",
          "avgOutDialWrapUpTime": "00:00:09",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "1",
          "avgAvailableTime": "00:50:07",
          "loginCount": "2",
          "rowId": 23,
          "tConnectedTime": "00:20:03",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:06:41",
          "outDialAvgHandleTime": "00:01:43",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:39:05",
          "idleCount": "8",
          "tWrapUpTime": "00:02:24"
        },
        {
          "avgWrapUpTime": "00:05:25",
          "consultRequestCount": "0",
          "avgIdleTime": "00:03:48",
          "connectedCount": "5",
          "occupancy": "0.12",
          "outDialAttemptedCount": "0",
          "outDialConnectedCount": "0",
          "holdCount": "1",
          "consultCount": "0",
          "tConsultTime": "00:00:00",
          "ringingCount": "6",
          "outDialHoldCount": "0",
          "tConsultAnswerTime": "00:00:00",
          "agentToQueueRequestCount": "0",
          "outdialCtqAnswerCount": "0",
          "initialLoginTime": "26-Apr-16 12:26:41",
          "ctqRequestCount": "0",
          "finalLogoutTime": "26-Apr-16 21:03:13",
          "avgConsultTime": "00:00:00",
          "notRespondingCount": "0",
          "tOutDialConnectedTime": "00:00:00",
          "avgConsultAnswerTime": "00:00:00",
          "avgNotRespondingTime": "00:00:00",
          "avgConsultRequestTime": "00:00:00",
          "params": {
            "fname": "showAdrReport",
            "agentId": 41799,
            "beginTimestamp": 1461643200000,
            "session_id": "3e09bdd07ba973a336bd0ad1ef1b6952",
            "reportLevel": 2,
            "type": 3,
            "uri": "/hrsui/adr_report.htm",
            "endTimestamp": 1461729600000,
            "timestamp": 1461643200000
          },
          "totalCtqRequestTime": "00:00:00",
          "tOutDialTalkTime": "00:00:00",
          "avgOutDialConnectedTime": "00:00:00",
          "agentToAgentXferCount": "2",
          "outDialRingingCount": "0",
          "avgHoldTime": "00:00:36",
          "tOutDialWrapUpTime": "00:00:00",
          "availableCount": "9",
          "tOutDialHoldTime": "00:00:00",
          "totalOutdialCtqAnsTime": "00:00:00",
          "callsHandled": "5",
          "icon": "date",
          "staffHours": "08:02:58",
          "totalCtqAnswerTime": "00:00:00",
          "outdialCtqRequestCount": "0",
          "disconnectedCount": "0",
          "avgRingingTime": "00:00:04",
          "avgHandleTime": "00:11:26",
          "tTalkTime": "00:24:03",
          "tOutDialRingingTime": "00:00:00",
          "avgOutDialRingingTime": "00:00:00",
          "consultAnswerCount": "0",
          "conferenceCount": "0",
          "tRingingTime": "00:00:24",
          "key": "26-Apr-2016",
          "tHoldTime": "00:00:36",
          "blindXferCount": "2",
          "tAvailableTime": "06:46:21",
          "wrapUpCount": "6",
          "avgOutDialWrapUpTime": "00:00:00",
          "tConsultRequestTime": "00:00:00",
          "totalOutdialCtqReqTime": "00:00:00",
          "ctqAnswerCount": "0",
          "outDialWrapUpCount": "0",
          "avgAvailableTime": "00:45:09",
          "loginCount": "2",
          "rowId": 24,
          "tConnectedTime": "00:24:39",
          "tNotRespondingTime": "00:00:00",
          "avgConnectedTime": "00:04:56",
          "outDialAvgHandleTime": "00:00:00",
          "avgOutDialHoldTime": "00:00:00",
          "tIdleTime": "00:19:02",
          "idleCount": "5",
          "tWrapUpTime": "00:32:32"
        }
      ],
      "ctqRequestCount": "0",
      "avgConsultTime": "00:01:17",
      "notRespondingCount": "0",
      "tOutDialConnectedTime": "00:01:50",
      "avgConsultAnswerTime": "00:00:00",
      "avgNotRespondingTime": "00:00:00",
      "avgConsultRequestTime": "00:01:17",
      "totalCtqRequestTime": "00:00:00",
      "tOutDialTalkTime": "00:01:50",
      "avgOutDialConnectedTime": "00:00:55",
      "agentToAgentXferCount": "4",
      "outDialRingingCount": "2",
      "avgHoldTime": "00:02:08",
      "tOutDialWrapUpTime": "00:00:25",
      "availableCount": "29",
      "tOutDialHoldTime": "00:00:00",
      "totalOutdialCtqAnsTime": "00:00:00",
      "callsHandled": "17",
      "icon": "agent",
      "staffHours": "23:56:18",
      "totalCtqAnswerTime": "00:00:00",
      "outdialCtqRequestCount": "0",
      "disconnectedCount": "1",
      "avgRingingTime": "00:00:04",
      "avgHandleTime": "00:08:23",
      "tTalkTime": "01:07:17",
      "tOutDialRingingTime": "00:00:50",
      "avgOutDialRingingTime": "00:00:25",
      "consultAnswerCount": "0",
      "conferenceCount": "1",
      "tRingingTime": "00:01:10",
      "key": "Agent-5",
      "tHoldTime": "00:06:24",
      "blindXferCount": "3",
      "tAvailableTime": "20:19:41",
      "wrapUpCount": "16",
      "avgOutDialWrapUpTime": "00:00:12",
      "tConsultRequestTime": "00:01:17",
      "totalOutdialCtqReqTime": "00:00:00",
      "ctqAnswerCount": "0",
      "outDialWrapUpCount": "2",
      "avgAvailableTime": "00:42:03",
      "loginCount": "6",
      "rowId": 21,
      "tConnectedTime": "01:13:40",
      "tNotRespondingTime": "00:00:00",
      "avgConnectedTime": "00:04:55",
      "outDialAvgHandleTime": "00:01:07",
      "avgOutDialHoldTime": "00:00:00",
      "tIdleTime": "01:26:38",
      "idleCount": "21",
      "tWrapUpTime": "00:52:05"
    }
  ],
  "totalCount": 1,
  "statusMessage": "Success",
  "statusCode": 200
};
// namespace
var com = com || {};
com.xera = com.xera || {};
// i18n messages
var i18nMessages = i18nMessages || [];
// verify i18n messages
verifyI18nMessages();
function verifyI18nMessages() {
    
    if (i18nMessages.length > 0) { return; }
    
    i18nMessages['error.ajax.request'] = 'Communication Interruption';
    i18nMessages['error.session.expired'] = 'Your session has expired.';
    i18nMessages['label.count'] = 'Count';
    i18nMessages['label.logout'] = 'Logout';
    i18nMessages['label.monitor'] = 'Monitor';
    i18nMessages['label.auxiliary.data'] = 'Auxiliary Data';
}
/**
 * Externally trigger the display of DataTables' "processing" indicator.
 * 
 * @name processing()
 * @summary Show / hide the processing indicator via the API
 * @author [Allan Jardine](http://datatables.net)
 * @requires DataTables 1.10+
 * @param {boolean}
 *            show `true` to show the processing indicator, `false` to hide it.
 * 
 * @returns {DataTables.Api} Unmodified API instance
 * 
 * @example // Show a processing indicator for two seconds on initialisation var table = $('#example').DataTable( { processing: true } );
 * 
 * table.processing( true );
 * 
 * setTimeout( function () { table.processing( false ); }, 2000 );
 */
jQuery.fn.dataTable.Api.register('processing()', function(show) {
    return this.iterator('table', function(ctx) {
        ctx.oApi._fnProcessingDisplay(ctx, show);
    });
});
function getAjaxErrorMessage() {
    return i18nMessages['error.ajax.request'] + ' @ ' + new Date().toLocaleString();
}
function getSessionExpiredMessage() {
    return i18nMessages['error.session.expired'];
}
function isEmpty(value) {
    return (value == null || value.length === 0);
}
function isNotEmpty(value) {
    return (value != null && value.length > 0);
}
//Base render
function BaseRender() {
    this.htmlText = '';
    this.styleName = '';
    this.toolTipText = '';
    this.hyperLinkTpl = _.template('<a class="link" href="<%- url %>"> <%= text %> </a>');
    this.tooltipTpl = _.template('<span id="<%- id %>" class="<%- cssClass %>" data-toggle="tooltip" data-placement="left" title="<%= tooltipData %>"><%= text %></span>');
    this.auxTooltipTpl = _.template('<a role="button" data-toggle="popover" data-toggle="popover" title="<%= tipTitle %>" data-content="<%= content %>"><%= text %></a>');
    this.colorItemTpl = _.template('<span class="<%- cssClass %>"><%= text %></span>');
}
com.xera.grid = (function() {
    
    function Settings(settings) {
        // this.id = settings.id || "";
        this.url = settings.url;
        this.sortColumn = settings.sortColumn || "";
        this.sortOrder = settings.sortOrder || "";
        this.pageSize = settings.pageSize || 5;
        this.currentPage = settings.currentPage || 1;
        this.resetPageNumber = settings.resetPageNumber || 0;
        // this.polling = settings.polling || false;
        this.refreshInterval = settings.refreshInterval || 0;
        this.queryParams = settings.queryParams;
        this.height = settings.height || 550; // default
        this.containerId = settings.containerId || 'reportTable';
        this.tableId = '#xeraDataTable-' + this.containerId;
        this.colReorder = settings.colReorder === undefined ? true : settings.colReorder;
        this.meta = true;
        this.suspendPolling = false;
        this.statusMessageDiv = settings.statusMessageDiv || 'xeraGridErrorMsg';
        this.errorMessageDiv = '<div id="xeraGridErrorMsg" class="text-center error"></div>';
        // this.complexHeader = settings.complexHeader || false;
    }
    
    (function() {
        this.customizer = function(objValue, srcValue) {
            return _.isUndefined(objValue) ? srcValue : objValue;
        };
    }).call(Settings.prototype);
    
    function DataTable(settings) {
        this.settings = new com.xera.grid.Settings(settings);
        this.grid = null;
        this.autoRefreshVar = null;
        this.headerInfo = null;
        this.columns = [];
        this.colGroupMap = {};
        this.groupColMap = {};
        this.colIndexMap = {};
        this.colValueMap = {};
        this.cellRenderMap = {};
        this.complexHeader = false;
        this.defaults = _.partialRight(_.assignInWith, settings.customizer);
        this.tableTpl = _.template('<table id="<%- tableId %>" class="xera-grid table-striped table-bordered table-hover compact" cellspacing="0" width="100%"></table>');
        this.branchNodeTpl = _.template('<span class="indenter"><a href="#">&nbsp;</a></span><span class="<%- icon %>">&nbsp;<%= key %></span>');
        this.branchNodeLinkTpl = _.template('<span class="indenter"><a href="#">&nbsp;</a></span><span class="<%- icon %>">&nbsp;<a href="<%= link %>" class="link"><%= key %></a></span>');
        this.leafNodeTpl = _.template('<span class="<%- icon %>">&nbsp;<%= key %></span>');
        this.leafNodeLinkTpl = _.template('<span class="<%- icon %>">&nbsp;<a href="<%= link %>" class="link"><%= key %></a></span>');
        this.groupHeaderTpl = _.template('<th rowspan ="<%- rowSpan %>" colspan="<%- colSpan %>"><%= title %></th>');
        this.fieldHeaderTpl = _.template('<th ><%= title %></th>');
        this.tableHeaderRowTpl = _.template('<tr><%= html %></tr>');
        this.tableHeaderTpl = _.template('<thead><%= groupHeader %> <%= fieldHeader %></thead>');
        this.baseRender = new BaseRender();
        this.dtStartTime = new Date().getTime();
        this.treeTable = false;
        this.treeCollapsed = false;
        this.statusCode = 0;
        this.statusMessage = '';
    }
    
    (function() {
        
        this.createCellRenders = function() {
            this.cellRenderMap = {};
        };
        
        this.setColumns = function(data) {
            var self = this;
            this.createCellRenders();
            // if (!this.meta) { return; }
            // reset columns
            if (data.metaData && $.type(data.metaData.fields) === "array") {
                this.columns = [];
                this.colIndexMap = {};
                this.colValueMap = {};
                this.colGroupMap = {};
                this.groupColMap = {};
                var col;
                _.forEach(data.metaData.fields, function(field, index) {
                    col = new Object();
                    col.data = field.data;
                    col.name = field.data;
                    col.title = field.header;
                    col.orderable = field.sortable;
                    col.width = field.width;
                    col.className = field.align + '-align';
                    col.defaultContent = "";
                    // set column render
                    self.setColumnRender(field, col);
                    self.colIndexMap[index] = col.data;
                    self.colValueMap[col.data] = index;
                    self.columns.push(col);
                });
                this.meta = false;
            } else {
                console.debug("Grid update, so not creating/updating columns");
            }
        };
        this.setColumnRender = function(field, col) {
            var self = this;
            // console.debug('Column Render %s, Header', field.hasOwnProperty("itemRender"), field.header);
            if (!field.hasOwnProperty("itemRender") && field.header !== 'Date' && field.header !== 'Month' && field.header !== 'Time') { return; }
            col.createdCell = function(td, cellData, rowData, row, col) {
                var table = $(self.settings.tableId).DataTable();
                // console.debug(table.row(row).data());
                var itemRender = self.cellRenderMap[field.itemRender];
                itemRender = itemRender == null && (field.header == 'Date' || field.header == 'Month' || field.header == 'Time') ? self.cellRenderMap['timeStampItemRender'] : itemRender;
                if (itemRender != null) {
                    var params = itemRender.getCellData(td, field.data, rowData);
                    // set cell data
                    $(td).html(itemRender.getHtmlText());
                    // add cell style
                    $(td).addClass(itemRender.getStyleName());
                    // TODO: action images
                    // tooltip
                    // attach event listener
                }
            };
        };
        this.setMetadata = function(data) {
            var self = this;
            // find table columns
            this.setColumns(data);
            
            // find table column groups
            if (!data.metaData || $.type(data.metaData.groups) !== "array") {
                this.complexHeader = false;
                this.headerInfo = null;
                return;
            }
            this.complexHeader = true;
            var groupHeaderMap = _.keyBy(data.metaData.groups, 'groupKey');
            var headerMap = {};
            _.forEach(groupHeaderMap, function(value, key) {
                headerMap[key + 'Gp'] = value;
            });
            
            var cols = [];
            var groupMap = new Object(), groups = [], fields = [], group, key, title;
            _.forEach(data.metaData.fields, function(col, index) {
                if (col.groupKey != null) {
                    key = col.groupKey + 'Gp';
                    fields.push({
                        "title" : title
                    });
                    // group columns
                    cols = self.groupColMap[col.groupKey];
                    if (cols == null) {
                        cols = [];
                        self.groupColMap[col.groupKey] = cols;
                    }
                    cols.push(col.data);
                    self.colGroupMap[col.data] = col.groupKey;
                } else {
                    key = col.data;
                }
                group = groupMap[key];
                if (group == null) {
                    title = headerMap[key] != null ? headerMap[key].header : col.header;
                    group = {
                        "title" : title,
                        "rowSpan" : 2,
                        "colSpan" : 0
                    };
                    groupMap[key] = group;
                } else {
                    group.rowSpan = 0;
                    group.colSpan += 1;
                }
            });
            
            _.forEach(groupMap, function(value, key) {
                groups.push(value);
            });
            
            // console.debug("Group Header: ", groups);
            this.headerInfo = {
                "groups" : groups,
                "fields" : fields
            };
        };
        
        this.flattenDeep = function(rows, list, parentId, level) {
            var self = this;
            var newItem, nodeId, hasParent = true, hasChildren = false;
            list = list || [];
            // parentId || (parentId = '', hasParent = false);
            level = level || 0;
            self.treeTable = level > 0;
            
            if (!parentId && parentId != '0') {
                parentId = '';
                hasParent = false;
            }
            
            _.forEach(rows, function(item) {
                hasChildren = item.children && item.children.length > 0 ? true : false;
                newItem = _.omit(item, "children");
                nodeId = hasParent ? parentId + '-' + newItem.rowId : newItem.rowId;
                // console.debug('parentId : ', parentId);
                // console.debug('nodeId : ', nodeId);
                self.defaults(newItem, {
                    "nodeId" : nodeId,
                    "parentId" : parentId,
                    "level" : level,
                    "hasChildren" : hasChildren,
                    "nodeClass" : hasChildren ? 'branch' : 'leaf'
                });
                // console.debug("%s, %s, %d", newItem.nodeId, newItem.parentId, newItem.level);
                list.push(newItem);
                if (hasChildren) {
                    self.flattenDeep(item.children, list, nodeId, level + 1);
                }
                // list.push(_.flatten(_.pick(item, ['children']).children));
            });
        };
        
        this.createGroupHeader = function() {
            var self = this;
            var header = '';
            _.forEach(this.headerInfo.groups, function(group, index) {
                // console.debug("group --------->", group);
                // group.rowSpan = group.rowSpan || 0;
                // group.colSpan = group.colSpan || 0;
                // group.title = group.title || '';
                group.colSpan = group.rowSpan == 0 ? group.colSpan + 1 : group.colSpan;
                header = header + self.groupHeaderTpl(group);
            });
            return this.tableHeaderRowTpl({
                'html' : header
            });
        };
        
        this.createFieldHeader = function() {
            var self = this;
            var header = '';
            _.forEach(this.headerInfo.fields, function(field, index) {
                header = header + self.fieldHeaderTpl(field);
            });
            return this.tableHeaderRowTpl({
                'html' : header
            });
        };
        
        this.createHeader = function() {
            var groupHeader = this.createGroupHeader();
            var fieldHeader = this.createFieldHeader();
            // console.debug('groupHeader : ', groupHeader);
            // console.debug('fieldHeader : ', fieldHeader);
            return this.tableHeaderTpl({
                "groupHeader" : groupHeader,
                "fieldHeader" : fieldHeader
            });
        };
        
        this.toggleNode = function(node) {
            var nodeId = node.attr('data-tr-id');
            var isCollapsed = node.hasClass('collapsed');
            isCollapsed = node.hasClass('expanded') ? false : isCollapsed;
            // console.debug('Node %s Closed : ', node, isCollapsed);
            // toggle child nodes display
            var childParentId = nodeId + '-';
            // console.debug('childParentId:', childParentId);
            $('.xera-grid tr[data-tr-parent-id=' + nodeId + ']').toggle(isCollapsed);
            $('.xera-grid tr[data-tr-parent-id^=' + childParentId + ']').toggle(isCollapsed);
            // add or remove
            if (isCollapsed) {
                node.removeClass("collapsed").addClass("expanded");
            } else {
                node.removeClass("expanded").addClass("collapsed");
            }
        };
        this.expandAll = function() {
            this.treeCollapsed = false;
            $('.xera-grid tr.branch').removeClass("collapsed").addClass("expanded");
            $('.xera-grid tr[data-tr-parent-id]').show();
            $('#toggleIcon').removeClass('fa-plus').addClass('fa-minus');
            // $('#' + this.settings.tableId).DataTable().columns.adjust();
        };
        this.collapseAll = function() {
            this.treeCollapsed = true;
            $('.xera-grid tbody tr[data-tr-parent-id != ""]').hide();
            $('.xera-grid tr.branch').removeClass("expanded").addClass("collapsed");
            $('#toggleIcon').removeClass('fa-minus').addClass('fa-plus');
        };
        
        this.transform = function(data) {
            data = data && $.type(data) === "string" ? JSON.parse(data) : data;
            var self = this;
            $('#' + this.settings.statusMessageDiv).html('');
            // var start = new Date().getTime();
            this.setMetadata(data);
            this.statusCode = data.statusCode;
            this.statusMessage = data.statusMessage;
            
            var result = new Object();
            _.forEach(data, function(value, key) {
                result[key] = value;
            });
            var summaryRow = data.summaryrow;
            // _.forEach(this.columns, function(col, index) {
            // console.debug('key %s, value %s', col.data, summaryRow[col.data]);
            // summaryRow[col.data] = summaryRow[col.data] || '';
            // });
            
            // set columns
            // result.columns = this.columns;
            // include summaryRow as first record to dataset.
            var rows = data.rows || [];
            if (summaryRow != null) {
                rows = [ summaryRow ].concat(rows);
            }
            // result.data = [ summaryRow ].concat(rows);
            var list = [];
            this.flattenDeep(rows, list);
            $('.toggle-tree').toggle(this.treeTable);
            // var flattenResult = _.flatten(list);
            // var duration = new Date().getTime() - start;
            // console.debug(flattenResult);
            // console.debug("Time took to transform %d rows is %d ms", list.length, duration)
            // result.data = list;
            // result.data = [ summaryRow ].concat(list);
            // update rows and summaryRow
            result.rows = list;
            // summary row
            result.summaryRow = summaryRow;
            // total number of records
            // console.debug('data.totalCount : %d, result.rows.length : %d', data.totalCount, result.rows.length);
            var totalRows = result.rows.length == 0 ? 1 : result.rows.length;
            // result.pageSize = totalRows;
            // result.recordsTotal = totalRows;
            result.pageSize = (data.totalCount == undefined || data.totalCount <= 1) ? totalRows : data.pageSize;
            result.recordsTotal = (data.totalCount == undefined || data.totalCount <= 1) ? totalRows : data.recordsTotal;
            result.recordsFiltered = result.recordsTotal;
            return result;
        };
        this.showStatus = function(message) {
            // $('#' + this.settings.tableId).html(message);
            $('#' + this.settings.statusMessageDiv).html(message);
        };
        this.clearStatus = function() {
            $('#' + this.settings.statusMessageDiv).html('');
        };
        
        this.isValidData = function(data) {
            console.debug('Data :', data);
            this.clearStatus();
            if (data && $.type(data) === "string" && data.indexOf("session has expired") > 0) {
                this.showStatus(i18nMessages['error.session.expired']);
                return false;
            }
            // verify status code
            if (!data || data.statusCode >= 300) {
                this.showStatus(data ? data.statusMessage : "N/A");
                return false;
            } else {
                return true;
            }
        };
        this.handleSuccess = function(data) {
            if (!this.isValidData(data)) { return; }
            var self = this;
            // transform the data
            var result = this.transform(data);
            if (this.grid != null) {
                var table = $(this.settings.tableId).DataTable();
                var api = $(this.settings.tableId).dataTable();
                // table.destroy();
                $(this.settings.tableId).empty(); // empty in case the columns change
                this.settings.resetPageNumber = true;
                this.grid = null;
            }
            
            // create or update grid
            // if (this.grid == null) {
            var tableHtml = this.tableTpl({
                "tableId" : this.settings.tableId.substr(1)
            });
            $('#' + this.settings.containerId).html(tableHtml);
            // $('#' + this.settings.tableId).removeClass('display').addClass(' table-striped table-bordered compact ');
            if (this.complexHeader == true) {
                $(this.settings.tableId).append(this.createHeader());
                // $("#xeraDataTable").append('<thead><tr><th rowspan="2">Entry Point</th><th rowspan="2">Date</th><th colspan="2"
                // class="center-align">Metrics</th></tr><tr><th>Total</th><th>New</th></tr></thead>');
            }
            $(this.settings.tableId).append("<tfoot><tr class='tfoot'></tr></tfoot>");
            _.forEach(self.columns, function(column, index) {
                $(".tfoot").append("<th></th>");
            });
            // } else {
            // }
            this.grid = $(this.settings.tableId).dataTable({
                "autoWidth" : false,
                "lengthChange" : false,
                "paging" : true,
                "pageLength" : this.settings.pageSize,
                "pagingType" : "full_numbers",
                "scrollX" : true,
                "scrollY" : this.settings.height,
                // "scrollCollapse" : true,
                // "stateSave" : true,
                // "stateDuration" : 0,
                "searching" : false,
                "columns" : self.columns,
                "data" : result.rows,
                // "sDom" : 'Rlfrtip',
                "dom" : "Z<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row xera-grid-pagination'<'col-sm-2'i><'col-sm-2'<'#xeraTableLastUpdated'>><'col-sm-6'p><'col-sm-2'<'#xeraTableToolbar'>>>",
                // "dom": "<'row'<'col-sm-5'i><'col-sm-7'p>>",
                // "dom": '<"dtwcHeader fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"<"#reloadBtn">lfr>t<"fg-toolbar
                // ui-toolbar
                // ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>',
                "colResize" : {
                    "resizeCallback" : function(column) {
                        console.debug("Column Resized");
                    }
                },
                "serverSide" : true,
                "ajax" : {
                    "url" : this.settings.url + "?ts=" + new Date().getTime(),
                    "type" : "POST",
                    "data" : function(d) {
                        self.dtStartTime = new Date().getTime();
                        d.columns = [];
                        // set query params
                        if (self.settings.queryParams) {
                            _.forEach(self.settings.queryParams, function(value, key) {
                                d[key] = value;
                            });
                        }
                        // resetPageNumber
                        // currentPage
                        // sortOrder
                        // sortColumn
                        var api = $(self.settings.tableId).dataTable().api();
                        var sortInfo = api.order();
                        // console.debug('page', api.page());
                        // console.debug('Sort info', sortInfo);
                        var sortColumnArray = [];
                        var sortOrderArray = [];
                        if ($.type(sortInfo) === "array") {
                            _.forEach(sortInfo, function(info, index) {
                                // console.debug('order by :', info[0]);
                                sortColumnArray.push(self.colIndexMap[info[0]]);
                                sortOrderArray.push(info[1]);
                            });
                        }
                        d.resetPageNumber = self.settings.resetPageNumber;
                        d.currentPage = api.page() + 1;
                        d.sortColumn = sortColumnArray.join();
                        d.sortOrder = sortOrderArray.join();
                        d.refreshTable = 1;
                        console.debug('Request parameters : ', d);
                        // var url = self.settings.url + "?ts=" + new Date().getTime() + "&meta=false";
                        // if (self.settings.queryParams) {
                        // _.forEach(self.settings.queryParams, function(value, key) {
                        // url = url + "&" + key + "=" + value;
                        // });
                        // }
                        // url = url + "&refreshTable=1";
                        // url = url + "&sortColumn=" + d.sortColumn;
                        // url = url + "&sortOrder=" + d.sortOrder;
                        // url = url + "&currentPage=" + d.currentPage;
                        // url = url + "&resetPageNumber=" + self.settings.resetPageNumber;
                        // api.ajax.url(url);
                    },
                    "dataSrc" : function(data) {
                        data = gridData;
                        // $('.dataTables_info').
                        var start = new Date().getTime();
                        
                        if (!self.isValidData(data)) { return null; }
                        // transform the response data
                        result = self.transform(data);
                        // set records details
                        var api = $(self.settings.tableId).dataTable().api();
                        api.page.len(result.pageSize);
                        data.recordsTotal = result.recordsTotal;
                        data.recordsFiltered = result.recordsFiltered;
                        
                        var sortColumnArray = $.type(result.sortColumn) === 'string' ? result.sortColumn.split(',') : [];
                        var sortOrderArray = $.type(result.sortOrder) === 'string' ? result.sortOrder.split(',') : [];
                        var sortInfo = [];
                        _.forEach(sortColumnArray, function(value, index) {
                            sortInfo[index] = [];
                            sortInfo[index][0] = self.colValueMap[value];
                            sortInfo[index][1] = sortOrderArray[index];
                        });
                        // console.debug('Sort Info (Result): ', sortInfo);
                        // api.order(sortInfo);
                        // $("#reportTabledata").DataTable().page.len(obj.pageLength);
                        var duration = new Date().getTime() - start;
                        console.debug("Time took to transform %d rows is %d ms", result.rows.length, duration);
                        return result.rows;
                    },
                    "error" : function(jqXHR, textStatus, errorThrown) {
                        var api = $(self.settings.tableId).dataTable().api();
                        if (api != null) {
                            api.processing(false);
                        }
                        console.debug('ajax textStatus : %s, ajax error : ', textStatus, errorThrown);
                        self.showStatus(getAjaxErrorMessage());
                        // console.debug('*** Error *** : ', getAjaxErrorMessage());
                    }
                },
                "deferLoading" : result.recordsTotal,
                "createdRow" : function(row, data, dataIndex) {
                    // set data-tr-id attribute and node class
                    var key = self.columns != null ? self.columns[0].data : 'key';
                    var cell = $(row).find('td:eq(0)');
                    var hasLinkParam = data.hasOwnProperty("link_param") && !isEmpty(data['link_param']);
                    var tplData = {
                        "icon" : data.hasOwnProperty("iconClass") ? data.iconClass : data.icon,
                        "key" : cell.html(),
                        "hasLinkParam" : hasLinkParam,
                        "link" : data['link_param']
                    };
                    // if (data.parentId != '') {
                    $(row).attr('data-tr-parent-id', data.parentId);
                    // }
                    $(row).attr('data-tr-id', data.nodeId).addClass(data.nodeClass);
                    $(row).find('td:eq(0)').addClass('level-' + data.level);
                    
                    // console.log('has link param :%s', hasLinkParam);
                    $(row).find('td:eq(0)').html(data.hasChildren ? self.branchNodeTpl(tplData) : (hasLinkParam ? self.leafNodeLinkTpl(tplData) : self.leafNodeTpl(tplData)));
                    // console.log('row index :' , dataIndex);
                    
                    if (dataIndex == 0 && result.summaryRow != null) {
                        // add bold class to total row
                        $(row).addClass('summary-row');
                    }
                    // Set the data-status attribute, and add a class
                    // $(row).find('td:eq(0)').attr('data-status', data.status ? 'locked' : 'unlocked').addClass('asset-context box');
                    // '<span class="indenter"><a href="#" title="Expand">&nbsp;</a></span><span class="inboundEntrypoint">Tiger Nixon</span>'
                },
                "footerCallback" : function(row, data, start, end, display) {
                    // console.debug('*** footerCallback ***');
                    var api = this.api();
                    if (result.summaryRow != null) {
                        _.forEach(self.columns, function(column, index) {
                            // console.debug(column);
                            $(api.column(column.name + ':name').footer()).html(result.summaryRow[column.data]);
                        });
                    }
                },
                "initComplete" : function(settings, json) {
                    console.debug('initComplete - DataTables has finished its initialisation.');
                },
                "drawCallback" : function(settings, json) {
                    console.debug('*** drawCallback ***, statusCode : %d', result.statusCode);
                    if (self.statusCode == 200) {
                        self.expandAll();
                        $('.xera-grid tr span.indenter a').click(function(e) {
                            self.toggleNode($(this).closest("tr"));
                            e.preventDefault();
                        });
                    } else {
                        $('.dataTables_empty').html(self.statusMessage);
                    }
                    if (result.hasOwnProperty('firstRow')) {
                        $('#xeraTableLastUpdated').html(result.firstRow);
                    }
                    if (self.settings.refreshInterval > 0) {
                        $('#xeraTableLastUpdated').html('Last Updated : ' + new Date().toLocaleTimeString());
                    }
                    $(self.settings.tableId).DataTable().columns.adjust();
                    var duration = new Date().getTime() - self.dtStartTime;
                    console.debug("Time took to transform and render table is %d ms", duration);
                    self.addRowSelection();
                    $('[data-toggle="popover"]').popover({
                        "container" : "body",
                        "html" : true,
                        "placement" : "auto",
                        "trigger" : "hover"
                    });
                    $('[data-toggle="tooltip"]').tooltip();
                    $('.popover').remove();
                },
                "processing" : true,
                "language" : {
                    "info" : "Showing page _PAGE_ of _PAGES_",
                    "infoEmpty" : "No records available",
                    "processing" : "<i class='fa fa-refresh'></i> Loading..."
                },
                "fixedColumns" : {
                    "leftColumns" : 1
                }
            });
            $('#xeraTableLastUpdated').addClass('dataTables_info pull-left');
            $('#xeraTableToolbar')
                    .addClass('dataTables_paginate pull-left')
                    .html(
                            '<ul class="pagination"><li class="paginate_button"><a href="#" id="btnReload"><i class="fa fa-refresh"></i>Reload</a></li><li class="paginate_button toggle-tree"><a href="#" id="btnToggle"><i class="fa fa-minus" id="toggleIcon"></i>Toggle</a></li></ul>');
            if (this.settings.colReorder == true) {
                console.debug("col reorder : %s", this.settings.colReorder);
                // ColReorder - allow columns to be reorder
                new $.fn.dataTable.ColReorder(this.grid, {
                    // options
                    "fixedColumnsLeft" : 1,
                    "realtime" : false,
                    "fnReorderCallback" : function() {
                        var api = $(self.settings.tableId).dataTable().api();
                        var colIndexes = api.colReorder.order();
                        
                        var usedCols = {};
                        var colOrder = [];
                        var colName;
                        _.each(colIndexes, function(colIndex, index) {
                            colName = self.colIndexMap[colIndex];
                            // console.debug('column name:', colName);
                            if (!usedCols.hasOwnProperty(colName)) {
                                var groupName = self.colGroupMap[colName];
                                if (isEmpty(groupName)) {
                                    colOrder.push(colName);
                                    usedCols[colName] = colName;
                                } else {
                                    var gpCols = self.groupColMap[groupName];
                                    _.each(gpCols, function(cname, index) {
                                        colOrder.push(cname);
                                        usedCols[cname] = cname;
                                    });
                                }
                            }
                        });
                        self.settings.queryParams.reorderedColumns = colOrder.join();
                        console.debug('Updated column order :', colOrder);
                        api.colReorder.order(colOrder);
                        console.debug('col-reorder :', colIndexes)
                        // self.init();
                        // self.settings.queryParams.reorderedColumns = '';
                    }
                });
            }
            $('.toggle-tree').hide();
            $('#btnToggle').click(function(e) {
                e.preventDefault();
                if (self.treeCollapsed == true) {
                    self.expandAll();
                } else {
                    self.collapseAll();
                }
            });
            // $('#btnCollapseAll').click(function() {
            // self.collapseAll();
            // });
            $('#btnReload').click(function(e) {
                e.preventDefault();
                self.reloadTable();
            });
            this.doAutoRefresh();
            this.handleResize();
            // register window resize
            $(window).resize(function() {
                self.handleResize();
            });
        };
        this.addRowSelection = function() {
            var table = $(this.settings.tableId).DataTable();
            $(this.settings.tableId).find("tbody>tr").click(function() {
                if ($(this).hasClass('success')) {
                    $(this).removeClass('success');
                } else {
                    table.$('tr.success').removeClass('success');
                    $(this).addClass('success');
                }
            });
        };
        this.handleError = function(jqXHR, textStatus, errorThrown) {
            this.showStatus(getAjaxErrorMessage());
            // this.doAutoRefresh();
        };
        this.sendRequest = function() {
           // com.xera.ajax.getJson(this.settings.url, this.settings.queryParams, this.handleSuccess, this.handleError, this);
           this.handleSuccess(gridData);
        };
        this.handleResize = function() {
            var isMaximize = $('#' + this.settings.containerId).hasClass('reportTableMaximized');
            console.debug('isMaximize : ', isMaximize);
            // var graphHeight = com.xera.util.getContainerHeight('graphTable');
            var headerHeight = $('#header').height();
            var footerHeight = $('#footer').height();
            var tableHeaderHeight = $('.dataTables_scrollHead').height();
            var tableFooterHeight = $('.xera-grid-pagination').height();
            var tableSummaryHeight = $('.tfoot').height();
            var winBarHeight = $('.win_bar').height();
            var reportSelectHeight = $('#reportSelection').height();
            var height = $(window).height() - headerHeight - footerHeight - tableHeaderHeight - tableFooterHeight - tableSummaryHeight - winBarHeight - reportSelectHeight - 14;
            if (!isMaximize) {
                height -= 18;
            }
            $('div.dataTables_scrollBody').height(height);
            $(this.settings.tableId).DataTable().columns.adjust();
        };
        
        this.doAutoRefresh = function() {
            var self = this;
            // console.debug('Polling frequency :', this.settings.refreshInterval);
            // console.debug('Polling for data (auto refresh) : ', new Date());
            var api = $(this.settings.tableId).dataTable().api();
            
            if (this.settings.refreshInterval > 0) {
                // api.processing(true);
                // $('.dataTables_processing').show();
                // api.processing(false);
                this.reloadTable();
                api.processing(false);
                // api.processing(false);
                // clearTimeout(this.autoRefreshVar);
                setTimeout(function() {
                    self.doAutoRefresh();
                }, this.settings.refreshInterval);
            }
        };
        this.reloadTable = function() {
            if (this.settings.suspendPolling == false) {
                var api = $(this.settings.tableId).dataTable().api();
                if (api) {
                    api.ajax.reload();
                }
            }
        };
        this.addErrorMessageDiv = function() {
            if ($("#" + this.settings.statusMessageDiv).length == 0) {
                $("#" + this.settings.containerId).after(this.settings.errorMessageDiv);
                // console.debug('### error div ### container :%s, error-div : %s ', this.settings.containerId, this.settings.errorMessageDiv);
            }
        };
        this.init = function() {
            this.settings.queryParams.meta = true;
            this.addErrorMessageDiv();
            this.sendRequest();
        };
        this.update = function(params) {
            this.settings.url = params['uri'];
            this.settings.queryParams = params;
            this.init();
        };
    }).call(DataTable.prototype);
    
    return {
        Settings : Settings,
        DataTable : DataTable
    };
    
}());
        $(document).ready(function() {
            var xeraGrid = new com.xera.grid.DataTable({
                'url' : './resources/data/test-data.json',
                'containerId' : 'reportTable',
                'colReorder' : true,
                'refreshInterval' : 0,
                'queryParams' : {
                    'key-1' : 'value-1',
                    'key-2' : 'value-2'
                }
            });
            xeraGrid.init();
        });
1 error 17 warnings
Line 2802: The object literal notation {} is preferable.
Line 2829: ['timeStampItemRender'] is better written in dot notation.
Line 2861: The object literal notation {} is preferable.
Line 2948: Use '===' to compare with '0'.
Line 3018: The object literal notation {} is preferable.
Line 3051: Use '===' to compare with '0'.
Line 3054: Use '===' to compare with 'undefined'.
Line 3055: Use '===' to compare with 'undefined'.
Line 3103: Use '===' to compare with 'true'.
Line 3232: ['link_param'] is better written in dot notation.
Line 3237: ['link_param'] is better written in dot notation.
Line 3249: Use '===' to compare with '0'.
Line 3315: Use '===' to compare with 'true'.
Line 3349: Missing semicolon.
Line 3358: Use '===' to compare with 'true'.
Line 3436: Use '===' to compare with 'false'.
Line 3444: Use '===' to compare with '0'.
Line 3455: ['uri'] is better written in dot notation.
Output 300px

This bin was created anonymously and its free preview time has expired. Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers