mirror of
https://github.com/sismics/docs.git
synced 2025-12-13 17:56:20 +00:00
Return file count on GET /document/list
This commit is contained in:
@@ -171,6 +171,7 @@ public class DocumentResource extends BaseResource {
|
||||
document.put("create_date", documentDto.getCreateTimestamp());
|
||||
document.put("shared", documentDto.getShared());
|
||||
document.put("language", documentDto.getLanguage());
|
||||
document.put("file_count", documentDto.getFileCount());
|
||||
|
||||
// Get tags
|
||||
List<TagDto> tagDtoList = tagDao.getByDocumentId(documentDto.getId());
|
||||
|
||||
@@ -16,7 +16,8 @@ App.controller('Navigation', function($scope, $http, $state, $rootScope, User, R
|
||||
setInterval(function() {
|
||||
$scope.$apply(function() {
|
||||
Restangular.one('app/log').get({
|
||||
limit: 100,
|
||||
// Error count will be wrong if there is more than 10 errors in 10 seconds
|
||||
limit: 10,
|
||||
level: 'ERROR'
|
||||
}).then(function(data) {
|
||||
// Add new errors
|
||||
|
||||
@@ -109,6 +109,7 @@ public class TestDocumentResource extends BaseJerseyTest {
|
||||
Assert.assertTrue(documents.length() == 1);
|
||||
Assert.assertEquals(document1Id, documents.getJSONObject(0).getString("id"));
|
||||
Assert.assertEquals("eng", documents.getJSONObject(0).getString("language"));
|
||||
Assert.assertEquals(1, documents.getJSONObject(0).getInt("file_count"));
|
||||
Assert.assertEquals(1, tags.length());
|
||||
Assert.assertEquals(tag1Id, tags.getJSONObject(0).getString("id"));
|
||||
Assert.assertEquals("SuperTag", tags.getJSONObject(0).getString("name"));
|
||||
|
||||
Reference in New Issue
Block a user