mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
@@ -356,7 +356,6 @@ class DirDetailView(APIView):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
dir_obj = seafile_api.get_dirent_by_path(repo_id, path)
|
dir_obj = seafile_api.get_dirent_by_path(repo_id, path)
|
||||||
count_info = seafile_api.get_file_count_info_by_path(repo_id, path)
|
|
||||||
except SearpcError as e:
|
except SearpcError as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
error_msg = 'Internal Server Error'
|
error_msg = 'Internal Server Error'
|
||||||
@@ -366,9 +365,6 @@ class DirDetailView(APIView):
|
|||||||
'repo_id': repo_id,
|
'repo_id': repo_id,
|
||||||
'path': path,
|
'path': path,
|
||||||
'name': dir_obj.obj_name,
|
'name': dir_obj.obj_name,
|
||||||
'file_count': count_info.file_count,
|
|
||||||
'dir_count': count_info.dir_count,
|
|
||||||
'size': count_info.size,
|
|
||||||
'mtime': timestamp_to_isoformat_timestr(dir_obj.mtime),
|
'mtime': timestamp_to_isoformat_timestr(dir_obj.mtime),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1118,19 +1118,6 @@
|
|||||||
<th width="35%"></th>
|
<th width="35%"></th>
|
||||||
<td width="65%"></td>
|
<td width="65%"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th>{% trans "Folders" %}</th>
|
|
||||||
<td class="dir-folder-counts"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>{% trans "Files" %}</th>
|
|
||||||
<td class="dir-file-counts"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>{% trans "Size" %}</th>
|
|
||||||
<td class="dir-size"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Location" %}</th>
|
<th>{% trans "Location" %}</th>
|
||||||
<td><%- path %></td>
|
<td><%- path %></td>
|
||||||
|
@@ -49,9 +49,6 @@ define([
|
|||||||
if (part_data.error_msg) {
|
if (part_data.error_msg) {
|
||||||
$('.error', $container).html(part_data.error_msg).show();
|
$('.error', $container).html(part_data.error_msg).show();
|
||||||
} else {
|
} else {
|
||||||
this.$('.dir-folder-counts').html(part_data.dir_count);
|
|
||||||
this.$('.dir-file-counts').html(part_data.file_count);
|
|
||||||
this.$('.dir-size').html(part_data.size);
|
|
||||||
$('table', $container).show();
|
$('table', $container).show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -394,8 +394,6 @@ class DirDetailViewTest(BaseTestCase):
|
|||||||
json_resp = json.loads(resp.content)
|
json_resp = json.loads(resp.content)
|
||||||
|
|
||||||
assert json_resp['name'] == self.folder_name
|
assert json_resp['name'] == self.folder_name
|
||||||
assert json_resp['file_count'] == 1
|
|
||||||
assert json_resp['dir_count'] == 1
|
|
||||||
|
|
||||||
def test_get_dir_detail_with_invalid_perm(self):
|
def test_get_dir_detail_with_invalid_perm(self):
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user