-
Notifications
You must be signed in to change notification settings - Fork 5
/
admin_dashboard.py
35 lines (32 loc) · 1.14 KB
/
admin_dashboard.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import time
import sys
from colorama import Fore, Style
from common_functions import clear_screen, log_action
from user_management import user_management
def admin_dashboard():
# Continuous loop for admin dashboard
while True:
clear_screen()
print(Fore.YELLOW + "\nADMIN Dashboard" + Style.RESET_ALL)
print("\n1. User Management")
print("2. Audit Logs")
print("3. Manage settings")
print("4. Logout")
option = input("\nPlease select an option: ")
# Check user input and perform corresponding action
if option == '1':
user_management()
elif option == '2':
print("\nThis feature is under development.")
elif option == '3':
# ! Implement settings management
print("\nThis feature is under development.")
time.sleep(2)
elif option == '4':
print("\nLogging out...")
log_action("ADMIN", "Logged Out")
time.sleep(2)
sys.exit()
else:
print(Fore.RED + "\nInvalid option. Please try again." + Style.RESET_ALL)
time.sleep(2)