8 $monLibrary= dirname(__FILE__) .
"/../library";
9 $monIncludes= dirname(__FILE__) .
"/../includes";
10 $sharedLibrary= dirname(__FILE__) .
"/../../shared/library";
11 require_once(
"$monLibrary/cu_top.i");
12 require_once(
"$monLibrary/ck_hticket.i");
13 require_once(
"$monIncludes/cu_remote_top.prg");
14 require_once(
"$monLibrary/monitorView.i");
15 require_once(
"$sharedLibrary/reports.i");
16 require_once(
"$sharedLibrary/commonJsFunctions.i");
17 require_once(
"$sharedLibrary/commonPhpFunctions.i");
19 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
22 header(
"Location: /hcuadm/hcu_noperm.prg");
26 dms_import(array(
"report" =>
"string",
"operation" =>
"string",
"servers" =>
"string",
"showServer" =>
"string"));
30 $dataFile= $_SERVER[
"PHP_SELF"];
31 $presentationFile= $dataFile;
32 $defaultDateFormat=
"MM/dd/yyyy";
40 $sql =
"SELECT cu FROM cuadmin WHERE livebatch IN ('L', 'B');";
41 $sqlRs = db_query($sql, $dbh);
47 $numRecords = db_num_rows($sqlRs);
48 for ($i = 0; $i < $numRecords; $i++) {
49 $row = db_fetch_assoc($sqlRs, $i);
50 $cu = strtoupper($row[
'cu']);
54 $eStmtQuery .=
"select '{$cu}', a.vendor from {$cu}memberacct m, cuadmin a where m.estmnt_flag = 'Y' and a.cu = '{$cu}'";
56 $eStmtSatQuery .=
"select '{$cu}', estmt, members, (case when members > 0 then round(((estmt::float * 100 ) / members::float)::numeric,1) else 0 end) from (select COUNT(estmnt_flag) as estmt from {$cu}memberacct where estmnt_flag = 'Y') as estmt, (select COUNT(accountnumber) as members from {$cu}memberacct) as members";
58 $callahanQuery .=
"select '{$cu}', orgname, (case when exists (select estmnt_flag from {$cu}memberacct where estmnt_flag = 'Y') then 'ES' else '' end), (case when exists (select role from cuadmnotify where cu = '{$cu}' and role = 'txtbanking') then 'TXT' else '' end), (case when trim(bp_vendor) not in ('', 'NO') then bp_vendor else '' end) from cuadmin where cu = '{$cu}'";
60 if ($i < $numRecords - 1) {
61 $eStmtQuery .=
" UNION ";
62 $eStmtSatQuery .=
" UNION ";
63 $callahanQuery .=
" UNION ";
70 "estatementClients" => array(
"title" =>
"E-Statements Clients",
71 "sql" =>
"{$eStmtQuery}",
72 "cols" => array(
"Credit Union" =>
"string",
"Vendor" =>
"string")),
74 "alphaCheck" => array(
"title" =>
"Alpha Check List",
75 "sql" =>
"select cu, user_name, orgname from cuadmin a where livebatch <> 'C' ",
76 "cols" => array(
"CU Code" =>
"string",
"CU Home" =>
"string",
"Org Name" =>
"string")),
78 "checkImaging" => array(
"title" =>
"Check Imaging Clients",
79 "sql" =>
"select cu, orgname, rt, img, case when (flagset & 2::int8)>0 then '+' else '' end, ckhexkey, ckorgid, ckurl from cuadmin where trim(img) not in ('','NO') and livebatch <> 'C' ",
80 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"Routing#" =>
"number",
"Image Vendor" =>
"string",
"On" =>
"string",
"Ck Hex Key" =>
"string",
81 "Ck ID" =>
"string",
"Ck URL" =>
"string")),
83 "download" => array(
"title" =>
"Download Formats",
84 "sql" =>
"select cu, orgname, rt, tranformat::int, case when tranfldsep=1 then 'SP' else 'TAB' end, 85 case when traneol=1 then 'NONE' when traneol=2 then 'CRLF' else 'NL' end from cuadmin where livebatch <> 'C' ",
86 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"R/T" =>
"number",
"Format" =>
"number",
"Fld" =>
"string",
"EOL" =>
"string")),
88 "alertUsage" => array(
"title" =>
"Alert Usage Summary",
89 "sql" =>
"select cuadmin.cu, coalesce(sq_bal_join.bal_count, 0), coalesce(sq_chk_join.chk_count, 0), coalesce(sq_loan_join.ln_count, 0), coalesce(sq_trnx_join.trnx_count, 0) from cuadmin left join (select cu, count(*) as bal_count from cu_alerts where alerttype = 'B' group by cu) as sq_bal_join on cuadmin.cu = sq_bal_join.cu left join (select cu, count(*) as chk_count from cu_alerts where alerttype = 'C' group by cu) as sq_chk_join on cuadmin.cu = sq_chk_join.cu left join (select cu, count(*) as ln_count from cu_alerts where alerttype = 'L' group by cu) as sq_loan_join ON cuadmin.cu = sq_loan_join.cu left join (select cu, count(*) as trnx_count from cu_alerts where alerttype = 'T' group by cu) as sq_trnx_join ON cuadmin.cu = sq_trnx_join.cu where livebatch <> 'C' and (coalesce(sq_bal_join.bal_count, 0) > 0 or coalesce(sq_chk_join.chk_count, 0) > 0 or coalesce(sq_loan_join.ln_count, 0) > 0 or coalesce(sq_trnx_join.trnx_count, 0) > 0) ",
90 "cols" => array(
"CU" =>
"string",
"Bal" =>
"number",
"Check" =>
"number",
"Loan" =>
"number",
"Trans" =>
"number")),
92 "billPayCross" => array(
"title" =>
"Bill Pay Cross-Authentication Settings",
93 "sql" =>
"select cu, orgname, rt, bp_vendor, bp_cuid, bp_secret from cuadmin where trim(bp_vendor) > '' and trim(bp_vendor) <> 'NO' and livebatch <> 'C' ",
94 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"RT Transit" =>
"number",
"Bill Pay Vendor" =>
"string",
"Bill Pay CUID" =>
"string",
"Bill Pay Secret" =>
"string")),
96 "security" => array(
"title" =>
"Security Method Settings",
97 "sql" =>
"select cu, orgname, case when cookie_ver = 'L' then 'Legacy' else '2-Factor' end, loginscript, min_chlng_qst from cuadmin where livebatch <> 'C' ",
98 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"Security Method" =>
"string",
"Login Script" =>
"string",
"Questions" =>
"string")),
100 "offlineStatus" => array(
"title" =>
"Offline Status Settings",
101 "sql" =>
"select cu, orgname, case when offlinestat = 'Y' then 'Offline (Stay Down)' when offlinestat = 'U' then 'Offline (Auto Up)' when offlinestat = 'R' then 'Read-Only' else 'Active' end, 102 offlineblurb from cuadmin where livebatch <> 'C' ",
103 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"Offline Status" =>
"string",
"Offline Message" =>
"string")),
105 "trustedAccess" => array(
"title" =>
"Trusted Access Settings",
106 "sql" =>
"select cu, orgname, ssovendor from cuadmin where trim(ssovendor) not in ('','NO') and livebatch <> 'C' ",
107 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"Trusted Access Vendor" =>
"string")),
109 "loginFailure" => array(
"title" =>
"Admin User Login Failure Status",
110 "sql" =>
"select a.cu, u.user_name, lastlogin, failedlogin, case when coalesce(userflags, 0) & 8::int4 = 8 then 'Email' when coalesce(userflags, 0) & 16::int4 = 16 then 'Challenge' 111 when coalesce(userflags, 0) & 32::int4 = 32 then 'Password' else '' end from cuadminusers u, cuadmin a where u.cu = a.cu and a.livebatch <> 'C' and coalesce(userflags,0) & 56::int4 > 0 ",
112 "cols" => array(
"CU Code" =>
"string",
"Admin User" =>
"string",
"Last Login" =>
"date",
"Last Failed" =>
"date",
"Reason" =>
"string")),
114 "creditCard" => array(
"title" =>
"Credit Card Settings",
115 "sql" =>
"select cu, orgname, case when (flagset2 & 8::int8)>0 then '+' else '' end, case when (flagset2 & 16::int8)>0 then '+' else '' end, case when (flagset2 & 1024::int8)>0 then '+' else '' end, case when exists (select * from cuhavetrans where cu=cuadmin.cu and trancode='CC') then 'CC' else 'LP' end, ccinfourl from cuadmin where (flagset2 & 4::int8) > 0 and livebatch <> 'C' ",
116 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"Show Interest" =>
"string",
"Show Last Pd" =>
"string",
"Show Stmnt Bal" =>
"string",
"TranCode" =>
"string",
117 "Card Info URL" =>
"string")),
119 "txtBanking" => array(
"title" =>
"TXT Banking Clients",
120 "sql" =>
"select a.cu, a.orgname, n.email from cuadmnotify n join cuadmin a on a.cu = n.cu where a.livebatch <> 'C' and n.role = 'txtbanking' ",
121 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"CU TXT Mail Address" =>
"string")),
123 "cuAlerts" => array(
"title" =>
"CU Alerts Clients",
124 "sql" =>
"select a.cu, a.orgname, n.email, a.liveserver from cuadmnotify n join cuadmin a on a.cu = n.cu where a.livebatch <> 'C' and n.role = 'alert' ",
125 "cols" => array(
"CU Code" =>
"string",
"Org Name" =>
"string",
"CU Alert Mail Address" =>
"string",
"PGLoad Command" =>
"string")),
127 "callahan" => array(
"title" =>
"Callahan Details",
128 "sql" =>
"{$callahanQuery}",
129 "cols" => array(
"CU Code" =>
"string",
"Name" =>
"string",
"ES" =>
"string",
"TXT" =>
"string",
"Bill Pay" =>
"string")),
131 "fid" => array(
"title" =>
"FID Settings",
132 "sql" =>
"select cu, orgname, rt, fid, tz from cuadmin where livebatch in ('B','L') ",
133 "cols" => array(
"CU Code" =>
"string",
"Name" =>
"string",
"Routing" =>
"number",
"FID" =>
"number",
"TimeZone" =>
"date")),
135 "overrideMcir" => array(
"title" =>
"Override MICR Usage",
136 "sql" =>
"select om.cu, count(*) from cuovermicr om join cuadmin a on om.cu = a.cu where a.livebatch in ('B','L') group by om.cu ",
137 "cols" => array(
"CU Code" =>
"string",
"Count" =>
"number")),
139 "classicMobile" => array(
"title" =>
"Clients using Classic Mobile Banking",
140 "sql" =>
"select cu, user_name, orgname from cuadmin where cu in ('#cus#')",
"cols" => array(
"CU Code" =>
"string",
"CU Home" =>
"string",
"Org Name" =>
"string"),
141 "replaceString" =>
"#cus#",
"replaceCode" =>
'return implode("\', \'", runPipe("clmobile.mp"));'),
143 "mobileWeb" => array(
"title" =>
"Clients using Mobile Web Banking",
144 "sql" =>
"select cu, user_name, orgname from cuadmin where cu in ('#cus#')",
"cols" => array(
"CU Code" =>
"string",
"CU Home" =>
"string",
"Org Name" =>
"string"),
145 "replaceString" =>
"#cus#",
"replaceCode" =>
'return implode("\', \'", runPipe("gomobile.mp"));'),
147 "estatementSat" => array(
"title" =>
"E-Statement Saturation",
148 "sql" =>
"{$eStmtSatQuery}",
149 "cols" => array(
"Credit Union" =>
"string",
"E-Stmnt" =>
"string",
"Members" =>
"string",
"Percent" =>
"number"))
152 $reportMenu= array(
"Administrative Info Reports" => array_keys($reportList));
158 function runPipe($file)
161 if ($handle = popen(
"../usr-bin/$file",
'r'))
163 while (!feof ($handle))
165 $getLine = fgets($handle, 4096);
166 if (trim($getLine) !=
"")
167 $response[] = strtoupper(trim($getLine));
175 function readReport($dbh, $showSQL, &$errors, &$sqls, $reportList, $defaultDateFormat, $cookieName=
"")
177 $parameters= array();
178 dms_import_v2($parameters,
"BOTTOM_LEVEL", array(
"report" =>
"string",
"initial" =>
"string",
"limit" =>
"string",
"offset" =>
"string",
"includeSchema" =>
"string",
"includeCount" =>
"string",
179 "excludeData" =>
"string",
"sortCols" =>
"string",
"sortDirs" =>
"string",
"filterCols" =>
"string",
"filterOps" =>
"string",
"filterValues" =>
"string",
"dontIncludeId" =>
"string",
180 "servers" =>
"string",
"showServer" =>
"string",
"excludeSort" =>
"string",
"limitId" =>
"string"));
182 array_merge($errors, cleanValuesForDatabase($parameters[
"BOTTOM_LEVEL"],
183 array(
"initial" => array(
"type" =>
"boolean",
"required" =>
false),
184 "report" => array(
"type" =>
"string",
"required" =>
true),
185 "limit" => array(
"type" =>
"int",
"required" =>
true,
"allowNegatives" =>
true),
186 "offset" => array(
"type" =>
"int",
"required" =>
false),
187 "includeSchema" => array(
"type" =>
"boolean",
"required" =>
false),
188 "includeCount" => array(
"type" =>
"boolean",
"required" =>
false),
189 "excludeData" => array(
"type" =>
"boolean",
"required" =>
false),
190 "dontIncludeId" => array(
"type" =>
"boolean",
"required" =>
false),
191 "showServer" => array(
"type" =>
"boolean",
"required" =>
false),
192 "excludeSort" => array(
"type" =>
"boolean",
"required" =>
false))));
193 $report= $parameters[
"BOTTOM_LEVEL"][
"report"];
194 $limit= $parameters[
"BOTTOM_LEVEL"][
"limit"];
195 $offset= intval($parameters[
"BOTTOM_LEVEL"][
"offset"]);
198 $sortCols= trim($parameters[
"BOTTOM_LEVEL"][
"sortCols"]);
199 $sortDirs= trim($parameters[
"BOTTOM_LEVEL"][
"sortDirs"]);
200 $filterCols= trim($parameters[
"BOTTOM_LEVEL"][
"filterCols"]);
201 $filterOps= trim($parameters[
"BOTTOM_LEVEL"][
"filterOps"]);
202 $filterValues= trim($parameters[
"BOTTOM_LEVEL"][
"filterValues"]);
203 $servers= trim($parameters[
"BOTTOM_LEVEL"][
"servers"]);
204 $limitId= trim($parameters[
"BOTTOM_LEVEL"][
"limitId"]);
206 $theseParameters= array(
"report" => $report,
"includeSchema" => $parameters[
"BOTTOM_LEVEL"][
"includeSchema"],
"includeCount" => $parameters[
"BOTTOM_LEVEL"][
"includeCount"],
207 "limit" => $limit,
"offset" => $offset,
"excludeData" => $parameters[
"BOTTOM_LEVEL"][
"excludeData"],
"sortCols" => $sortCols,
"sortDirs" => $sortDirs,
"servers" => $servers,
208 "filterCols" => $filterCols,
"filterOps" => $filterOps,
"filterValues" => $filterValues,
"dontIncludeId" => $parameters[
"BOTTOM_LEVEL"][
"dontIncludeId"],
209 "showServer" => $parameters[
"BOTTOM_LEVEL"][
"showServer"],
"excludeSort" => $parameters[
"BOTTOM_LEVEL"][
"excludeSort"],
"limitId" => $limitId);
211 $printThis = readReportMonitor($dbh, $theseParameters, $errors, $sqls, $reportList, $defaultDateFormat, $cookieName);
212 header(
'Content-type: application/json');
213 print json_encode($printThis);
216 function readReportMonitor($dbh, $theseParameters, &$errors, &$sqls, $reportList, $defaultDateFormat, $cookieName=
"")
220 $validServers= array(
"www3",
"www5",
"www6", $_SERVER[
'SERVER_NAME']);
221 $serverArray= $validServers;
224 $servers= $theseParameters[
"servers"];
225 $showServer= $theseParameters[
"showServer"] ==
"Y";
226 $limit= $theseParameters[
"limit"];
227 $offset= $theseParameters[
"offset"];
228 $sortCols= $theseParameters[
"sortCols"];
229 $sortDirs= $theseParameters[
"sortDirs"];
231 global $SYS_TYPE_CLOSED;
232 $sql=
"select trim(upper(user_name)) as user_name, trim(www_server) as www_server from cuinfo where system_options & $SYS_TYPE_CLOSED = 0 order by user_name";
234 $results= runSelectStatementMap($sql, $dbh);
235 $cuMap= $results[
"record"];
236 $errors= array_merge($errors, $results[
"error"]);
240 $theseServers= json_decode($servers,
true);
241 if (!is_array($theseServers))
242 $errors[]=
"Servers are not formatted correctly.";
245 $serverCount= count($theseServers);
246 if ($serverCount != 0)
247 $serverArray= $theseServers;
251 unset($theseParameters[
"servers"]);
252 unset($theseParameters[
"showServer"]);
254 $theseParameters[
"limit"]= -1;
255 $theseParameters[
"offset"]= 0;
256 $theseParameters[
"excludeSort"]=
"Y";
258 $serverData= array();
259 $columnData= array();
261 $reportData= array();
263 foreach($serverArray as $server)
265 if (!in_array($server, $validServers))
266 $errors[]=
"$server is not a valid server.";
267 if (count($errors) == 0)
272 if ($server ==
"www3" || $server ==
"www5" || $server ==
"www6") {
273 $response = runCurl($server, $theseParameters, $cookieName);
275 $response = readReportCommon($theseParameters[
"report"], $errors, $sqls, $dbh, $theseParameters[
"limit"], $theseParameters[
"offset"], $theseParameters[
"includeSchema"] ==
"Y", $theseParameters[
"includeCount"] ==
"Y", $theseParameters[
"excludeData"] ==
"Y", $theseParameters[
"dontIncludeId"] ==
"Y", $theseParameters[
"excludeSort"] ==
"Y", $theseParameters[
"sortCols"], $theseParameters[
"sortDirs"], $theseParameters[
"filterCols"], $theseParameters[
"filterOps"], $theseParameters[
"filterValues"], $reportList,
"admReports", $cookieName);
278 $response = HCU_JsonEncode($response);
281 if (strpos($response,
"<html>") !==
false)
282 $errors[]=
"You do not have the necessary rights to view the data from $server.";
283 else if (trim($response) ==
"")
284 $errors[]=
"No data found from $server!";
287 $jsonResponse= json_decode($response,
true);
288 $errors= array_merge($errors, $jsonResponse[
"error"]);
289 if (isset($jsonResponse[
"sql"]))
290 $sqls= array_merge($sqls, $jsonResponse[
"sql"]);
292 foreach($jsonResponse[
"reportData"][
"data"] as $record)
295 $cu= strtoupper(trim(next($record)));
297 if (!isset($cuMap[$cu]) || trim($cuMap[$cu]) != $server)
300 $record[
"server"]= $server;
301 $serverData[]= $record;
304 if (count($columnData) == 0)
306 $columnData= $jsonResponse[
"columnData"];
307 $modelData= $jsonResponse[
"modelData"];
311 $modelData[
"fields"][
"server"]= array(
"type" =>
"string");
312 $columnData[]= array(
"field" =>
"server",
"title" =>
"Server");
319 return array(
"sql" => $sqls,
"error" => $errors,
"reportData" => array(
"data" => $serverData),
"modelData" => $modelData,
"columnData" => $columnData);
322 function generateCSV($dbh, &$errors, &$sqls, $reportList, $defaultDateFormat, $cookieName=
"")
324 $parameters= array();
325 dms_import_v2($parameters,
"BOTTOM_LEVEL", array(
"report" =>
"string",
"sortCols" =>
"string",
"sortDirs" =>
"string",
"filterCols" =>
"string",
326 "filterOps" =>
"string",
"filterValues" =>
"string"));
328 array_merge($errors, cleanValuesForDatabase($parameters[
"BOTTOM_LEVEL"], array(
"report" => array(
"type" =>
"string",
"required" =>
true))));
330 $report= $parameters[
"BOTTOM_LEVEL"][
"report"];
333 $sortCols= $parameters[
"BOTTOM_LEVEL"][
"sortCols"];
334 $sortDirs= $parameters[
"BOTTOM_LEVEL"][
"sortDirs"];
335 $filterCols= $parameters[
"BOTTOM_LEVEL"][
"filterCols"];
336 $filterOps= $parameters[
"BOTTOM_LEVEL"][
"filterOps"];
337 $filterValues= $parameters[
"BOTTOM_LEVEL"][
"filterValues"];
339 $parameters= array();
340 dms_import_v2($parameters,
"BOTTOM_LEVEL", array(
"report" =>
"string"));
343 $errors= cleanValuesForDatabase($parameters[
"BOTTOM_LEVEL"],
344 array(
"report" => array(
"type" =>
"string",
"required" =>
true)));
345 $report= $parameters[
"BOTTOM_LEVEL"][
"report"];
346 $reportTitles= getReportTitles();
347 $reportName= $reportTitles[$report];
349 $reportValues= readAdmReportCommon(array(
"report" => $report,
"includeSchema" =>
"Y",
"limit" => -1,
"offset" => 0,
"sortCols" => $sortCols,
"sortDirs" => $sortDirs,
"filterCols" => $filterCols,
350 "filterOps" => $filterOps,
"filterValues" => $filterValues,
"dontIncludeId" =>
"Y"), $dbh, $showSQL, $errors, $sqls, $reportList, $defaultDateFormat, $cookieName);
352 printCSVData($reportValues, $report, $reportName, $reportList, $defaultDateFormat,
"\t");
355 if (isset($previousScript))
358 if (!isset($operation)) {$operation =
"";}
359 if ($operation !=
"")
366 readReport($link, $showSQL, $errors, $sqls, $reportList, $defaultDateFormat,
"adm_reports");
368 case "readReportSQL":
369 readReport($link,
true, $errors, $sqls, $reportList, $defaultDateFormat);
372 generateCSV($link, $errors, $sqls, $reportList, $defaultDateFormat);
375 header(
'Content-type: application/json');
376 $returnArray= array(
"error" => array(
"Operation not specified: '$operation'"),
"record" =>
"",
"operation" =>
"");
377 print json_encode($returnArray);
386 if (!isset($report)) {$report =
"";}
387 $report= trim($report);
389 $reports= getReportTitles();
392 $reportMenuDDL= array();
393 foreach($reports as $value => $text)
395 $reportDDL[]= array(
"value" => $value,
"text" => $text);
398 $reportMenuDDL[$text]= array(
"url" =>
"$presentationFile?report=" . $value);
400 $reportMenuDDL= array(
"REDIRECT" => array(
"list" => array(
"Report List" => array(
"url" => $presentationFile))),
"Other Reports" => array(
"list" => $reportMenuDDL),
401 "Download CSV" => array(
"id" =>
"downloadCSVBtn"),
"Help <img src=\"/monitor/images/q1.gif\" border=\"0\" alt=\"View Help\" align=\"top\">" => array(
"id" =>
"helpBtn"));
407 $title=
"Please Select Report";
408 printMonitorPageTop($title, $homecuKendoVersion, $cloudfrontDomainName,
'',
'',
true); ?>
420 .reportMenu .sectionHeader {
422 font-family:arial,helvetica;
450 <script type=
"text/javascript">
452 getErrorsAreShownFunction();
453 getEscapeHTMLFunction();
455 function initReportSelectPage()
458 $(
"#serverMultiselect").prev().css({height: 25});
460 $(
"#runReportBtn").click(
function() {
462 var data= {error: []};
463 if ($(
".reportRadioButton:checked").length == 0)
464 data.error.push(
"Please select a report.");
466 if (!errorsAreShown(data,
"formValidateMainDiv"))
468 var url= $(
".reportRadioButton:checked").val();
469 var showServer= $(
"#showServerCheckbox:checked").length > 0 ?
"Y" :
"N";
471 if ($(
"#www3Checkbox").prop(
"checked"))
472 servers.push(
"www3");
473 if ($(
"#www5Checkbox").prop(
"checked"))
474 servers.push(
"www5");
475 if ($(
"#www6Checkbox").prop(
"checked"))
476 servers.push(
"www6");
477 if ($(
"#myCheckbox").prop(
"checked"))
478 servers.push(
"<?php echo $_SERVER['SERVER_NAME']; ?>");
479 servers= kendo.stringify(servers);
480 url+=
"&showServer=" + showServer +
"&servers=" + servers;
481 window.location.href= url;
488 $(document).ready(
function () {
489 initReportSelectPage();
492 <?php printMonitorPageMiddle($title); ?>
493 <div
id=
'hideSubmitWait' style=
'position:relative; left:-2000px;top:-2000px;'>
494 <div
id=
'homecuSubmitWait' class=
'k-block' >
495 <div
class=
'k-loading-image'></div>
498 <div
class=
"container_12">
499 <div
class=
"grid_12" style=
"margin-bottom:5px;">
500 <div
id=
"formValidateMainDiv" class=
"k-block k-error-colored" style=
"display:none;"></div>
502 <div
class=
"grid_12">
503 <?php echo compileMenu($reportMenu, $reportList, $dataFile,
true); ?>
505 <div
class=
"grid_12">Include Data from:</div>
506 <div
class=
"grid_12">
507 <div
class=
"serverCheck">www3: <input type=
"checkbox" id=
"www3Checkbox"></div>
509 <div
class=
"grid_12">
510 <div
class=
"serverCheck">www5: <input type=
"checkbox" id=
"www5Checkbox"></div>
512 <div
class=
"grid_12">
513 <div
class=
"serverCheck">www6: <input type=
"checkbox" id=
"www6Checkbox"></div>
515 <div
class=
"grid_12">
516 <div
class=
"serverCheck">Odyssey: <input type=
"checkbox" id=
"myCheckbox"></div>
518 <div
class=
"grid_12">
519 Show Server: <input type=
"checkbox" id=
"showServerCheckbox">
521 <div
class=
"grid_12">
522 <a href=
"#" class=
"k-button k-button-icontext" id=
"runReportBtn">Go</a>
525 <?php printMonitorPageBottom();
531 $title= isset($reports[$report]) ? $reports[$report] :
"Unrecognized Report";
532 printMonitorPageTop($title, $homecuKendoVersion, $cloudfrontDomainName);
536 .hide { position:absolute; top:-1px; left:-1px; width:1px; height:1px; }
540 border: 1px solid black;
544 #filterSettingsDiv > div { 548 #formValidateMainDiv li { 549 list-style-position: inside;
553 <script type=
"text/javascript">
556 if (!isset($showServer)) {$showServer =
"";}
557 if (!isset($servers)) {$servers =
"";}
560 getErrorsAreShownFunction();
561 getEscapeHTMLFunction();
562 getShowSQLFunction($showSQL);
563 getShowWaitFunctions();
564 getIsFilterChanged();
565 initReportClientSide($presentationFile, $report, $title, array(
"servers" => $servers,
"showServer" => $showServer),
true,
"addWidthsPre");
568 function addWidthsPre(gridDefinition)
570 gridDefinition.columns[0].width=
"150px";
573 function addWidthsPost(grid)
575 for(var i=1, length=grid.columns.length; i!=length; i++)
577 grid.autoFitColumn(i);
579 var tableWidth= Number($(
"#reportGrid table").css(
"width").replace(
"px",
""));
582 if (tableWidth < minWidth)
584 tableWidth= minWidth;
585 colWidth= (minWidth-150)/(grid.columns.length-1);
586 $(
"#reportGrid .k-grid-header-wrap").find(
"colgroup col:not(:first)").width(colWidth);
587 $(
"#reportGrid .k-grid-content").find(
"colgroup col:not(:first)").width(colWidth);
589 $(
"#reportGrid").css({width: tableWidth});
590 grid.reorderColumn(1, grid.columns[0]);
591 grid.reorderColumn(1, grid.columns[0]);
596 var notification = $(
"#notification").kendoNotification({
604 notificationIsShown=
true;
608 notificationIsShown=
false;
610 }).data(
"kendoNotification");
612 var notifificationIsShown=
false;
613 var infoLine=
"<span class=\"k-icon k-i-filter\"></span><b>To Filter:</b> Click on the (<span class=\"k-icon k-i-filter\"></span>) icon in a column that you want to filter. A dialog will pop up with filter value and options.<br>";
614 infoLine+=
"<span class=\"k-icon k-i-arrow-n\"></span><b>To Sort:</b> Click on a column (not on the (<span class=\"k-icon k-i-filter\"></span>) icon). That column will sort ascending. ";
615 infoLine+=
"Column will show with the (<span class=\"k-icon k-i-arrow-n\"></span>) icon. Click again and it will sort descending. ";
616 infoLine+=
"Column will show with the (<span class=\"k-icon k-i-arrow-s\"></span>) icon. A third click will clear the sort.";
617 notification.info(infoLine);
620 $(document).ready(
function () {
622 $(
"#helpBtn").click(
function () {
628 <?php printMonitorPageMiddle($title, $reportMenuDDL); ?>
629 <div
id=
'hideSubmitWait' style=
'position:relative; left:-2000px;top:-2000px;'>
630 <div
id=
'homecuSubmitWait' class=
'k-block' >
631 <div
class=
'k-loading-image'></div>
635 <div
id=
"notification"></div>
636 <div
class=
"container_12">
637 <div
class=
"grid_12">
638 <div
id=
"sqlOutput"></div>
640 <div
class=
"grid_12" style=
"margin-bottom:5px;">
641 <div
id=
"formValidateMainDiv" class=
"k-block k-error-colored" style=
"display:none;"></div>
643 <div
class=
"grid_12">
644 <div
id=
"reportGrid"></div>
647 <?php printMonitorPageBottom();