add docker support and update the locally

pull/256/head
xRain 2016-06-07 11:51:16 +08:00
commit 6acda5fcd1
4 changed files with 10 additions and 5 deletions

View File

@ -274,7 +274,7 @@ class TermLogRecorder(object):
self.filename = filename
filepath = os.path.join(path, 'tty', date, filename + '.zip')
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):
filename = str(uuid.uuid4())
filepath = os.path.join(path, 'tty', date, filename + '.zip')

View File

@ -493,8 +493,8 @@ if __name__ == "__main__":
# # "ansible_become_user": "root",
# "ansible_become_pass": "yusky0902",
}]
cmd = Command(resource)
print cmd.run('ls')
cmd.run('ls',pattern='*')
print cmd.results_raw
# resource = [{"hostname": "192.168.10.148", "port": "22", "username": "root", "password": "xxx"}]
# task = Tasks(resource)

View File

@ -419,7 +419,9 @@ def change_info(request):
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:
user.set_password(password)
user.save()

View File

@ -55,6 +55,9 @@
<div class="col-sm-3">
<div>
<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>
</div>
</div>
@ -118,4 +121,4 @@ $(document).ready(function(){
</script>
{% endblock %}
{% endblock %}