From e5e0aa4e974a73b6e74a9fdeb4e43d6264ebfd0c Mon Sep 17 00:00:00 2001 From: "Francois @fanf42 Armand" Date: Tue, 14 Nov 2017 13:58:12 +0100 Subject: [PATCH] Fixes #11725: \"Priority\" level mean the contrary to what is thought --- .../web/components/DirectiveEditForm.scala | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/rudder-web/src/main/scala/com/normation/rudder/web/components/DirectiveEditForm.scala b/rudder-web/src/main/scala/com/normation/rudder/web/components/DirectiveEditForm.scala index a0989decc77..4404612ce3b 100644 --- a/rudder-web/src/main/scala/com/normation/rudder/web/components/DirectiveEditForm.scala +++ b/rudder-web/src/main/scala/com/normation/rudder/web/components/DirectiveEditForm.scala @@ -394,10 +394,23 @@ class DirectiveEditForm( } } - private[this] val piPriority = + private[this] val piPriority = { + val priorities = List( + ( 0, "Highest") + , ( 1, "+4") + , ( 2, "+3") + , ( 3, "+2") + , ( 4, "+1") + , ( 5, "Default") + , ( 6, "-1") + , ( 7, "-2") + , ( 8, "-3") + , ( 9, "-4") + , (10, "Lowest") + ) new WBSelectObjField( "Priority" - , (0 to 10).map(i => (i, i.toString)) + , priorities , defaultValue = directive.priority ) { override val displayHtml = @@ -409,7 +422,6 @@ class DirectiveEditForm(

Priority

Priority determines which unique Directive will be applied.

Unique Directives can be applied only once (ie. Time Settings), so only the highest priority will be appllied.

-

Highest Priority is 0.

@@ -417,6 +429,7 @@ class DirectiveEditForm( override def labelClassName = "col-xs-12" override def subContainerClassName = "col-xs-12" } + } private[this] var newTags = directive.tags