Commit migration

Fix overview divide-by-zero error
Remove CoreProtect permissions for new app

Signed-off-by: Etzelia <etzelia@hotmail.com>
pull/2/head
Etzelia 2019-07-26 12:37:20 -05:00
parent da66751986
commit bc852b2090
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
3 changed files with 54 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -13,11 +13,8 @@ class MinecraftManagerUser(User):
class Meta:
proxy = True
permissions = (
('coreprotect_partial', 'Can use CoreProtect GUI except Command/Chat searches'),
('coreprotect_full', 'Can use full CoreProtect GUI'),
('coreprotect_activity', 'Can use CoreProtect Activity Monitor'),
('bots', 'Can use the bot control page'),
('chat', 'Can use chat page'),
('minecraft_manager_bots', 'Can use the bot control page'),
('minecraft_manager_chat', 'Can use chat page'),
)

View File

@ -46,10 +46,11 @@ def overview_data():
# Percentage
data['percentage'] = {
'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'] /
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)
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2),
'applied': round((data['total']['application']['all'] /
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2)
}
# Unique logins