panel icon indicating copy to clipboard operation
panel copied to clipboard

[Feature] Enhance Activity Log with Detailed and Contextual Entries

Open Maximilian1021 opened this issue 1 year ago • 6 comments

Feature Description

Currently, the Activity Log provides only general information about changes, such as "Server updated." This makes it difficult to track specific changes and understand their reasons. For critical actions like server suspensions or account-related changes (e.g., coins, roles, vouchers), more transparency is needed.

A more detailed logging system that records not only the type of change but also the reason behind it would significantly improve traceability and efficiency.

Examples:

  • **Server suspended:** Log the reason, such as "Server suspended due to insufficient funds" or "Server suspended due to inactivity."
    
  • **Coins adjustments:** Log credits or deductions with a reason, e.g., "Coins deducted for overdue payment."
    
  • **Role changes:** Log the reason for role modifications, e.g., "Role 'Admin' removed due to policy violation."
    
  • **Voucher actions:** Include details on voucher creation, redemption, or expiration.
    

Solution Idea

Expand the Activity Log to include more precise entries and the reasons behind actions:

Server suspension or reactivation:
    Old entry: Server updated
    New entry:
        Server suspended due to insufficient funds.
        Server suspended due to inactivity for 30 days.
        Server unsuspended (manual action by admin).

Coins adjustments:
    Old entry: Account updated
    New entry:
        User '[email protected]' credited with 100 Coins (Reason: Voucher redemption).
        User '[email protected]' debited by 50 Coins (Reason: Overdue payment).

Role changes:
    Old entry: User updated
    New entry:
        Role 'Admin' assigned to user '[email protected]' (Reason: Promotion).
        Role 'Support' removed from user '[email protected]' (Reason: Account inactive).

Voucher actions:
    Voucher creation:
        Old entry: Voucher updated
        New entry: Voucher 'SUMMER2024' created (Value: 10€; Expires: 2024-12-31; Created by admin).
    Voucher redemption:
        Old entry: Voucher updated
        New entry: Voucher 'SUMMER2024' redeemed by user '[email protected]' (Value: 10€; Applied to invoice #12345).
    Voucher expiration:
        Old entry: Voucher updated
        New entry: Voucher 'WINTER2023' expired (Value: 5€ unused).

Implementation details:

Extend backend logic:
    Identify specific events (e.g., server status changes, coins adjustments, role modifications).
    Add a field for reasons behind the changes in the log entries.
Save "before" and "after" values for better traceability.
Allow administrators to optionally specify reasons for manual changes.

Additional Info

Additional Info

Target Audience: Administrators and support staff who need to track changes to servers, user accounts, coins, or vouchers.
Benefits:
    Enhanced transparency.
    Simplified troubleshooting for support inquiries.
    Improved security monitoring.
Challenges:
    Ensure privacy-compliant storage of log entries (e.g., no sensitive data stored unencrypted).
    Maintain performance with large log volumes.

Anything Else

Filtering options: Search logs by reason, action type, user, or date.
Export capability: Provide logs as CSV or JSON for analysis.
Notifications: Enable alerts for critical events (e.g., server suspension due to insufficient funds).

Maximilian1021 avatar Nov 21 '24 21:11 Maximilian1021

Duplicate of #708

S0ly avatar Nov 24 '24 13:11 S0ly

This is way more detailed. thanks

1day2die avatar Nov 28 '24 08:11 1day2die

@1day2die since you closed the pull request, this should not be closed whit it ?

S0ly avatar Dec 04 '24 19:12 S0ly

@1day2die since you closed the pull request, this should not be closed whit it ?

He hasn't finished this yet

MrWeez avatar Dec 04 '24 19:12 MrWeez

Just started working in this direction

MrWeez avatar Dec 04 '24 20:12 MrWeez

correct

1day2die avatar Dec 09 '24 13:12 1day2die