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 #24494: Groups listed on a node webpage should be clickable #5554

Draft
wants to merge 1 commit into
base: branches/rudder/7.3
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,56 +156,11 @@ object DisplayNodeGroupTree extends Loggable {
}

override def body = {

val editButton = {
if (!targetActions.isEmpty && !targetInfo.isSystem) {
val tooltipId = Helpers.nextFuncName
<span class="treeActions">
<span class="fa fa-pencil" tooltipid={tooltipId} title=""
onclick={linkUtil.redirectToGroupLink(NodeGroupId(NodeGroupUid(groupId))).toJsCmd}
></span>
<div class="tooltipContent" id={tooltipId}><div>Configure this group.</div></div>
</span>
} else {
NodeSeq.Empty
}
}

val actionButtons = {
if (!targetActions.isEmpty) {
(targetActions get ("include") match {

case Some(include) =>
val tooltipId = Helpers.nextFuncName
<span class="treeActions">
<span class="tooltipable fa action-icon accept" tooltipid={tooltipId} title="" onclick={
include(targetInfo).toJsCmd
}></span>
<div class="tooltipContent" id={tooltipId}><div>Include Nodes from this group.</div></div>
</span>

case None => NodeSeq.Empty

}) ++
(targetActions get ("exclude") match {
case Some(exclude) =>
val tooltipId = Helpers.nextFuncName
<span class="treeActions">
<span class="tooltipable fa action-icon except" tooltipid={tooltipId} title="" onclick={
exclude(targetInfo).toJsCmd
}></span>
<div class="tooltipContent" id={tooltipId}><div>Exclude Nodes from this group.</div></div>
</span>
case None => NodeSeq.Empty
})
} else {
NodeSeq.Empty
}
}

val xml = {
val tooltipId = Helpers.nextFuncName
<span class="treeGroupName tooltipable" tooltipid={tooltipId} title="">
<span class="treeGroupName tooltipable" tooltipid={tooltipId} title="" onclick={
linkUtil.redirectToGroupLink(NodeGroupId(NodeGroupUid(groupId))).toJsCmd
}>
{targetInfo.name}
{if (targetInfo.isSystem) <small class="greyscala"> - System</small>}
<small class="greyscala">{
Expand All @@ -221,7 +176,6 @@ object DisplayNodeGroupTree extends Loggable {
<h3>{targetInfo.name}</h3>
<div>{targetInfo.description}</div>
</div>
<div class="treeActions-container">{actionButtons} {editButton}</div>
}

onClickNode match {
Expand Down