! RFACTOR TEMPLATE2
This commit is contained in:
13
app.py
13
app.py
@@ -427,6 +427,19 @@ def format_version(value):
|
||||
|
||||
return result
|
||||
|
||||
@app.template_global()
|
||||
def bootstrap_alert_category(cat):
|
||||
mapping = {
|
||||
'error': 'danger',
|
||||
'fail': 'danger',
|
||||
'warning': 'warning',
|
||||
'warn': 'warning',
|
||||
'ok': 'success',
|
||||
'success': 'success',
|
||||
'info': 'info'
|
||||
}
|
||||
return mapping.get(cat.lower(), 'info')
|
||||
|
||||
def fetch_changelogs(force=False):
|
||||
changelog_url = "https://mikrotik.com/download/changelogs"
|
||||
current_date = datetime.utcnow()
|
||||
|
Reference in New Issue
Block a user