AntonLV vor 9 Jahren
Ursprung
Commit
6203552c8e

+ 1 - 0
install/sql/system.sql

@@ -229,6 +229,7 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `or
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+(@iCategoryId, 'sys_cron_time', '_adm_stg_cpt_option_sys_cron_time', '0', 'digit', '', '', '', 2),
 (@iCategoryId, 'sys_install_time', '_adm_stg_cpt_option_sys_install_time', '0', 'digit', '', '', '', 3),
 
 (@iCategoryId, 'sys_ftp_login', '_adm_stg_cpt_option_sys_ftp_login', '', 'digit', '', '', '', 10),

+ 2 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1274,6 +1274,7 @@
 	<string name="_adm_stg_cpt_option_sys_ftp_dir"><![CDATA[Path to the script on FTP server]]></string>
 	<string name="_adm_stg_cpt_option_sys_ftp_login"><![CDATA[FTP server login]]></string>
 	<string name="_adm_stg_cpt_option_sys_ftp_password"><![CDATA[FTP server password]]></string>
+	<string name="_adm_stg_cpt_option_sys_cron_time"><![CDATA[Last cron execution time]]></string>
 	<string name="_adm_stg_cpt_option_sys_install_time"><![CDATA[Installation date]]></string>
 	<string name="_adm_stg_cpt_option_sys_live_updates_interval"><![CDATA[Live updates interval (in milliseconds)]]></string>
 	<string name="_adm_stg_cpt_option_sys_maps_api_key"><![CDATA[Google Maps API key]]></string>
@@ -1574,6 +1575,7 @@
 	<string name="_sys_admin_apply"><![CDATA[Apply]]></string>
 	<string name="_sys_admin_filter"><![CDATA[Filter:]]></string>
 	<string name="_sys_audit_cron_jobs"><![CDATA[Cron jobs]]></string>
+	<string name="_sys_audit_cron_jobs_exec_time"><![CDATA[Last cron jobs execution]]></string>
 	<string name="_sys_audit_header_manual_audit"><![CDATA[Manual Server Audit]]></string>
 	<string name="_sys_audit_header_requirements"><![CDATA[Requirements]]></string>
 	<string name="_sys_audit_header_site_optimization"><![CDATA[Site optimization]]></string>

+ 2 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -1272,6 +1272,7 @@
 	<string name="_adm_stg_cpt_option_sys_ftp_dir"><![CDATA[Путь к скрипту на FTP-сервере]]></string>
 	<string name="_adm_stg_cpt_option_sys_ftp_login"><![CDATA[FTP-сервер - Логин]]></string>
 	<string name="_adm_stg_cpt_option_sys_ftp_password"><![CDATA[FTP-сервер - Пароль]]></string>
+	<string name="_adm_stg_cpt_option_sys_cron_time"><![CDATA[Дата последнего запуска планировщика]]></string>
 	<string name="_adm_stg_cpt_option_sys_install_time"><![CDATA[Дата установки]]></string>
     <string name="_adm_stg_cpt_option_sys_live_updates_interval"><![CDATA[Интервал обновлений (в миллисекундах)]]></string>
     <string name="_adm_stg_cpt_option_sys_maps_api_key"><![CDATA[Ключ Google Maps API]]></string>
@@ -1572,6 +1573,7 @@
 	<string name="_sys_admin_apply"><![CDATA[Применить]]></string>
 	<string name="_sys_admin_filter"><![CDATA[Фильтр:]]></string>
 	<string name="_sys_audit_cron_jobs"><![CDATA[Планировщик]]></string>
+	<string name="_sys_audit_cron_jobs_exec_time"><![CDATA[Последний запуск планировщика]]></string>
 	<string name="_sys_audit_header_manual_audit"><![CDATA[Ручной аудит сервера]]></string>
 	<string name="_sys_audit_header_requirements"><![CDATA[Требования]]></string>
 	<string name="_sys_audit_header_site_optimization"><![CDATA[Оптимизация сайта]]></string>

+ 2 - 0
periodic/cron.php

@@ -122,6 +122,8 @@ function runJob($aJob)
 bx_import('BxDolCronQuery');
 $oDb = BxDolCronQuery::getInstance();
 
+setParam('sys_cron_time', time());
+
 // run one time transient jobs
 $aJobsTransient = $oDb->getTransientJobs();
 if (!empty($aJobsTransient)) {

+ 3 - 0
studio/classes/BxDolStudioToolsAudit.php

@@ -358,6 +358,9 @@ class BxDolStudioToolsAudit extends BxDol
 
         $s .= $this->getBlock(_t('_sys_audit_cron_jobs'), '', _t('_sys_audit_msg_cron_jobs', `crontab -l 2>&1`));
 
+        $iCronTime = getParam('sys_cron_time');
+        $s .= $this->getBlock(_t('_sys_audit_cron_jobs_exec_time'), '', !empty($iCronTime) ? bx_time_js($iCronTime, BX_FORMAT_DATE_TIME, true) : _t('_None'));
+
         echo '<h1>' . _t('_sys_audit_header_site_setup') . '</h1>';
         echo "<ul>$s</ul>";
     }

+ 5 - 3
studio/js/dashboard.js

@@ -164,11 +164,11 @@ BxDolStudioDashboard.prototype.clearCache = function(sType) {
 
 BxDolStudioDashboard.prototype.permissions = function() {
     this.hostTools('permissions');
-}
+};
 
 BxDolStudioDashboard.prototype.serverAudit = function() {
     this.hostTools('server_audit');
-}
+};
 
 BxDolStudioDashboard.prototype.hostTools = function(sAction) {
 	var $this = this;
@@ -191,7 +191,9 @@ BxDolStudioDashboard.prototype.hostTools = function(sAction) {
 			if(!sData.length)
 			    return;
 
-			$('#' + sDivId).hide().html(sData).bx_anim('show', 'fade', 'slow');
+			$('#' + sDivId).hide().html(sData).bx_anim('show', 'fade', 'slow', function() {
+				$(this).bxTime();
+			});
 		},
 		'html'
 	);