From b7a651c26bec6a36edba79feac695ecc8c35835e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Gauthier?= Date: Wed, 23 Aug 2017 16:05:45 +0200 Subject: [PATCH] Work in progress --- .../configuration/DirectiveManagement.scala | 16 +++++++++++----- .../directiveManagement.html | 4 ++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/rudder-web/src/main/scala/com/normation/rudder/web/snippet/configuration/DirectiveManagement.scala b/rudder-web/src/main/scala/com/normation/rudder/web/snippet/configuration/DirectiveManagement.scala index fac46b88062..3b341d4dfe1 100644 --- a/rudder-web/src/main/scala/com/normation/rudder/web/snippet/configuration/DirectiveManagement.scala +++ b/rudder-web/src/main/scala/com/normation/rudder/web/snippet/configuration/DirectiveManagement.scala @@ -70,6 +70,7 @@ import com.normation.rudder.web.model.JsInitContextLinkUtil import com.normation.rudder.domain.policies.GlobalPolicyMode import com.normation.rudder.domain.policies.Tags import com.normation.rudder.domain.policies.Tag +import com.normation.inventory.domain.AgentType /** * Snippet for managing the System and Active Technique libraries. @@ -355,16 +356,21 @@ class DirectiveManagement extends DispatchSnippet with Loggable { val isDeprecated = t.deprecrationInfo.isDefined val deprecationMessage = t.deprecrationInfo.map(_.message).getOrElse("") val acceptationDate = DateFormaterService.getFormatedDate(timeStamp) + val dscSupport = t.agentConfigs.forall { _.agentType match{ + case AgentType.Dsc => false + case _ => true + }} val action = { val ajax = SHtml.ajaxCall(JsNull, (_) => newDirective(t, activeTechnique, workflowEnabled)) AnonFunc("",ajax) } JsObj( - ( "version" -> v.toString ) - , ( "isDeprecated" -> isDeprecated) - , ("deprecationMessage" -> deprecationMessage) - , ("acceptationDate" -> acceptationDate) - , ( "action" -> action) + ( "version" -> v.toString ) + , ( "isDeprecated" -> isDeprecated) + , ( "deprecationMessage" -> deprecationMessage) + , ( "acceptationDate" -> acceptationDate) + , ( "dscSupport" -> dscSupport) + , ( "action" -> action) ) } val dataArray = JsArray(techniqueVersionInfo.toList) diff --git a/rudder-web/src/main/webapp/secure/configurationManager/directiveManagement.html b/rudder-web/src/main/webapp/secure/configurationManager/directiveManagement.html index cd1ab6939fd..ea13206ebde 100644 --- a/rudder-web/src/main/webapp/secure/configurationManager/directiveManagement.html +++ b/rudder-web/src/main/webapp/secure/configurationManager/directiveManagement.html @@ -183,10 +183,14 @@

Available versions

{{technique.version}} +
Deprecated: {{technique.deprecationMessage}}
+
+

This Technique version is compatible with the DSC agent .

+
{{technique.acceptationDate}}