mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
clean
This commit is contained in:
parent
673b6d4e62
commit
2b310d4367
13 changed files with 8 additions and 72 deletions
|
@ -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']
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -77,8 +77,6 @@
|
|||
|
||||
$.getJSON('/Tags/get_all_tags',
|
||||
function(data) {
|
||||
//console.log(data)
|
||||
//for(var i=0;i<data.length;i++) jsonData.push({id:i,name:data[i]});
|
||||
|
||||
ltags = $('#ltags').tagSuggest({
|
||||
data: data,
|
||||
|
|
|
@ -111,7 +111,6 @@ $(document).ready(function(){
|
|||
{
|
||||
"aLengthMenu": [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
|
||||
"iDisplayLength": 15,
|
||||
//"order": [[ 1, "asc" ]]
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -100,13 +100,10 @@
|
|||
<script>
|
||||
$(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" ]]
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -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'"}}]);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -97,19 +97,11 @@
|
|||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
/*$('[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));
|
||||
});
|
||||
|
||||
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" ]]
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ cfg = Flask_config.cfg
|
|||
max_preview_char = Flask_config.max_preview_char
|
||||
max_preview_modal = Flask_config.max_preview_modal
|
||||
r_serv_metadata = Flask_config.r_serv_metadata
|
||||
bootstrap_label = Flask_config.bootstrap_label
|
||||
|
||||
#init all lvlDB servers
|
||||
curYear = datetime.now().year
|
||||
|
@ -58,12 +59,6 @@ def event_stream_getImportantPasteByModule(module_name, year):
|
|||
index = 0
|
||||
all_pastes_list = getPastebyType(r_serv_db[year], module_name)
|
||||
paste_tags = []
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
bootstrap_label.append('success')
|
||||
bootstrap_label.append('danger')
|
||||
bootstrap_label.append('warning')
|
||||
bootstrap_label.append('info')
|
||||
|
||||
for path in all_pastes_list:
|
||||
index += 1
|
||||
|
@ -128,13 +123,6 @@ def importantPasteByModule():
|
|||
paste_tags = []
|
||||
allPastes = getPastebyType(r_serv_db[currentSelectYear], module_name)
|
||||
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
bootstrap_label.append('success')
|
||||
bootstrap_label.append('danger')
|
||||
bootstrap_label.append('warning')
|
||||
bootstrap_label.append('info')
|
||||
|
||||
for path in allPastes[0:10]:
|
||||
all_path.append(path)
|
||||
paste = Paste.Paste(path)
|
||||
|
|
|
@ -137,7 +137,6 @@ $("#myTable_"+moduleName).attr('data-numElem', "{{ all_path|length }}");
|
|||
$(document).ready(function(){
|
||||
$('[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));
|
||||
});
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ r_serv_pasteName = Flask_config.r_serv_pasteName
|
|||
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
|
||||
|
||||
|
||||
baseindexpath = os.path.join(os.environ['AIL_HOME'], cfg.get("Indexer", "path"))
|
||||
|
@ -158,13 +159,6 @@ def search():
|
|||
results = searcher.search(query)
|
||||
num_res = len(results)
|
||||
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
bootstrap_label.append('success')
|
||||
bootstrap_label.append('danger')
|
||||
bootstrap_label.append('warning')
|
||||
bootstrap_label.append('info')
|
||||
|
||||
index_min = 1
|
||||
index_max = len(get_index_list())
|
||||
return render_template("search.html", r=r, c=c,
|
||||
|
@ -198,13 +192,6 @@ def get_more_search_result():
|
|||
size_array = []
|
||||
list_tags = []
|
||||
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
bootstrap_label.append('success')
|
||||
bootstrap_label.append('danger')
|
||||
bootstrap_label.append('warning')
|
||||
bootstrap_label.append('info')
|
||||
|
||||
schema = Schema(title=TEXT(stored=True), path=ID(stored=True), content=TEXT)
|
||||
|
||||
ix = index.open_dir(selected_index)
|
||||
|
|
|
@ -23,6 +23,7 @@ r_serv_tags = Flask_config.r_serv_tags
|
|||
max_preview_char = Flask_config.max_preview_char
|
||||
max_preview_modal = Flask_config.max_preview_modal
|
||||
DiffMaxLineLength = Flask_config.DiffMaxLineLength
|
||||
bootstrap_label = Flask_config.bootstrap_label
|
||||
|
||||
showsavedpastes = Blueprint('showsavedpastes', __name__, template_folder='templates')
|
||||
|
||||
|
@ -97,14 +98,6 @@ def showpaste(content_range):
|
|||
if content_range != 0:
|
||||
p_content = p_content[0:content_range]
|
||||
|
||||
#tag color
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
bootstrap_label.append('success')
|
||||
bootstrap_label.append('danger')
|
||||
bootstrap_label.append('warning')
|
||||
bootstrap_label.append('info')
|
||||
|
||||
#active taxonomies
|
||||
active_taxonomies = r_serv_tags.smembers('active_taxonomies')
|
||||
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
|
||||
ltags = $('#ltags').tagSuggest({
|
||||
data: data,
|
||||
//sortOrder: 'name',
|
||||
maxDropHeight: 200,
|
||||
name: 'ltags'
|
||||
});
|
||||
|
@ -229,7 +228,6 @@
|
|||
|
||||
ltagsgalaxies = $('#ltagsgalaxies').tagSuggest({
|
||||
data: data,
|
||||
//sortOrder: 'name',
|
||||
maxDropHeight: 200,
|
||||
name: 'ltagsgalaxies'
|
||||
});
|
||||
|
@ -241,7 +239,7 @@
|
|||
|
||||
<script>
|
||||
jQuery("#all-tags-taxonomies").click(function(e){
|
||||
//change input tags list /Tags/get_tags_taxonomie?taxonomie=infoleak
|
||||
//change input tags list
|
||||
$.getJSON('/Tags/get_all_tags_taxonomies',
|
||||
function(data) {
|
||||
ltags.setData(data)
|
||||
|
|
|
@ -69,4 +69,4 @@ popd
|
|||
source ./../../AILENV/bin/activate
|
||||
#Update MISP Taxonomies and Galaxies
|
||||
python3 -m pip install git+https://github.com/MISP/PyTaxonomies
|
||||
python3 -m pip install --upgrade git+https://github.com/MISP/PyMISPGalaxies
|
||||
python3 -m pip install git+https://github.com/MISP/PyMISPGalaxies
|
||||
|
|
Loading…
Reference in a new issue