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 #11911: Rule list on group #2159

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -571,7 +571,7 @@ class NodeApiService6 (
nodeId <- nodeIds
nodeInfo <- nodeInfos.get(nodeId)
} yield {
val runDate = runs.get(nodeId).map( _.map(_.agentRunId.date)).flatten
val runDate = runs.get(nodeId).flatMap( _.map(_.agentRunId.date))
serializeInventory(nodeInfo, state, runDate, inventories.get(nodeId), software.getOrElse(nodeId, Seq()), detailLevel, version)
}
}
Expand Down
Expand Up @@ -58,6 +58,7 @@ import net.liftweb.http._
import scala.xml._
import net.liftweb.util.Helpers._
import bootstrap.liftweb.RudderConfig
import com.normation.rudder.domain.policies.GroupTarget
import com.normation.rudder.domain.policies.RuleTarget
import com.normation.rudder.services.workflows.DGModAction
import com.normation.rudder.services.workflows.NodeGroupChangeRequest
Expand Down Expand Up @@ -98,6 +99,7 @@ class NodeGroupForm(
private[this] val nodeInfoService = RudderConfig.nodeInfoService
private[this] val categoryHierarchyDisplayer = RudderConfig.categoryHierarchyDisplayer
private[this] val workflowLevelService = RudderConfig.workflowLevelService
private[this] val dependencyService = RudderConfig.dependencyAndDeletionService

private[this] val nodeGroupCategoryForm = new LocalSnippet[NodeGroupCategoryForm]
private[this] val nodeGroupForm = new LocalSnippet[NodeGroupForm]
Expand Down Expand Up @@ -186,6 +188,12 @@ class NodeGroupForm(
}
& "group-delete" #> SHtml.ajaxButton("Delete", () => onSubmitDelete(), ("class" -> " btn btn-danger"))
& "group-notifications" #> updateAndDisplayNotifications()
& "#groupRulesTab" #> {
val noDisplay = DisplayColumn.Force(false)
val cmp = new RuleGrid("remove_popup_grid", None, false, None, noDisplay, noDisplay)
val rules = dependencyService.targetDependencies(GroupTarget(nodeGroup.id)).map( _.rules.toSeq).toOption
cmp.rulesGridWithUpdatedInfo(rules, false, true)
}
)(html)
}

Expand Down
Expand Up @@ -22,7 +22,7 @@
<div id="createCloneGroupContainer" ></div>
</div>
</div>

<div>
<div id="confirmUpdateActionDialog" class="modal fade" data-keyboard="true" tabindex="-1" ></div>
</div>
Expand All @@ -32,6 +32,7 @@
<div id="GroupTabs">
<ul id="groupTabMenu">
<li><a href="#groupParametersTab">Group parameters</a></li>
<li><a href="#groupRulesTab">Applied Rules</a></li>
</ul>

<div id="groupParametersTab">
Expand Down Expand Up @@ -80,10 +81,8 @@
</div>
</div>
</div>
<!--
<group-removeform></group-removeform>
-->
</div>
<div id="groupRulesTab"> </div>
</div>
</component-body>
</xml:group>