Commit migration
Fix overview divide-by-zero error Remove CoreProtect permissions for new app Signed-off-by: Etzelia <etzelia@hotmail.com>pull/2/head
parent
da66751986
commit
bc852b2090
File diff suppressed because one or more lines are too long
|
@ -13,11 +13,8 @@ class MinecraftManagerUser(User):
|
||||||
class Meta:
|
class Meta:
|
||||||
proxy = True
|
proxy = True
|
||||||
permissions = (
|
permissions = (
|
||||||
('coreprotect_partial', 'Can use CoreProtect GUI except Command/Chat searches'),
|
('minecraft_manager_bots', 'Can use the bot control page'),
|
||||||
('coreprotect_full', 'Can use full CoreProtect GUI'),
|
('minecraft_manager_chat', 'Can use chat page'),
|
||||||
('coreprotect_activity', 'Can use CoreProtect Activity Monitor'),
|
|
||||||
('bots', 'Can use the bot control page'),
|
|
||||||
('chat', 'Can use chat page'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,11 @@ def overview_data():
|
||||||
# Percentage
|
# Percentage
|
||||||
data['percentage'] = {
|
data['percentage'] = {
|
||||||
'accepted': round((data['total']['application']['accepted'] /
|
'accepted': round((data['total']['application']['accepted'] /
|
||||||
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1) * 100, 2),
|
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1) * 100, 2),
|
||||||
'banned': round((data['total']['player']['banned'] /
|
'banned': round((data['total']['player']['banned'] /
|
||||||
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2),
|
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2),
|
||||||
'applied': round((data['total']['application']['all'] / data['total']['player']['all']) * 100, 2)
|
'applied': round((data['total']['application']['all'] /
|
||||||
|
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unique logins
|
# Unique logins
|
||||||
|
|
Loading…
Reference in New Issue