Skip to content

Instantly share code, notes, and snippets.

@machv
Last active August 29, 2015 14:14
Show Gist options
  • Save machv/946207870f8fe0cf0daa to your computer and use it in GitHub Desktop.
Save machv/946207870f8fe0cf0daa to your computer and use it in GitHub Desktop.
Mediatel WallBoard
{
"LayoutType" : "PANEL",
"PanelRows" : "2",
"PanelCols" : "4",
"RowDataSQL" : "",
"FontSize" : "1.0",
"DBType" : "MICROSOFT",
"DBConnStr" : "data source=APSHODMS;initial catalog=MediatelAutodialer;persist security info=True;user id=mediatel;password=---",
"WebService" : "http://172.26.9.4:8888/RealTimeWS.asmx",
"DataGenerators" : [
{ "Type" : "WEBSERVICE", "Command" : "", "Refresh" : 1 },
{ "Type" : "SQLQUERY", "Command" : "SELECT (LeadsAvailable + 0) AS LeadsAvailable FROM LeadsAvailable", "Refresh" : 30 },
{ "Type" : "SQLQUERY", "Command" : "SELECT COALESCE(SUM(CASE WHEN (CallType IN (3, 4) AND DialerResult IN(1026)) THEN 1 ELSE 0 END) + SUM(CASE WHEN CallType = 1 THEN 1 ELSE 0 END), 0) + 0 AS NO_CALLS_CONNECTED_TODAY FROM QueueCallTrace WHERE CallStartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()));", "Refresh" : 1 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS NO_CALLS_DROPPED, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 1 OR t.CALLTYPE = 3) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))\n\n\n ", "Refresh" : 30 }
],
"Parameters" : [
{ "Title" : "Agents in", "Value" : "REALTIME-AGENTS-LOGGED", "RealtimeQueues" : "", "Alert" : "['lesser','5','color:red']" },
{ "Title" : "Agents free", "Value" : "REALTIME-AGENTS-FREE", "RealtimeQueues" : "", "Alert" : "['lesser','2','color:red']" },
{ "Title" : "Agents in call", "Value" : "REALTIME-AGENTS-CALL", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Agents in pause", "Value" : "REALTIME-AGENTS-PAUSE", "RealtimeQueues" : "", "Alert" : "['lesser','3','color:green'],\n['lesser','6','color:yellow']" },
{ "Title" : "Waiting clients", "Value" : "REALTIME-QUEUES-CLIENTSWAITING", "RealtimeQueues" : "Specifiy queues names separated by commas...", "Alert" : "['lesser','1','color:green'],\n['greater','0','color:red']," },
{ "Title" : "Avg wait before drop", "Value" : "AVG_WAIT_DROP", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Remaining leads", "Value" : "LeadsAvailable", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls connected today", "Value" : "NO_CALLS_CONNECTED_TODAY", "RealtimeQueues" : "", "Alert" : "" }
]
}
{
"LayoutType" : "PANEL",
"PanelRows" : "2",
"PanelCols" : "3",
"RowDataSQL" : "",
"FontSize" : "1.0",
"DBType" : "MICROSOFT",
"DBConnStr" : "data source=APSHODMS;initial catalog=MediatelAutodialer;persist security info=True;user id=mediatel;password=---",
"WebService" : "http://172.26.9.4:8888/RealTimeWS.asmx",
"DataGenerators" : [
{ "Type" : "WEBSERVICE", "Command" : "", "Refresh" : 1 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n COALESCE(SUM(CASE WHEN CallType = 1 THEN 1 ELSE 0 END), 0) + 0 AS CZ_NO_CALLS_IN_TODAY,\n COALESCE(SUM(CASE WHEN CallType IN (3, 4) THEN 1 ELSE 0 END), 0) + 0 AS CZ_NO_CALLS_OUT_TODAY,\n COALESCE(SUM(CASE WHEN (CallType IN (3, 4) AND DialerResult IN(1026)) THEN 1 ELSE 0 END), 0) + 0 AS CZ_NO_CALLS_OUT_CONNECTED_TODAY,\n COALESCE(SUM(CASE WHEN WaitTime > 20.0 AND ExitPoint in (4,9) THEN 1 ELSE 0 END), 0) AS CZ_NO_ABANDONED_20SEC_TODAY\nFROM QueueCallTrace ct\nLEFT JOIN Queues q ON q.QUEUEID = ct.QueueID\nWHERE CallStartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) AND q.QUEUEDESCRIPTION LIKE '%Cz%'", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS CZ_NO_CALLS_DROPPED_OUT, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP_SK\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 3) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))\n AND QUEUEDESCRIPTION LIKE '%Cz%'", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT COUNT(DISTINCT CLIENT_ID) AS CZ_LEADS_AVAILABLE FROM aps.LeadsAvailableDetailed WHERE QUEUEDESCRIPTION LIKE '%Cz%'", "Refresh" : 15 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS CZ_NO_CALLS_DROPPED_IN, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP_SK\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 1) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))\n AND QUEUEDESCRIPTION LIKE '%Cz%'\n\n ", "Refresh" : 5 }
],
"Parameters" : [
{ "Title" : "Calls in today", "Value" : "CZ_NO_CALLS_IN_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out today", "Value" : "CZ_NO_CALLS_OUT_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out connected", "Value" : "CZ_NO_CALLS_OUT_CONNECTED_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (in)", "Value" : "CZ_NO_CALLS_DROPPED_IN", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (out)", "Value" : "CZ_NO_CALLS_DROPPED_OUT", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Remaining leads", "Value" : "CZ_LEADS_AVAILABLE", "RealtimeQueues" : "", "Alert" : "" }
]
}
{
"LayoutType" : "PANEL",
"PanelRows" : "2",
"PanelCols" : "3",
"RowDataSQL" : "",
"FontSize" : "1.0",
"DBType" : "MICROSOFT",
"DBConnStr" : "data source=APSHODMS;initial catalog=MediatelAutodialer;persist security info=True;user id=mediatel;password=---",
"WebService" : "http://172.26.9.4:8888/RealTimeWS.asmx",
"DataGenerators" : [
{ "Type" : "WEBSERVICE", "Command" : "", "Refresh" : 1 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n COALESCE(SUM(CASE WHEN CallType = 1 THEN 1 ELSE 0 END), 0) + 0 AS SK_NO_CALLS_IN_TODAY,\n COALESCE(SUM(CASE WHEN CallType IN (3, 4) THEN 1 ELSE 0 END), 0) + 0 AS SK_NO_CALLS_OUT_TODAY,\n COALESCE(SUM(CASE WHEN (CallType IN (3, 4) AND DialerResult IN(1026)) THEN 1 ELSE 0 END), 0) + 0 AS SK_NO_CALLS_OUT_CONNECTED_TODAY,\n COALESCE(SUM(CASE WHEN WaitTime > 20.0 AND ExitPoint in (4,9) THEN 1 ELSE 0 END), 0) AS SK_NO_ABANDONED_20SEC_TODAY\nFROM QueueCallTrace ct\nLEFT JOIN Queues q ON q.QUEUEID = ct.QueueID\nWHERE CallStartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) AND q.QUEUEDESCRIPTION LIKE '%Sk%'", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS SK_NO_CALLS_DROPPED_OUT, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP_SK\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 3) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))\n AND QUEUEDESCRIPTION LIKE '%Sk%'", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT COUNT(DISTINCT CLIENT_ID) AS SK_LEADS_AVAILABLE FROM aps.LeadsAvailableDetailed WHERE QUEUEDESCRIPTION LIKE '%Sk%'", "Refresh" : 15 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS SK_NO_CALLS_DROPPED_IN, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP_SK\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 1) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))\n AND QUEUEDESCRIPTION LIKE '%Sk%'\n\n ", "Refresh" : 5 }
],
"Parameters" : [
{ "Title" : "Calls in today", "Value" : "SK_NO_CALLS_IN_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out today", "Value" : "SK_NO_CALLS_OUT_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out connected", "Value" : "SK_NO_CALLS_OUT_CONNECTED_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (in)", "Value" : "SK_NO_CALLS_DROPPED_IN", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (out)", "Value" : "SK_NO_CALLS_DROPPED_OUT", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Remaining leads", "Value" : "SK_LEADS_AVAILABLE", "RealtimeQueues" : "", "Alert" : "" }
]
}
{
"LayoutType" : "PANEL",
"PanelRows" : "2",
"PanelCols" : "3",
"RowDataSQL" : "",
"FontSize" : "1.0",
"DBType" : "MICROSOFT",
"DBConnStr" : "data source=APSHODMS;initial catalog=MediatelAutodialer;persist security info=True;user id=mediatel;password=---",
"WebService" : "http://172.26.9.4:8888/RealTimeWS.asmx",
"DataGenerators" : [
{ "Type" : "WEBSERVICE", "Command" : "", "Refresh" : 1 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n COALESCE(SUM(CASE WHEN CallType = 1 THEN 1 ELSE 0 END), 0) + 0 AS NO_CALLS_IN_TODAY,\n COALESCE(SUM(CASE WHEN CallType IN (3, 4) THEN 1 ELSE 0 END), 0) + 0 AS NO_CALLS_OUT_TODAY,\n COALESCE(SUM(CASE WHEN (CallType IN (3, 4) AND DialerResult IN(1026)) THEN 1 ELSE 0 END), 0) + 0 AS NO_CALLS_OUT_CONNECTED_TODAY,\n COALESCE(SUM(CASE WHEN WaitTime > 20.0 AND ExitPoint in (4,9) THEN 1 ELSE 0 END), 0) AS NO_ABANDONED_20SEC_TODAY\nFROM QueueCallTrace ct\nWHERE CallStartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS NO_CALLS_DROPPED_OUT, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 3) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))", "Refresh" : 5 },
{ "Type" : "SQLQUERY", "Command" : "SELECT COUNT(DISTINCT CLIENT_ID) AS LEADS_AVAILABLE FROM aps.LeadsAvailableDetailed", "Refresh" : 15 },
{ "Type" : "SQLQUERY", "Command" : "SELECT \n(COUNT(*) / 1) AS NO_CALLS_DROPPED_IN, CONCAT(ROUND(AVG(WaitTime) / 1,1), ' sec.') AS AVG_WAIT_DROP_SK\n\n FROM calltrace t\n LEFT JOIN QueueCallTrace qt ON qt.CallTraceID = t.CALLTRACEID\n LEFT JOIN queues q ON t.QUEUEID = q.QUEUEID\n WHERE \n t.DIALERRESULT = 1027 -- Talk to agent 3497\n AND (t.CALLTYPE = 1) -- 3 = out predictive, 1 = incoming\n AND StartDate >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))", "Refresh" : 5 }
],
"Parameters" : [
{ "Title" : "Calls in today", "Value" : "NO_CALLS_IN_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out today", "Value" : "NO_CALLS_OUT_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls out connected", "Value" : "NO_CALLS_OUT_CONNECTED_TODAY", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (in)", "Value" : "NO_CALLS_DROPPED_IN", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Calls dropped while waiting (out)", "Value" : "NO_CALLS_DROPPED_OUT", "RealtimeQueues" : "", "Alert" : "" },
{ "Title" : "Remaining leads", "Value" : "LEADS_AVAILABLE", "RealtimeQueues" : "", "Alert" : "" }
]
}
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<style>
html, body
{
height: 100%;
}
body
{
margin: 0;
background-color: black;
color: white;
font-family: Verdana;
}
h2
{
text-align: center;
font-size: 32pt;
margin: 0;
padding: 0;
}
.cc_div
{
position: absolute;
top: 0;
width: 100%;
height: 100%;
}
iframe
{
border: 0;
width: 100%;
height: 100%;
}
#container
{
display: table;
width: 100%;
height: 100%;
}
table
{
width: 100%;
height: 100%;
border-collapse: collapse;
}
</style>
</head>
<body>
<div id="container">
<div id="cc_common" style="height: 50%">
<iframe id="cc_frame_common" src="http://172.26.9.4:8880/common"></iframe>
</div>
<div style="position: absolute; width: 100%; height: 49%" class="fill">
<div id="cc_CZ" class="cc_div" style="display: none">
<table>
<tr style="height: 20px">
<td>
<h2>
CZ</h2>
</td>
</tr>
<tr>
<td>
<iframe id="cc_frame_CZ" src="http://172.26.9.4:8880/cz"></iframe>
</td>
</tr>
</table>
</div>
<div id="cc_SK" class="cc_div" style="display: none">
<table>
<tr style="height: 20px">
<td>
<h2>
SK</h2>
</td>
</tr>
<tr>
<td>
<iframe id="cc_frame_SK" src="http://172.26.9.4:8880/sk"></iframe>
</td>
</tr>
</table>
</div>
<div id="cc_Total" class="cc_div">
<table>
<tr style="height: 20px">
<td>
<h2>
Total (CZ + SK)</h2>
</td>
</tr>
<tr>
<td>
<iframe id="Iframe1" src="http://172.26.9.4:8880/total"></iframe>
</td>
</tr>
</table>
</div>
<div id="cc_details" class="cc_div" style="display: none">
<table>
<tr style="height: 20px">
<td>
<h2>
Queues</h2>
</td>
</tr>
<tr>
<td>
<iframe id="cc_frame_details" src="http://172.26.9.4:8880/detail"></iframe>
</td>
</tr>
</table>
</div>
</div>
<script>
$(document).ready(function () {
setInterval(toggle, 3000);
});
var previous = "";
var current = "Total";
function toggle() {
var next = "";
$("#cc_" + current).fadeOut("slow");
if (current == "CZ") {
next = "SK"; // details
previous = current;
}
else if (current == "details") {
if (previous == "CZ")
next = "SK";
else next = "CZ";
}
else if (current == "SK") {
next = "Total"; // details
previous = current;
}
else if (current == "Total") {
next = "CZ"; // details
previous = current;
}
$("#cc_" + next).fadeIn("slow");
current = next;
}
</script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment