Commit 6168ab27 authored by 蓝枫's avatar 蓝枫

Merge pull request #19 from IYism/master

bugfix:connect.py log_online.html
parents a4ac9833 66786222
......@@ -91,7 +91,7 @@ def log_record(username, host):
dept_name = User.objects.get(username=username).dept.name
pid = os.getpid()
pts = os.popen("ps axu | awk '$2==%s{ print $7 }'" % pid).read().strip()
ip_list = os.popen("who | awk '$2==%s{ print $5 }'" % pts).read().strip('()\n')
ip_list = os.popen("who | awk '$2==\"%s\"{ print $5 }'" % pts).read().strip('()\n')
if not os.path.isdir(today_connect_log_dir):
try:
......
......@@ -223,10 +223,12 @@
$.ajax({
type: "GET",
url: g_url,
success: window.open("/jlog/log_list/online/", "_self")
success: function(){
document.location.reload();
}
// error: window.open(g_url, "_self")
});
}
</script>
{% endblock %}
\ No newline at end of file
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment