Commit 99c36f2a authored by ibuler's avatar ibuler

Fix bug

parent db8b0022
...@@ -133,7 +133,7 @@ class MyGrantedAssetsGroupsApi(APIView): ...@@ -133,7 +133,7 @@ class MyGrantedAssetsGroupsApi(APIView):
'id': asset_group.id, 'id': asset_group.id,
'name': asset_group.name, 'name': asset_group.name,
'comment': asset_group.comment, 'comment': asset_group.comment,
'asset_amount': 1 'assets_amount': 1
} }
asset_groups_json = asset_groups.values() asset_groups_json = asset_groups.values()
return Response(asset_groups_json, status=200) return Response(asset_groups_json, status=200)
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
} }
}} }}
], ],
ajax_url: '{% url "perms:api-user-assets" %}', ajax_url: '{% url "perms:api-user-assets" pk=user.id %}',
columns: [{data: function(){return ""}}, {data: "hostname" }, {data: "ip" }, {data: "port"}, columns: [{data: function(){return ""}}, {data: "hostname" }, {data: "ip" }, {data: "port"},
{data: "system_users_join"}, {data: "is_active"}] {data: "system_users_join"}, {data: "is_active"}]
}; };
...@@ -148,8 +148,8 @@ ...@@ -148,8 +148,8 @@
$(td).html(detail_btn.replace('99991937', rowData.id)); $(td).html(detail_btn.replace('99991937', rowData.id));
}} }}
], ],
ajax_url: '{% url "perms:api-user-asset-groups" %}', ajax_url: '{% url "perms:api-user-asset-groups" pk=user.id %}',
columns: [{data: function(){return ""}}, {data: "name" }, {data: "asset_amount" }] columns: [{data: function(){return ""}}, {data: "name" }, {data: "assets_amount" }]
}; };
jumpserver.initDataTable(options); jumpserver.initDataTable(options);
jumpserver.initDataTable(options2); jumpserver.initDataTable(options2);
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
} }
}} }}
], ],
ajax_url: '{% url "perms:api-user-assets" %}', ajax_url: '{% url "perms:api-user-assets" pk=user.id %}',
columns: [{data: function(){return ""}}, {data: "hostname" }, {data: "ip" }, {data: "port"}, columns: [{data: function(){return ""}}, {data: "hostname" }, {data: "ip" }, {data: "port"},
{data: "system_users_join"}, {data: "is_active"}] {data: "system_users_join"}, {data: "is_active"}]
}; };
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
$(td).html(detail_btn.replace('99991937', rowData.id)); $(td).html(detail_btn.replace('99991937', rowData.id));
}} }}
], ],
ajax_url: '{% url "perms:api-user-asset-groups" %}', ajax_url: '{% url "perms:api-user-asset-groups" pk=user.id %}',
columns: [{data: function(){return ""}}, {data: "name" }, {data: "asset_amount" }] columns: [{data: function(){return ""}}, {data: "name" }, {data: "asset_amount" }]
}; };
jumpserver.initDataTable(options); jumpserver.initDataTable(options);
......
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