From 2b310d436790d99ba45d6e1d91b054ae800667f1 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 1 Jun 2018 11:26:45 +0200 Subject: [PATCH] clean --- var/www/modules/Flask_config.py | 2 ++ var/www/modules/Tags/Flask_Tags.py | 8 +------- var/www/modules/Tags/templates/Tags.html | 2 -- var/www/modules/Tags/templates/galaxies.html | 1 - .../modules/Tags/templates/tag_galaxy_info.html | 3 --- var/www/modules/Tags/templates/tagged.html | 11 ----------- var/www/modules/Tags/templates/taxonomies.html | 8 -------- .../modules/browsepastes/Flask_browsepastes.py | 14 +------------- .../templates/important_paste_by_module.html | 1 - var/www/modules/search/Flask_search.py | 15 +-------------- var/www/modules/showpaste/Flask_showpaste.py | 9 +-------- .../showpaste/templates/show_saved_paste.html | 4 +--- var/www/update_thirdparty.sh | 2 +- 13 files changed, 8 insertions(+), 72 deletions(-) diff --git a/var/www/modules/Flask_config.py b/var/www/modules/Flask_config.py index 41745f21..26edccfa 100644 --- a/var/www/modules/Flask_config.py +++ b/var/www/modules/Flask_config.py @@ -82,3 +82,5 @@ max_preview_char = int(cfg.get("Flask", "max_preview_char")) # Maximum number of max_preview_modal = int(cfg.get("Flask", "max_preview_modal")) # Maximum number of character to display in the modal DiffMaxLineLength = int(cfg.get("Flask", "DiffMaxLineLength"))#Use to display the estimated percentage instead of a raw value + +bootstrap_label = ['primary', 'success', 'danger', 'warning', 'info'] diff --git a/var/www/modules/Tags/Flask_Tags.py b/var/www/modules/Tags/Flask_Tags.py index 701f7c46..95560ad6 100644 --- a/var/www/modules/Tags/Flask_Tags.py +++ b/var/www/modules/Tags/Flask_Tags.py @@ -24,6 +24,7 @@ r_serv_tags = Flask_config.r_serv_tags r_serv_metadata = Flask_config.r_serv_metadata max_preview_char = Flask_config.max_preview_char max_preview_modal = Flask_config.max_preview_modal +bootstrap_label = Flask_config.bootstrap_label Tags = Blueprint('Tags', __name__, template_folder='templates') @@ -204,13 +205,6 @@ def get_tagged_paste(): #TODO FIXME currentSelectYear = int(datetime.now().year) - bootstrap_label = [] - bootstrap_label.append('primary') - bootstrap_label.append('success') - bootstrap_label.append('danger') - bootstrap_label.append('warning') - bootstrap_label.append('info') - all_content = [] paste_date = [] paste_linenum = [] diff --git a/var/www/modules/Tags/templates/Tags.html b/var/www/modules/Tags/templates/Tags.html index 8c9fad2a..f3cf1a44 100644 --- a/var/www/modules/Tags/templates/Tags.html +++ b/var/www/modules/Tags/templates/Tags.html @@ -77,8 +77,6 @@ $.getJSON('/Tags/get_all_tags', function(data) { - //console.log(data) - //for(var i=0;i $(document).ready(function(){ - //search_table = $('#myTable_').DataTable({ "order": [[ 2, "desc" ]] }); - $('#myTable_').DataTable( { "aLengthMenu": [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]], "iDisplayLength": 15, - //"order": [[ 1, "asc" ]] } ); diff --git a/var/www/modules/Tags/templates/tagged.html b/var/www/modules/Tags/templates/tagged.html index 1fe47c4f..284323fd 100644 --- a/var/www/modules/Tags/templates/tagged.html +++ b/var/www/modules/Tags/templates/tagged.html @@ -159,7 +159,6 @@ $(document).ready(function(){ search_table = $('#myTable_').DataTable({ "order": [[ 2, "desc" ]] }); $('[data-toggle="tooltip"]').tooltip(); $("[data-toggle='modal']").off('click.openmodal').on("click.openmodal", function (event) { - //get_html_and_update_modal(event); get_html_and_update_modal(event, $(this)); }); @@ -169,18 +168,10 @@ $(document).ready(function(){ $("#nbr_entry").hide(); $("#loading_gif_browse").hide(); - /*$('#myTable_').DataTable( - { - "aLengthMenu": [[5, 10, 25, -1], [5, 10, 25, "All"]], - "iDisplayLength": 10 - } - );*/ - $.getJSON('/Tags/get_all_tags', function(data) { activePage = "page-Tags" $("#"+activePage).addClass("active"); - //var valueData = ["infoleak:automatic-detection=\"bitcoin-address\"","infoleak:automatic-detection=\"aws-key\"",'misp-galaxy:botnet="Marina Botnet"']; var valueData = [ {% for tag in list_tag %} '{{tag|safe}}', @@ -195,8 +186,6 @@ $(document).ready(function(){ name: 'ltags', }); - //ltags.setValue(["{{ tags }}"]); - //ltags.setValue([{id:"infoleak:automatic-detection='bitcoin-address'",name:"infoleak:automatic-detection='bitcoin-address'"}}]); }); }); diff --git a/var/www/modules/Tags/templates/taxonomies.html b/var/www/modules/Tags/templates/taxonomies.html index 6ac9a3e6..74feda6f 100644 --- a/var/www/modules/Tags/templates/taxonomies.html +++ b/var/www/modules/Tags/templates/taxonomies.html @@ -97,19 +97,11 @@