修改role添加显示

pull/26/head
ibuler 2015-11-28 22:45:40 +08:00
parent a0ae7ff139
commit 4672884255
2 changed files with 16 additions and 1 deletions

View File

@ -602,7 +602,7 @@ class Nav(object):
else:
res = gen_resource({'user': self.user, 'asset': assets, 'role': role}, perm=self.user_perm)
cmd = Command(res)
logger.debug("res: %s" % res)
logger.debug("批量执行res: %s" % res)
asset_name_str = ''
for inv in cmd.inventory.get_hosts(pattern=pattern):
print inv.name

View File

@ -116,6 +116,21 @@ $('#roleForm').validator({
form.submit();
}
})
var config = {
'.chosen-select' : {},
'.chosen-select-deselect' : {allow_single_deselect:true},
'.chosen-select-no-single' : {disable_search_threshold:10},
'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
'.chosen-select-width' : {width:"95%"}
};
for (var selector in config) {
$(selector).chosen(config[selector]);
}
</script>
<script src="/static/js/cropper/cropper.min.js"></script>
<script src="/static/js/datapicker/bootstrap-datepicker.js"></script>
{% endblock %}