mirror of https://github.com/jumpserver/jumpserver
add docker support and update the locally
commit
6acda5fcd1
|
@ -274,7 +274,7 @@ class TermLogRecorder(object):
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
filepath = os.path.join(path, 'tty', date, filename + '.zip')
|
filepath = os.path.join(path, 'tty', date, filename + '.zip')
|
||||||
if not os.path.isdir(os.path.join(path, 'tty', date)):
|
if not os.path.isdir(os.path.join(path, 'tty', date)):
|
||||||
os.makedirs(os.path.join(path, 'tty', date), mode=0777)
|
mkdir(os.path.join(path, 'tty', date), mode=777)
|
||||||
while os.path.isfile(filepath):
|
while os.path.isfile(filepath):
|
||||||
filename = str(uuid.uuid4())
|
filename = str(uuid.uuid4())
|
||||||
filepath = os.path.join(path, 'tty', date, filename + '.zip')
|
filepath = os.path.join(path, 'tty', date, filename + '.zip')
|
||||||
|
|
|
@ -493,8 +493,8 @@ if __name__ == "__main__":
|
||||||
# # "ansible_become_user": "root",
|
# # "ansible_become_user": "root",
|
||||||
# "ansible_become_pass": "yusky0902",
|
# "ansible_become_pass": "yusky0902",
|
||||||
}]
|
}]
|
||||||
cmd = Command(resource)
|
cmd.run('ls',pattern='*')
|
||||||
print cmd.run('ls')
|
print cmd.results_raw
|
||||||
|
|
||||||
# resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}]
|
# resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}]
|
||||||
# task = Tasks(resource)
|
# task = Tasks(resource)
|
||||||
|
|
|
@ -419,7 +419,9 @@ def change_info(request):
|
||||||
error = '不能为空'
|
error = '不能为空'
|
||||||
|
|
||||||
if not error:
|
if not error:
|
||||||
User.objects.filter(id=user_id).update(name=name, email=email)
|
user.name = name
|
||||||
|
user.email = email
|
||||||
|
user.save()
|
||||||
if len(password) > 0:
|
if len(password) > 0:
|
||||||
user.set_password(password)
|
user.set_password(password)
|
||||||
user.save()
|
user.save()
|
||||||
|
|
|
@ -55,6 +55,9 @@
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div>
|
<div>
|
||||||
<select id="users_selected" name="users_selected" class="form-control m-b" size="12" multiple>
|
<select id="users_selected" name="users_selected" class="form-control m-b" size="12" multiple>
|
||||||
|
{% for user in users_selected %}
|
||||||
|
<option value="{{ user }}">{{ user|to_name }}</option>
|
||||||
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,4 +121,4 @@ $(document).ready(function(){
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue