Skip to content

Commit

Permalink
Fixes #24494: Groups listed on a node webpage should be clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaadF committed Mar 28, 2024
1 parent 60b58c9 commit db7818d
Showing 1 changed file with 1 addition and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,56 +156,9 @@ 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 +174,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

0 comments on commit db7818d

Please sign in to comment.