fix null bug

pull/26/head
ibuler 2015-12-17 10:52:48 +08:00
parent ea29305f8b
commit da7cc102a3
5 changed files with 8 additions and 8 deletions

View File

@ -579,7 +579,7 @@ class Nav(object):
for asset in assets: for asset in assets:
print ' %s' % asset.hostname print ' %s' % asset.hostname
print print
print "请输入主机名、IP或ansile支持的pattern, 多个主机:分隔, q退出" print "请输入主机名或ansile支持的pattern, 多个主机:分隔, q退出"
pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip() pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip()
if pattern == 'q': if pattern == 'q':
break break
@ -621,7 +621,7 @@ class Nav(object):
self.user_perm = get_group_user_perm(self.user) self.user_perm = get_group_user_perm(self.user)
try: try:
print "进入批量上传模式" print "进入批量上传模式"
print "请输入主机名、IP或ansile支持的pattern, 多个主机:分隔 q退出" print "请输入主机名或ansile支持的pattern, 多个主机:分隔 q退出"
pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip() pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip()
if pattern == 'q': if pattern == 'q':
break break
@ -674,7 +674,7 @@ class Nav(object):
self.user_perm = get_group_user_perm(self.user) self.user_perm = get_group_user_perm(self.user)
try: try:
print "进入批量下载模式" print "进入批量下载模式"
print "请输入主机名、IP或ansile支持的pattern, 多个主机:分隔,q退出" print "请输入主机名或ansile支持的pattern, 多个主机:分隔,q退出"
pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip() pattern = raw_input("\033[1;32mPattern>:\033[0m ").strip()
if pattern == 'q': if pattern == 'q':
break break

View File

@ -2,7 +2,7 @@ import datetime
from django.db import models from django.db import models
from jasset.models import Asset, AssetGroup from jasset.models import Asset, AssetGroup
from juser.models import User, UserGroup from juser.models import User, UserGroup
class PermLog(models.Model): class PermLog(models.Model):

View File

@ -59,7 +59,7 @@
</div> </div>
</div> </div>
</div> </div>
<p class="col-sm-offset-2">Tips: 管理用户为root或用户拥有NOPASSWD:ALL sudo权限的用户</p> <p class="col-sm-offset-2">Tips: 管理账号是服务器存在的root等高权限账号用来推送新建系统用户</p>
<div class="form-group" id="admin_account" style="display: none"> <div class="form-group" id="admin_account" style="display: none">
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>
<label class="col-sm-2 control-label"> 管理用户名<span class="red-fonts">*</span> </label> <label class="col-sm-2 control-label"> 管理用户名<span class="red-fonts">*</span> </label>

View File

@ -105,7 +105,7 @@
{% endifnotequal %} {% endifnotequal %}
<th class="text-center"> 录像 </th> <th class="text-center"> 录像 </th>
<th class="text-center"> 登录时间 </th> <th class="text-center"> 登录时间 </th>
<th class="text-center"> 结束时间 </th> <th class="text-center"> 时长</th>
</tr> </tr>
</thead> </thead>
@ -123,7 +123,7 @@
{% endifnotequal %} {% endifnotequal %}
<td class="text-center"><a value="{% url 'log_record' %}?id={{ post.id }}" class="log_record"> 回放 </a></td> <td class="text-center"><a value="{% url 'log_record' %}?id={{ post.id }}" class="log_record"> 回放 </a></td>
<td class="text-center start_time"> {{ post.start_time|date:"Y-m-d H:i:s"}} </td> <td class="text-center start_time"> {{ post.start_time|date:"Y-m-d H:i:s"}} </td>
<td class="text-center end_time"> {{ post.end_time|date:"Y-m-d H:i:s" }} </td> <td class="text-center end_time"> {{ post.end_time|timeuntil:post.start_time }} </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -49,7 +49,7 @@
<input name="setting" value="default" style="display: none"> <input name="setting" value="default" style="display: none">
<div class="col-sm-8"> <div class="col-sm-8">
<input id="username" name="username" placeholder="Username" type="text" value="{{ setting_default.field1 }}" class="form-control"> <input id="username" name="username" placeholder="Username" type="text" value="{{ setting_default.field1 }}" class="form-control">
<span class="help-block m-b-none"> 管理用户为root或用户拥有NOPASSWD:ALL sudo权限的用户</span> <span class="help-block m-b-none"> 管理账号是服务器存在的root等高权限账号(或拥有NOPASSWD: ALL sudo权限),用来推送新建系统用户</span>
</div> </div>
</div> </div>
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>