Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelGauthier committed Jan 11, 2024
1 parent 35bf493 commit 5c833b3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 27 deletions.
Expand Up @@ -534,32 +534,44 @@ buildIncludeList originRule groupsTree model editMode includeBool ruleTarget =
in
List.member ruleTarget list

(groupName, groupTarget, isEnabled) = case List.Extra.find (\g -> g.id == id) groupsList of
Just gr -> (gr.name, gr.target, gr.enabled)
Nothing -> (id, id, True)

(disabledClass, disabledLabel) =
if isEnabled then
("", text "")
else
(" is-disabled", span[class "badge-disabled"][])

rowIncludeGroup = li[class ((if isNew then "" else "new") ++ disabledClass)]
[ span[class "fa fa-sitemap"][]
, a[href (getGroupLink model.contextPath id)]
[ span [class "target-name"][text groupName]
, disabledLabel
, goToIcon
targetItem : String -> String -> Bool -> Html Msg
targetItem groupName groupTarget isEnabled =
let
(disabledClass, disabledLabel) =
if isEnabled then
("", text "")
else
(" is-disabled", span[class "badge-disabled"][])
in
li[class ((if isNew then "" else "new") ++ disabledClass)]
[ span[class "fa fa-sitemap"][]
, a[href (getGroupLink model.contextPath id)]
[ span [class "target-name"][text groupName]
, disabledLabel
, goToIcon
]
, ( if editMode then
span [class "target-remove", onClick (SelectGroup groupTarget includeBool)][ i [class "fa fa-times"][] ]
else
text ""
)
, span [class "border"][]
]
, ( if editMode then
span [class "target-remove", onClick (SelectGroup groupTarget includeBool)][ i [class "fa fa-times"][] ]
else
text ""
)
, span [class "border"][]
]
in
rowIncludeGroup
case List.Extra.find (\g -> g.id == id) groupsList of
Just gr -> targetItem gr.name gr.target gr.enabled
Nothing ->
li[class "unknown"]
[ span
[ class "fa fa-excalamtion-triangle" ][]
, a[]
[ span [class "target-name"]
[ b[][text "Unknown target: "]
, text id
]
]
, span [class "target-remove", onClick (SelectGroup id includeBool)][ i [class "fa fa-times"][] ]
]

buildComplianceReport : ValueLine -> String
buildComplianceReport report =
Expand All @@ -580,7 +592,6 @@ buildComplianceReport report =
"badPolicyMode" -> "Bad Policy Mode"
val -> val


reportStatusOrder : ValueLine -> Int
reportStatusOrder report =
case report.status of
Expand Down
Expand Up @@ -1464,7 +1464,7 @@ ul.applied-list > li > .border{
width: 4px;
transition-duration: .2s;
}
ul.applied-list > li:hover > .border{
ul.applied-list > li:not(.unknown):hover > .border{
background-color: #ccc;
}
ul.applied-list > li > .target-remove:hover + .border{
Expand All @@ -1476,6 +1476,13 @@ ul.applied-list > li.new {
ul.applied-list > li.new > .border{
background-color: #13BEB7AA;
}
ul.applied-list > li.unknown {
background-color: #ef960008;
color: #EF9600;
}
ul.applied-list > li.unknown > .border{
background-color: #EF9600;
}
ul.applied-list > li.new:hover > .border{
background-color: #13BEB7;
}
Expand Down Expand Up @@ -1511,7 +1518,10 @@ ul.applied-list > li > span.fa{
color: #aaa;
margin-right: 6px;
}

ul.applied-list > li.unknown > span.fa,
ul.applied-list > li.unknown > a{
color: #EF9600;
}
ul.applied-list > li .rudder-label{
margin-right: 4px;
}
Expand Down

0 comments on commit 5c833b3

Please sign in to comment.