mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
chg: [UI] add update note
This commit is contained in:
parent
613954952a
commit
ea386d76d0
5 changed files with 59 additions and 9 deletions
|
@ -74,10 +74,13 @@ def login():
|
||||||
if user.request_password_change():
|
if user.request_password_change():
|
||||||
return redirect(url_for('root.change_password'))
|
return redirect(url_for('root.change_password'))
|
||||||
else:
|
else:
|
||||||
if next_page and next_page!='None':
|
# update note
|
||||||
|
# next page
|
||||||
|
if next_page and next_page!='None' and next_page!='/':
|
||||||
return redirect(next_page)
|
return redirect(next_page)
|
||||||
|
# dashboard
|
||||||
else:
|
else:
|
||||||
return redirect(url_for('dashboard.index'))
|
return redirect(url_for('dashboard.index', update_note=True))
|
||||||
# login failed
|
# login failed
|
||||||
else:
|
else:
|
||||||
# set brute force protection
|
# set brute force protection
|
||||||
|
@ -113,7 +116,9 @@ def change_password():
|
||||||
if check_password_strength(password1):
|
if check_password_strength(password1):
|
||||||
user_id = current_user.get_id()
|
user_id = current_user.get_id()
|
||||||
create_user_db(user_id , password1, update=True)
|
create_user_db(user_id , password1, update=True)
|
||||||
return redirect(url_for('dashboard.index'))
|
# update Note
|
||||||
|
# dashboard
|
||||||
|
return redirect(url_for('dashboard.index', update_note=True))
|
||||||
else:
|
else:
|
||||||
error = 'Incorrect password'
|
error = 'Incorrect password'
|
||||||
return render_template("change_password.html", error=error)
|
return render_template("change_password.html", error=error)
|
||||||
|
|
|
@ -155,6 +155,8 @@ def stuff():
|
||||||
@login_required
|
@login_required
|
||||||
@login_read_only
|
@login_read_only
|
||||||
def index():
|
def index():
|
||||||
|
update_note = request.args.get('update_note')
|
||||||
|
|
||||||
default_minute = config_loader.get_config_str("Flask", "minute_processed_paste")
|
default_minute = config_loader.get_config_str("Flask", "minute_processed_paste")
|
||||||
threshold_stucked_module = config_loader.get_config_int("Module_ModuleInformation", "threshold_stucked_module")
|
threshold_stucked_module = config_loader.get_config_int("Module_ModuleInformation", "threshold_stucked_module")
|
||||||
log_select = {10, 25, 50, 100}
|
log_select = {10, 25, 50, 100}
|
||||||
|
@ -176,6 +178,7 @@ def index():
|
||||||
return render_template("index.html", default_minute = default_minute, threshold_stucked_module=threshold_stucked_module,
|
return render_template("index.html", default_minute = default_minute, threshold_stucked_module=threshold_stucked_module,
|
||||||
log_select=log_select, selected=max_dashboard_logs,
|
log_select=log_select, selected=max_dashboard_logs,
|
||||||
update_warning_message=update_warning_message, update_in_progress=update_in_progress,
|
update_warning_message=update_warning_message, update_in_progress=update_in_progress,
|
||||||
|
update_note=update_note,
|
||||||
update_warning_message_notice_me=update_warning_message_notice_me)
|
update_warning_message_notice_me=update_warning_message_notice_me)
|
||||||
|
|
||||||
# ========= REGISTRATION =========
|
# ========= REGISTRATION =========
|
||||||
|
|
|
@ -72,12 +72,10 @@
|
||||||
</div>
|
</div>
|
||||||
{%endif%}
|
{%endif%}
|
||||||
|
|
||||||
<div class="alert alert-info alert-dismissible fade show mt-1" role="alert">
|
<!-- TODO: Add users messages -->
|
||||||
<strong>Bootstrap 4 migration!</strong> Some pages are still in bootstrap 3. You can check the migration progress <strong><a href="https://github.com/CIRCL/AIL-framework/issues/330" target="_blank">Here</a></strong>.
|
{%if update_note%}
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
{% include 'dashboard/update_modal.html' %}
|
||||||
<span aria-hidden="true">×</span>
|
{%endif%}
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-2">
|
<div class="row my-2">
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
<div class="col-12 col-lg-10" id="core_content">
|
<div class="col-12 col-lg-10" id="core_content">
|
||||||
|
|
||||||
|
{% include 'dashboard/update_modal.html' %}
|
||||||
|
|
||||||
<div class="card mb-3 mt-1">
|
<div class="card mb-3 mt-1">
|
||||||
<div class="card-header text-white bg-dark pb-1">
|
<div class="card-header text-white bg-dark pb-1">
|
||||||
<h5 class="card-title">AIL-framework Status :</h5>
|
<h5 class="card-title">AIL-framework Status :</h5>
|
||||||
|
|
42
var/www/templates/dashboard/update_modal.html
Normal file
42
var/www/templates/dashboard/update_modal.html
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<div class="modal fade" id="update_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header bg-secondary text-white">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel">Update Note: v3.5 - Splash Manager</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="alert alert-danger text-danger" role="alert">All Splash Crawlers have been removed from the core.</div>
|
||||||
|
AIL is using a new Crawler manager to start and launch dockers and tor/web crawlers
|
||||||
|
|
||||||
|
<ul class="list-group my-3">
|
||||||
|
<li class="list-group-item active">Splash Manager Features:</li>
|
||||||
|
<li class="list-group-item">Install and run Splash crawlers on another server</li>
|
||||||
|
<li class="list-group-item">Handle proxies (Web and tor)</li>
|
||||||
|
<li class="list-group-item">Launch/Kill Splash Dockers</li>
|
||||||
|
<li class="list-group-item">Restart crawlers on crash</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<a class="btn btn-info" href="https://github.com/ail-project/ail-splash-manager" role="button">
|
||||||
|
<i class="fab fa-github"></i> Install and Configure AIL-Splash-Manager
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(window).on('load', function() {
|
||||||
|
$('#update_modal').modal('show');
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in a new issue