1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 02:10:24 +00:00

update dir detail (#2796)

remove file_count, dir_count and size field
This commit is contained in:
lian
2019-01-09 15:11:17 +08:00
committed by Daniel Pan
parent 71228ae651
commit 7b70adaa6d
4 changed files with 0 additions and 22 deletions

View File

@@ -356,7 +356,6 @@ class DirDetailView(APIView):
try:
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:
logger.error(e)
error_msg = 'Internal Server Error'
@@ -366,9 +365,6 @@ class DirDetailView(APIView):
'repo_id': repo_id,
'path': path,
'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),
}

View File

@@ -1118,19 +1118,6 @@
<th width="35%"></th>
<td width="65%"></td>
</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>
<th>{% trans "Location" %}</th>
<td><%- path %></td>

View File

@@ -49,9 +49,6 @@ define([
if (part_data.error_msg) {
$('.error', $container).html(part_data.error_msg).show();
} 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();
}
},

View File

@@ -394,8 +394,6 @@ class DirDetailViewTest(BaseTestCase):
json_resp = json.loads(resp.content)
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):