Commit ce5950ca authored by ibuler's avatar ibuler

Merge with asset

parents 65461a09 24e31a69
# coding:utf-8
from django import forms
from .models import IDC, Asset, AssetGroup, AdminUser, SystemUser
from .models import IDC, Asset, AssetGroup, AdminUser, SystemUser, Tag
from django.utils.translation import gettext_lazy as _
class AssetForm(forms.ModelForm):
# class AssetForm(forms.ModelForm):
# class Meta:
# model = Asset
#
# fields = [
# 'ip', 'other_ip', 'remote_card_ip', 'hostname', 'port', 'groups', 'username', 'password',
# 'idc', 'mac_address', 'brand', 'cpu', 'memory', 'disk', 'os', 'cabinet_no', 'cabinet_pos',
# 'number', 'status', 'type', 'env', 'sn', 'is_active', 'comment', 'admin_user', 'system_users'
# ]
#
# widgets = {
# 'groups': forms.SelectMultiple(attrs={'class': 'select2-groups', 'data-placeholder': _('Select asset groups')}),
# 'system_user': forms.SelectMultiple(attrs={'class': 'select2-system-user', 'data-placeholder': _('Select asset system user')}),
# 'admin_user': forms.SelectMultiple(attrs={'class': 'select2-admin-user', 'data-placeholder': _('Select asset admin user')}),
# }
#
class AssetCreateForm(forms.ModelForm):
tags = forms.CharField(label=_('Tags'), widget=forms.TextInput(attrs={'id': 'tags'}),
required=False, help_text='Use `,` split')
def __init__(self, *args, **kwargs):
instance = kwargs.get('instance', None)
if instance:
initial = kwargs.get('initial', {})
tags = instance.tags.all()
initial['tags'] = ",".join([tag.value for tag in tags])
print(kwargs.get('initial'))
super(AssetCreateForm, self).__init__(*args, **kwargs)
def _save_m2m(self):
tags = self.cleaned_data['tags']
if tags:
value_list = tags.split(',')
self.instance.tags.all().delete()
Tag.objects.bulk_create(
[Tag(value=value, asset=self.instance) for value in value_list]
)
class Meta:
model = Asset
fields = [
"ip", "other_ip", "remote_card_ip", "hostname", "port", "groups", "username", "password",
"idc", "mac_address", "brand", "cpu", "memory", "disk", "os", "cabinet_no", "cabinet_pos",
"number", "status", "type", "env", "sn", "is_active", "comment", "admin_user", "system_users"
'hostname', 'ip', 'port', 'type', 'comment', 'admin_user', 'system_users', 'idc', 'groups',
'other_ip', 'remote_card_ip', 'mac_address', 'brand', 'cpu', 'memory', 'disk', 'os', 'cabinet_no',
'cabinet_pos', 'number', 'status', 'env', 'sn',
]
widgets = {
'groups': forms.SelectMultiple(attrs={'class': 'select2-groups', 'data-placeholder': _('Select asset groups')}),
'system_users': forms.SelectMultiple(attrs={'class': 'select2-system-user', 'data-placeholder': _('Select asset system user')}),
# 'admin_user': forms.SelectMultiple(attrs={'class': 'select2-admin-user', 'data-placeholder': _('Select asset admin user')}),
'groups': forms.SelectMultiple(attrs={'class': 'select2',
'data-placeholder': _('Select asset groups')}),
'system_users': forms.SelectMultiple(attrs={'class': 'select2',
'data-placeholder': _('Select asset system users')}),
'admin_user': forms.Select(attrs={'class': 'select2', 'data-placeholder': _('Select asset admin user')}),
}
help_texts = {
'hostname': '* required',
'ip': '* required',
}
......@@ -32,7 +77,7 @@ class AssetGroupForm(forms.ModelForm):
)
def __init__(self, *args, **kwargs):
if kwargs.get('instance'):
if kwargs.get('instance', None):
initial = kwargs.get('initial', {})
initial['assets'] = kwargs['instance'].assets.all()
super(AssetGroupForm, self).__init__(*args, **kwargs)
......
# coding:utf-8
from __future__ import unicode_literals, absolute_import
import functools
from django.db import models
import logging
from django.utils.translation import ugettext_lazy as _
......@@ -26,6 +27,10 @@ class IDC(models.Model):
def __unicode__(self):
return self.name
@classmethod
def initial(cls):
return cls.objects.get_or_create(name=_('Default'), created_by=_('System'), comment=_('Default IDC'))[0]
class Meta:
db_table = 'idc'
......@@ -55,10 +60,10 @@ class IDC(models.Model):
class AssetExtend(models.Model):
key = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('KEY'))
value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE'))
key = models.CharField(max_length=64, verbose_name=_('KEY'))
value = models.CharField(max_length=64, verbose_name=_('VALUE'))
created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by"))
date_created = models.DateTimeField(auto_now=True, null=True, blank=True)
date_created = models.DateTimeField(auto_now=True, null=True)
comment = models.TextField(blank=True, verbose_name=_('Comment'))
def __unicode__(self):
......@@ -83,6 +88,7 @@ class AssetExtend(models.Model):
class Meta:
db_table = 'asset_extend'
unique_together = ('key', 'value')
class AdminUser(models.Model):
......@@ -249,7 +255,7 @@ class AssetGroup(models.Model):
@classmethod
def initial(cls):
asset_group = cls(name=_('Default'), commont=_('Default asset group'))
asset_group = cls(name=_('Default'), comment=_('Default asset group'))
asset_group.save()
@classmethod
......@@ -271,49 +277,68 @@ class AssetGroup(models.Model):
continue
def get_default_extend(key, value):
try:
return AssetExtend.objects.get_or_create(key=key, value=value)[0]
except:
return None
def get_default_idc():
return IDC.initial()
class Asset(models.Model):
ip = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('IP'))
ip = models.GenericIPAddressField(max_length=32, verbose_name=_('IP'))
other_ip = models.CharField(max_length=255, null=True, blank=True, verbose_name=_('Other IP'))
remote_card_ip = models.CharField(max_length=16, null=True, blank=True, verbose_name=_('Remote card IP'))
hostname = models.CharField(max_length=128, unique=True, null=True, blank=True, verbose_name=_('Hostname'))
port = models.IntegerField(default=22, null=True, blank=True, verbose_name=_('Port'))
hostname = models.CharField(max_length=128, blank=True, verbose_name=_('Hostname'))
port = models.IntegerField(default=22, verbose_name=_('Port'))
groups = models.ManyToManyField(AssetGroup, blank=True, related_name='assets', verbose_name=_('Asset groups'))
username = models.CharField(max_length=16, null=True, blank=True, verbose_name=_('Admin user'))
password = models.CharField(max_length=256, null=True, blank=True, verbose_name=_("Admin password"))
admin_user = models.ForeignKey(AdminUser, null=True, blank=True, related_name='assets',
on_delete=models.SET_NULL, verbose_name=_("Admin user"))
system_users = models.ManyToManyField(SystemUser, blank=True, related_name='assets', verbose_name=_("System User"))
idc = models.ForeignKey(IDC, null=True, related_name='assets', on_delete=models.SET_NULL, verbose_name=_('IDC'))
idc = models.ForeignKey(IDC, null=True, related_name='assets',
on_delete=models.SET_NULL, verbose_name=_('IDC'),)
# default=get_default_idc)
mac_address = models.CharField(max_length=20, null=True, blank=True, verbose_name=_("Mac address"))
brand = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('Brand'))
cpu = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('CPU'))
cpu = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('CPU'))
memory = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Memory'))
disk = models.CharField(max_length=1024, null=True, blank=True, verbose_name=_('Disk'))
os = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('OS'))
cabinet_no = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Cabinet number'))
cabinet_pos = models.IntegerField(null=True, blank=True, verbose_name=_('Cabinet position'))
number = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Asset number'))
status = models.ForeignKey(AssetExtend, null=True, blank=True, related_name="asset_status_extend",
verbose_name=_('Asset status'))
type = models.ForeignKey(AssetExtend, null=True, blank=True, related_name="asset_type_extend",
verbose_name=_('Asset type'))
env = models.ForeignKey(AssetExtend, null=True, blank=True, related_name="asset_env_extend",
verbose_name=_('Asset environment'))
status = models.ForeignKey(AssetExtend, null=True, blank=True,
related_name="status_asset", verbose_name=_('Asset status'),)
# default=functools.partial(get_default_extend, 'status', 'In use'))
type = models.ForeignKey(AssetExtend, null=True, limit_choices_to={'key': 'type'},
related_name="type_asset", verbose_name=_('Asset type'),)
# default=functools.partial(get_default_extend, 'type','Server'))
env = models.ForeignKey(AssetExtend, blank=True, null=True, limit_choices_to={'key': 'env'},
related_name="env_asset", verbose_name=_('Asset environment'),)
# default=functools.partial(get_default_extend, 'env', 'Production'))
sn = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Serial number'))
created_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by'))
is_active = models.BooleanField(default=True, verbose_name=_('Is active'))
date_created = models.DateTimeField(auto_now=True, null=True, blank=True, verbose_name=_('Date added'))
comment = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Comment'))
comment = models.TextField(max_length=128, null=True, blank=True, verbose_name=_('Comment'))
def __unicode__(self):
return '%(ip)s:%(port)s' % {'ip': self.ip, 'port': self.port}
def initial(self):
pass
def is_valid(self):
warning = ''
if not self.is_active:
warning += ' inactive'
else:
return True, ''
return False, warning
class Meta:
db_table = 'asset'
index_together = ('ip', 'port')
unique_together = ('ip', 'port')
@classmethod
def generate_fake(cls, count=100):
......@@ -323,8 +348,8 @@ class Asset(models.Model):
seed()
for i in range(count):
asset = cls(ip='%s.%s.%s.%s' % tuple([forgery_py.forgery.basic.text(length=3, digits=True)
for i in range(0, 4)]),
asset = cls(ip='%s.%s.%s.%s' % (i, i, i, i),
hostname=forgery_py.internet.user_name(True),
admin_user=choice(AdminUser.objects.all()),
idc=choice(IDC.objects.all()),
port=22,
......@@ -339,21 +364,28 @@ class Asset(models.Model):
continue
class Label(models.Model):
key = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('KEY'))
value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE'))
asset = models.ForeignKey(Asset, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_('Asset'))
created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by"))
date_created = models.DateTimeField(auto_now=True, null=True)
comment = models.CharField(max_length=128, blank=True, verbose_name=_('Comment'))
class Tag(models.Model):
value = models.CharField(max_length=64, verbose_name=_('VALUE'))
asset = models.ForeignKey(Asset, related_name='tags', on_delete=models.CASCADE, verbose_name=_('Asset'))
def __unicode__(self):
return self.key
return self.value
class Meta:
db_table = 'label'
db_table = 'tag'
unique_together = ('value', 'asset')
def init_all_models():
for cls in (AssetExtend, AssetGroup):
cls.initial()
def generate_fake():
for cls in (AssetGroup, IDC, AdminUser, SystemUser, Asset):
cls.generate_fake()
def flush_all():
for cls in (AssetGroup, AssetExtend, IDC, AdminUser, SystemUser, Asset):
cls.objects.all().delete()
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
{% extends 'base.html' %}
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
{% endblock %}
{% block content %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-10">
<div class="ibox float-e-margins">
<div id="ibox-content" class="ibox-title">
<h5> 添加资产 </h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="panel blank-panel">
<div class="tab-content">
<form id="assetForm" method="post" class="form-horizontal">
{% csrf_token %}
<h3 class="widget-head-color-box">基本信息</h3>
{{ form.hostname|bootstrap_horizontal }}
{{ form.ip|bootstrap_horizontal }}
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>关联资产用户</h3>
<div class="form-group">
<label for="j_group" class="col-sm-2 control-label">管理用户</label>
<div class="col-sm-9">
<div class="radio i-checks">
<label><input type="radio" checked="checked" id="id_use_default_auth" name="use_default_auth"><span>使用预定义管理用户</span></label>
<label><input type="radio" id="id_use_default_auth" name="use_default_auth"><span>自定义</span></label>
</div>
</div>
</div>
{{ form.admin_user|bootstrap_horizontal }}
<p class="col-sm-offset-2">Tips: 管理用户是服务器存在的root或拥有sudo的用户,用来推送系统用户</p>
<div class="hr-line-dashed"></div>
{{ form.system_users|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>所属</h3>
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>标签</h3>
<div class="form-group" id="id_label">
<label class="col-sm-2 control-label">Label</label>
<div class="col-sm-4">
<input type="text" placeholder="Key" name="key" class="form-control">
</div>
<div class="col-sm-5">
<input type="text" placeholder="Value" name="value" class="form-control">
</div>
</div>
<div class="col-sm-offset-2">
<i class="fa fa-plus-circle"></i> <span class="nav-label">添加</span><span class="fa arrow"></span>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-5">
<button class="btn btn-white" type="reset"> 重置 </button>
<button class="btn btn-primary" type="submit"> 提交 </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% load i18n %}
{% block form %}
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<h3>{% trans 'Basic' %}</h3>
{{ form.hostname|bootstrap_horizontal }}
{{ form.ip|bootstrap_horizontal }}
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Group' %}</h3>
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Asset user' %}</h3>
{{ form.admin_user|bootstrap_horizontal }}
{{ form.system_users|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
{{ form.tags|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="reset">{% trans 'Reset' %}</button>
<button id="submit_button" class="btn btn-primary" type="submit">{% trans 'Submit' %}</button>
</div>
</div>
</div>
</form>
{% endblock %}
{% block custom_foot_js %}
<script>
$(document).ready(function () {
$('.select2-groups').select2();
$('.select2-admin-user').select2();
$('.select2-system-user').select2();
$('.select2').select2();
$('#tags').inputTags();
})
</script>
{% endblock %}
\ No newline at end of file
......@@ -16,10 +16,12 @@
<div class="ibox float-e-margins">
<div class="panel-options">
<ul class="nav nav-tabs">
<li class="active"><a href="" class="text-center"><i class="fa fa-laptop"></i> {% trans 'Asset detail' %} </a>
<li class="active">
<a href="" class="text-center"><i class="fa fa-laptop"></i> {% trans 'Asset detail' %} </a>
</li>
<li>
<a href="" class="text-center"><i class="fa fa-bar-chart-o"></i> {% trans 'Asset login log' %}</a>
</li>
<li><a href="" class="text-center"><i class="fa fa-bar-chart-o"></i> {% trans 'Asset users' %}</a></li>
<li><a href="" class="text-center"><i class="fa fa-bar-chart-o"></i> {% trans 'Asset login log' %}</a></li>
</ul>
</div>
<div class="tab-content">
......@@ -45,11 +47,6 @@
<table class="table">
<tbody>
<tr class="no-borders-tr">
{# <td colspan="2">#}
{# <img src="{{ asset | user_avatar_url }}" class="img-circle" width="64" height="64">#}
{# </td>#}
</tr>
<tr>
<td width="20%">{% trans 'Hostname' %}:</td>
<td><b>{{ asset.hostname }}</b></td>
</tr>
......@@ -85,20 +82,10 @@
<td>{% trans 'Disk' %}:</td>
<td><b>{{ asset.disk }}</b></td>
</tr>
<tr>
<td>{% trans 'Label' %}:</td>
{% for label in asset.label_set.all %}
<td><b>{{ label.key }} - {{ label.value }}</b></td>
{% endfor %}
</tr>
<tr>
<td>{% trans 'OS' %}:</td>
<td><b>{{ asset.os }}</b></td>
</tr>
<tr>
<td>{% trans 'Mac address' %}:</td>
<td><b>{{ asset.mac_addr }}</b></td>
</tr>
<tr>
<td>{% trans 'Asset status' %}:</td>
<td><b>{{ asset.status }}</b></td>
......@@ -163,44 +150,38 @@
</span></td>
</tr>
<tr>
<td>{% trans 'Enable OTP' %}:</td>
<td><span class="pull-right">
<div class="switch">
<div class="onoffswitch">
<input type="checkbox" class="onoffswitch-checkbox" {% if asset.enable_otp %} checked {% endif %}
id="enable_otp">
<label class="onoffswitch-label" for="enable_otp">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</div>
</span></td>
<td>{% trans 'Rrefresh hardware' %}:</td>
<td>
<span class="pull-right">
<button type="button" class="btn btn-primary btn-xs" style="width: 54px">{% trans 'Refresh' %}</button>
</span>
</td>
</tr>
<tr>
<td>{% trans 'Reset password' %}:</td>
<td>{% trans 'Test admin user' %}:</td>
<td>
<span class="pull-right">
<button type="button" class="btn btn-primary btn-xs" id="btn_reset_password" style="width: 54px">{% trans 'Reset' %}</button>
<button type="button" class="btn btn-primary btn-xs" id="btn_reset_pk" style="width: 54px;">{% trans 'Test' %}</button>
</span>
</td>
</tr>
<tr>
<td>{% trans 'Reset ssh key' %}:</td>
<td>{% trans 'Test system users' %}:</td>
<td>
<span class="pull-right">
<button type="button" class="btn btn-primary btn-xs" id="btn_reset_pk" style="width: 54px;">{% trans 'Reset' %}</button>
<button type="button" class="btn btn-primary btn-xs" id="btn_reset_pk" style="width: 54px;">{% trans 'Test' %}</button>
</span>
</td>
</tr>
</tbody>
</tbody>
</table>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Asset group' %}
<i class="fa fa-info-circle"></i> {% trans 'Asset groups' %}
</div>
<div class="panel-body">
<table class="table group_edit">
......@@ -208,25 +189,25 @@
<form>
<tr>
<td colspan="2" class="no-borders">
<select data-placeholder="{% trans 'Join user groups' %}" id="slct_groups" class="select2" style="width: 100%" multiple="" tabindex="4">
{% for group in groups %}
<option value="{{ group.id }}" id="opt_{{ group.id }}">{{ group.name }}</option>
<select data-placeholder="{% trans 'Join asset groups' %}" class="select2" style="width: 100%" multiple="" tabindex="4">
{% for asset_group in asset_groups_remain %}
<option value="{{ asset_group.id }}" >{{ asset_group.name }}</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td colspan="2" class="no-borders">
<button type="button" class="btn btn-info btn-small" id="btn_add_user_group">{% trans 'Join' %}</button>
<button type="button" class="btn btn-info btn-sm" id="btn_add_user_group">{% trans 'Join' %}</button>
</td>
</tr>
</form>
{% for group in asset.groups.all %}
{% for asset_group in asset_groups %}
<tr>
<td ><b class="bdg_user_group" data-gid={{ group.id }}>{{ group.name }}</b></td>
<td ><b data-gid={{ asset_group.id }}>{{ asset_group.name }}</b></td>
<td>
<button class="btn btn-danger pull-right btn-sm btn_delete_user_group" type="button"><i class="fa fa-minus"></i></button>
<button class="btn btn-danger pull-right btn-xs " type="button"><i class="fa fa-minus"></i></button>
</td>
</tr>
{% endfor %}
......@@ -243,5 +224,8 @@
{% endblock %}
{% block custom_foot_js %}
<script>
$(document).ready(function () {
$('.select2').select2();
})
</script>
{% endblock %}
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
{% extends 'base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% block content %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins" id="all">
<div class="ibox-title">
<h5> 资产列表</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<form id="asset_form">
<div class="col-sm-1" style="padding-left: 0">
<a href="{% url 'assets:asset-create' %}" class="btn btn-sm btn-primary "> {% trans 'Create asset' %}</a>
</div>
<div class="col-sm-7" style="padding-left: 0px">
<label>
<select name="idc" class="form-control m-b input-sm" onchange="change_info()">
<option value="">机房</option>
{% for idc in idc_all %}
{% ifequal idc.name idc_name %}
<option value="{{idc.name}}" selected> {{ idc.name|slice:":20" }}</option>
{% else %}
<option value="{{idc.name}}"> {{ idc.name|slice:":20" }}</option>
{% endifequal %}
{% endfor %}
</select>
</label>
<label>
<select name="group" class="form-control m-b input-sm" onchange="change_info()">
<option value="">主机组</option>
{% for asset_group in asset_group_all %}
{% ifequal asset_group.name group_name %}
<option value="{{ asset_group.name }}" selected> {{ asset_group.name|slice:":20" }} </option>
{% else %}
<option value="{{ asset_group.name }}"> {{ asset_group.name|slice:":20" }} </option>
{% endifequal %}
{% endfor %}
</select>
</label>
{% load common_tags %}
{% block content_left_head %}
<a href="{% url 'assets:asset-create' %}" class="btn btn-sm btn-primary "> {% trans "Create asset" %} </a>
{% endblock %}
<label>
<select name="asset_type" class="form-control m-b input-sm" onchange="change_info()">
<option value="">资产类型</option>
{# {% for type in asset_types %}#}
{# {% ifequal type.0|int2str asset_type %}#}
{# <option value="{{ type.0 }}" selected> {{ type.1 }}</option>#}
{# {% else %}#}
{# <option value="{{ type.0 }}"> {{ type.1 }}</option>#}
{# {% endifequal %}#}
{# {% endfor %}#}
</select>
</label>
{% block table_head %}
<th class="text-center">
<input type="checkbox" id="check_all" onclick="checkAll('check_all', 'checked')">
</th>
<th class="text-center"><a href="{% url 'assets:asset-list' %}?sort=hostname">{% trans 'Hostname' %}</a></th>
<th class="text-center"><a href="{% url 'assets:asset-list' %}?sort=username">{% trans 'IP' %}</a></th>
<th class="text-center">{% trans 'Port' %}</th>
<th class="text-center">{% trans 'Type' %}</th>
<th class="text-center">{% trans 'Hardware' %}</th>
<th class="text-center">{% trans 'Valid' %}</th>
<th class="text-center"></th>
{% endblock %}
<label>
<select name="status" class="form-control m-b input-sm" onchange="change_info()">
<option value="">资产状态</option>
{# {% for s in asset_status %}#}
{# {% ifequal s.0|int2str status %}#}
{# <option value="{{ s.0 }}" selected> {{ s.1 }}</option>#}
{# {% else %}#}
{# <option value="{{ s.0 }}"> {{ s.1 }}</option>#}
{# {% endifequal %}#}
{# {% endfor %}#}
</select>
</label>
</div>
{% block table_body %}
{% for asset in asset_list %}
<tr class="gradeX">
<td class="text-center">
<input type="checkbox" name="checked" value="{{ asset.id }}">
</td>
<td class="text-center">
<a href="{% url 'assets:asset-detail' pk=user.id %}">
{{ asset.hostname }}
</a>
</td>
<td class="text-center">{{ asset.ip }}</td>
<td class="text-center">{{ asset.port }}</td>
<td class="text-center">{{ asset.type }}</td>
<td class="text-center">{{ asset.cpu }} {{ asset.memory }} {{ asset.disk }} </td>
<td class="text-center">
{% if asset.is_valid.0 %}
<i class="fa fa-check text-navy"></i>
{% else %}
<i class="fa fa-times text-danger"></i>
{% endif %}
</td>
<td class="text-center">
<a href="{% url 'assets:asset-update' pk=asset.id %}" class="btn btn-xs btn-info">{% trans 'Update' %}</a>
<a href="{% url 'assets:asset-delete' pk=asset.id %}" class="btn btn-xs btn-danger del">{% trans 'Delete' %}</a>-
{# <a href="{% url '' %}">{% trans 'Delete' %}</a>#}
</td>
</tr>
{% endfor %}
{% endblock %}
<div class="col-sm-4" style="padding-right: 0">
<div class="input-group inline-group">
<input type="text" class="form-control m-b input-sm" id="search_input" name="keyword" value="{{ keyword }}" placeholder="Search">
<input type="text" style="display: none">
<div class="input-group-btn">
<button id='search_btn' href="{% url 'assets:asset-list' %}?search=true" type="button" class="btn btn-sm btn-primary search-btn" onclick="change_info()">
- 搜索 -
</button>
<button type="button" href="{% url 'assets:asset-list' %}?export=true" name="export" class="btn btn-sm btn-success search-btn-excel" onclick="return false">
- 导出 -
</button>
</div>
</div>
</div>
<div id="export"></div>
<table class="table table-striped table-bordered table-hover " id="editable" name="editable">
<thead>
<tr>
<th class="text-center">
<input id="checkall" type="checkbox" class="i-checks" name="checkall" value="checkall" data-editable='false' onclick="check_all('asset_form')">
</th>
<th class="text-center"> 主机名 </th>
<th class="text-center" name="ip"> IP </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>
</thead>
<tbody>
{% for asset in assets %}
<tr class="gradeX">
<td class="text-center" name="id" value="{{ asset.id }}" data-editable='false'>
<input name="id" value="{{ asset.id }}" type="checkbox" class="i-checks">
</td>
<td class="text-center"> <a href="{% url 'assets:asset-detail' pk=asset.id %}">{{ asset.hostname }}</a></td>
<td class="text-center"> {{ asset.ip }} </td>
<td class="text-center">{{ asset.system_type }}</td>
<td class="text-center"> {{ asset.cpu }} | {{ asset.memory }} | {{ asset.disk }}</td>
<td class="text-center"> {% for group in asset.group.all %} {{ group.name }} {% endfor %}</td>
<td class="text-center">
{% if asset.is_active %}
<i class="fa fa-circle text-navy"></i>
{% else %}
<i class="fa fa-circle text-danger"></i>
{% endif %}
</td>
<td class="text-center" data-editable='false'>
{# <a href="{% url 'asset_edit' %}?id={{ asset.id }}" class="btn btn-xs btn-info">编辑</a>#}
<a value="{{ asset.id }}" class="conn btn btn-xs btn-warning">连接</a>
{# <a value="{% url 'asset_del' %}?id={{ asset.id }}" class="btn btn-xs btn-danger asset_del">删除</a>#}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="row">
<div class="col-sm-6">
<input type="button" id="asset_del" class="btn btn-danger btn-sm" name="del_button" value="删除"/>
{# <a value="{% url 'asset_edit_batch' %}" type="button" class="btn btn-sm btn-warning iframe">修改</a>#}
<input type="button" id="asset_update" class="btn btn-info btn-sm" name="update_button" value="更新"/>
{# <input type="button" id="asset_update_all" class="btn btn-primary btn-sm" name="update_button" value="更新全部"/>#}
<input type="button" id="exec_cmd" class="btn btn-sm btn-primary" name="exec_cmd" value="执行命令"/>
</div>
{% include '_pagination.html' %}
</div>
</form>
</div>
{% block content_bottom_left %}
<form id="" method="get" action="" class=" mail-search">
<div class="input-group">
<select class="form-control m-b" style="width: auto">
<option>{% trans 'Delete selected' %}</option>
<option>{% trans 'Update selected' %}</option>
<option>{% trans 'Deactive selected' %}</option>
<option>{% trans 'Export selected' %}</option>
</select>
<div class="input-group-btn pull-left" style="padding-left: 5px;">
<button id='search_btn' type="submit" style="height: 32px;" class="btn btn-sm btn-primary">
{% trans 'Submit' %}
</button>
</div>
</div>
</div>
</div>
</form>
{% endblock %}
{% block self_footer_js %}
<script>
$(document).ready(function(){
$('.asset_del').click(function(){
var row = $(this).closest('tr');
if (confirm("确定删除?")) {
$.get(
$(this).attr('value'),
{},
function (data) {
row.remove()
}
)
}
});
$('#exec_cmd').click(function(){
var url = '{% url "role_get" %}';
var new_url = '{% url "exec_cmd" %}?role=';
var check_array = [];
$(".gradeX input:checked").closest('tr').find('.hostname a').each(function() {
check_array.push($(this).text())
});
check_assets = check_array.join(':');
$.ajax({
type: 'GET',
url: url,
data: {},
success: function(data){
var dataArray = data.split(',');
if (dataArray.length == 1 && data != 'error'){
var title = 'Jumpserver Exec Terminal';
layer.open({
type: 2,
title: title,
maxmin: true,
shade: false,
area: ['725px', '600px'],
content: new_url+data+'&check_assets='+check_assets
});
//window.open(new_url + data, '', 'location=no, resizeable=no, height=410, width=625, top=89px, left=99px,toolbar=no,menubar=no,scrollbars=auto,status=no');
} else if (dataArray.length == '1' && data == 'error'){
layer.alert('没有授权系统用户')
} else {
aUrl = '';
$.each(dataArray, function(index, value){
aUrl += '<a onclick="windowOpenExec(this); return false" class="btn btn-xs btn-primary newa" href=' + new_url + value + '&check_assets=' + check_assets + '>' + value + '</a> '
});
layer.alert(aUrl, {
skin: 'layui-layer-molv',
title: '授权多个系统用户,请选择一个连接',
shade: false,
closeBtn: 0
})
}
}
});
return false
});
$('.conn').click(function(){
var url='{% url "role_get" %}?id=' + $(this).attr('value'); // 获取用户有权限的角色
var href = $(this).attr('href');
var new_url = '{% url "terminal" %}?id=' + $(this).attr('value') + '&role='; // webterminal socket url
var hostname = $(this).closest('tr').find('.hostname a')[0].innerHTML;
$.ajax({
type: 'GET',
url: url,
data: {},
success: function(data){
var dataArray = data.split(',');
if (data == 'error' || data == '' || data == null || data == undefined){
layer.alert('没有授权系统用户')
}
else if (dataArray.length == 1 && data != 'error' && navigator.platform == 'Win32'){
/*
var title = 'Jumpserver Web Terminal' + '<span class="text-info"> '+ hostname +'</span>';
layer.open({
type: 2,
title: title,
maxmin: true,
shade: false,
area: ['628px', '420px'],
content: new_url+data
});
window.open(new_url+data, '_blank', 'toolbar=yes, location=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=628, height=400')
*/
window.open(new_url+data, "_blank");
} else if (dataArray.length == 1 && data != 'error'){
/*layer.open({
type: 2,
title: title,
maxmin: true,
shade: false,
area: ['628px', '452px'],
content: new_url+data
});
*/
window.open(new_url+data, '_blank');
}
else {
aUrl = '';
$.each(dataArray, function(index, value){
aUrl += '<a onclick="windowOpen(this); return false" class="btn btn-xs btn-primary newa" href=' + new_url + value + ' value=' + hostname + '>' + value + '</a> '
});
console.log(aUrl);
layer.alert(aUrl, {
skin: 'layui-layer-molv',
title: '授权多个系统用户,请选择一个连接',
shade: false,
closeBtn: 0
})
}
}
});
return false
});
});
function windowOpen(a){
var new_url = $(a).attr('href');
var hostname = $(a).attr('value');
var title = 'Jumpserver Web Terminal - ' + '<span class="text-info"> '+ hostname +'</span>';
if (navigator.platform == 'Win32'){
/*
layer.open({
type: 2,
title: title,
maxmin: true,
area: ['628px', '420px'],
shade: false,
content: new_url
});
*/
window.open(new_url, '_blank')
} else {
/*
layer.open({
type: 2,
title: title,
maxmin: true,
area: ['628px', '452px'],
shade: false,
content: new_url
});
*/
window.open(new_url, '_blank');
}
return false
}
function windowOpenExec(a){
var new_url = $(a).attr('href');
var title = 'Jumpserver Exec Terminal';
layer.open({
type: 2,
title: title,
maxmin: true,
area: ['725px', '600px'],
shade: false,
content: new_url
});
return false
}
$(".iframe").on('click', function(){
var asset_id_all = getIDall();
if (asset_id_all == ''){
alert("请至少选择一行!");
return false;
}
var url= $(this).attr("value") + '?asset_id_all=' + asset_id_all;
parent.layer.open({
type: 2,
title: 'JumpServer - 批量修改主机',
maxmin: true,
shift: 'top',
border: [2, 0.3, '#1AB394'],
shade: [0.5, '#000000'],
area: ['800px', '600px'],
shadeClose: true,
content: url,
cancel: function(){
location.replace(location.href);
}
});
});
$('.search-btn-excel').unbind('click').bind('click',function(){
var url= $(this).attr("href");
$.ajax({
type: "GET",
url: url,
data: $("#asset_form").serialize(),
success: function (data) {
$("#export").html(data);
}
});
});
$('#asset_del').click(function () {
var asset_id_all = getIDall();
if (asset_id_all == ''){
alert("请至少选择一行!");
return false;
}
if (confirm("确定删除?")) {
$.ajax({
type: "post",
data: {asset_id_all: asset_id_all},
url: "{% url 'asset_del' %}?arg=batch",
success: function () {
parent.location.reload();
}
});
}
});
$('#asset_update').click(function () {
var asset_id_all = getIDall();
if (asset_id_all == ''){
if (confirm("更新全部资产信息?")) {
layer.msg('玩命更新中...', {time: 200000});
$.ajax({
type: "post",
url: "{% url 'asset_update_batch' %}?arg=all",
success: function () {
parent.location.reload();
}
});
}
}
else {
layer.msg('玩命更新中...', {time: 200000});
$.ajax({
type: "post",
data: {asset_id_all: asset_id_all},
url: "{% url 'asset_update_batch' %}",
success: function () {
parent.location.reload();
}
});
}
});
{# $('#asset_update_all').click(function () {#}
{# layer.msg('玩命更新中...', {time: 200000});#}
{# $.ajax({#}
{# type: "post",#}
{# url: "/jasset/asset_update_batch/?arg=all",#}
{# success: function () {#}
{# parent.location.reload();#}
{# }#}
{# });#}
{# });#}
function change_info(){
var args = $("#asset_form").serialize();
window.location = "{% url 'asset_list' %}?" + args
}
$("#search_input").keydown(function(e){
if(e.keyCode==13){
change_info()
}
});
</script>
{% endblock %}
{% extends '_base_create_update.html' %}
{% load static %}
{% load bootstrap %}
{% load i18n %}
{% block custom_head_css_js_create %}
<link href="{% static "css/plugins/inputTags.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/inputTags.jquery.min.js" %}"></script>
{% endblock %}
{% block form %}
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<h3>{% trans 'Basic' %}</h3>
{{ form.hostname|bootstrap_horizontal }}
{{ form.ip|bootstrap_horizontal }}
{{ form.port|bootstrap_horizontal }}
{{ form.type|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Group' %}</h3>
{{ form.idc|bootstrap_horizontal }}
{{ form.groups|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Asset user' %}</h3>
{{ form.admin_user|bootstrap_horizontal }}
{{ form.system_users|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Hardware' %}</h3>
{{ form.sn|bootstrap_horizontal }}
{{ form.brand|bootstrap_horizontal }}
{{ form.cpu|bootstrap_horizontal }}
{{ form.memory|bootstrap_horizontal }}
{{ form.disk|bootstrap_horizontal }}
{{ form.mac_address|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Configuration' %}</h3>
{{ form.number|bootstrap_horizontal }}
{{ form.other_ip|bootstrap_horizontal }}
{{ form.remote_card_ip|bootstrap_horizontal }}
{{ form.os|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Location' %}</h3>
{{ form.cabinet_no|bootstrap_horizontal }}
{{ form.cabinet_pos|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<h3>{% trans 'Other' %}</h3>
{{ form.status|bootstrap_horizontal }}
{{ form.env|bootstrap_horizontal }}
{{ form.tags|bootstrap_horizontal }}
{{ form.comment|bootstrap_horizontal }}
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="reset">{% trans 'Reset' %}</button>
<button id="submit_button" class="btn btn-primary" type="submit">{% trans 'Submit' %}</button>
</div>
</div>
</form>
{% endblock %}
{% block custom_foot_js %}
<script>
$(document).ready(function () {
$('.select2').select2();
{# $('#tags').inputTags({#}
{# tags: [{% for tag in form.tags.value %} {{ tag|safe }}, {% endfor %}]#}
{# });#}
$('#tags').inputTags(
);
})
</script>
{% endblock %}
\ No newline at end of file
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
......@@ -10,45 +10,77 @@ from django.urls import reverse_lazy
from django.contrib.messages.views import SuccessMessageMixin
from django.views.generic.detail import DetailView, SingleObjectMixin
from django.shortcuts import get_object_or_404, reverse, redirect
from .models import Asset, AssetGroup, IDC, AssetExtend, AdminUser, SystemUser, Label
from .forms import AssetForm, AssetGroupForm, IDCForm, AdminUserForm, SystemUserForm
from common.utils import int_seq
from .models import Asset, AssetGroup, IDC, AssetExtend, AdminUser, SystemUser, Tag
from .forms import AssetCreateForm, AssetGroupForm, IDCForm, AdminUserForm, SystemUserForm
from .hands import AdminUserRequiredMixin
class AssetListView(AdminUserRequiredMixin, ListView):
paginate_by = settings.CONFIG.DISPLAY_PER_PAGE
model = Asset
context_object_name = 'asset_list'
template_name = 'assets/asset_list.html'
def get_queryset(self):
queryset = super(AssetListView, self).get_queryset()
queryset = sorted(queryset, key=self.sorted_by_valid_and_ip)
return queryset
@staticmethod
def sorted_by_valid_and_ip(asset):
ip_list = int_seq(asset.ip.split('.'))
ip_list.insert(0, asset.is_valid()[0])
return ip_list
def get_context_data(self, **kwargs):
context = {
'app': 'Assets',
'action': 'Asset list',
}
kwargs.update(context)
return super(AssetListView, self).get_context_data(**kwargs)
class AssetCreateView(AdminUserRequiredMixin, CreateView):
model = Asset
form_class = AssetForm
form_class = AssetCreateForm
template_name = 'assets/asset_create.html'
success_url = reverse_lazy('assets:asset-list')
def form_valid(self, form):
asset = form.save(commit=False)
key = self.request.POST.get('key', '')
value = self.request.POST.get('value', '')
asset.save()
Label.objects.create(key=key, value=value, asset=asset)
return super(AssetCreateView, self).form_valid(form)
def form_invalid(self, form):
print(form.errors)
return super(AssetCreateView, self).form_invalid(form)
def get_context_data(self, **kwargs):
context = super(AssetCreateView, self).get_context_data(**kwargs)
context.update({'admin_users': AdminUser.objects.all()})
assert isinstance(context, object)
return context
class AssetUpdateView(UpdateView):
pass
context = {
'app': 'Assets',
'action': 'Create asset',
}
kwargs.update(context)
return super(AssetCreateView, self).get_context_data(**kwargs)
class AssetDeleteView(DeleteView):
class AssetUpdateView(AdminUserRequiredMixin, UpdateView):
model = Asset
form_class = AssetCreateForm
template_name = 'assets/asset_update.html'
success_url = reverse_lazy('assets:asset-list')
def get_context_data(self, **kwargs):
context = {
'app': 'Assets',
'action': 'Update asset',
}
kwargs.update(context)
return super(AssetUpdateView, self).get_context_data(**kwargs)
class AssetListView(ListView):
class AssetDeleteView(DeleteView):
model = Asset
context_object_name = 'assets'
template_name = 'assets/asset_list.html'
template_name = 'assets/delete_confirm.html'
success_url = reverse_lazy('assets:asset-list')
class AssetDetailView(DetailView):
......@@ -56,6 +88,18 @@ class AssetDetailView(DetailView):
context_object_name = 'asset'
template_name = 'assets/asset_detail.html'
def get_context_data(self, **kwargs):
asset_groups = self.object.groups.all()
context = {
'app': 'Assets',
'action': 'Asset detail',
'asset_groups_remain': [asset_group for asset_group in AssetGroup.objects.all()
if asset_group not in asset_groups],
'asset_groups': asset_groups,
}
kwargs.update(context)
return super(AssetDetailView, self).get_context_data(**kwargs)
class AssetGroupCreateView(AdminUserRequiredMixin, CreateView):
model = AssetGroup
......
......@@ -100,3 +100,10 @@ def search_object_attr(obj, value='', attr_list=None, ignore_case=False):
def get_logger(name=None):
return logging.getLogger('jumpserver.%s' % name)
def int_seq(seq):
try:
return map(int, seq)
except ValueError:
return seq
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-15 12:13+0800\n"
"POT-Creation-Date: 2016-09-18 22:57+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
......@@ -17,62 +17,79 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
#: assets/forms.py:19 assets/forms.py:156 perms/forms.py:27
#: perms/templates/perms/asset_permission_asset_list.html:139
#: assets/forms.py:26
msgid "Tags"
msgstr ""
#: assets/forms.py:57 assets/forms.py:201
#: assets/templates/assets/admin_user_detail.html:191 perms/forms.py:27
#: perms/templates/perms/asset_permission_asset.html:139 users/forms.py:115
msgid "Select asset groups"
msgstr "添加到资产组"
#: assets/forms.py:26 assets/forms.py:57 assets/forms.py:88
#: assets/forms.py:146 assets/models.py:322
#: assets/forms.py:59
#, fuzzy
#| msgid "System user"
msgid "Select asset system users"
msgstr "系统"
#: assets/forms.py:60
#, fuzzy
#| msgid "Select assets"
msgid "Select asset admin user"
msgstr "选择资产"
#: assets/forms.py:71 assets/forms.py:102 assets/forms.py:133
#: assets/forms.py:191 assets/models.py:347
#: perms/templates/perms/asset_permission_create_update.html:40
#: templates/_nav.html:21
msgid "Asset"
msgstr "资产"
#: assets/forms.py:29 assets/forms.py:60 assets/forms.py:91
#: assets/forms.py:149 perms/forms.py:25
#: assets/forms.py:74 assets/forms.py:105 assets/forms.py:136
#: assets/forms.py:194 perms/forms.py:25 users/forms.py:113
msgid "Select assets"
msgstr "选择资产"
#: assets/forms.py:79 assets/forms.py:134 assets/forms.py:206
#: assets/models.py:14 assets/models.py:88 assets/models.py:153
#: assets/models.py:222 assets/templates/assets/admin_user_detail.html:50
#: assets/forms.py:124 assets/forms.py:179 assets/forms.py:251
#: assets/models.py:14 assets/models.py:89 assets/models.py:154
#: assets/models.py:238 assets/templates/assets/admin_user_detail.html:46
#: assets/templates/assets/admin_user_list.html:10
#: assets/templates/assets/asset_group_detail.html:46
#: assets/templates/assets/asset_group_list.html:12
#: assets/templates/assets/idc_list.html:10
#: assets/templates/assets/system_user_asset_group.html:53
#: assets/templates/assets/system_user_detail.html:55
#: assets/templates/assets/system_user_detail.html:51
#: assets/templates/assets/system_user_list.html:10 perms/models.py:19
#: perms/templates/perms/asset_permission_create_update.html:33
#: perms/templates/perms/asset_permission_detail.html:56
#: perms/templates/perms/asset_permission_list.html:12
#: perms/templates/perms/asset_permission_user_list.html:66
#: perms/templates/perms/perm_user_asset_list.html:12 users/models.py:20
#: users/models.py:67 users/templates/users/user_detail.html:54
#: perms/templates/perms/asset_permission_user.html:66 users/models.py:20
#: users/models.py:67 users/templates/users/user_asset_permission.html:66
#: users/templates/users/user_detail.html:58
#: users/templates/users/user_granted_asset.html:129
#: users/templates/users/user_list.html:12
msgid "Name"
msgstr "名称"
#: assets/forms.py:96 assets/forms.py:161
#: assets/forms.py:141 assets/forms.py:206
msgid "If also set private key, use that first"
msgstr "如果设置私钥,则优先使用私钥"
#: assets/forms.py:135 assets/forms.py:207 assets/models.py:89
#: assets/models.py:154 assets/templates/assets/admin_user_detail.html:54
#: assets/forms.py:180 assets/forms.py:252 assets/models.py:90
#: assets/models.py:155 assets/templates/assets/admin_user_detail.html:50
#: assets/templates/assets/admin_user_list.html:11
#: assets/templates/assets/system_user_detail.html:59
#: assets/templates/assets/system_user_detail.html:55
#: assets/templates/assets/system_user_list.html:11
#: perms/templates/perms/asset_permission_user_list.html:67
#: perms/templates/perms/perm_user_asset_list.html:13 users/forms.py:13
#: perms/templates/perms/asset_permission_user.html:67 users/forms.py:13
#: users/models.py:66 users/templates/users/login.html:53
#: users/templates/users/user_detail.html:58
#: users/templates/users/user_detail.html:62
#: users/templates/users/user_list.html:13
#: users/templates/users/user_update.html:6
msgid "Username"
msgstr "用户名"
#: assets/forms.py:152 perms/templates/perms/perm_user_asset_list.html:16
#: assets/forms.py:197 assets/templates/assets/asset_detail.html:203
#: templates/_nav.html:22
msgid "Asset group"
msgstr "资产组"
......@@ -86,7 +103,7 @@ msgid "Contact"
msgstr "联系人"
#: assets/models.py:17 assets/templates/assets/idc_list.html:14
#: users/models.py:73 users/templates/users/user_detail.html:67
#: users/models.py:73 users/templates/users/user_detail.html:71
msgid "Phone"
msgstr "手机"
......@@ -98,7 +115,7 @@ msgstr "地址"
msgid "Network"
msgstr "网络"
#: assets/models.py:20 assets/models.py:225 assets/models.py:286
#: assets/models.py:20 assets/models.py:241 assets/models.py:307
msgid "Date added"
msgstr "加入日期"
......@@ -106,35 +123,37 @@ msgstr "加入日期"
msgid "Operator"
msgstr "运营商"
#: assets/models.py:22 assets/models.py:59 assets/models.py:96
#: assets/models.py:167 assets/models.py:224 assets/models.py:284
#: assets/models.py:323 assets/templates/assets/admin_user_detail.html:62
#: assets/models.py:22 assets/models.py:59 assets/models.py:97
#: assets/models.py:168 assets/models.py:240 assets/models.py:305
#: assets/templates/assets/admin_user_detail.html:58
#: assets/templates/assets/asset_detail.html:127
#: assets/templates/assets/asset_group_detail.html:54
#: assets/templates/assets/system_user_detail.html:105 perms/models.py:28
#: perms/templates/perms/asset_permission_detail.html:96 users/models.py:82
#: users/templates/users/user_detail.html:86
#: assets/templates/assets/system_user_detail.html:101 perms/models.py:29
#: perms/templates/perms/asset_permission_detail.html:88 users/models.py:82
#: users/templates/users/user_detail.html:90
msgid "Created by"
msgstr "创建者"
#: assets/models.py:23 assets/models.py:61 assets/models.py:94
#: assets/models.py:168 assets/models.py:226 assets/models.py:287
#: assets/models.py:325 assets/templates/assets/admin_user_detail.html:66
#: assets/models.py:23 assets/models.py:61 assets/models.py:95
#: assets/models.py:169 assets/models.py:242 assets/models.py:308
#: assets/templates/assets/admin_user_detail.html:62
#: assets/templates/assets/admin_user_list.html:14
#: assets/templates/assets/asset_detail.html:135
#: assets/templates/assets/asset_group_detail.html:58
#: assets/templates/assets/asset_group_list.html:14
#: assets/templates/assets/system_user_asset_group.html:56
#: assets/templates/assets/system_user_detail.html:109
#: assets/templates/assets/system_user_list.html:15 perms/models.py:30
#: perms/templates/perms/asset_permission_detail.html:100 users/models.py:21
#: users/models.py:78 users/templates/users/user_detail.html:98
#: assets/templates/assets/system_user_detail.html:105
#: assets/templates/assets/system_user_list.html:15 perms/models.py:31
#: perms/templates/perms/asset_permission_detail.html:92 users/models.py:21
#: users/models.py:78 users/templates/users/user_detail.html:102
msgid "Comment"
msgstr "备注"
#: assets/models.py:57 assets/models.py:320
#: assets/models.py:57
msgid "KEY"
msgstr "KEY"
#: assets/models.py:58 assets/models.py:321
#: assets/models.py:58 assets/models.py:346
msgid "VALUE"
msgstr "VALUE"
......@@ -199,179 +218,185 @@ msgstr ""
#: assets/models.py:79
#, fuzzy
msgid "Setting"
msgid "Testing"
msgstr "设置"
#: assets/models.py:90 assets/models.py:155 users/forms.py:15
#: assets/models.py:91 assets/models.py:156 users/forms.py:15
#: users/templates/users/login.html:56
#: users/templates/users/reset_password.html:52
#: users/templates/users/user_create.html:8
#: users/templates/users/user_create.html:10
#: users/templates/users/user_create.html:9
#: users/templates/users/user_create.html:11
#: users/templates/users/user_update.html:13
#: users/templates/users/user_update.html:15
msgid "Password"
msgstr "密码"
#: assets/models.py:91 assets/models.py:157
#: assets/models.py:92 assets/models.py:158
msgid "SSH private key"
msgstr "ssh密钥"
#: assets/models.py:92 assets/models.py:158
#: assets/models.py:93 assets/models.py:159
msgid "SSH public key"
msgstr "ssh公钥"
#: assets/models.py:93 assets/models.py:159
#: assets/models.py:94 assets/models.py:160
#: assets/templates/assets/admin_user_create_update.html:43
#: assets/templates/assets/system_user_create_update.html:44
#: assets/templates/assets/system_user_detail.html:75
#: assets/templates/assets/system_user_detail.html:71
msgid "As default"
msgstr "默认使用"
#: assets/models.py:156 assets/templates/assets/system_user_detail.html:63
#: assets/models.py:157 assets/templates/assets/system_user_detail.html:59
msgid "Protocol"
msgstr "协议"
#: assets/models.py:160
#: assets/models.py:161
#: assets/templates/assets/system_user_create_update.html:50
#: assets/templates/assets/system_user_detail.html:67
#: assets/templates/assets/system_user_detail.html:63
msgid "Auto push"
msgstr "自动推送"
#: assets/models.py:161
#: assets/models.py:162
msgid "Auto update pass/key"
msgstr "自动更新密码/密钥"
#: assets/models.py:162 assets/templates/assets/system_user_detail.html:79
#: assets/models.py:163 assets/templates/assets/system_user_detail.html:75
msgid "Sudo"
msgstr "Sudo"
#: assets/models.py:163 assets/templates/assets/system_user_detail.html:84
#: assets/models.py:164 assets/templates/assets/system_user_detail.html:80
msgid "Shell"
msgstr "Shell"
#: assets/models.py:164 assets/templates/assets/system_user_detail.html:90
#: assets/models.py:165 assets/templates/assets/system_user_detail.html:86
#: templates/_header_bar.html:41 templates/_nav.html:4
msgid "Home"
msgstr "仪表盘"
#: assets/models.py:165 assets/templates/assets/system_user_detail.html:96
#: assets/models.py:166 assets/templates/assets/system_user_detail.html:92
msgid "Uid"
msgstr "Uid"
#: assets/models.py:236
#: assets/models.py:252
#, fuzzy
#| msgid "As default"
msgid "Default"
msgstr "默认使用"
#: assets/models.py:236
#: assets/models.py:252
#, fuzzy
#| msgid "Create asset group"
msgid "Default asset group"
msgstr "创建资产组"
#: assets/models.py:259 assets/templates/assets/admin_user_detail.html:100
#: assets/models.py:279 assets/templates/assets/admin_user_detail.html:92
#: assets/templates/assets/asset_detail.html:57
#: assets/templates/assets/asset_group_detail.html:88
#: assets/templates/assets/system_user_asset.html:53
#: perms/templates/perms/asset_permission_asset_list.html:67
#: assets/templates/assets/asset_list.html:13
#: assets/templates/assets/system_user_asset.html:50
#: perms/templates/perms/asset_permission_asset.html:67
#: users/templates/users/user_granted_asset.html:67
msgid "IP"
msgstr "IP"
#: assets/models.py:260
#: assets/models.py:280 assets/templates/assets/asset_detail.html:61
msgid "Other IP"
msgstr "其它IP"
#: assets/models.py:261
#: assets/models.py:281 assets/templates/assets/asset_detail.html:65
msgid "Remote card IP"
msgstr "远控卡IP"
#: assets/models.py:262 assets/templates/assets/admin_user_detail.html:99
#: assets/models.py:282 assets/templates/assets/admin_user_detail.html:91
#: assets/templates/assets/asset_detail.html:53
#: assets/templates/assets/asset_group_detail.html:87
#: assets/templates/assets/system_user_asset.html:52
#: perms/templates/perms/asset_permission_asset_list.html:66
#: assets/templates/assets/asset_list.html:12
#: assets/templates/assets/system_user_asset.html:49
#: perms/templates/perms/asset_permission_asset.html:66
#: users/templates/users/user_granted_asset.html:66
msgid "Hostname"
msgstr "主机名"
#: assets/models.py:263 assets/templates/assets/admin_user_detail.html:101
#: assets/models.py:283 assets/templates/assets/admin_user_detail.html:93
#: assets/templates/assets/asset_detail.html:69
#: assets/templates/assets/asset_group_detail.html:89
#: assets/templates/assets/system_user_asset.html:54
#: perms/templates/perms/asset_permission_asset_list.html:68
#: assets/templates/assets/asset_list.html:14
#: assets/templates/assets/system_user_asset.html:51
#: perms/templates/perms/asset_permission_asset.html:68
#: users/templates/users/user_granted_asset.html:68
msgid "Port"
msgstr "端口"
#: assets/models.py:264
#: assets/models.py:284
msgid "Asset groups"
msgstr "用户组"
#: assets/models.py:265 assets/models.py:268 templates/_nav.html:24
#: assets/models.py:286 templates/_nav.html:24
msgid "Admin user"
msgstr "管理用户"
#: assets/models.py:266
msgid "Admin password"
msgstr "管理员密码"
#: assets/models.py:269
#: assets/models.py:287
msgid "System User"
msgstr "系统用户"
#: assets/models.py:270 templates/_nav.html:23
#: assets/models.py:288 templates/_nav.html:23
msgid "IDC"
msgstr "机房"
#: assets/models.py:271
#: assets/models.py:289 assets/templates/assets/asset_detail.html:73
#: assets/templates/assets/asset_detail.html:99
msgid "Mac address"
msgstr "Mac地址"
#: assets/models.py:272
#: assets/models.py:290
msgid "Brand"
msgstr "品牌"
#: assets/models.py:273
#: assets/models.py:291 assets/templates/assets/asset_detail.html:77
msgid "CPU"
msgstr "CPU"
#: assets/models.py:274
#: assets/models.py:292 assets/templates/assets/asset_detail.html:81
msgid "Memory"
msgstr "内存"
#: assets/models.py:275
#: assets/models.py:293 assets/templates/assets/asset_detail.html:85
msgid "Disk"
msgstr "硬盘"
#: assets/models.py:276
#: assets/models.py:294 assets/templates/assets/asset_detail.html:95
msgid "OS"
msgstr "操作系统"
#: assets/models.py:277
#: assets/models.py:295
msgid "Cabinet number"
msgstr "机柜编号"
#: assets/models.py:278
#: assets/models.py:296
msgid "Cabinet position"
msgstr "机柜层号"
#: assets/models.py:279
#: assets/models.py:297 assets/templates/assets/asset_detail.html:123
msgid "Asset number"
msgstr "资产编号"
#: assets/models.py:280
#: assets/models.py:299 assets/templates/assets/asset_detail.html:103
msgid "Asset status"
msgstr "资产状态"
#: assets/models.py:281
#: assets/models.py:301 assets/templates/assets/asset_detail.html:111
msgid "Asset type"
msgstr "系统类型"
#: assets/models.py:282
#: assets/models.py:303 assets/templates/assets/asset_detail.html:115
msgid "Asset environment"
msgstr "资产环境"
#: assets/models.py:283
#: assets/models.py:304 assets/templates/assets/asset_detail.html:119
msgid "Serial number"
msgstr "序列号"
#: assets/models.py:285 perms/templates/perms/asset_permission_detail.html:84
#: assets/models.py:306 assets/templates/assets/asset_detail.html:107
msgid "Is active"
msgstr "是否激活"
......@@ -390,127 +415,126 @@ msgid "Auto generate key"
msgstr "自动更新密码/密钥"
#: assets/templates/assets/admin_user_create_update.html:53
#: assets/templates/assets/admin_user_detail.html:152
#: assets/templates/assets/admin_user_detail.html:144
#: assets/templates/assets/asset_create_update.html:45
#: assets/templates/assets/asset_detail.html:184
#: assets/templates/assets/asset_detail.html:192
#: assets/templates/assets/asset_group_create.html:38
#: assets/templates/assets/idc_create_update.html:44
#: assets/templates/assets/system_user_create_update.html:71
#: assets/templates/assets/system_user_detail.html:148
#: perms/templates/perms/asset_permission_create_update.html:69
#: assets/templates/assets/system_user_detail.html:144
#: perms/templates/perms/asset_permission_create_update.html:67
#: users/templates/users/_user.html:70
#: users/templates/users/user_detail.html:147
#: users/templates/users/user_detail.html:155
#: users/templates/users/user_detail.html:151
#: users/templates/users/user_detail.html:159
msgid "Reset"
msgstr "重置"
#: assets/templates/assets/admin_user_create_update.html:54
#: assets/templates/assets/asset_create_update.html:46
#: assets/templates/assets/asset_group_create.html:39
#: assets/templates/assets/asset_group_list.html:51
#: assets/templates/assets/asset_list.html:64
#: assets/templates/assets/idc_create_update.html:45
#: assets/templates/assets/system_user_create_update.html:72
#: perms/templates/perms/asset_permission_create_update.html:70
#: perms/templates/perms/asset_permission_create_update.html:68
#: perms/templates/perms/asset_permission_list.html:65
#: perms/templates/perms/perm_user_asset_list.html:58
#: users/templates/users/_user.html:71
#: users/templates/users/forgot_password.html:44
#: users/templates/users/user_asset_permission.html:144
#: users/templates/users/user_list.html:64
msgid "Submit"
msgstr "提交"
#: assets/templates/assets/admin_user_detail.html:18
#: assets/templates/assets/admin_user_detail.html:19
#: assets/templates/assets/asset_group_detail.html:18
#: assets/templates/assets/system_user_asset.html:19
#: assets/templates/assets/system_user_asset_group.html:19
#: assets/templates/assets/system_user_detail.html:19
#: perms/templates/perms/asset_permission_asset_list.html:20
#: perms/templates/perms/asset_permission_asset.html:20
#: perms/templates/perms/asset_permission_detail.html:20
#: perms/templates/perms/asset_permission_user_list.html:20
#: perms/templates/perms/asset_permission_user.html:20
msgid "Detail"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:20
#: assets/templates/assets/system_user_asset.html:22
#: assets/templates/assets/system_user_asset_group.html:22
#: assets/templates/assets/system_user_detail.html:23
#, fuzzy
#| msgid "User assets"
msgid "Associate assets"
msgstr "用户资产"
#: assets/templates/assets/admin_user_detail.html:58
#: assets/templates/assets/admin_user_detail.html:54
#: assets/templates/assets/asset_group_detail.html:50
#: assets/templates/assets/system_user_detail.html:101 perms/models.py:29
#: perms/templates/perms/asset_permission_detail.html:92
#: assets/templates/assets/system_user_detail.html:97 perms/models.py:30
#: perms/templates/perms/asset_permission_detail.html:84
#, fuzzy
#| msgid "Date added"
msgid "Date created"
msgstr "加入日期"
#: assets/templates/assets/admin_user_detail.html:76
#: assets/templates/assets/admin_user_detail.html:72
#: assets/templates/assets/asset_group_detail.html:68
#: assets/templates/assets/system_user_asset.html:33
#: assets/templates/assets/system_user_asset_group.html:34
#: perms/templates/perms/asset_permission_asset_list.html:47
#: perms/templates/perms/asset_permission_asset.html:47
#, fuzzy
#| msgid "Asset group list"
msgid "Asset list of "
msgstr "资产组列表"
#: assets/templates/assets/admin_user_detail.html:102
#: assets/templates/assets/admin_user_detail.html:94
#: assets/templates/assets/asset_group_detail.html:90
#: assets/templates/assets/system_user_asset.html:55
#, fuzzy
msgid "Alive"
msgstr "激活"
#: assets/templates/assets/admin_user_detail.html:125
#: assets/templates/assets/system_user_detail.html:121
#: perms/templates/perms/asset_permission_detail.html:112
#: assets/templates/assets/admin_user_detail.html:117
#: assets/templates/assets/system_user_detail.html:117
#: perms/templates/perms/asset_permission_detail.html:104
msgid "Quick update"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:131
#: assets/templates/assets/admin_user_detail.html:123
msgid "Get install script"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:134
#: assets/templates/assets/system_user_detail.html:130
#: assets/templates/assets/admin_user_detail.html:126
#: assets/templates/assets/system_user_detail.html:126
msgid "Get"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:140
#: assets/templates/assets/system_user_detail.html:136
#: perms/templates/perms/asset_permission_detail.html:132
#: assets/templates/assets/admin_user_detail.html:132
#: assets/templates/assets/system_user_detail.html:132
#: perms/templates/perms/asset_permission_detail.html:124
msgid "Retest asset connectivity"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:143
#: assets/templates/assets/system_user_detail.html:139
#: perms/templates/perms/asset_permission_detail.html:135
#: assets/templates/assets/admin_user_detail.html:135
#: assets/templates/assets/system_user_detail.html:135
#: perms/templates/perms/asset_permission_detail.html:127
msgid "Start"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:149
#: assets/templates/assets/system_user_detail.html:145
#: assets/templates/assets/admin_user_detail.html:141
#: assets/templates/assets/system_user_detail.html:141
#, fuzzy
#| msgid "ssh private key"
msgid "Reset private key"
msgstr "ssh密钥"
#: assets/templates/assets/admin_user_detail.html:163
#: assets/templates/assets/admin_user_detail.html:155
msgid "Replace asset admin user with this"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:171
#: assets/templates/assets/system_user_asset.html:86
#: assets/templates/assets/admin_user_detail.html:163
#: assets/templates/assets/system_user_asset.html:89
#, fuzzy
#| msgid "Select assets"
msgid "Select asset"
msgstr "选择资产"
#: assets/templates/assets/admin_user_detail.html:180
#: assets/templates/assets/admin_user_detail.html:172
#: assets/templates/assets/admin_user_detail.html:200
msgid "Replace"
msgstr ""
#: assets/templates/assets/admin_user_detail.html:183
msgid "Replace asset admin user with this admin user"
msgstr ""
#: assets/templates/assets/admin_user_list.html:9
#: assets/templates/assets/idc_list.html:9
#: assets/templates/assets/system_user_list.html:9
......@@ -524,7 +548,6 @@ msgstr "机房"
#: assets/templates/assets/idc_list.html:11
#: assets/templates/assets/system_user_asset_group.html:54
#: assets/templates/assets/system_user_list.html:12
#: perms/templates/perms/perm_user_asset_list.html:15
#: users/templates/users/user_list.html:16
msgid "Asset num"
msgstr "资产数量"
......@@ -545,6 +568,7 @@ msgstr ""
#: assets/templates/assets/admin_user_list.html:36
#: assets/templates/assets/asset_group_list.html:32
#: assets/templates/assets/asset_list.html:44
#: assets/templates/assets/idc_list.html:30
#: assets/templates/assets/system_user_list.html:38
#: perms/templates/perms/asset_permission_list.html:46
......@@ -554,6 +578,7 @@ msgstr "更新"
#: assets/templates/assets/admin_user_list.html:37
#: assets/templates/assets/asset_group_list.html:33
#: assets/templates/assets/asset_list.html:45
#: assets/templates/assets/idc_list.html:31
#: assets/templates/assets/system_user_list.html:39
#: perms/templates/perms/asset_permission_list.html:47
......@@ -562,9 +587,100 @@ msgstr "更新"
msgid "Delete"
msgstr "删除"
#: assets/templates/assets/asset_create_update.html:14
msgid "Basic"
msgstr ""
#: assets/templates/assets/asset_create_update.html:21
msgid "Group"
msgstr ""
#: assets/templates/assets/asset_create_update.html:26
#, fuzzy
#| msgid "Asset number"
msgid "Asset user"
msgstr "资产编号"
#: assets/templates/assets/asset_create_update.html:31
#: perms/templates/perms/asset_permission_create_update.html:45
#, fuzzy
#| msgid "Other IP"
msgid "Other"
msgstr "其它IP"
#: assets/templates/assets/asset_detail.html:19
#, fuzzy
#| msgid "Asset group list"
msgid "Asset detail"
msgstr "资产组列表"
#: assets/templates/assets/asset_detail.html:21
#, fuzzy
#| msgid "Asset number"
msgid "Asset users"
msgstr "资产编号"
#: assets/templates/assets/asset_detail.html:22
#, fuzzy
#| msgid "Asset group list"
msgid "Asset login log"
msgstr "资产组列表"
#: assets/templates/assets/asset_detail.html:89 templates/_nav.html:26
msgid "Label"
msgstr "标签"
#: assets/templates/assets/asset_detail.html:131
#: users/templates/users/user_detail.html:94
msgid "Date joined"
msgstr "创建日期"
#: assets/templates/assets/asset_detail.html:146
#: users/templates/users/user_detail.html:113
msgid "Quick modify"
msgstr "快速修改"
#: assets/templates/assets/asset_detail.html:152 perms/models.py:27
#: perms/templates/perms/asset_permission_create_update.html:47
#: users/templates/users/user_detail.html:119
#: users/templates/users/user_list.html:17
#, fuzzy
msgid "Active"
msgstr "激活"
#: assets/templates/assets/asset_detail.html:166 users/models.py:74
#: users/templates/users/_user.html:57
#: users/templates/users/user_detail.html:133
msgid "Enable OTP"
msgstr "二次验证"
#: assets/templates/assets/asset_detail.html:181
#: users/templates/users/reset_password.html:45
#: users/templates/users/user_detail.html:148 users/utils.py:99
msgid "Reset password"
msgstr "重置密码"
#: assets/templates/assets/asset_detail.html:189
#: users/templates/users/user_detail.html:156
msgid "Reset ssh key"
msgstr "重置密钥"
#: assets/templates/assets/asset_detail.html:211 users/forms.py:33
#: users/forms.py:51 users/templates/users/user_detail.html:178
msgid "Join user groups"
msgstr "添加到用户组"
#: assets/templates/assets/asset_detail.html:220
#: perms/templates/perms/asset_permission_asset.html:148
#: perms/templates/perms/asset_permission_detail.html:164
#: perms/templates/perms/asset_permission_user.html:148
#: users/templates/users/user_detail.html:187
msgid "Join"
msgstr "加入"
#: assets/templates/assets/asset_group_create.html:16
#: assets/templates/assets/asset_group_list.html:5 assets/views.py:61
#: assets/views.py:131
#: assets/templates/assets/asset_group_list.html:5 assets/views.py:80
#: assets/views.py:150
msgid "Create asset group"
msgstr "创建资产组"
......@@ -609,47 +725,58 @@ msgid "Select asset user"
msgstr "选择资产"
#: assets/templates/assets/asset_group_detail.html:174
#: assets/templates/assets/system_user_asset.html:95
#: assets/templates/assets/system_user_asset_group.html:96
#: perms/templates/perms/asset_permission_asset_list.html:120
#: perms/templates/perms/asset_permission_user_list.html:120
#: perms/templates/perms/asset_permission_asset.html:120
#: perms/templates/perms/asset_permission_user.html:120
#, fuzzy
#| msgid "Address"
msgid "Add"
msgstr "地址"
#: assets/templates/assets/asset_group_list.html:43
#: assets/templates/assets/asset_list.html:56
#: perms/templates/perms/asset_permission_list.html:57
#: perms/templates/perms/perm_user_asset_list.html:50
#: users/templates/users/user_list.html:56
msgid "Delete selected"
msgstr "批量删除"
#: assets/templates/assets/asset_group_list.html:44
#: assets/templates/assets/asset_list.html:57
#: perms/templates/perms/asset_permission_list.html:58
#: perms/templates/perms/perm_user_asset_list.html:51
#: users/templates/users/user_list.html:57
msgid "Update selected"
msgstr "批量更新"
#: assets/templates/assets/asset_group_list.html:45
#: assets/templates/assets/asset_list.html:58
#: perms/templates/perms/asset_permission_list.html:59
#: perms/templates/perms/perm_user_asset_list.html:52
#: users/templates/users/user_list.html:58
msgid "Deactive selected"
msgstr "禁用所选"
#: assets/templates/assets/asset_group_list.html:46
#: assets/templates/assets/asset_list.html:59
#: perms/templates/perms/asset_permission_list.html:60
#: perms/templates/perms/perm_user_asset_list.html:53
#: users/templates/users/user_list.html:59
msgid "Export selected"
msgstr "批量导出"
#: assets/templates/assets/asset_list.html:27
#: assets/templates/assets/asset_list.html:5
msgid "Create asset"
msgstr "创建资产"
#: assets/templates/assets/asset_list.html:15
msgid "Type"
msgstr ""
#: assets/templates/assets/asset_list.html:16
msgid "Hardware"
msgstr ""
#: assets/templates/assets/asset_list.html:17
msgid "Valid"
msgstr ""
#: assets/templates/assets/delete_confirm.html:6
#: perms/templates/perms/delete_confirm.html:6
#: users/templates/users/user_delete_confirm.html:6
......@@ -668,18 +795,58 @@ msgstr "创建者"
msgid "Create IDC"
msgstr "创建者"
#: assets/templates/assets/system_user_asset.html:25
#: assets/templates/assets/system_user_asset_group.html:26
#: assets/templates/assets/system_user_detail.html:28
#: assets/templates/assets/system_user_asset.html:22
#: assets/templates/assets/system_user_detail.html:23
#, fuzzy
#| msgid "Create asset group"
msgid "Associate asset groups"
msgid "Associate assets and asset groups"
msgstr "创建资产组"
#: assets/templates/assets/system_user_asset.html:78
msgid "Add asset to this system user"
#: assets/templates/assets/system_user_asset.html:30
#, fuzzy
#| msgid "Asset group list"
msgid "Assets attached of "
msgstr "资产组列表"
#: assets/templates/assets/system_user_asset.html:52
msgid "Reachable"
msgstr ""
#: assets/templates/assets/system_user_asset.html:81
#, fuzzy
#| msgid "User assets"
msgid "Attach to assets "
msgstr "用户资产"
#: assets/templates/assets/system_user_asset.html:98
#: assets/templates/assets/system_user_asset.html:126
msgid "Attach"
msgstr ""
#: assets/templates/assets/system_user_asset.html:109
#, fuzzy
#| msgid "Select asset groups"
msgid "Attach to asset groups"
msgstr "添加到资产组"
#: assets/templates/assets/system_user_asset.html:117
#, fuzzy
#| msgid "Asset group"
msgid "Add asset group"
msgstr "资产组"
#: assets/templates/assets/system_user_asset_group.html:22
#, fuzzy
#| msgid "User assets"
msgid "Associate assets"
msgstr "用户资产"
#: assets/templates/assets/system_user_asset_group.html:26
#, fuzzy
#| msgid "Create asset group"
msgid "Associate asset groups"
msgstr "创建资产组"
#: assets/templates/assets/system_user_asset_group.html:55
msgid "Unavailable num"
msgstr ""
......@@ -697,20 +864,20 @@ msgid "Select asset group"
msgstr "添加到资产组"
#: assets/templates/assets/system_user_create_update.html:16
#: assets/templates/assets/system_user_list.html:5 assets/views.py:349
#: assets/templates/assets/system_user_list.html:5 assets/views.py:368
#, fuzzy
#| msgid "Create user"
msgid "Create system user"
msgstr "创建用户"
#: assets/templates/assets/system_user_create_update.html:56
#: assets/templates/assets/system_user_detail.html:71
#: assets/templates/assets/system_user_detail.html:67
#, fuzzy
#| msgid "Auto update pass/key"
msgid "Auto update"
msgstr "自动更新密码/密钥"
#: assets/templates/assets/system_user_detail.html:127
#: assets/templates/assets/system_user_detail.html:123
msgid "Get mannual install script"
msgstr ""
......@@ -721,67 +888,61 @@ msgid "Asset group num"
msgstr "资产组"
#: assets/templates/assets/system_user_list.html:14
msgid "Unavailable"
msgid "Unreachable"
msgstr ""
#: assets/views.py:60 assets/views.py:80 assets/views.py:114
#: assets/views.py:130 assets/views.py:152 assets/views.py:219
#: assets/views.py:318 assets/views.py:348 assets/views.py:372
#: assets/views.py:390 templates/_nav.html:18
#: assets/views.py:79 assets/views.py:99 assets/views.py:133
#: assets/views.py:149 assets/views.py:171 assets/views.py:238
#: assets/views.py:337 assets/views.py:367 assets/views.py:390
#: assets/views.py:408 templates/_nav.html:18
msgid "Assets"
msgstr "资产管理"
#: assets/views.py:81
#: assets/views.py:100
msgid "Asset group list"
msgstr "资产组列表"
#: assets/views.py:115
#: assets/views.py:134
#, fuzzy
#| msgid "Asset group list"
msgid "Asset group detail"
msgstr "资产组列表"
#: assets/views.py:153
#: assets/views.py:172
msgid "IDC list"
msgstr ""
#: assets/views.py:220
#: assets/views.py:239
#, fuzzy
#| msgid "Admin user"
msgid "Admin user list"
msgstr "管理用户"
#: assets/views.py:256
#: assets/views.py:275
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Create admin user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: assets/views.py:319
#: assets/views.py:338
#, fuzzy
#| msgid "System user"
msgid "System user list"
msgstr "系统"
#: assets/views.py:355
#: assets/views.py:374
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Create system user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: assets/views.py:368
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Update system user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: assets/views.py:373
#: assets/views.py:391
#, fuzzy
#| msgid "Update user"
msgid "Update system user"
msgstr "编辑用户"
#: assets/views.py:391
#: assets/views.py:409
#, fuzzy
#| msgid "System user"
msgid "System user detail"
......@@ -793,75 +954,68 @@ msgstr "系统"
msgid "Select users"
msgstr "选择资产"
#: perms/forms.py:23 perms/templates/perms/asset_permission_user_list.html:139
#: perms/forms.py:23 perms/templates/perms/asset_permission_user.html:139
#, fuzzy
#| msgid "Select asset groups"
msgid "Select user groups"
msgstr "添加到资产组"
#: perms/forms.py:29 perms/templates/perms/asset_permission_detail.html:163
#: perms/forms.py:29 perms/templates/perms/asset_permission_detail.html:155
#: users/forms.py:117
#, fuzzy
#| msgid "System user"
msgid "Select system users"
msgstr "系统"
#: perms/models.py:26
#: perms/templates/perms/asset_permission_create_update.html:49
#: perms/templates/perms/perm_user_asset_list.html:18
#: users/templates/users/user_detail.html:115
#: users/templates/users/user_list.html:17
#, fuzzy
msgid "Active"
msgstr "激活"
#| msgid "SSH private key"
msgid "Private for"
msgstr "ssh密钥"
#: perms/models.py:27 perms/templates/perms/asset_permission_detail.html:88
#: users/models.py:81 users/templates/users/user_detail.html:82
#: perms/models.py:28 perms/templates/perms/asset_permission_detail.html:80
#: users/models.py:81 users/templates/users/user_detail.html:86
msgid "Date expired"
msgstr "失效日期"
#: perms/templates/perms/asset_permission_asset_list.html:24
#: perms/templates/perms/asset_permission_asset.html:24
#: perms/templates/perms/asset_permission_detail.html:24
#: perms/templates/perms/asset_permission_user_list.html:24
#: perms/templates/perms/asset_permission_user.html:24
#, fuzzy
#| msgid "Join user groups"
msgid "Users and user groups"
msgstr "添加到用户组"
#: perms/templates/perms/asset_permission_asset_list.html:29
#: perms/templates/perms/asset_permission_asset.html:29
#: perms/templates/perms/asset_permission_detail.html:29
#: perms/templates/perms/asset_permission_user_list.html:29
#: perms/templates/perms/asset_permission_user.html:29
#, fuzzy
#| msgid "Select asset groups"
msgid "Assets and asset gruops"
msgid "Assets and asset groups"
msgstr "添加到资产组"
#: perms/templates/perms/asset_permission_asset_list.html:69
#: perms/templates/perms/asset_permission_asset.html:69
#: perms/templates/perms/asset_permission_list.html:18
#: perms/templates/perms/asset_permission_user_list.html:69
#: perms/templates/perms/asset_permission_user.html:69
#: users/templates/users/user_asset_permission.html:73
#: users/templates/users/user_granted_asset.html:71
msgid "Is valid"
msgstr ""
#: perms/templates/perms/asset_permission_asset_list.html:103
#: perms/templates/perms/asset_permission_asset.html:103
msgid "Add asset to this permission"
msgstr ""
#: perms/templates/perms/asset_permission_asset_list.html:111
#: perms/templates/perms/asset_permission_asset.html:111
#, fuzzy
#| msgid "Select assets"
msgid "Select asset "
msgstr "选择资产"
#: perms/templates/perms/asset_permission_asset_list.html:131
#: perms/templates/perms/asset_permission_asset.html:131
msgid "Add asset group to this permission"
msgstr ""
#: perms/templates/perms/asset_permission_asset_list.html:148
#: perms/templates/perms/asset_permission_detail.html:172
#: perms/templates/perms/asset_permission_user_list.html:148
#: users/templates/users/user_detail.html:183
msgid "Join"
msgstr "加入"
#: perms/templates/perms/asset_permission_create_update.html:17
#, fuzzy
#| msgid "Create asset group"
......@@ -873,12 +1027,6 @@ msgstr "创建资产组"
msgid "User"
msgstr "用户"
#: perms/templates/perms/asset_permission_create_update.html:45
#, fuzzy
#| msgid "Other IP"
msgid "Other"
msgstr "其它IP"
#: perms/templates/perms/asset_permission_detail.html:60
#: perms/templates/perms/asset_permission_list.html:13
#, fuzzy
......@@ -895,6 +1043,7 @@ msgstr "用户组列表"
#: perms/templates/perms/asset_permission_detail.html:68
#: perms/templates/perms/asset_permission_list.html:15
#: users/templates/users/user_granted_asset.html:130
#, fuzzy
#| msgid "Asset group"
msgid "Asset count"
......@@ -914,23 +1063,19 @@ msgstr "资产组列表"
msgid "System user count"
msgstr "系统"
#: perms/templates/perms/asset_permission_detail.html:80
#, fuzzy
msgid "Action"
msgstr "激活"
#: perms/templates/perms/asset_permission_detail.html:141
#: perms/templates/perms/asset_permission_detail.html:133
#, fuzzy
#| msgid "System user"
msgid "Repush system user"
msgstr "系统"
#: perms/templates/perms/asset_permission_detail.html:144
#: perms/templates/perms/asset_permission_detail.html:136
msgid "Push"
msgstr ""
#: perms/templates/perms/asset_permission_detail.html:155
#: perms/templates/perms/perm_user_asset_list.html:17 templates/_nav.html:25
#: perms/templates/perms/asset_permission_detail.html:147
#: templates/_nav.html:25 users/templates/users/user_granted_asset.html:69
#: users/templates/users/user_granted_asset.html:131
msgid "System user"
msgstr "系统"
......@@ -940,53 +1085,33 @@ msgstr "系统"
msgid "Create permission"
msgstr "创建权限"
#: perms/templates/perms/asset_permission_user_list.html:47
#: perms/templates/perms/asset_permission_user.html:47
#, fuzzy
#| msgid "User list"
msgid "User list of "
msgstr "用户列表"
#: perms/templates/perms/asset_permission_user_list.html:68 users/models.py:68
#: users/templates/users/user_detail.html:62
#: perms/templates/perms/asset_permission_user.html:68 users/models.py:68
#: users/templates/users/user_detail.html:66
msgid "Email"
msgstr "邮件"
#: perms/templates/perms/asset_permission_user_list.html:103
#: perms/templates/perms/asset_permission_user.html:103
msgid "Add user to asset permission"
msgstr ""
#: perms/templates/perms/asset_permission_user_list.html:111
#: perms/templates/perms/asset_permission_user.html:111
#, fuzzy
#| msgid "Select assets"
msgid "Select user"
msgstr "选择资产"
#: perms/templates/perms/asset_permission_user_list.html:131
#: perms/templates/perms/asset_permission_user.html:131
#, fuzzy
#| msgid "Asset group list"
msgid "Add user group to asset permission"
msgstr "资产组列表"
#: perms/templates/perms/perm_user_asset_list.html:5
#, fuzzy
#| msgid "Create perm"
msgid "Create perm "
msgstr "创建权限"
#: perms/templates/perms/perm_user_asset_list.html:14 users/models.py:70
#: users/templates/users/user_detail.html:78
#: users/templates/users/user_list.html:14
msgid "Role"
msgstr "角色"
#: perms/templates/perms/perm_user_asset_list.html:39
msgid "Create perm"
msgstr "创建权限"
#: perms/templates/perms/perm_user_asset_list.html:40
msgid "Flush"
msgstr ""
#: perms/views.py:29 perms/views.py:66 perms/views.py:89 perms/views.py:107
#: perms/views.py:146 perms/views.py:181 templates/_nav.html:30
msgid "Perms"
......@@ -1038,26 +1163,6 @@ msgstr "资产组列表"
msgid "Asset permission asset list"
msgstr "资产组列表"
#: templates/_foot_js.html:24
msgid "Are you sure delete ?"
msgstr ""
#: templates/_foot_js.html:28
msgid "Cancel"
msgstr ""
#: templates/_foot_js.html:30
msgid "Yes, delete it!"
msgstr ""
#: templates/_foot_js.html:40
# msgid "Deleted!"
# msgstr "删除"
#: templates/_foot_js.html:40
msgid "has been deleted."
msgstr "已被删除"
#: templates/_header_bar.html:8
msgid "Search"
msgstr "搜索"
......@@ -1083,23 +1188,28 @@ msgstr "登录"
msgid "Close"
msgstr ""
#: templates/_nav.html:9 users/views.py:107 users/views.py:120
#: users/views.py:160 users/views.py:191 users/views.py:216 users/views.py:229
#: users/views.py:345
#: templates/_modal.html:16 users/templates/users/user_detail.html:304
#: users/templates/users/user_detail.html:326
#, fuzzy
#| msgid "Confirm delete"
msgid "Confirm"
msgstr "确认删除"
#: templates/_nav.html:9 users/views.py:102 users/views.py:115
#: users/views.py:155 users/views.py:186 users/views.py:211 users/views.py:224
#: users/views.py:340
msgid "Users"
msgstr "用户管理"
#: templates/_nav.html:13 users/models.py:69
#: users/templates/users/user_detail.html:166
#: users/templates/users/user_detail.html:170
#: users/templates/users/user_list.html:15
msgid "User group"
msgstr "用户组"
#: templates/_nav.html:26
msgid "Label"
msgstr "标签"
#: templates/_nav.html:33
#: templates/_nav.html:33 users/templates/users/user_asset_permission.html:23
#: users/templates/users/user_detail.html:24
#: users/templates/users/user_granted_asset.html:23
#, fuzzy
#| msgid "Asset type"
msgid "Asset permission"
......@@ -1146,78 +1256,75 @@ msgstr "验证码"
msgid "Filters"
msgstr "过滤"
#: users/forms.py:35 users/forms.py:55
#: users/templates/users/user_detail.html:174
msgid "Join user groups"
msgstr "添加到用户组"
#: users/forms.py:74
#: users/forms.py:68
#, fuzzy
#| msgid "Name"
msgid "name"
msgstr "名称"
#: users/forms.py:75
#: users/forms.py:69
#, fuzzy
#| msgid "Avatar"
msgid "avatar"
msgstr "头像"
#: users/forms.py:76
#: users/forms.py:70
#, fuzzy
#| msgid "Wechat"
msgid "wechat"
msgstr "微信"
#: users/forms.py:77
#: users/forms.py:71
#, fuzzy
#| msgid "Phone"
msgid "phone"
msgstr "手机"
#: users/forms.py:78
#: users/forms.py:72
#, fuzzy
#| msgid "Enable OTP"
msgid "enable otp"
msgstr "二次验证"
#: users/forms.py:82
#, fuzzy
#| msgid "SSH private key"
msgid "private key"
msgstr "ssh密钥"
#: users/forms.py:77 users/models.py:77
msgid "ssh public key"
msgstr "ssh公钥"
#: users/forms.py:78
msgid "ssh-rsa AAAA..."
msgstr ""
#: users/forms.py:79
msgid "Paste your id_ras.pub here."
msgstr ""
#: users/forms.py:89 users/serializers.py:55
#: users/forms.py:90 users/forms.py:93
#, fuzzy
#| msgid "ssh private key"
msgid "Not a valid ssh private key."
msgid "Not a valid ssh public key"
msgstr "ssh密钥"
#: users/models.py:62 users/models.py:206
msgid "Administrator"
msgstr "管理员"
#: users/models.py:70 users/templates/users/user_detail.html:82
#: users/templates/users/user_list.html:14
msgid "Role"
msgstr "角色"
#: users/models.py:71
msgid "Avatar"
msgstr "头像"
#: users/models.py:72 users/templates/users/user_detail.html:73
#: users/models.py:72 users/templates/users/user_detail.html:77
msgid "Wechat"
msgstr "微信"
#: users/models.py:74 users/templates/users/_user.html:57
#: users/templates/users/user_detail.html:129
msgid "Enable OTP"
msgstr "二次验证"
#: users/models.py:76
msgid "ssh private key"
msgstr "ssh密钥"
#: users/models.py:77
msgid "ssh public key"
msgstr "ssh公钥"
#: users/models.py:209
msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员"
......@@ -1226,8 +1333,15 @@ msgstr "Administrator是初始的超级管理员"
msgid "System"
msgstr "系统"
#: users/templates/users/_user.html:17 users/templates/users/user_list.html:5
#: users/views.py:120
#: users/serializers.py:55
#, fuzzy
#| msgid "ssh private key"
msgid "Not a valid ssh private key."
msgstr "ssh密钥"
#: users/templates/users/_user.html:17
#: users/templates/users/user_create.html:4
#: users/templates/users/user_list.html:5 users/views.py:115
msgid "Create user"
msgstr "创建用户"
......@@ -1245,7 +1359,7 @@ msgstr "角色安全"
msgid "Reset User SSH Private Key"
msgstr "ssh密钥"
#: users/templates/users/first_login.html:16 users/views.py:345
#: users/templates/users/first_login.html:16 users/views.py:340
#, fuzzy
#| msgid "Last login"
msgid "First Login"
......@@ -1284,96 +1398,145 @@ msgstr "输入您的邮箱, 将会发一封重置短信邮件到您的邮箱中"
msgid "Captcha invalid"
msgstr "验证码错误"
#: users/templates/users/reset_password.html:45
#: users/templates/users/user_detail.html:144 users/utils.py:99
msgid "Reset password"
msgstr "重置密码"
#: users/templates/users/reset_password.html:55
msgid "Password again"
msgstr "再次输入密码"
#: users/templates/users/user_create.html:12
msgid "Reset link will be generated and sent to the user. "
msgstr "生成重置密码连接,通过邮件发送给用户"
#: users/templates/users/reset_password.html:57
#, fuzzy
msgid "Setting"
msgstr "设置"
#: users/templates/users/user_detail.html:20 users/views.py:191
#: users/templates/users/user_asset_permission.html:20
#: users/templates/users/user_detail.html:21
#: users/templates/users/user_granted_asset.html:20 users/views.py:186
msgid "User detail"
msgstr "用户详情"
#: users/templates/users/user_detail.html:22
msgid "User assets"
msgstr "用户资产"
#: users/templates/users/user_asset_permission.html:26
#: users/templates/users/user_detail.html:26
#: users/templates/users/user_granted_asset.html:26
#, fuzzy
#| msgid "Asset type"
msgid "Asset granted"
msgstr "系统类型"
#: users/templates/users/user_detail.html:23
msgid "User log"
msgstr "登录日志"
#: users/templates/users/user_asset_permission.html:29
#: users/templates/users/user_detail.html:27
#: users/templates/users/user_granted_asset.html:29
msgid "Login history"
msgstr ""
#: users/templates/users/user_detail.html:90
msgid "Date joined"
msgstr "创建日期"
#: users/templates/users/user_asset_permission.html:47
#, fuzzy
#| msgid "Asset type"
msgid "Asset permission of "
msgstr "系统类型"
#: users/templates/users/user_detail.html:94
msgid "Last login"
msgstr "最后登录"
#: users/templates/users/user_asset_permission.html:67
#, fuzzy
#| msgid "User"
msgid "User "
msgstr "用户"
#: users/templates/users/user_detail.html:109
msgid "Quick modify"
msgstr "快速修改"
#: users/templates/users/user_asset_permission.html:68
#, fuzzy
#| msgid "User group"
msgid "User group "
msgstr "用户组"
#: users/templates/users/user_detail.html:152
msgid "Reset ssh key"
msgstr "重置密钥"
#: users/templates/users/user_asset_permission.html:69
#, fuzzy
#| msgid "Asset"
msgid "Asset "
msgstr "资产"
#: users/templates/users/user_asset_permission.html:70
#, fuzzy
#| msgid "Asset group"
msgid "Asset group "
msgstr "资产组"
#: users/templates/users/user_asset_permission.html:71
#, fuzzy
#| msgid "System user"
msgid "System user "
msgstr "系统"
#: users/templates/users/user_asset_permission.html:115
#, fuzzy
#| msgid "Create perm"
msgid "Quick create permission for user"
msgstr "创建权限"
#: users/templates/users/user_create.html:13
msgid "Reset link will be generated and sent to the user. "
msgstr "生成重置密码连接,通过邮件发送给用户"
#: users/templates/users/user_detail.html:98
msgid "Last login"
msgstr "最后登录"
#: users/templates/users/user_detail.html:233
#: users/templates/users/user_detail.html:236
msgid "UserGroup Update Success!"
msgstr ""
#: users/templates/users/user_detail.html:251
#: users/templates/users/user_detail.html:257
#: users/templates/users/user_detail.html:254
#: users/templates/users/user_detail.html:260
#, fuzzy
#| msgid "Create account successfully"
msgid "Update Successfully!"
msgstr "创建账户成功"
#: users/templates/users/user_detail.html:290
#: users/templates/users/user_detail.html:293
msgid "E-mail sent successfully. An e-mail has been sent to the user\\"
msgstr ""
#: users/templates/users/user_detail.html:291
#: users/templates/users/user_detail.html:294
#, fuzzy
#| msgid "Password"
msgid "Password-Reset"
msgstr "密码"
#: users/templates/users/user_detail.html:296
#: users/templates/users/user_detail.html:299
#: users/templates/users/user_detail.html:321
msgid "Are you sure?"
msgstr ""
#: users/templates/users/user_detail.html:297
#: users/templates/users/user_detail.html:300
#: users/templates/users/user_detail.html:322
msgid "This will reset the user\\"
msgstr ""
#: users/templates/users/user_detail.html:315
msgid "Successfully updated the SSH private key."
msgid ""
"The reset-ssh-public-key E-mail has been sent successfully. Please inform "
"the user to update his new ssh public key."
msgstr ""
#: users/templates/users/user_detail.html:316
#: users/templates/users/user_detail.html:321
#, fuzzy
#| msgid "SSH private key"
msgid "User SSH Private Key Reset"
msgid "SSH-Public-Key Reset"
msgstr "ssh密钥"
#: users/templates/users/user_detail.html:319
msgid "Failed to update the user\\"
msgstr ""
#: users/templates/users/user_granted_asset.html:47
#, fuzzy
#| msgid "Create asset group"
msgid "Granted assets of "
msgstr "创建资产组"
#: users/templates/users/user_granted_asset.html:110
#, fuzzy
#| msgid "Asset group list"
msgid "Asset groups granted of "
msgstr "资产组列表"
#: users/templates/users/user_group_create.html:16 users/views.py:229
#: users/templates/users/user_group_create.html:16 users/views.py:224
msgid "Create user group"
msgstr "创建用户组"
#: users/templates/users/user_update.html:3 users/views.py:160
#: users/templates/users/user_update.html:3 users/views.py:155
msgid "Update user"
msgstr "编辑用户"
......@@ -1478,57 +1641,109 @@ msgstr ""
" </br>\n"
" "
#: users/views.py:78
#: users/utils.py:132
#, fuzzy
#| msgid "SSH private key"
msgid "SSH Key Reset"
msgstr "ssh密钥"
#: users/utils.py:134
#, python-format
msgid ""
"\n"
" Hello %(name)s:\n"
" </br>\n"
" Your ssh public key has been reset by site administrator.\n"
" Please login and reset your ssh public key.\n"
" </br>\n"
" <a href=\"%(login_url)s\">Login direct</a>\n"
"\n"
" </br>\n"
" "
msgstr ""
#: users/views.py:73
msgid "Logout success"
msgstr "退出登录成功"
#: users/views.py:79
#: users/views.py:74
msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面"
#: users/views.py:107
#: users/views.py:102
msgid "User list"
msgstr "用户列表"
#: users/views.py:116
#: users/views.py:111
#, fuzzy, python-format
#| msgid "Create user <a href=\"%s\">%s</a> success."
msgid "Create user <a href=\"%s\">%s</a> successfully."
msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#: users/views.py:216
#: users/views.py:211
msgid "User group list"
msgstr "用户组列表"
#: users/views.py:261
#: users/views.py:256
msgid "Email address invalid, input again"
msgstr "邮箱地址错误,重新输入"
#: users/views.py:272
#: users/views.py:267
msgid "Send reset password message"
msgstr "发送重置密码邮件"
#: users/views.py:273
#: users/views.py:268
msgid "Send reset password mail success, login your mail box and follow it "
msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views.py:285
#: users/views.py:280
msgid "Reset password success"
msgstr "重置密码成功"
#: users/views.py:286
#: users/views.py:281
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
#: users/views.py:302 users/views.py:315
#: users/views.py:297 users/views.py:310
msgid "Token invalid or expired"
msgstr "Token错误或失效"
#: users/views.py:311
#: users/views.py:306
msgid "Password not same"
msgstr "密码不一致"
#~ msgid "Admin password"
#~ msgstr "管理员密码"
#, fuzzy
#~| msgid "Create user <a href=\"%s\">%s</a> success."
#~ msgid "Update system user <a href=\"%s\">%s</a> successfully."
#~ msgstr "创建用户 <a href=\"%s\">%s</a> 成功"
#, fuzzy
#~ msgid "Action"
#~ msgstr "激活"
#, fuzzy
#~| msgid "Create perm"
#~ msgid "Create perm "
#~ msgstr "创建权限"
#~ msgid "Create perm"
#~ msgstr "创建权限"
# msgid "Deleted!"
# msgstr "删除"
#~ msgid "has been deleted."
#~ msgstr "已被删除"
#~ msgid "User assets"
#~ msgstr "用户资产"
#~ msgid "User log"
#~ msgstr "登录日志"
#, fuzzy
#~| msgid "Create user <a href=\"%s\">%s</a> success."
#~ msgid "Update admin user <a href=\"%s\">%s</a> successfully."
......
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
@import url("https://fonts.useso.com/css?family=Open+Sans:300,400,600,700");
@import url("https://fonts.useso.com/css?family=Roboto:400,300,500,700");
/** {*/
/*box-sizing: border-box;*/
/*}*/
/*.color {*/
/*color: #19BC9C !important;*/
/*}*/
/*html,*/
/*body {*/
/*width: 100%;*/
/*height: 100%;*/
/*margin: 0;*/
/*font-family: 'Ubuntu Condensed', sans-serif;*/
/*background-color: #fff;*/
/*}*/
/*h1 {*/
/*text-align: center;*/
/*margin-bottom: 32px;*/
/*}*/
div.container {
display: block;
width: 50%;
margin: 32px auto;
padding: 16px 32px;
background-color: #fff;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}
div.inputTags-list {
display: inline-block;
width: 100%;
padding: 6px;
border: 1px solid rgba(25, 188, 156, 0.35);
/*background-color: #f9f9f9;*/
box-shadow: 1px 2px 2px rgba(221, 221, 221, 0.2);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
div.inputTags-list span.inputTags-item {
position: relative;
display: inline-block;
margin: 2px;
padding: 3px 22px 4px 8px;
background-color: #19BC9C;
text-align: center;
color: #fff;
opacity: 1;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
div.inputTags-list span.inputTags-item.is-edit {
display: none;
}
div.inputTags-list span.inputTags-item.is-hidden {
display: none !important;
}
div.inputTags-list span.inputTags-item.is-exists {
background-color: rgba(231, 76, 60, 0.7);
}
div.inputTags-list span.inputTags-item span.value {
cursor: pointer;
}
div.inputTags-list span.inputTags-item i {
position: absolute;
top: 50%;
right: 6px;
font-size: 20px;
cursor: pointer;
z-index: 10;
font-weight: 400;
font-family: sans-serif;
line-height: 1;
font-style: normal;
-webkit-transition: color 0.2s;
-khtml-transition: color 0.2s;
-moz-transition: color 0.2s;
-ms-transition: color 0.2s;
-o-transition: color 0.2s;
-webkit-transform: translateY(-50%);
-khtml-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
}
div.inputTags-list span.inputTags-item i:hover {
color: #e74c3c;
}
div.inputTags-list input.inputTags-field {
border: none;
margin-left: 4px;
background-color: transparent;
}
div.inputTags-list input.inputTags-field:focus,
div.inputTags-list input.inputTags-field:active {
outline: none;
}
div.inputTags-list input.inputTags-field.is-edit {
margin: 0 2px;
padding: 4px 8px 3px 8px;
border: 1px dashed #c4c4c4;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
div.inputTags-list ul.inputTags-autocomplete-list {
position: absolute;
max-height: 192px;
margin: 0;
padding: 0;
list-style-type: none;
background-color: #fff;
border: 1px solid #ddd;
overflow-y: auto;
z-index: 100;
opacity: 0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
-webkit-transform: scaleY(0);
-khtml-transform: scaleY(0);
-moz-transform: scaleY(0);
-ms-transform: scaleY(0);
-o-transform: scaleY(0);
-webkit-transform-origin: 50% 0;
-khtml-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
-ms-transform-origin: 50% 0;
-o-transform-origin: 50% 0;
-webkit-transition-duration: 0.2s;
-khtml-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
-ms-transition-duration: 0.2s;
-o-transition-duration: 0.2s;
}
div.inputTags-list ul.inputTags-autocomplete-list.is-active {
opacity: 1;
-webkit-transform: scaleY(1);
-khtml-transform: scaleY(1);
-moz-transform: scaleY(1);
-ms-transform: scaleY(1);
-o-transform: scaleY(1);
}
div.inputTags-list ul.inputTags-autocomplete-list li {
height: 32px;
line-height: 32px;
padding: 0 16px;
cursor: pointer;
border-bottom: 1px solid #ddd;
-webkit-transition-duration: 0.3s;
-khtml-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-ms-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
-webkit-transition-duration: 0.2s;
-khtml-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
-ms-transition-duration: 0.2s;
-o-transition-duration: 0.2s;
}
div.inputTags-list ul.inputTags-autocomplete-list li:last-child {
border: none;
}
div.inputTags-list ul.inputTags-autocomplete-list li:hover {
background-color: #19BC9C;
color: #fff;
}
div.inputTags-list ul.inputTags-autocomplete-list li.is-disabled {
cursor: default;
background-color: #f7f7f7;
color: initial;
}
p.inputTags-error {
position: relative;
margin: 0;
padding: 0.5em 1em;
color: #fff;
background-color: rgba(231, 76, 60, 0.7);
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
p.inputTags-error:first-of-type {
margin-top: 8px;
}
p.inputTags-error:after {
position: absolute;
content: "\000D7";
top: 50%;
right: 0.5em;
-webkit-transform: translateY(-50%);
-khtml-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
font-size: 28px;
}
!function(a){a.fn.inputTags=function(b){if("inputTags"in window||(window.inputTags={instances:[]}),window.inputTags.methods={tags:function(a,b){if(a){switch(typeof a){case"string":switch(a){case"_toString":var c=d.tags.toString();return b?b(c):c;case"_toObject":var e=d._toObject(d.tags);return b?b(e):e;case"_toJSON":var e=d._toObject(d.tags),f=JSON.stringify(e);return b?b(f):f;case"_toArray":return b?b(d.tags):d.tags}var g=a.split(",");if(g.length>1){var h=d.tags;d.tags=h.concat(g)}else d.tags.push(g[0]);break;case"object":var h=d.tags;"[object Object]"===Object.prototype.toString.call(a)&&(a=Object.keys(a).map(function(b){return a[b]})),d.tags=h.concat(a);break;case"function":return a(d.tags)}if(d._clean(),d._fill(),d._updateValue(),d.destroy(),d._setInstance(d),b)return b(d.tags)}return d.tags},event:function(a,b){d.options[a]=b,d._setInstance(d)},options:function(a,b){return a||b?b?(d.options[a]=b,void d._setInstance(d)):d.options[a]:d.options},destroy:function(){var b=a(this).attr("data-uniqid");delete window.inputTags.instances[b]}},"object"==typeof b||!b){var b=a.extend(!0,{},a.fn.inputTags.defaults,b);this.each(function(){var c=a(this);c.UNIQID=Math.round(Date.now()/(494*Math.random()-54)),c.DEFAULT_CLASS="inputTags",c.ELEMENT_CLASS=c.DEFAULT_CLASS+"-"+c.UNIQID,c.LIST_CLASS=c.DEFAULT_CLASS+"-list",c.ITEM_CLASS=c.DEFAULT_CLASS+"-item",c.ITEM_CONTENT='<span class="value" title="Cliquez pour éditer">%s</span><i class="close-item">&times</i>',c.FIELD_CLASS=c.DEFAULT_CLASS+"-field",c.ERROR_CLASS=c.DEFAULT_CLASS+"-error",c.ERROR_CONTENT='<p class="'+c.ERROR_CLASS+'">%s</p>',c.AUTOCOMPLETE_LIST_CLASS=c.DEFAULT_CLASS+"-autocomplete-list",c.AUTOCOMPLETE_ITEM_CLASS=c.DEFAULT_CLASS+"-autocomplete-item",c.AUTOCOMPLETE_ITEM_CONTENT='<li class="'+c.AUTOCOMPLETE_ITEM_CLASS+'">%s</li>',c.options=b,c.keys=[13,188,27],c.tags=[],c.options.keys.length>0&&(c.keys=c.keys.concat(c.options.keys)),c.init=function(){c.addClass(c.ELEMENT_CLASS).attr("data-uniqid",c.UNIQID),c.$element=a("."+c.ELEMENT_CLASS),c.$element.hide(),c.build(),c.fill(),c.save(),c.edit(),c.destroy(),c._autocomplete()._init(),c._focus()},c.build=function(){c.$html=a("<div>").addClass(c.LIST_CLASS),c.$input=a("<input>").attr({type:"text",class:c.FIELD_CLASS}),c.$html.insertAfter(c.$element).prepend(c.$input),c.$list=c.$element.next("."+c.LIST_CLASS),c.$list.on("click",function(b){return!a(b.target).hasClass("inputTags-field")&&void c.$input.focus()})},c.fill=function(){return c._getDefaultValues(),0!==c.options.tags&&(c._concatenate(),c._updateValue(),void c._fill())},c._fill=function(){c.tags.forEach(function(a,b){var d=c._validate(a,!1);(!0===d||"max"===d&&b+1<=c.options.max)&&c._buildItem(a)})},c._clean=function(){a("."+c.ITEM_CLASS,c.$list).remove()},c.save=function(){c.$input.on("keyup",function(b){b.preventDefault();var d=b.keyCode||b.which,e=c.$input.val().trim();if(a.inArray(d,c.keys)<0)return!1;if(27===d)return c._cancel(),!1;if(e=188===d?e.slice(0,-1):e,!c._validate(e,!0))return!1;if(c.options.only&&c._exists(e))return c._errors("exists"),!1;if(c.$input.hasClass("is-edit")){var f=c.$input.attr("data-old-value");if(f===e)return c._cancel(),!0;c._update(f,e),c._clean(),c._fill()}else{if(c._autocomplete()._isSet()&&c._autocomplete()._get("only")&&a.inArray(e,c._autocomplete()._get("values"))<0)return c._autocomplete()._hide(),c._errors("autocomplete_only"),!1;if(c._exists(e)){c.$input.removeClass("is-autocomplete"),c._errors("exists");var g=a('[data-tag="'+e+'"]',c.$list);return g.addClass("is-exists"),setTimeout(function(){g.removeClass("is-exists")},300),!1}c._buildItem(e),c._insert(e)}return c._cancel(),c._updateValue(),c.destroy(),c._autocomplete()._build(),c._setInstance(c),c.$input.focus(),!1})},c.edit=function(){c.$list.on("click","."+c.ITEM_CLASS,function(b){if(a(b.target).hasClass("close-item")||!1===c.options.editable||c._autocomplete()._isSet()&&c._autocomplete()._get("only"))return c._cancel(),!0;var d=a(this).addClass("is-edit"),e=a(".value",d).text();c.$input.width(d.outerWidth()).insertAfter(d).addClass("is-edit").attr("data-old-value",e).val(e).focus(),c._bindEvent("selected"),c.$input.on("blur",function(){c._cancel(),c._bindEvent("unselected")})})},c.destroy=function(){a("."+c.ITEM_CLASS,c.$list).off("click").on("click",".close-item",function(){var b=a(this).parent("."+c.ITEM_CLASS),d=a(".value",b).text();b.addClass("is-closed"),setTimeout(function(){c._pop(d),c._updateValue(),b.remove(),c._autocomplete()._build(),c.$input.focus(),c._setInstance(c)},200)})},c._buildItem=function(b){var d=a(c.ITEM_CONTENT.replace("%s",b)),e=a("<span>").addClass(c.ITEM_CLASS+" is-closed").attr("data-tag",b).html(d);e.insertBefore(c.$input).delay(100).queue(function(){a(this).removeClass("is-closed")})},c._getIndex=function(a){return c.tags.indexOf(a)},c._concatenate=function(){(!1===typeof c.options.max||c.options.max>0)&&c.options.tags.length>c.options.max&&c.options.tags.splice(-Math.abs(c.options.tags.length-c.options.max)),c.tags=c.tags.concat(c.options.tags)},c._getDefaultValues=function(){c.$element.val().length>0?c.tags=c.tags.concat(c.$element.val().split(",")):c.$element.attr("value","")},c._insert=function(a){c.tags.push(a),c._bindEvent(["change","create"])},c._update=function(a,b){var d=c._getIndex(a);c.tags[d]=b,c._bindEvent(["change","update"])},c._pop=function(a){var b=c._getIndex(a);return!(b<0)&&(c.tags.splice(b,1),void c._bindEvent(["change","destroy"]))},c._cancel=function(){a("."+c.ITEM_CLASS).removeClass("is-edit"),c.$input.removeClass("is-edit is-autocomplete").removeAttr("data-old-value style").val("").appendTo(c.$list)},c._autocomplete=function(){var b=c.options.autocomplete.values;return{_isSet:function(){return b.length>0},_init:function(){return!!c._autocomplete()._isSet()&&void c._autocomplete()._build()},_build:function(){c._autocomplete()._exists()&&c.$autocomplete.remove(),c.$autocomplete=a("<ul>").addClass(c.AUTOCOMPLETE_LIST_CLASS),c._autocomplete()._get("values").forEach(function(b,d){var e=c.AUTOCOMPLETE_ITEM_CONTENT.replace("%s",b),f=a.inArray(b,c.tags)>=0?a(e).addClass("is-disabled"):a(e);f.appendTo(c.$autocomplete)}),c._autocomplete()._bindClick(),a(document).not(c.$autocomplete).on("click",function(){c._autocomplete()._hide()})},_bindClick:function(){a(c.$autocomplete).off("click").on("click","."+c.AUTOCOMPLETE_ITEM_CLASS,function(b){if(a(b.target).hasClass("is-disabled"))return!1;c.$input.addClass("is-autocomplete").val(a(this).text()),c._autocomplete()._hide(),c._bindEvent("autocompleteTagSelect");var b=a.Event("keyup");b.which=13,c.$input.trigger(b)})},_show:function(){return!!c._autocomplete()._isSet()&&(c.$autocomplete.css({left:c.$input[0].offsetLeft,minWidth:c.$input.width()}).insertAfter(c.$input),void setTimeout(function(){c._autocomplete()._bindClick(),c.$autocomplete.addClass("is-active")},100))},_hide:function(){c.$autocomplete.removeClass("is-active")},_get:function(a){return c.options.autocomplete[a]},_exists:function(){return void 0!==c.$autocomplete}}},c._updateValue=function(){c.$element.attr("value",c.tags.join(","))},c._focus=function(){c.$input.on("focus",function(){c._bindEvent("focus"),!c._autocomplete()._isSet()||c.$input.hasClass("is-autocomplete")||c.$input.hasClass("is-edit")||c._autocomplete()._show()})},c._toObject=function(a){return a.reduce(function(a,b,c){return a[c]=b,a},{})},c._validate=function(a,b){var d,e="";switch(!0){case!a:case void 0===a:case 0===a.length:c._cancel(),e="empty";break;case a.length>0&&a.length<c.options.minLength:e="minLength";break;case a.length>c.options.maxLength:e="maxLength";break;case c.options.max>0&&c.tags.length>=c.options.max:c.$input.hasClass("is-edit")||(e="max");break;case c.options.email:d=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,d.test(a)||(e="email")}return!(e.length>0)||(b?c._errors(e):e)},c._exists=function(b){return a.inArray(b,c.tags)>=0},c._errors=function(a){return 0!==a.length&&(c._autocomplete()._exists()&&c.$autocomplete.remove(),c._displayErrors(c.options.errors[a].replace("%s",c.options[a]),a),!1)},c._displayErrors=function(b,d){var e=a(c.ERROR_CONTENT.replace("%s",b)).attr("data-error",d),f=c.options.errors.timeout;return!a("."+c.ERROR_CLASS+'[data-error="'+d+'"]').length&&(e.hide().insertAfter(c.$list).slideDown(),!(!f||f<=0)&&(a("."+c.ERROR_CLASS).on("click",function(){c._collapseErrors(a(this))}),void setTimeout(function(){c._collapseErrors()},f)))},c._collapseErrors=function(b){var d=b?b:a("."+c.ERROR_CLASS);d.slideUp(300,function(){d.remove()})},c._getInstance=function(){return window.inputTags.instances[c.UNIQID]},c._setInstance=function(a){window.inputTags.instances[c.UNIQID]=c},c._isSet=function(a){return!(void 0===c.options[a]||!1===c.options[a]||c.options[a].length<=0)},c._callMethod=function(a,b){return void 0!==b.options[a]&&"function"==typeof b.options[a]&&void b.options[a].apply(this,Array.prototype.slice.call(arguments,1))},c._initEvent=function(a,b){if(!a)return!1;switch(typeof a){case"string":b(a,c);break;case"object":a.forEach(function(a,d){b(a,c)})}return!0},c._bindEvent=function(a){return c._initEvent(a,function(a,b){c._callMethod(a,b)})},c._unbindEvent=function(a){return c._initEvent(a,function(a,b){c.options[a]=!1})},c.init(),c._bindEvent("init"),c._setInstance(c)});return{on:function(a,b){window.inputTags.methods.event(a,b)}}}if(window.inputTags.methods[b]){var c=a(this).attr("data-uniqid"),d=window.inputTags.instances[c];return void 0===d?a.error("[undefined instance] No inputTags instance found."):window.inputTags.methods[b].apply(this,Array.prototype.slice.call(arguments,1))}a.error("[undefined method] The method ["+b+"] does not exists.")},a.fn.inputTags.defaults={tags:[],keys:[],minLength:2,maxLength:30,max:6,email:!1,only:!0,init:!1,create:!1,update:!1,destroy:!1,focus:!1,selected:!1,unselected:!1,change:!1,autocompleteTagSelect:!1,editable:!0,autocomplete:{values:[],only:!1},errors:{empty:"Attention, vous ne pouvez pas ajouter un tag vide.",minLength:"Attention, votre tag doit avoir au minimum %s caractères.",maxLength:"Attention, votre tag ne doit pas dépasser %s caractères.",max:"Attention, le nombre de tags ne doit pas dépasser %s.",email:"Attention, l'adresse email que vous avez entré n'est pas valide",exists:"Attention, ce tag existe déjà !",autocomplete_only:"Attention, vous devez sélectionner une valeur dans la liste.",timeout:8e3}}}(jQuery);
\ No newline at end of file
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% block custom_head_css_js %}
<link href="{% static "css/plugins/select2/select2.min.css" %}" rel="stylesheet">
<script src="{% static "js/plugins/select2/select2.full.min.js" %}"></script>
{% block custom_head_css_js_create %} {% endblock %}
{% endblock %}
{% block content %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>{{ action }}</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
{% block form %} {% endblock %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% extends 'users/_user.html' %}
{% load i18n %}
{% load bootstrap %}
{% block user_template_title %}{% trans "Create user" %}{% endblock %}
{% block username %}
{{ form.username|bootstrap_horizontal }}
{% endblock %}
......
<<<<<<< HEAD
{% extends '_list_base.html' %}
{% load i18n static %}
{% block custom_head_css_js %}
......@@ -5,6 +6,11 @@
<script src="{% static "js/plugins/sweetalert/sweetalert.min.js" %}"></script>
{% endblock %}
=======
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
>>>>>>> asset
{% block content_left_head %}
<a href="{% url 'users:user-group-create' %}" class="btn btn-sm btn-primary ">{% trans "Add User Group" %}</a>
{% endblock %}
......
{% extends '_list_base.html' %}
{% extends '_base_list.html' %}
{% load i18n %}
{% load common_tags %}
{% block content_left_head %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment