From a39fe577b51fef468c5f6be485523331b1c249ab Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 7 Feb 2023 10:21:45 +0100 Subject: [PATCH 1/2] #10296 added date in popup about --- .../include/class/Diagnostics.class.php | 21 +++++++++++++++++++ pandora_console/include/functions_menu.php | 9 ++++++++ 2 files changed, 30 insertions(+) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index b0f698252b..44e003fd95 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -516,6 +516,27 @@ class Diagnostics extends Wizard } + /** + * Date system + * + * @return string + */ + public function getSystemDate(): string + { + $result = [ + 'error' => false, + 'data' => [ + 'date' => [ + 'name' => __('System Date (Console)'), + 'value' => date('H:i:s Y-m-d'), + ], + ], + ]; + + return json_encode($result); + } + + /** * Database size stats. * diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 277eb8520c..2d474a9853 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -797,6 +797,7 @@ if (is_ajax()) { $db_fragmentation = json_decode($d->getTablesFragmentation()); $sys_info = json_decode($d->getSystemInfo()); $php_sys = json_decode($d->getPHPSetup()); + $system_date = json_decode($d->getSystemDate()); $fragmentation_status = ''; if ($db_fragmentation->data->tablesFragmentationStatus->status === 1) { @@ -1030,6 +1031,14 @@ if (is_ajax()) {

'.$sys_info->data->ipInfo->value.'

+ + +

'.$system_date->data->date->name.'

+ + +

'.$system_date->data->date->value.'

+ + From 1457dffe6cf80c34721327190145e5b499c56054 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 7 Feb 2023 10:30:22 +0100 Subject: [PATCH 2/2] #10296 added getSystemDate in AJAXMethods --- pandora_console/include/class/Diagnostics.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandora_console/include/class/Diagnostics.class.php b/pandora_console/include/class/Diagnostics.class.php index 44e003fd95..99e28e3983 100644 --- a/pandora_console/include/class/Diagnostics.class.php +++ b/pandora_console/include/class/Diagnostics.class.php @@ -104,6 +104,7 @@ class Diagnostics extends Wizard 'getChartAjax', 'formFeedback', 'createdScheduleFeedbackTask', + 'getSystemDate', ]; @@ -209,6 +210,7 @@ class Diagnostics extends Wizard 'getAttachmentFolder', 'getInfoTagenteDatos', 'getServerThreads', + 'getSystemDate', ]; if ($this->pdf === true) { @@ -278,6 +280,10 @@ class Diagnostics extends Wizard $title = __('SQL show engine innodb status'); break; + case 'getSystemDate': + $title = __('Date system'); + break; + default: // Not possible. $title = '';