Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release-20.10.5' of https://github.com/centreon/centreon
Browse files Browse the repository at this point in the history
…into release-20.10.5
  • Loading branch information
bdauria committed Mar 31, 2021
2 parents 2c4a088 + ce7316e commit 095a931
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 118 deletions.
2 changes: 1 addition & 1 deletion features/bootstrap/ConfigurationWarningsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function aWarningMessageIsPrinted()
'css',
'#debug_1 font[color="orange"]'
));
if ($warningCount != 1) {
if ($warningCount !== 1) {
throw new \Exception(
'Invalid warning count: got ' . $warningCount . ', expected 1.'
);
Expand Down
96 changes: 48 additions & 48 deletions features/bootstrap/DowntimeDSTContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ public function aDowntimeStartingOnSummerChangingTime()
{
// on Europe/Paris at 2AM, we jump to 3AM
$this->downtimeProperties = array(
'start_day' => '03/28/2021',
'start_day' => '03/30/2025',
'start_time' => '02:30',
'end_day' => '03/28/2021',
'end_day' => '03/30/2025',
'end_time' => '03:30',
'expected_start' => '2021-03-28 03:00',
'expected_end' => '2021-03-28 03:30',
'expected_start' => '2025-03-30 03:00',
'expected_end' => '2025-03-30 03:30',
'expected_duration' => '1800', // 30m
'faketime' => '2021-03-28 01:56:00'
'faketime' => '2025-03-30 01:56:00'
);
}

Expand All @@ -126,14 +126,14 @@ public function aDowntimeEndingOnSummerChangingTime()
{
// on Europe/Paris at 2AM, we jump to 3AM
$this->downtimeProperties = array(
'start_day' => '03/28/2021',
'start_day' => '03/30/2025',
'start_time' => '01:30',
'end_day' => '03/28/2021',
'end_day' => '03/30/2025',
'end_time' => '02:30',
'expected_start' => '2021-03-28 01:30',
'expected_end' => '2021-03-28 03:00',
'expected_start' => '2025-03-30 01:30',
'expected_end' => '2025-03-30 03:00',
'expected_duration' => '1800', // 30m
'faketime' => '2021-03-28 01:26:00'
'faketime' => '2025-03-30 01:26:00'
);
}

Expand All @@ -144,14 +144,14 @@ public function aDowntimeStartingAndEndingOnSummerChangingTime()
{
// on Europe/Paris at 2AM, we jump to 3AM
$this->downtimeProperties = array(
'start_day' => '03/28/2021',
'start_day' => '03/30/2025',
'start_time' => '02:03',
'end_day' => '03/28/2021',
'end_day' => '03/30/2025',
'end_time' => '02:33',
'expected_start' => '',
'expected_end' => '',
'expected_duration' => '0',
'faketime' => '2021-03-28 01:58:00'
'faketime' => '2025-03-30 01:58:00'
);
}

Expand All @@ -162,14 +162,14 @@ public function aDowntimeDuringAllDayOnSummerChangingDate()
{
// on Europe/Paris at 2AM, we jump to 3AM
$this->downtimeProperties = array(
'start_day' => '03/28/2021',
'start_day' => '03/30/2025',
'start_time' => '00:00',
'end_day' => '03/28/2021',
'end_day' => '03/30/2025',
'end_time' => '24:00',
'expected_start' => '2021-03-28 00:00',
'expected_end' => '2021-03-29 00:00',
'expected_start' => '2025-03-30 00:00',
'expected_end' => '2025-03-31 00:00',
'expected_duration' => '82800', // 23h
'faketime' => '2021-03-27 23:56:00'
'faketime' => '2025-03-29 23:56:00'
);
}

Expand All @@ -189,14 +189,14 @@ public function aDowntimeDuringAllDayOnSummerChangingDateIsScheduled()
public function aDowntimeOfNextDayOfSummerChangingDate()
{
$this->downtimeProperties = array(
'start_day' => '03/29/2021',
'start_day' => '03/31/2025',
'start_time' => '00:00',
'end_day' => '03/29/2021',
'end_day' => '03/31/2025',
'end_time' => '24:00',
'expected_start' => '2021-03-29 00:00',
'expected_end' => '2021-03-30 00:00',
'expected_start' => '2025-03-31 00:00',
'expected_end' => '2025-04-01 00:00',
'expected_duration' => '86400', // 24h
'faketime' => '2021-03-28 23:58:00'
'faketime' => '2025-03-30 23:58:00'
);
}

Expand All @@ -207,14 +207,14 @@ public function aDowntimeStartingOnWinterChangingDate()
{
// on Europe/Paris at 3AM, backward to 2AM
$this->downtimeProperties = array(
'start_day' => '10/31/2021',
'start_day' => '10/26/2025',
'start_time' => '02:03',
'end_day' => '10/31/2021',
'end_day' => '10/26/2025',
'end_time' => '03:33',
'expected_start' => '2021-10-31 02:03',
'expected_end' => '2021-10-31 03:33',
'expected_start' => '2025-10-26 02:03',
'expected_end' => '2025-10-26 03:33',
'expected_duration' => '9000', // 2h30
'faketime' => '2021-10-31 01:58:00'
'faketime' => '2025-10-26 01:58:00'
);
}

Expand All @@ -225,14 +225,14 @@ public function aDowntimeEndingOnWinterChangingDate()
{
// on Europe/Paris at 3AM, backward to 2AM
$this->downtimeProperties = array(
'start_day' => '10/31/2021',
'start_day' => '10/26/2025',
'start_time' => '01:00',
'end_day' => '10/31/2021',
'end_day' => '10/26/2025',
'end_time' => '02:30',
'expected_start' => '2021-10-31 01:00',
'expected_end' => '2021-10-31 02:30',
'expected_start' => '2025-10-26 01:00',
'expected_end' => '2025-10-26 02:30',
'expected_duration' => '9000', // 2h30
'faketime' => '2021-10-31 00:58:00'
'faketime' => '2025-10-26 00:58:00'
);
}

Expand All @@ -243,14 +243,14 @@ public function aDowntimeStartingAndEndingOnWinterChangingDate()
{
// on Europe/Paris at 3AM, backward to 2AM
$this->downtimeProperties = array(
'start_day' => '10/31/2021',
'start_day' => '10/26/2025',
'start_time' => '02:03',
'end_day' => '10/31/2021',
'end_day' => '10/26/2025',
'end_time' => '02:33',
'expected_start' => '2021-10-31 02:03',
'expected_end' => '2021-10-31 02:33',
'expected_start' => '2025-10-26 02:03',
'expected_end' => '2025-10-26 02:33',
'expected_duration' => '5400', // 1h30
'faketime' => '2021-10-31 01:58:00'
'faketime' => '2025-10-26 01:58:00'
);
}

Expand All @@ -261,14 +261,14 @@ public function aDowntimeDuringAllDayOnWinterChangingDate()
{
// on Europe/Paris at 3AM, backward to 2AM
$this->downtimeProperties = array(
'start_day' => '10/31/2021',
'start_day' => '10/26/2025',
'start_time' => '00:00',
'end_day' => '10/31/2021',
'end_day' => '10/26/2025',
'end_time' => '24:00',
'expected_start' => '2021-10-31 00:00',
'expected_end' => '2021-11-01 00:00',
'expected_start' => '2025-10-26 00:00',
'expected_end' => '2025-10-27 00:00',
'expected_duration' => '90000', // 25h
'faketime' => '2021-10-30 23:58:00'
'faketime' => '2025-10-25 23:58:00'
);
}

Expand All @@ -288,14 +288,14 @@ public function aDowntimeDuringAllDayOnWinterChangingDateIsScheduled()
public function aDowntimeOfNextDayOfWinterChangingDate()
{
$this->downtimeProperties = array(
'start_day' => '11/01/2021',
'start_day' => '10/27/2025',
'start_time' => '00:00',
'end_day' => '11/01/2021',
'end_day' => '10/27/2025',
'end_time' => '24:00',
'expected_start' => '2021-11-01 00:00',
'expected_end' => '2021-11-02 00:00',
'expected_start' => '2025-10-27 00:00',
'expected_end' => '2025-10-28 00:00',
'expected_duration' => '86400', // 24h
'faketime' => '2021-10-31 23:58:00'
'faketime' => '2025-10-26 23:58:00'
);
}

Expand Down
4 changes: 2 additions & 2 deletions features/bootstrap/GeneratePollerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public function thePollersAreAlreadySelected()
*/
public function pollerConfigurationIsGenerated()
{
/* Wait configuration is generated. */
// Wait configuration is generated.
$this->spin(
function ($context) {
return count($context->getSession()->getPage()
->findAll('css', 'div#consoleDetails font[color="green"]')) == 6;
->findAll('css', 'div#consoleDetails font[color="green"]')) === 6;
}
);
}
Expand Down
41 changes: 1 addition & 40 deletions www/include/common/javascript/moment-timezone-with-data.min.js

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions www/install/php/Update-20.10.5.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,3 @@
*
*/

include_once __DIR__ . "/../../class/centreonLog.class.php";
$centreonLog = new CentreonLog();

//error specific content
$versionOfTheUpgrade = 'UPGRADE - 20.10.5 : ';

/**
* Queries needing exception management and rollback if failing
*/
try {
//engine postpone
if ($pearDB->isColumnExist('cfg_nagios', 'postpone_notification_to_timeperiod')) {
// An update is required
$errorMessage = 'Impossible to drop postpone_notification_to_timeperiod from fg_nagios';
$pearDB->query('ALTER TABLE `cfg_nagios` DROP COLUMN `postpone_notification_to_timeperiod`');
}
$errorMessage = "";
} catch (\Exception $e) {
$centreonLog->insertLog(
4,
$versionOfTheUpgrade . $errorMessage .
" - Code : " . (int)$e->getCode() .
" - Error : " . $e->getMessage() .
" - Trace : " . $e->getTraceAsString()
);
throw new \Exception($versionOfTheUpgrade . $errorMessage, (int)$e->getCode(), $e);
}

0 comments on commit 095a931

Please sign in to comment.