fix: release tiemeout alarm, chg:icon graph node

This commit is contained in:
Terrtia 2018-07-13 11:54:14 +02:00
parent 87b7facba8
commit fce324e370
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
3 changed files with 14 additions and 7 deletions

View file

@ -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:

View file

@ -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)

View file

@ -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