mirror of https://github.com/JohnHammond/CTFd.git
Starting DO integration
parent
fb5e525775
commit
7642aeb1e5
|
@ -55,3 +55,4 @@ target/
|
||||||
|
|
||||||
*.db
|
*.db
|
||||||
*.log
|
*.log
|
||||||
|
.idea/
|
|
@ -111,6 +111,11 @@ def init_admin(app):
|
||||||
return render_template('admin/pages.html', routes=pages)
|
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'])
|
@app.route('/admin/chals', methods=['POST', 'GET'])
|
||||||
@admins_only
|
@admins_only
|
||||||
def admin_chals():
|
def admin_chals():
|
||||||
|
|
|
@ -8,3 +8,4 @@ passlib==1.6.2
|
||||||
py-bcrypt==0.4
|
py-bcrypt==0.4
|
||||||
six==1.8.0
|
six==1.8.0
|
||||||
itsdangerous
|
itsdangerous
|
||||||
|
dop
|
|
@ -135,7 +135,7 @@ function loadchals(){
|
||||||
};
|
};
|
||||||
|
|
||||||
for (var i = 0; i <= challenges['game'].length - 1; i++) {
|
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) {
|
$('#challenges button').click(function (e) {
|
||||||
|
@ -145,7 +145,7 @@ function loadchals(){
|
||||||
loadfiles(this.value);
|
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) {
|
$('.create-challenge').click(function (e) {
|
||||||
$('#new-chal-category').val($($(this).siblings()[0]).text().trim())
|
$('#new-chal-category').val($($(this).siblings()[0]).text().trim())
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
<div>
|
<div>
|
||||||
<table id='challenges'>
|
<table id='challenges'>
|
||||||
</table>
|
</table>
|
||||||
<button style="width:100%;" class="create-category">New Category</button>
|
<button style="width:100%;" class="radius create-category">New Category</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,6 +7,11 @@
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input name='nonce' type='hidden' value="{{ nonce }}">
|
<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">
|
<div class="row">
|
||||||
<label for="start">Start Date:</label>
|
<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 %}>
|
<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