mirror of https://github.com/JohnHammond/CTFd.git
Starting DO integration
parent
fb5e525775
commit
7642aeb1e5
|
@ -54,4 +54,5 @@ docs/_build/
|
|||
target/
|
||||
|
||||
*.db
|
||||
*.log
|
||||
*.log
|
||||
.idea/
|
|
@ -111,6 +111,11 @@ def init_admin(app):
|
|||
return render_template('admin/pages.html', routes=pages)
|
||||
|
||||
|
||||
@app.route('/admin/hosts', methods=['GET'])
|
||||
@admins_only
|
||||
def admin_hosts():
|
||||
return render_template('admin/hosts.html')
|
||||
|
||||
@app.route('/admin/chals', methods=['POST', 'GET'])
|
||||
@admins_only
|
||||
def admin_chals():
|
||||
|
@ -353,12 +358,12 @@ def init_admin(app):
|
|||
db.session.close()
|
||||
|
||||
return render_template('admin/statistics.html', team_count=teams_registered,
|
||||
hit_count=site_hits,
|
||||
wrong_count=wrong_count,
|
||||
solve_count=solve_count,
|
||||
hit_count=site_hits,
|
||||
wrong_count=wrong_count,
|
||||
solve_count=solve_count,
|
||||
challenge_count=challenge_count,
|
||||
most_solved=most_solved_chal,
|
||||
least_solved = least_solved_chal
|
||||
least_solved=least_solved_chal
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@ SQLAlchemy==0.9.8
|
|||
passlib==1.6.2
|
||||
py-bcrypt==0.4
|
||||
six==1.8.0
|
||||
itsdangerous
|
||||
itsdangerous
|
||||
dop
|
|
@ -135,7 +135,7 @@ function loadchals(){
|
|||
};
|
||||
|
||||
for (var i = 0; i <= challenges['game'].length - 1; i++) {
|
||||
$('#' + challenges['game'][i].category.replace(/ /g,"-")).append($('<button value="' + challenges['game'][i].id + '">' + challenges['game'][i].value + '</button>'));
|
||||
$('#' + challenges['game'][i].category.replace(/ /g,"-")).append($('<button class="radius" value="' + challenges['game'][i].id + '">' + challenges['game'][i].value + '</button>'));
|
||||
};
|
||||
|
||||
$('#challenges button').click(function (e) {
|
||||
|
@ -145,7 +145,7 @@ function loadchals(){
|
|||
loadfiles(this.value);
|
||||
});
|
||||
|
||||
$('tr').append('<button class="create-challenge"><i class="fa fa-plus"></i></button>');
|
||||
$('tr').append('<button class="radius create-challenge"><i class="fa fa-plus"></i></button>');
|
||||
|
||||
$('.create-challenge').click(function (e) {
|
||||
$('#new-chal-category').val($($(this).siblings()[0]).text().trim())
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<div>
|
||||
<table id='challenges'>
|
||||
</table>
|
||||
<button style="width:100%;" class="create-category">New Category</button>
|
||||
<button style="width:100%;" class="radius create-category">New Category</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
<form method="POST">
|
||||
<input name='nonce' type='hidden' value="{{ nonce }}">
|
||||
|
||||
<div class="row">
|
||||
<label for="start">Digital Ocean API Key:</label>
|
||||
<input id='do_api_key' name='do_api_key' type='text' placeholder="Digital Ocean API Key" {% if do_api_key is defined and do_api_key != None %}value="{{ do_api_key }}"{% endif %}>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="start">Start Date:</label>
|
||||
<input id='start' name='start' type='text' placeholder="Start Date (UTC timestamp)" {% if start is defined and start != None %}value="{{ start }}"{% endif %}>
|
||||
|
|
Loading…
Reference in New Issue