mirror of https://github.com/jumpserver/jumpserver
modify logdir , asset beizhu
parent
596573293f
commit
de2837229c
|
@ -105,9 +105,10 @@ def run_cmd(cmd):
|
|||
|
||||
def connect(host, port, user, password):
|
||||
"""Use pexpect module to connect other server."""
|
||||
if not os.path.isdir(log_dir):
|
||||
os.mkdir(log_dir)
|
||||
logfile = open("%s/%s_%s_%s" % (log_dir, host, time.strftime('%Y%m%d'), user), 'a')
|
||||
log_date_dir = '%s/%s' % (log_dir, time.strftime('%Y%m%d'))
|
||||
if not os.path.isdir(log_date_dir):
|
||||
os.mkdir(log_date_dir)
|
||||
logfile = open("%s/%s_%s" % (log_date_dir, host, user), 'a')
|
||||
logfile.write('\n\n%s\n\n' % time.strftime('%Y%m%d_%H%M%S'))
|
||||
cmd = 'ssh -q -p %s %s@%s' % (port, user, host)
|
||||
global foo
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<div class="form-group">
|
||||
<label for="comment" class="col-sm-2 control-label">备注<span style="color: red"></span></label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="comment" name="comment" placeholder="备注">
|
||||
<input type="text" class="form-control" id="comment" name="comment" placeholder="备注(最好是英文)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue