Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #15531: Add an Interface to select reporting protocol #2411

Conversation

VinceMacBuche
Copy link
Member

@@ -174,26 +174,52 @@ <h3 class="page-title">Security</h3>
</form>
</div>
</div>
<div class="inner-portlet">
<h3 class="page-title">Reporting protocol</h3>
<div class="lift:administration.PropertiesManagement.reportProtocolSection" id="reportProtocolForm">
Copy link
Member

Choose a reason for hiding this comment

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

there need an introduction text about the protocol, that Syslog is the historical one, but in 5.1 HTTPS is available, better, faster, stronger, safer. Or something like that

@VinceMacBuche VinceMacBuche force-pushed the ust_15531/add_an_interface_to_select_reporting_protocol branch from 5da894b to f77a673 Compare August 22, 2019 15:59
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_15531/add_an_interface_to_select_reporting_protocol branch from f77a673 to 82ddd3a Compare August 22, 2019 16:01
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_15531/add_an_interface_to_select_reporting_protocol branch from 82ddd3a to 32831b1 Compare August 23, 2019 15:57
@VinceMacBuche
Copy link
Member Author

Commit modified

@VinceMacBuche VinceMacBuche force-pushed the ust_15531/add_an_interface_to_select_reporting_protocol branch from 32831b1 to f31de82 Compare August 26, 2019 10:12
@VinceMacBuche
Copy link
Member Author

Commit modified

Copy link
Member

@ncharles ncharles left a comment

Choose a reason for hiding this comment

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

some minor cosmetic changes plus a question on a input


def noModif = (
for {
initSyslog <- initSyslogProtocol
Copy link
Member

Choose a reason for hiding this comment

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

could you correct the indentation ?

configService.set_rudder_syslog_protocol_disabled(disabledSyslog, actor, None).toBox.foreach(updateOk => initDisabledSyslog = Full(disabledSyslog))

// start a promise generation, Since we check if there is change to save, if we got there it mean that we need to redeploy
startNewPolicyGeneration
Copy link
Member

Choose a reason for hiding this comment

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

the configService should take care of starting the new policy generation if value changed (at least I think that's how it works)

Copy link
Member Author

Choose a reason for hiding this comment

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

need to look at the service!

reportProtocol = protocol
protocol match {
case AgentReportingHTTPS =>

Copy link
Member

Choose a reason for hiding this comment

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

could you remove this blank line which is misleading ?

Copy link
Member

Choose a reason for hiding this comment

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

and the one below


val checkboxInitValue = initReportsProtocol == SyslogUDP
val zip : Box[(AgentReportingProtocol,Boolean)] = (initReportProtocol,initDisabledSyslog) match {
Copy link
Member

Choose a reason for hiding this comment

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

zip ??

val (label,value) = labelAndValue(protocol,disabledSyslog)
val inputId = value + "-id"
val ajaxCall = SHtml.ajaxCall(Str(""), _ => displayDisableSyslogSectionJS(value) & check)._2.toJsCmd
val inputCheck = if (initReport == protocol && initDisabled == disabledSyslog) {
Copy link
Member

Choose a reason for hiding this comment

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

why the condition on disabledSyslog ?

Copy link
Member

Choose a reason for hiding this comment

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

(or on protocol - i don't get why there is both)

Copy link
Member Author

Choose a reason for hiding this comment

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

Because we manage both properties with that input ... it' a three state select

With
Https only (so https + disabled syslog)
https with syslog support (so https + enable syslog)
Syslog only (so Syslog and enable syslog (obviously)

@VinceMacBuche VinceMacBuche force-pushed the ust_15531/add_an_interface_to_select_reporting_protocol branch from f31de82 to 29c6891 Compare August 26, 2019 10:46
@VinceMacBuche
Copy link
Member Author

Commit modified

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 29c6891 into Normation:master Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants