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

6530 standardize mail notifications #6570

Merged
merged 4 commits into from
Sep 6, 2018

Conversation

adr-mo
Copy link
Contributor

@adr-mo adr-mo commented Aug 28, 2018

Simple replica of #6530 .

Work has been rebased on the latest 2.8.x
New branch created for CI matters (validation and automatic tests modified)

Code validation has been already done.

@adr-mo
Copy link
Contributor Author

adr-mo commented Aug 28, 2018

Looks good to me can now be merged on the 2.8.x

@UrBnW
Copy link
Contributor

UrBnW commented Aug 28, 2018

Thank you @adr-mo 👍
I wondered whether or not <str> would have to be changed to &lt;str&gt;, but sounds then like no.
But re-reading the changes, I would say some &quot; have useless $ sign in front of them.
For example :
-r $&quot;Centreon <centreon-engine>$&quot; -S replyto=$&quot;Centreon admin <$ADMINEMAIL$>$&quot;
Finally would require some update I think.

@UrBnW
Copy link
Contributor

UrBnW commented Aug 28, 2018

I've corrected in the initial PR #6530.

@adr-mo
Copy link
Contributor Author

adr-mo commented Aug 28, 2018

If it worth changing the code do not hesitate to do so 😊 I'll do the validation one more time there is no issue with that 😉

@UrBnW
Copy link
Contributor

UrBnW commented Aug 28, 2018

Thank you 👍
I've submitted 2 additional Typo commits to the initial PR, you can go !

@adr-mo
Copy link
Contributor Author

adr-mo commented Aug 28, 2018

Ok perfect I will cherry-pick them to this branch and validate the PR.

Thanks again for the contribution 😉

@UrBnW
Copy link
Contributor

UrBnW commented Aug 29, 2018

In addition, do you know why " are replaces by the HTML entity &quot; ?
The notification commands are the only ones to use this "trick".
All other ones use ".
In addition, if you add a command through Crenteon GUI and then look at the inserted MySQL line, you'll see ", not &quot;.
Do you think we could get rid of them ?

@adr-mo
Copy link
Contributor Author

adr-mo commented Aug 30, 2018

@cpbn I don't know, maybe @lpinsivy or @leoncx could answer to your question :)

@UrBnW
Copy link
Contributor

UrBnW commented Aug 30, 2018

Thank you @adr-mo, let's then wait for their answer before merging 👍

@leoncx
Copy link
Contributor

leoncx commented Aug 30, 2018

The " is present because we convert the string into html entities, in old Centreon Web code the convert is done before the insert into the databases. We fix the code during time, normally the convert of special characters must be done during render of html.

@UrBnW
Copy link
Contributor

UrBnW commented Aug 30, 2018

Thank you @leoncx 👍
So we can now safely replace these HTML entities by their corresponding characters, right ?

@UrBnW
Copy link
Contributor

UrBnW commented Aug 31, 2018

We can also go like this, the " vs &quot; is not really important, rather cosmetic, making code easier to read :)

@chgautier chgautier force-pushed the 6530-standardize-mail-notifications branch from da53ddb to c1538f3 Compare August 31, 2018 13:11
@chgautier
Copy link
Contributor

Modifications on branch 6530-standardize-mail-notifications OK. Header and Body looking good.

@thiuyendang thiuyendang merged commit 4ff4d05 into 2.8.x Sep 6, 2018
@thiuyendang thiuyendang deleted the 6530-standardize-mail-notifications branch September 6, 2018 09:57
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.

6 participants