mirror of https://github.com/jumpserver/jumpserver
[Update] 修改command 批量执行左侧选择系统用户
parent
82a6369568
commit
87deb18791
|
@ -67,8 +67,6 @@ class AssetUserManager:
|
||||||
return AssetUserQuerySet(instances)
|
return AssetUserQuerySet(instances)
|
||||||
|
|
||||||
def get(self, username, asset, **kwargs):
|
def get(self, username, asset, **kwargs):
|
||||||
print(username)
|
|
||||||
print(asset)
|
|
||||||
instances = self.filter(username, assets=[asset], **kwargs)
|
instances = self.filter(username, assets=[asset], **kwargs)
|
||||||
if len(instances) == 1:
|
if len(instances) == 1:
|
||||||
return instances[0]
|
return instances[0]
|
||||||
|
|
|
@ -80,9 +80,7 @@
|
||||||
<select class="select2 form-control"
|
<select class="select2 form-control"
|
||||||
id="system-users-select">
|
id="system-users-select">
|
||||||
{% for s in system_users %}
|
{% for s in system_users %}
|
||||||
{% if s.protocol == 'ssh' and s.login_mode == 'auto' %}
|
<option value="{{ s.id }}" {% if s.protocol != 'ssh' or s.login_mode != 'auto' %}disabled{% endif %}>{{ s }}</option>
|
||||||
<option value="{{ s.id }}">{{ s }}</option>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
@ -207,6 +205,7 @@
|
||||||
lineHeight: 1,
|
lineHeight: 1,
|
||||||
rightClickSelectsWord: true,
|
rightClickSelectsWord: true,
|
||||||
disableStdin: true,
|
disableStdin: true,
|
||||||
|
cursorBlink: false,
|
||||||
theme: {
|
theme: {
|
||||||
background: '#1f1b1b'
|
background: '#1f1b1b'
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ class CommandExecutionStartView(PermissionsMixin, TemplateView):
|
||||||
user = self.request.user
|
user = self.request.user
|
||||||
with tmp_to_root_org():
|
with tmp_to_root_org():
|
||||||
util = AssetPermissionUtilV2(user)
|
util = AssetPermissionUtilV2(user)
|
||||||
system_users = [s for s in util.get_system_users() if s.protocol == 'ssh']
|
system_users = util.get_system_users()
|
||||||
return system_users
|
return system_users
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue