mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
fix: release tiemeout alarm, chg:icon graph node
This commit is contained in:
parent
87b7facba8
commit
fce324e370
3 changed files with 14 additions and 7 deletions
|
@ -37,6 +37,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
regex = '|'.join(regexs)
|
regex = '|'.join(regexs)
|
||||||
while True:
|
while True:
|
||||||
|
signal.alarm(max_execution_time)
|
||||||
filepath = p.get_from_set()
|
filepath = p.get_from_set()
|
||||||
if filepath is None:
|
if filepath is None:
|
||||||
publisher.debug("Script Release is Idling 10s")
|
publisher.debug("Script Release is Idling 10s")
|
||||||
|
@ -47,7 +48,7 @@ if __name__ == "__main__":
|
||||||
paste = Paste.Paste(filepath)
|
paste = Paste.Paste(filepath)
|
||||||
content = paste.get_p_content()
|
content = paste.get_p_content()
|
||||||
|
|
||||||
signal.alarm(max_execution_time)
|
#signal.alarm(max_execution_time)
|
||||||
try:
|
try:
|
||||||
releases = set(re.findall(regex, content))
|
releases = set(re.findall(regex, content))
|
||||||
if len(releases) == 0:
|
if len(releases) == 0:
|
||||||
|
|
|
@ -78,7 +78,7 @@ def get_file_icon_text(estimated_type):
|
||||||
elif file_type == 'audio':
|
elif file_type == 'audio':
|
||||||
file_icon_text = '\uf1c7'
|
file_icon_text = '\uf1c7'
|
||||||
elif file_type == 'image':
|
elif file_type == 'image':
|
||||||
file_icon_text = '\uf03e'
|
file_icon_text = '\uf1c5'
|
||||||
elif file_type == 'text':
|
elif file_type == 'text':
|
||||||
file_icon_text = '\uf15c'
|
file_icon_text = '\uf15c'
|
||||||
else:
|
else:
|
||||||
|
@ -354,7 +354,7 @@ def hash_graph_node_json():
|
||||||
size = r_serv_metadata.hget('metadata_hash:'+child_hash, 'size')
|
size = r_serv_metadata.hget('metadata_hash:'+child_hash, 'size')
|
||||||
estimated_type = r_serv_metadata.hget('metadata_hash:'+child_hash, 'estimated_type')
|
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))
|
links_set.add((child_hash, paste))
|
||||||
|
|
||||||
#l_pastes_child = r_serv_metadata.zrange('base64_hash:'+child_hash, 0, -1)
|
#l_pastes_child = r_serv_metadata.zrange('base64_hash:'+child_hash, 0, -1)
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.graph_node_icon {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.node text {
|
.node text {
|
||||||
font: 8px sans-serif;
|
font: 8px sans-serif;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
|
@ -286,15 +290,17 @@ d3.json(url)
|
||||||
.attr("r", function(d) {
|
.attr("r", function(d) {
|
||||||
return (d.hash) ? 6 : 5; })
|
return (d.hash) ? 6 : 5; })
|
||||||
.attr("fill", function(d) {
|
.attr("fill", function(d) {
|
||||||
if(!d.hash){return color(d.group)}
|
if(!d.hash){ return color(d.group);}
|
||||||
return 'white'; });
|
if(d.group == 1){ return "orange";}
|
||||||
|
return "rgb(141, 211, 199)"; });
|
||||||
|
|
||||||
node.append('text')
|
node.append('text')
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.attr('dominant-baseline', 'central')
|
.attr('dominant-baseline', 'central')
|
||||||
//.text(function(d) { return ICON_UNICODE[d.nodeType]; });
|
.attr("class", "graph_node_icon")
|
||||||
.attr('font-family', 'FontAwesome')
|
.attr('font-family', 'FontAwesome')
|
||||||
.attr('font-size', '12px' )
|
.attr('font-size', '8px' )
|
||||||
|
.attr('pointer-events', 'none')
|
||||||
.text(function(d) {
|
.text(function(d) {
|
||||||
if(d.hash){
|
if(d.hash){
|
||||||
return d.icon
|
return d.icon
|
||||||
|
|
Loading…
Reference in a new issue