fix submit paste

This commit is contained in:
Terrtia 2018-06-29 15:29:02 +02:00
parent 98d0235fc3
commit a0a639276c
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 100 additions and 61 deletions

View file

@ -34,7 +34,7 @@ def create_paste(uuid, paste_content, ltags, ltagsgalaxies, name):
gzip64encoded = base64.standard_b64encode(gzipencoded).decode()
except:
abord_file_submission(uuid, "file error")
continue
return 1
# send paste to Global module
relay_message = "{0} {1}".format(save_path, gzip64encoded)

View file

@ -12,6 +12,7 @@
<link href="{{ url_for('static', filename='font-awesome/css/font-awesome.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/sb-admin-2.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/dataTables.bootstrap.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ url_for('static', filename='css/daterangepicker.min.css') }}" rel="stylesheet" type="text/css" />
<!-- JS -->
<script language="javascript" src="{{ url_for('static', filename='js/jquery.js')}}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
@ -20,6 +21,8 @@
<script src="{{ url_for('static', filename='js/jquery.flot.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.flot.time.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.flot.stack.js') }}"></script>
<script language="javascript" src="{{ url_for('static', filename='js/moment.min.js') }}"></script>
<script language="javascript" src="{{ url_for('static', filename='js/jquery.daterangepicker.min.js') }}"></script>
<script language="javascript" src="{{ url_for('static', filename='js/d3.js') }}"></script>
<style>
.red_table thead{
@ -53,6 +56,7 @@
</div>
<!-- /.col-lg-12 -->
<div class="col-md-6">
{% if type %}
<div id="barchart_type">
</div>
@ -115,6 +119,11 @@
{% else %}
<h3>{{daily_date[0:4]}}/{{daily_date[4:6]}}/{{daily_date[6:8]}}, No base64</h3>
{% endif %}
</div>
<div class="col-md-6">
<input id="date-range-from" size="40" value="">
<input id="date-range-to" size="40" value="">
</div>
</div>
<!-- /.row -->
@ -124,6 +133,37 @@
activePage = "page-base64Decoded"
$("#"+activePage).addClass("active");
$('#date-range-from').dateRangePicker({
separator : ' to ',
getValue: function()
{
if ($('#date-range-from').val() && $('#date-range-to').val() )
return $('#date-range-from').val() + ' to ' + $('#date-range-to').val();
else
return '';
},
setValue: function(s,s1,s2)
{
$('#date-range-from').val(s1);
$('#date-range-to').val(s2);
}
});
$('#date-range-to').dateRangePicker({
separator : ' to ',
getValue: function()
{
if ($('#date-range-from').val() && $('#date-range-to').val() )
return $('#date-range-from').val() + ' to ' + $('#date-range-to').val();
else
return '';
},
setValue: function(s,s1,s2)
{
$('#date-range-from').val(s1);
$('#date-range-to').val(s2);
}
});
$('#tableb64').DataTable({
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
"iDisplayLength": 10,
@ -135,7 +175,6 @@
{% endif %}
{% if daily_type_chart %}
barchart_type('/base64Decoded/daily_type_json?date={{daily_date}}', '#barchart_type');
console.log('cool')
{% endif %}
});