Skip to content

Commit

Permalink
Issue 206 - Improve automember rebuild confirmation message
Browse files Browse the repository at this point in the history
Highlight that the rebuild task is very expensive and that it typically
only needs to done once, and not regularly. Also since the task can run
for a very long time a "info" alert is added at the start of the task
stating that the task is being started and it may take a long time to
complete.

relates: freeipa#206

Signed-off-by: Mark Reynolds <[email protected]>
  • Loading branch information
mreynolds389 committed Dec 11, 2023
1 parent d9f6b63 commit 97f3db0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/pages/ActiveUsers/ActiveUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ const ActiveUsers = () => {
params: [[], paramArgs],
};

// Task can potentially run for a very long time, give feed back that we
// at least started the task
alerts.addAlert(
"rebuild-automember-start",
"Starting automember rebuild membership task (this may take a long " +
"time to complete) ...",
"info"
);

executeCommand(automemberPayload).then((result) => {
if ("data" in result) {
const automemberError = result.data.error as
Expand Down Expand Up @@ -344,7 +353,11 @@ const ActiveUsers = () => {
id: "question-text",
pfComponent: (
<TextLayout component="p">
Are you sure you want to rebuild auto membership?
<b>Warning</b> In case of a high number of users, hosts or groups, the
rebuild task may require high CPU usage. This can severely impact
server performance. Typically this only needs to be done once after
importing raw data into the server. Are you sure you want to rebuild
the auto memberships?
</TextLayout>
),
},
Expand Down

0 comments on commit 97f3db0

Please sign in to comment.