Skip to content
Draft
Show file tree
Hide file tree
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 @@ -54,13 +54,13 @@ update msg model =
ui = model.ui
-- we need to reload to make sure we are not in a details page, or else some external elements will replace our Elm dom elements
in
({ model | mode = Loading, groupsCompliance = Dict.empty, ui = { ui | modal = ExternalModal, loadingGroups = True } }, createGroupModal ())
({ model | mode = Loading, groupsCompliance = Dict.empty, ui = { ui | loadingGroups = True } }, createGroupModal ())
CloseModal ->
let
ui = model.ui
in
({ model | ui = { ui | modal = NoModal, loadingGroups = True } }, Cmd.batch [ getGroupsTree model False ])
LoadGroupTable ->
({ model | ui = { ui | loadingGroups = True } }, Cmd.batch [ getGroupsTree model False ])
LoadGroupTable ->
let
ui = model.ui
newModel =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ getSubElems cat =

type alias UI =
{ groupFilters : Filters
, modal : ModalState
, hasWriteRights : Bool
, loadingGroups : Bool
}

type ModalState = NoModal | ExternalModal

type alias Filters =
{ tableFilters : TableFilters SortBy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ init flags =
initTableFilters = defaultTableFilters Name
initTreeFilters = (TreeFilters "" [])
initFilters = Filters initTableFilters initTreeFilters
initUI = UI initFilters NoModal flags.hasWriteRights True
initUI = UI initFilters flags.hasWriteRights True
initModel = Model flags.contextPath Loading initUI initCategory Dict.empty
listInitActions =
[ getGroupsTree initModel (not flags.hasGroupToDisplay)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ view model =
]
]
ExternalTemplate -> text ""

modal = case model.ui.modal of
NoModal -> text ""
ExternalModal -> div [class "modal-backdrop fade show", style "height" "100%"] []
in
div [class "rudder-template"]
[ div [class "template-sidebar sidebar-left"]
Expand Down Expand Up @@ -172,5 +168,4 @@ view model =
[
templateMain
]
, modal
]
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ class Groups extends StatefulSnippet with DefaultExtendableSnippet[Groups] with
|// When custom event to close group details fires, we load the group table state in the Elm app
|$$("#${htmlId_item}").on("group-close-detail", function () {
| $$("#${htmlId_item} .main-container").hide(); // guarantee to hide details
| app.ports.loadGroupTable.send(null)
| app.ports.loadGroupTable.send(null);
| const url = contextPath + "/secure/nodeManager/groups"
| history.pushState({}, '', url);
|});
|
|// Initialize tooltips
Expand Down