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

Commit

Permalink
fix(resource): duplicated lines displayed on resource status (#12055)
Browse files Browse the repository at this point in the history
* chore(hotfix): update version to 22.10.1

* fix(resource): possible duplicated lines on resource status

* fix unit tests

* fix tests

* centreon-bot you are annoying

* update jenkinsfile

Co-authored-by: tuntoja <[email protected]>
  • Loading branch information
adr-mo and tuntoja authored Nov 4, 2022
1 parent 2c0ac1a commit 4867a88
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
5 changes: 1 addition & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ def devBranch = "develop"
env.REF_BRANCH = stableBranch
env.PROJECT='centreon-web'




if (env.BRANCH_NAME.startsWith('release-22.10.0-next')) {
env.BUILD = 'QA'
env.REPO = 'unstable'
env.DELIVERY_STAGE = 'Delivery to unstable'
} else if (env.BRANCH_NAME.startsWith('release-')) {
} else if (env.BRANCH_NAME.startsWith('hotfix-') || env.BRANCH_NAME.startsWith('release-')) {
env.BUILD = 'RELEASE'
env.REPO = 'testing'
env.DELIVERY_STAGE = 'Delivery to testing'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function generateFindResourcesRequest(
): string {
$this->sqlRequestTranslator->setConcordanceArray($this->resourceConcordances);

$request = "SELECT SQL_CALC_FOUND_ROWS DISTINCT
$request = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT
resources.resource_id,
resources.name,
resources.alias,
Expand Down Expand Up @@ -171,7 +171,8 @@ private function generateFindResourcesRequest(
FROM `:dbstg`.`resources`
LEFT JOIN `:dbstg`.`resources` parent_resource
ON parent_resource.id = resources.parent_id
LEFT JOIN `:dbstg`.`severities`
AND parent_resource.type = ' . self::RESOURCE_TYPE_HOST .
" LEFT JOIN `:dbstg`.`severities`
ON `severities`.severity_id = `resources`.severity_id
LEFT JOIN `:dbstg`.`resources_tags` AS rtags
ON `rtags`.resource_id = `resources`.resource_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ function generateExpectedSQLQuery(string $accessGroupRequest): string
FROM `centreon-monitoring`.`resources`
LEFT JOIN `centreon-monitoring`.`resources` parent_resource
ON parent_resource.id = resources.parent_id
LEFT JOIN `centreon-monitoring`.`severities`
AND parent_resource.type = 1' .
" LEFT JOIN `centreon-monitoring`.`severities`
ON `severities`.severity_id = `resources`.severity_id
LEFT JOIN `centreon-monitoring`.`resources_tags` AS rtags
ON `rtags`.resource_id = `resources`.resource_id
INNER JOIN `centreon-monitoring`.`instances`
ON `instances`.instance_id = `resources`.poller_id WHERE ' .
ON `instances`.instance_id = `resources`.poller_id WHERE " .
" resources.name NOT LIKE '\_Module\_%'
AND resources.parent_name NOT LIKE '\_Module\_BAM%'
AND resources.enabled = 1 AND resources.type != 3 " .
Expand Down
2 changes: 1 addition & 1 deletion www/install/insertBaseConf.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Insert version
--

INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.10.0');
INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.10.1');

--
-- Contenu de la table `contact`
Expand Down
20 changes: 20 additions & 0 deletions www/install/php/Update-22.10.1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/*
* Copyright 2005 - 2022 Centreon (https://www.centreon.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information : [email protected]
*
*/

0 comments on commit 4867a88

Please sign in to comment.