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

fix(monitoring filters): status filter dropdown doesn't lose it's value #7339

Closed
wants to merge 2 commits into from

Conversation

miteto
Copy link
Contributor

@miteto miteto commented Mar 26, 2019

Fix monitoring services filter

status filter dropdown doesn't lose it's value

  • check dropdown from $_GET parameters and use it
  • remove duplicated parameters from form
  • check if parameter is string when adding it to parameters in URL (for redirecting)

Type of change

  • Patch fixing an issue (non-breaking change)

Target serie

  • 18.10.x
  • 19.04.x (master)

- check dropdown from $_GET parameters and use it
- remove duplicated parameters from form
- check if parameter is string when adding it to parameters in URL (for redirecting)
Copy link
Contributor

@sc979 sc979 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR need to go deeper.
As the task was to : "...(fix) the defined filters must be kept".
And it doesn't seems to correct the other filter : "Service status".

@@ -554,6 +556,9 @@ function preInit() {
jQuery("#statusService option[value='svc_unhandled']").prop('selected', true);
jQuery("#statusFilter option[value='']").prop('selected', true);
}
if(_defaultStatusFilter != '') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a space after the "if" : if( -> if (

@@ -528,6 +529,7 @@ function preInit() {
_sid = '<?php echo $sid ?>';
_tm = <?php echo $tM ?>;
_o = '<?php echo $o; ?>';
_defaultStatusFilter = '<?php echo $defaultStatusFilter; ?>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you use <?= instead of <?php echo ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because other (above) assignments were that way

@UrBnW
Copy link
Contributor

UrBnW commented Mar 26, 2019

I thought this would also solve issue explained in https://github.com/centreon/centreon/issues/7306#issuecomment-475951673
(specific case of the "All" service status).
But I just tested it, and it does not help.

@sc979
Copy link
Contributor

sc979 commented Mar 26, 2019

Thanks CPbN for your feedback,
Indeed this task is to fix the issue #7306.
That's why we need to go deeper to solve it.
This fix is also linked to your PR #7327.
Regards,
sc979

@sc979
Copy link
Contributor

sc979 commented Mar 26, 2019

I close this PR, as the work isn't ready to be reviewed properly, nor tested

@sc979 sc979 closed this Mar 26, 2019
@ptitpopey
Copy link

Issue #7306 not resolved. I have upgrade to 2.8.28 and the problem appear again.

@sc979
Copy link
Contributor

sc979 commented Jun 12, 2019

Hi @ptitpopey ,

As you can see :

As you know, we don't fix the 2.8.x based on PHP5 anymore, except for security fixes.

Could you consider to upgrade your Centreon to the latest version ?

Regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants