8 $monLibrary= dirname(__FILE__) .
"/../library";
9 $sharedLibrary= dirname(__FILE__) .
"/../../shared/library";
10 require_once(
"$monLibrary/cu_top.i");
11 require_once(
"$monLibrary/ck_hticket.i");
12 require_once(
"$sharedLibrary/cu_func.i");
13 require_once(
"$sharedLibrary/commonJsFunctions.i");
14 require_once(
"$monLibrary/monitorView.i");
17 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
20 header(
"Location: /hcuadm/hcu_noperm.prg");
24 printMonitorPageTop(
"Core Requests Report", $homecuKendoVersion, $cloudfrontDomainName);
25 printMonitorPageMiddle(
"Core Requests Report");
28 <script type=
"text/javascript">
32 getShowWaitFunctions();
36 {
"value":
"",
"text":
"Select Type"},
37 {
"value":
"I",
"text":
"I - Account Inquiry"},
38 {
"value":
"X",
"text":
"X - Cross Accounts"},
39 {
"value":
"T",
"text":
"T - Transactions related"},
40 {
"value":
"MIR",
"text":
"MIR - Member Info Inquiry"},
41 {
"value":
"ETOC",
"text":
"ETOC - eStatement Table of Contents"},
42 {
"value":
"ESTM",
"text":
"ESTM - eStatement Request"},
43 {
"value":
"NEWAPP",
"text":
"NEWAPP - Submit New Loan App"},
44 {
"value":
"INQAPP",
"text":
"INQAPP - Loan App Inquiry"},
47 $(document).ready(
function(e) {
49 $.homecuValidator.setup({formValidate:
'searchFrm', formStatusField:
'formErrorDiv'});
52 $(
"#cuCode").kendoAutoComplete({
55 dataSource:
new kendo.data.DataSource({
58 url:
"mCorerequestsReport.data",
59 data: { action:
"read_cus"},
67 placeholder:
"Start typing...",
70 var value = $(
"#cuCode").val();
71 var data = this.dataSource.view();
72 for( var i = 0, length = data.length; i < length; i++ ) {
73 if( data[i] === value) {
81 alert(
"Please select a value from the list.");
87 $(
"#formErrorDiv").hide();
89 $(
"#requestType").kendoDropDownList({
90 dataTextField:
"text",
91 dataValueField:
"value",
92 dataSource: requestTypes
95 $(
"#timeStart, #timeEnd").kendoDateTimePicker({
96 format:
"yyyy-MM-dd HH:mm:ss",
99 var todayDate = kendo.toString(kendo.parseDate(
new Date()),
'yyyy-MM-dd');
100 var endDate = kendo.toString(kendo.parseDate(
new Date()),
'yyyy-MM-dd 23:59:59');
101 $(
"#timeStart").data(
"kendoDateTimePicker").value(todayDate);
102 $(
"#timeEnd").data(
"kendoDateTimePicker").value(endDate);
104 $(
"#gridRequests").kendoGrid({
110 template:
"No core requests were found." 113 { field:
"cu", title:
"Credit Union" },
114 { field:
"accountnumber", title:
"Member" },
115 { field:
"appliance_ip", title:
"Appliance IP", hidden:
true },
116 { field:
"remote_ip", title:
"Remote IP", hidden:
true },
117 { field:
"request_type", title:
"Request Type" },
118 { field:
"request_url", title:
"Request Url", hidden:
true,
template: kendo.template($(
"#templateURL").html()) },
119 { field:
"request_start", title:
"Start Time" },
120 { field:
"request_end", title:
"End Time", hidden:
true },
121 { field:
"request_elapsed", title:
"Elapsed (including Retry Delays)" },
122 { field:
"request_status", title:
"Status",
template: kendo.template($(
"#templateStatus").html()) }
130 $(
"#search").on(
"click",
function(e) {
132 var cuCode = $(
"#cuCode").val();
133 var member = $(
"#member").val();
134 var applianceIp = $(
"#applianceIp").val();
135 var requestType = $(
"#requestType").data(
"kendoDropDownList").value();
136 var timeStart = $(
"#timeStart").data(
"kendoDateTimePicker").value();
137 var timeEnd = $(
"#timeEnd").data(
"kendoDateTimePicker").value();
141 if (timeEnd !=
null && timeStart ==
null) {
142 error =
"Start Time is required with End Time";
143 }
else if (timeEnd !=
null && timeStart !=
null) {
145 if (timeEnd <= timeStart) {
146 error =
"End Time cannot be less than Start Time";
152 error =
"CU Code is required.";
155 if (error.length > 0) {
156 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
159 $.homecuValidator.hideMessage();
166 applianceip: applianceIp,
167 requesttype: requestType,
168 timestart: (timeStart ==
null ?
"" : kendo.toString(timeStart,
's')),
169 timeend: (timeEnd ==
null ?
"" : kendo.toString(timeEnd,
's'))
175 $(
this).prop(
"disabled",
"disabled");
179 url:
"mCorerequestsReport.data",
182 .done(
function (data, textStatus, jqXHR) {
185 if (data.Results.requests) {
186 var requests = data.Results.requests;
187 var dropdown = $(
"#gridRequests").data(
"kendoGrid").dataSource.data(requests);
188 $.homecuValidator.hideMessage();
190 error =
"Failed to retrieve results";
191 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
194 .fail(
function (jqXHR, textStatus, errorThrown) {
195 $.homecuValidator.displayMessage(errorThrown, $.homecuValidator.settings.statusError);
196 $(
"#search").removeProp(
"disabled");
198 .always(
function (jqXHR, textStatus, errorThrown) {
200 $(
"#search").removeProp(
"disabled");
206 $(
"#viewDetails").on(
'change',
function(e) {
207 var checked = $(
this).prop(
"checked");
208 var grid = $(
"#gridRequests").data(
"kendoGrid");
226 <script type=
"text/x-kendo-template" id=
"templateURL">
227 # if (data && data.request_url) { # 228 # var url = decodeURIComponent(data.request_url); # 229 <span>#= url #</span>
233 <script type=
"text/x-kendo-template" id=
"templateStatus">
234 # if (data && data.request_status) { # 235 # var request_status = data.request_status; # 236 # if (request_status) { # 237 <span><strong>Code: </strong>#: request_status.status.code #</span><br>
238 <span><strong>Description: </strong>#: request_status.status.desc #</span><br>
239 <span><strong>Extra: </strong>#: request_status.status.extra #</span><br>
240 <span><strong>Packet Size: </strong>#: request_status.status.packetsize #</span><br>
241 <span><strong>Message: </strong>#: request_status.error.messages #</span><br>
242 <span><strong>DB Error: </strong>#: request_status.note.dberror #</span><br>
243 # if (request_status.status.attempted_core_conns) { # 244 <span><strong>Attempted Core Connections: </strong>#: request_status.status.attempted_core_conns #</span><br>
246 <span><strong>Curl Error Code(s): </strong>#: request_status.status.curl_errno #</span><br>
252 <style type=
"text/css">
255 font-family: Arial, Helvetica, sans-serif;
256 background-color: #EFEFEF;
281 .col-1 { width: 8.33%; }
282 .col-2 { width: 16.67%; }
283 .col-3 { width: 25%; }
284 .col-4 { width: 33.33% }
285 .col-5 { width: 41.67%; }
286 .col-6 { width: 50%; }
287 .col-7 { width: 58.33%; }
288 .col-8 { width: 66.67%; }
289 .col-9 { width: 75%; }
290 .col-10 { width: 83.33%; }
291 .col-11 { width: 91.67%; }
292 .col-12 { width: 100%; }
296 overflow-wrap:
break-word;
299 #timeStart, #timeEnd { 305 <div
class=
"container-fluid" id=
"searchFrm">
306 <div
class=
"form-horizontal form-widgets well well-sm">
307 <div
class=
"row k-block k-error-colored" id=
"formErrorDiv"></div>
310 <div
class=
"form-group">
311 <label
class=
"col-2" for=
"cuCode">Credit Union:</label>
312 <input name=
"cuCode" id=
"cuCode" class=
"k-textbox col-3" maxlength=
"12">
317 <div
class=
"form-group">
318 <label
class=
"col-2" for=
"member">Member:</label>
319 <input name=
"member" id=
"member" class=
"k-textbox col-3" maxlength=
"12">
324 <div
class=
"form-group">
325 <label
class=
"col-2" for=
"applianceIp">Appliance IP:</label>
326 <input name=
"applianceIp" id=
"applianceIp" class=
"k-textbox col-3">
331 <div
class=
"form-group">
332 <label
class=
"col-2" for=
"requestType">Request Type:</label>
333 <input name=
"requestType" id=
"requestType" class=
"col-3">
338 <div
class=
"form-group">
339 <label
class=
"col-2">Date:</label>
341 <div style=
"display: inline-block;">
342 <label
for=
"timeStart">From:</label><br>
343 <input type=
"" name=
"timeStart" id=
"timeStart" class=
"">
345 <div style=
"display: inline-block;">
346 <label
for=
"timeEnd">To:</label><br>
347 <input type=
"" name=
"timeEnd" id=
"timeEnd" class=
"">
354 <div
class=
"form-group">
355 <label
class=
"col-2" for=
"viewDetails">View Details:</label>
357 <input type=
"checkbox" name=
"viewDetails" id=
"viewDetails" >
363 <div
class=
"form-group">
365 <button
class=
"k-button k-primary" id=
"search">Search</button>
373 <div
class=
"container-fluid">
375 <div
id=
"gridRequests"></div>
379 <?php printMonitorPageBottom(); ?>