Add user page to admin panel, improve other admin pages #88

Merged
raucao merged 15 commits from feature/admin_user_details into master 2023-02-26 14:16:41 +00:00
raucao added 11 commits 2023-02-25 07:34:57 +00:00
raucao changed title from WIP: Add user page to admin panel, improve other admin pages to Add user page to admin panel, improve other admin pages 2023-02-26 02:41:29 +00:00
raucao added the
kredits-2
label 2023-02-26 02:41:35 +00:00
raucao requested review from greg 2023-02-26 02:41:43 +00:00
raucao requested review from galfert 2023-02-26 02:41:44 +00:00
raucao requested review from bumi 2023-02-26 02:41:44 +00:00
raucao added 3 commits 2023-02-26 03:33:23 +00:00
Improve admin donation pages
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
5f74212603
raucao changed title from Add user page to admin panel, improve other admin pages to WIP: Add user page to admin panel, improve other admin pages 2023-02-26 09:39:52 +00:00
raucao added 1 commit 2023-02-26 10:41:35 +00:00
Fix inline tailwind styles not being applied
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
c8e405d93a
raucao changed title from WIP: Add user page to admin panel, improve other admin pages to Add user page to admin panel, improve other admin pages 2023-02-26 10:41:51 +00:00
galfert approved these changes 2023-02-26 12:00:23 +00:00
galfert left a comment
Owner

Looks very good. I haven't railsed in a while, so I'm not quite sure if the DB question/suggestion makes sense :D

Looks very good. I haven't railsed in a while, so I'm not quite sure if the DB question/suggestion makes sense :D
@ -0,0 +10,4 @@
@stats = {
users_confirmed: User.where(ou: @ou).confirmed.count,
users_pending: User.where(ou: @ou).pending.count
Owner

Isn't this creating a new DB COUNT query? Since the @users are already there, wouldn't a @users.pending.size be more performant?

Isn't this creating a new DB `COUNT` query? Since the `@users` are already there, wouldn't a `@users.pending.size` be more performant?
Author
Owner

@users is not filtered by pending at that point, so .pending would actually create a query that selects all fields from the table using that filter, and then .size would convert the results into an array and count the contained items I believe. So .count should be more performant if that is correct.

`@users` is not filtered by pending at that point, so `.pending` would actually create a query that selects all fields from the table using that filter, and then `.size` would convert the results into an array and count the contained items I believe. So `.count` should be more performant if that is correct.
@ -40,3 +40,3 @@
namespace :admin do
root to: 'dashboard#index'
get 'ldap_users', to: 'ldap_users#index'
resources 'users', param: 'address', only: ['index', 'show'], constraints: { address: /.*/ }
Owner

What's the constraints for? Doesn't the regex basically allow anything?

What's the `constraints` for? Doesn't the regex basically allow anything?
Author
Owner

It's to prevent Rails from parsing out the part behind the dot character as a format type. It would otherwise regard e.g. the "org" in "user@kosmos.org" as format "org".

It's to prevent Rails from parsing out the part behind the dot character as a format type. It would otherwise regard e.g. the "org" in "user@kosmos.org" as format "org".
raucao merged commit 7fd564726f into master 2023-02-26 14:16:41 +00:00
raucao deleted branch feature/admin_user_details 2023-02-26 14:16:41 +00:00
raucao added the
feature
label 2023-03-28 14:41:51 +00:00
Sign in to join this conversation.
No description provided.