3 * Report to view the background services.
6 * @link http://www.open-emr.org
7 * @author Brady Miller <brady.g.miller@gmail.com>
8 * @copyright Copyright (c) 2013-2018 Brady Miller <brady.g.miller@gmail.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 require_once("../globals.php");
15 use OpenEMR\Core\Header
;
22 <?php Header
::setupHeader(); ?
>
24 <title
><?php
echo xlt('Background Services'); ?
></title
>
26 <style type
="text/css">
28 /* specifically include & exclude from printing */
34 #report_parameters_daterange {
38 #report_results table {
43 /* specifically exclude some from the screen */
45 #report_parameters_daterange {
54 <body
class="body_top">
56 <span
class='title'><?php
echo xlt('Background Services'); ?
></span
>
58 <form method
='post' name
='theform' id
='theform' action
='background_services.php' onsubmit
='return top.restoreSession()'>
60 <div id
="report_parameters">
64 <div
class="btn-group pull-left" role
="group">
65 <a id
='refresh_button' href
='#' class='btn btn-default btn-refresh' onclick
='top.restoreSession(); $("#theform").submit()'>
66 <?php
echo xlt('Refresh'); ?
>
72 </div
> <!-- end of search parameters
-->
78 <div id
="report_results">
83 <?php
echo xlt('Service Name'); ?
>
87 <?php
echo xlt('Active'); ?
>
91 <?php
echo xlt('Automatic'); ?
>
95 <?php
echo xlt('Interval (minutes)'); ?
>
99 <?php
echo xlt('Currently Busy'); ?
>
103 <?php
echo xlt('Last Run Started At'); ?
>
107 <?php
echo xlt('Next Scheduled Run'); ?
>
115 <tbody
> <!-- added
for better
print-ability
-->
118 $res = sqlStatement("SELECT *, (`next_run` - INTERVAL `execute_interval` MINUTE) as `last_run_start`" .
119 " FROM `background_services` ORDER BY `sort_order`");
120 while ($row = sqlFetchArray($res)) {
123 <td align
='center'><?php
echo xlt($row['title']); ?
></td
>
125 <td align
='center'><?php
echo ($row['active']) ?
xlt("Yes") : xlt("No"); ?
></td
>
127 <?php
if ($row['active']) { ?
>
128 <td align
='center'><?php
echo ($row['execute_interval'] > 0) ?
xlt("Yes") : xlt("No"); ?
></td
>
130 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
133 <?php
if ($row['active'] && ($row['execute_interval'] > 0)) { ?
>
134 <td align
='center'><?php
echo text($row['execute_interval']); ?
></td
>
136 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
139 <td align
='center'><?php
echo ($row['running']>0) ?
xlt("Yes") : xlt("No"); ?
></td
>
141 <?php
if ($row['running'] > -1) { ?
>
142 <td align
='center'><?php
echo text(oeFormatDateTime($row['last_run_start'], "global", true)); ?
></td
>
144 <td align
='center'><?php
echo xlt('Never'); ?
></td
>
147 <?php
if ($row['active'] && ($row['execute_interval'] > 0)) { ?
>
148 <td align
='center'><?php
echo text(oeFormatDateTime($row['next_run'], "global", true)); ?
></td
>
150 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
153 <?php
if ($row['name'] == "phimail") { ?
>
154 <td align
='center'><a href
='direct_message_log.php' onclick
='top.restoreSession()'><?php
echo xlt("View Log"); ?
></a
></td
>
156 <td align
='center'> 
;</td
>
161 } // $row = sqlFetchArray($res) while
165 </div
> <!-- end of search results
-->