mirror of https://github.com/CIRCL/AIL-framework
fix: release tiemeout alarm, chg:icon graph node
parent
87b7facba8
commit
fce324e370
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue