Commit 8bb82d16 authored by ibuler's avatar ibuler

Merge branch 'dev' of github.com:jumpserver/jumpserver into dev

parents 1ef16d55 97bc3d5e
...@@ -75,7 +75,8 @@ class Gateway(AssetUser): ...@@ -75,7 +75,8 @@ class Gateway(AssetUser):
pkey=self.private_key_obj) pkey=self.private_key_obj)
except(paramiko.AuthenticationException, except(paramiko.AuthenticationException,
paramiko.BadAuthenticationType, paramiko.BadAuthenticationType,
paramiko.SSHException) as e: paramiko.SSHException,
paramiko.ssh_exception.NoValidConnectionsError) as e:
return False, str(e) return False, str(e)
try: try:
......
...@@ -117,7 +117,7 @@ function initTable() { ...@@ -117,7 +117,7 @@ function initTable() {
columns: [ columns: [
{data: function(){return ""}}, {data: "name"}, {data: "username" }, {data: "assets_amount", orderable: false}, {data: function(){return ""}}, {data: "name"}, {data: "username" }, {data: "assets_amount", orderable: false},
{#{data: "connectivity_amount"}, {data: "connectivity_amount"}, {data: "connectivity_amount"},#} {#{data: "connectivity_amount"}, {data: "connectivity_amount"}, {data: "connectivity_amount"},#}
{data: "comment"}, {data: "id"} {data: "comment"}, {data: "id", orderable: false}
] ]
}; };
admin_user_table = jumpserver.initServerSideDataTable(options); admin_user_table = jumpserver.initServerSideDataTable(options);
......
...@@ -62,8 +62,8 @@ function initTable() { ...@@ -62,8 +62,8 @@ function initTable() {
], ],
ajax_url: '{% url "api-assets:cmd-filter-list" %}', ajax_url: '{% url "api-assets:cmd-filter-list" %}',
columns: [ columns: [
{data: "id"}, {data: "name" }, {data: "rules" }, {data: "id"}, {data: "name" }, {data: "rules", orderable: false},
{data: "system_users" }, {data: "comment"}, {data: "id"} {data: "system_users", orderable: false}, {data: "comment"}, {data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
...@@ -90,8 +90,8 @@ function initTable() { ...@@ -90,8 +90,8 @@ function initTable() {
], ],
ajax_url: '{% url "api-assets:cmd-filter-rule-list" filter_pk=object.id %}', ajax_url: '{% url "api-assets:cmd-filter-rule-list" filter_pk=object.id %}',
columns: [ columns: [
{data: "id"}, {data: "type.display" }, {data: 'content'}, {data: 'priority'}, {data: "id"}, {data: "type.display", orderable: false }, {data: 'content'}, {data: 'priority'},
{data: 'action.display'}, {data: "comment" }, {data: "id"} {data: 'action.display', orderable: false}, {data: "comment" }, {data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-9" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span class="label"><b>{{ object.name }}</b></span> <span class="label"><b>{{ object.name }}</b></span>
......
...@@ -106,7 +106,7 @@ function initTable() { ...@@ -106,7 +106,7 @@ function initTable() {
ajax_url: '{% url "api-assets:gateway-list" %}?domain={{ object.id }}', ajax_url: '{% url "api-assets:gateway-list" %}?domain={{ object.id }}',
columns: [ columns: [
{data: "id"}, {data: "name" }, {data: 'ip'}, {data: 'port'}, {data: "id"}, {data: "name" }, {data: 'ip'}, {data: 'port'},
{data: "protocol"}, {data: "username" }, {data: "comment" }, {data: "id"} {data: "protocol", orderable: false}, {data: "username" }, {data: "comment" }, {data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
...@@ -58,8 +58,8 @@ function initTable() { ...@@ -58,8 +58,8 @@ function initTable() {
], ],
ajax_url: '{% url "api-assets:domain-list" %}', ajax_url: '{% url "api-assets:domain-list" %}',
columns: [ columns: [
{data: "id"}, {data: "name" }, {data: "asset_count" }, {data: "id"}, {data: "name" }, {data: "asset_count", orderable: false },
{data: "gateway_count" }, {data: "comment" }, {data: "id"} {data: "gateway_count", orderable: false }, {data: "comment" }, {data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
...@@ -44,7 +44,7 @@ function initTable() { ...@@ -44,7 +44,7 @@ function initTable() {
ajax_url: '{% url "api-assets:label-list" %}?sort=name', ajax_url: '{% url "api-assets:label-list" %}?sort=name',
columns: [ columns: [
{data: "id"}, {data: "name" }, {data: "value" }, {data: "id"}, {data: "name" }, {data: "value" },
{data: "asset_count" }, {data: "id"} {data: "asset_count", orderable: false}, {data: "id", orderable: false}
], ],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
...@@ -113,7 +113,8 @@ ...@@ -113,7 +113,8 @@
"searching": false, "searching": false,
"paging": false, "paging": false,
"bInfo" : false, "bInfo" : false,
"order": [] "order": [],
"columnDefs": [{"targets": 6, "orderable": false}]
}); });
$('.select2').select2({ $('.select2').select2({
dropdownAutoWidth: true, dropdownAutoWidth: true,
......
...@@ -120,8 +120,8 @@ $(document).ready(function () { ...@@ -120,8 +120,8 @@ $(document).ready(function () {
}} }}
], ],
ajax_url: '{% url "api-ops:adhoc-list" %}?task={{ object.pk }}', ajax_url: '{% url "api-ops:adhoc-list" %}?task={{ object.pk }}',
columns: [{data: function(){return ""}}, {data: "short_id" }, {data: "hosts"}, {data: "pattern"}, columns: [{data: function(){return ""}}, {data: "short_id" }, {data: "hosts", orderable:false}, {data: "pattern", orderable:false},
{data: "run_as"}, {data: "become"}, {data: "date_created"}, {data: "id"}] {data: "run_as"}, {data: "become", orderable:false}, {data: "date_created"}, {data: "id", orderable:false}]
}; };
jumpserver.initDataTable(options); jumpserver.initDataTable(options);
}).on('click', '.celery-task-log', function () { }).on('click', '.celery-task-log', function () {
......
...@@ -140,8 +140,8 @@ function initTable() { ...@@ -140,8 +140,8 @@ function initTable() {
}} }}
], ],
ajax_url: '{% url "api-ops:history-list" %}?task={{ object.pk }}', ajax_url: '{% url "api-ops:history-list" %}?task={{ object.pk }}',
columns: [{data: function(){return ""}}, {data: "date_start"}, {data: "stat"}, {data: "stat"}, {data: "is_finished"}, columns: [{data: function(){return ""}}, {data: "date_start"}, {data: "stat", orderable:false}, {data: "stat", orderable:false}, {data: "is_finished"},
{data: "is_success"}, {data: "timedelta"}, {data: 'adhoc_short_id'}, {data: "id"}] {data: "is_success"}, {data: "timedelta"}, {data: 'adhoc_short_id'}, {data: "id", orderable:false}]
}; };
jumpserver.initDataTable(options); jumpserver.initDataTable(options);
} }
......
...@@ -75,7 +75,13 @@ $(document).ready(function() { ...@@ -75,7 +75,13 @@ $(document).ready(function() {
"searching": false, "searching": false,
"paging": false, "paging": false,
"bInfo" : false, "bInfo" : false,
"order": [] "order": [],
"columnDefs": [
{ "targets": 0, "orderable": false },
{ "targets": 4, "orderable": false },
{ "targets": 5, "orderable": false },
{ "targets": 8, "orderable": false }
]
}); });
$('.select2').select2({ $('.select2').select2({
dropdownAutoWidth : true, dropdownAutoWidth : true,
......
...@@ -19,17 +19,17 @@ ...@@ -19,17 +19,17 @@
</li> </li>
<li> <li>
<a href="{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Users and user groups' %} <i class="fa fa-group"></i> {% trans 'Users and user groups' %}
</a> </a>
</li> </li>
<li class="active"> <li class="active">
<a href="{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Assets and node' %}</a> <i class="fa fa-inbox"></i> {% trans 'Assets and node' %}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span style="float: left">{% trans 'Asset list of ' %} <b>{{ asset_permission.name }}</b></span> <span style="float: left">{% trans 'Asset list of ' %} <b>{{ asset_permission.name }}</b></span>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Add asset to this permission' %} <i class="fa fa-info-circle"></i> {% trans 'Add asset to this permission' %}
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
</li> </li>
<li> <li>
<a href="{% url 'perms:asset-permission-user-list' pk=object.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-user-list' pk=object.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Users and user groups' %} <i class="fa fa-group"></i> {% trans 'Users and user groups' %}
</a> </a>
</li> </li>
<li> <li>
<a href="{% url 'perms:asset-permission-asset-list' pk=object.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-asset-list' pk=object.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Assets and node' %}</a> <i class="fa fa-inbox"></i> {% trans 'Assets and node' %}</a>
</li> </li>
<li class="pull-right"> <li class="pull-right">
<a class="btn btn-outline btn-default" href="{% url 'perms:asset-permission-update' pk=object.id %}"><i class="fa fa-edit"></i>{% trans 'Update' %}</a> <a class="btn btn-outline btn-default" href="{% url 'perms:asset-permission-update' pk=object.id %}"><i class="fa fa-edit"></i>{% trans 'Update' %}</a>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span class="label"><b>{{ object.name }}</b></span> <span class="label"><b>{{ object.name }}</b></span>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Quick update' %} <i class="fa fa-info-circle"></i> {% trans 'Quick update' %}
......
...@@ -182,9 +182,9 @@ function initTable() { ...@@ -182,9 +182,9 @@ function initTable() {
], ],
ajax_url: '{% url "api-perms:asset-permission-list" %}?display=1', ajax_url: '{% url "api-perms:asset-permission-list" %}?display=1',
columns: [ columns: [
{data: "id"}, {data: "name"}, {data: "users"}, {data: "id"}, {data: "name"}, {data: "users", orderable: false},
{data: "user_groups"}, {data: "assets"}, {data: "user_groups", orderable: false}, {data: "assets", orderable: false},
{data: "nodes"}, {data: "system_users"}, {data: "nodes", orderable: false}, {data: "system_users", orderable: false},
{data: "is_valid", orderable: false}, {data: "id", orderable: false} {data: "is_valid", orderable: false}, {data: "id", orderable: false}
], ],
select: {}, select: {},
......
...@@ -19,17 +19,17 @@ ...@@ -19,17 +19,17 @@
</li> </li>
<li class="active"> <li class="active">
<a href="{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-user-list' pk=asset_permission.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Users and user groups' %} <i class="fa fa-group"></i> {% trans 'Users and user groups' %}
</a> </a>
</li> </li>
<li> <li>
<a href="{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}" class="text-center"> <a href="{% url 'perms:asset-permission-asset-list' pk=asset_permission.id %}" class="text-center">
<i class="fa fa-bar-chart-o"></i> {% trans 'Assets and node' %}</a> <i class="fa fa-inbox"></i> {% trans 'Assets and node' %}</a>
</li> </li>
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span style="float: left">{% trans 'User list of ' %} <b>{{ asset_permission.name }}</b></span> <span style="float: left">{% trans 'User list of ' %} <b>{{ asset_permission.name }}</b></span>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Add user to asset permission' %} <i class="fa fa-info-circle"></i> {% trans 'Add user to asset permission' %}
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span class="label"><b>{{ object.name }}</b></span> <span class="label"><b>{{ object.name }}</b></span>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Quick update' %} <i class="fa fa-info-circle"></i> {% trans 'Quick update' %}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span style="float: left">{% trans 'RemoteApp list of ' %} <b>{{ remote_app_permission.name }}</b></span> <span style="float: left">{% trans 'RemoteApp list of ' %} <b>{{ remote_app_permission.name }}</b></span>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Add RemoteApp to this permission' %} <i class="fa fa-info-circle"></i> {% trans 'Add RemoteApp to this permission' %}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</ul> </ul>
</div> </div>
<div class="tab-content"> <div class="tab-content">
<div class="col-sm-7" style="padding-left: 0;"> <div class="col-sm-8" style="padding-left: 0;">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<span style="float: left">{% trans 'User list of ' %} <b>{{ remote_app_permission.name }}</b></span> <span style="float: left">{% trans 'User list of ' %} <b>{{ remote_app_permission.name }}</b></span>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-5" style="padding-left: 0;padding-right: 0"> <div class="col-sm-4" style="padding-left: 0;padding-right: 0">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-info-circle"></i> {% trans 'Add user to this permission' %} <i class="fa fa-info-circle"></i> {% trans 'Add user to this permission' %}
......
...@@ -199,8 +199,8 @@ function initTable() { ...@@ -199,8 +199,8 @@ function initTable() {
ajax_url: commandListUrl, ajax_url: commandListUrl,
columns: [ columns: [
{data: "id"}, {data: "input", orderable: false}, {data: "user", orderable: false}, {data: "id"}, {data: "input", orderable: false}, {data: "user", orderable: false},
{data: "asset"}, {data: "system_user"}, {data: "asset", orderable: false}, {data: "system_user", orderable: false},
{data: "session"}, {data: "timestamp", width: "160px"}, {data: "session", orderable: false}, {data: "timestamp", width: "160px", orderable: false},
], ],
select: {}, select: {},
op_html: $('#actions').html(), op_html: $('#actions').html(),
......
...@@ -155,11 +155,11 @@ function initTable() { ...@@ -155,11 +155,11 @@ function initTable() {
], ],
ajax_url: sessionListUrl, ajax_url: sessionListUrl,
columns: [ columns: [
{data: "id"}, {data: "id"}, {data: "user", orderable: false}, {data: "id"}, {data: "id", orderable:false}, {data: "user"},
{data: "asset", orderable: false}, {data: "system_user", orderable: false}, {data: "asset"}, {data: "system_user"},
{data: "remote_addr"}, {data: "protocol"}, {data: "login_from_display"}, {data: "remote_addr"}, {data: "protocol"}, {data: "login_from_display", orderable:false},
{data: "command_amount"}, {data: "date_start"}, {data: "command_amount", orderable:false}, {data: "date_start"},
{data: "date_end"}, {data: "id"}, {data: "date_end", orderable:false}, {data: "id",orderable:false},
], ],
op_html: $('#actions').html(), op_html: $('#actions').html(),
fb_html: $("#daterange").html(), fb_html: $("#daterange").html(),
......
...@@ -90,7 +90,7 @@ function initTable() { ...@@ -90,7 +90,7 @@ function initTable() {
], ],
ajax_url: '{% url "api-terminal:terminal-list" %}', ajax_url: '{% url "api-terminal:terminal-list" %}',
columns: [{data: function(){return ""}}, {data: "name" }, {data: "remote_addr" }, columns: [{data: function(){return ""}}, {data: "name" }, {data: "remote_addr" },
{data: "session_online"}, {data: "is_active" }, {data: 'is_alive'}, {data: "id"}], {data: "session_online", orderable: false}, {data: "is_active", orderable: false}, {data: 'is_alive'}, {data: "id", orderable: false}],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
jumpserver.initDataTable(options); jumpserver.initDataTable(options);
......
...@@ -80,8 +80,8 @@ function initTable() { ...@@ -80,8 +80,8 @@ function initTable() {
}} }}
], ],
ajax_url: '{% url "api-users:user-group-list" %}?display=1', ajax_url: '{% url "api-users:user-group-list" %}?display=1',
columns: [{data: function(){return ""}}, {data: "name" }, {data: "users"}, columns: [{data: function(){return ""}}, {data: "name" }, {data: "users", orderable: false},
{data: "comment"}, {data: "id" }], {data: "comment"}, {data: "id", orderable: false }],
order: [], order: [],
op_html: $('#actions').html() op_html: $('#actions').html()
}; };
......
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