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 #17804: Trying to add a group property with change request plugin enabled lead to blank property #3096
Conversation
Must be validated along with Normation/rudder-plugins#317 |
PR updated with a new commit |
...rudder-core/src/main/scala/com/normation/rudder/repository/jdbc/EventLogJdbcRepository.scala
Show resolved
Hide resolved
).toBox | ||
val name = (p \\ "name").text.trim | ||
if(name.isBlank) { | ||
Failure(s"Found unexpected xml under <properties> tag (name is blank): ${p}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forbid to same load a property with an empty name, it brokes things all around
@@ -405,10 +405,13 @@ final case class RestDataSerializerImpl ( | |||
val serverList :JValue = diff.modNodeList.map(displaySimpleDiff(_)(convertNodeList)).getOrElse(initialState.serverList.map(v => (v.value)).toList) | |||
val dynamic :JValue = diff.modIsDynamic.map(displaySimpleDiff(_)).getOrElse(initialState.isDynamic) | |||
val enabled :JValue = diff.modIsActivated.map(displaySimpleDiff(_)).getOrElse(initialState.isEnabled) | |||
val properties: JValue = diff.modProperties.map(displaySimpleDiff(_)).getOrElse(initialState.properties.toApiJson()) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missings bits to display properties diff
@@ -154,9 +154,9 @@ class NodeGroupForm( | |||
|
|||
val pendingChangeRequestXml = | |||
<div id="pendingChangeRequestNotification"> | |||
<div> | |||
<div class="row"> | |||
<i class="fa fa-exclamation-triangle warnicon" aria-hidden="true"></i> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the warning about existing change request was broken because of group UI update
PR updated with a new commit |
something is not working with property update |
ok, no, it's just that if you don't deploy change but just validate it, it is not deployed. Obviously. |
@@ -178,6 +176,23 @@ nodePropertiesApp.controller('nodePropertiesCtrl', function ($scope, $http, DTOp | |||
} | |||
} | |||
}; | |||
|
|||
$scope.processResponse = function(response, successMsg) { | |||
// check if it created a change request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to redirect to change request screen if it's a change request.
webapp/sources/rudder/rudder-web/src/main/webapp/javascript/rudder/angular/nodeProperties.js
Show resolved
Hide resolved
var changeId = undefined; | ||
try { | ||
changeId = response.data.data[$scope.objectName+'s'][0].changeRequestId; | ||
} catch {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not log something here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. In case we don't have a change request, we are not sure about the format of answer
PR updated with a new commit |
This PR is not mergeable to upper versions. |
OK, squash merging this PR |
…in enabled lead to blank property
94c4d29
to
0650059
Compare
https://issues.rudder.io/issues/17804