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

Commit

Permalink
fix(web): display command with status$ in the command definition (#11286
Browse files Browse the repository at this point in the history
) (#11903)

* fix(web): display command with status$ in the command definition

* Update src/Centreon/Domain/Monitoring/CommandLineTrait.php

Co-authored-by: Kevin Duret <kduret@centreon.com>

* Update unit test

* Fix regex replacement in macros command

Co-authored-by: Kevin Duret <kduret@centreon.com>
Co-authored-by: Tamaz Cheishvili <tamazc@yahoo.com>

Co-authored-by: Stéphane Duret <sduret@centreon.com>
Co-authored-by: Kevin Duret <kduret@centreon.com>
  • Loading branch information
3 people authored and tuntoja committed Oct 12, 2022
1 parent 19d6631 commit 4568fb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Centreon/Domain/Monitoring/CommandLineTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ private function buildCommandLineFromConfiguration(
array $macros,
string $replacementValue
): string {
// if the command line contains $$ after a macro (so $$$), delete one of them to match with
// the command executed by centreon-engine
$configurationCommand = str_replace('$$$', '$$', $configurationCommand);
$macroPasswordNames = [];
foreach ($macros as $macro) {
if ($macro->isPassword()) {
Expand Down

0 comments on commit 4568fb1

Please sign in to comment.