From fce324e370b0ec6f8fc51545be5ce6463af4075c Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 13 Jul 2018 11:54:14 +0200 Subject: [PATCH] fix: release tiemeout alarm, chg:icon graph node --- bin/Release.py | 3 ++- .../modules/base64Decoded/Flask_base64Decoded.py | 4 ++-- .../modules/base64Decoded/templates/showHash.html | 14 ++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/Release.py b/bin/Release.py index dbe57122..43c84b04 100755 --- a/bin/Release.py +++ b/bin/Release.py @@ -37,6 +37,7 @@ if __name__ == "__main__": regex = '|'.join(regexs) while True: + signal.alarm(max_execution_time) filepath = p.get_from_set() if filepath is None: publisher.debug("Script Release is Idling 10s") @@ -47,7 +48,7 @@ if __name__ == "__main__": paste = Paste.Paste(filepath) content = paste.get_p_content() - signal.alarm(max_execution_time) + #signal.alarm(max_execution_time) try: releases = set(re.findall(regex, content)) if len(releases) == 0: diff --git a/var/www/modules/base64Decoded/Flask_base64Decoded.py b/var/www/modules/base64Decoded/Flask_base64Decoded.py index 084e75c9..c3a5c937 100644 --- a/var/www/modules/base64Decoded/Flask_base64Decoded.py +++ b/var/www/modules/base64Decoded/Flask_base64Decoded.py @@ -78,7 +78,7 @@ def get_file_icon_text(estimated_type): elif file_type == 'audio': file_icon_text = '\uf1c7' elif file_type == 'image': - file_icon_text = '\uf03e' + file_icon_text = '\uf1c5' elif file_type == 'text': file_icon_text = '\uf15c' else: @@ -354,7 +354,7 @@ def hash_graph_node_json(): size = r_serv_metadata.hget('metadata_hash:'+child_hash, 'size') estimated_type = r_serv_metadata.hget('metadata_hash:'+child_hash, 'estimated_type') - nodes_set_hash.add((child_hash, 1, first_seen, last_seen, estimated_type, nb_seen_in_paste, size, url)) + nodes_set_hash.add((child_hash, 3, first_seen, last_seen, estimated_type, nb_seen_in_paste, size, url)) links_set.add((child_hash, paste)) #l_pastes_child = r_serv_metadata.zrange('base64_hash:'+child_hash, 0, -1) diff --git a/var/www/modules/base64Decoded/templates/showHash.html b/var/www/modules/base64Decoded/templates/showHash.html index 5de3346d..2796d572 100644 --- a/var/www/modules/base64Decoded/templates/showHash.html +++ b/var/www/modules/base64Decoded/templates/showHash.html @@ -50,6 +50,10 @@ pointer-events: none; } + .graph_node_icon { + pointer-events: none; + } + .node text { font: 8px sans-serif; pointer-events: auto; @@ -286,15 +290,17 @@ d3.json(url) .attr("r", function(d) { return (d.hash) ? 6 : 5; }) .attr("fill", function(d) { - if(!d.hash){return color(d.group)} - return 'white'; }); + if(!d.hash){ return color(d.group);} + if(d.group == 1){ return "orange";} + return "rgb(141, 211, 199)"; }); node.append('text') .attr('text-anchor', 'middle') .attr('dominant-baseline', 'central') - //.text(function(d) { return ICON_UNICODE[d.nodeType]; }); + .attr("class", "graph_node_icon") .attr('font-family', 'FontAwesome') - .attr('font-size', '12px' ) + .attr('font-size', '8px' ) + .attr('pointer-events', 'none') .text(function(d) { if(d.hash){ return d.icon