Skip to content

Commit d57e183

Browse files
authored
Merge branch 'clowder-framework:develop' into updateGettingStartedDocs
2 parents f0da750 + 834ca94 commit d57e183

File tree

22 files changed

+147
-45
lines changed

22 files changed

+147
-45
lines changed

.zenodo.json

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,35 @@
146146
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
147147
"name": "Kenton McHenry",
148148
"orcid": "0000-0003-0367-2550"
149+
},
150+
{
151+
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
152+
"name": "Aaraj Habib"
153+
},
154+
{
155+
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
156+
"name": "Ben Galewsky"
157+
},
158+
{
159+
"name": "Chrysovalantis Constantinou"
160+
},
161+
{
162+
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
163+
"name": "Kaveh Karimi-Asli"
164+
},
165+
{
166+
"name": "Maria-Spyridoula Tzima"
167+
},
168+
{
169+
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
170+
"name": "Michael Johnson"
171+
},
172+
{
173+
"affiliation": "National Center for Supercomputing Applications, University of Illinois at Urbana-Champaign",
174+
"name": "Mike Bobak"
175+
},
176+
{
177+
"name": "Tim Yardley"
149178
}
150179
],
151180
"upload_type": "software",
@@ -158,5 +187,5 @@
158187
"open-data",
159188
"open-science"
160189
],
161-
"notes": "This research has been partially funded by grants: NSF #BCS-0941268, #EAR- 331906, #ACI-1261582, #ACI-1443013, #OCI-0940824, #OCI-0525308; NIH #1P01AI089556-01A1. Illinois - Indiana Sea Grant #DW92329201, European Commission #RI-261600, XSEDE #OCI-1053575, ARPA- E #DE-AR0000594."
162-
}
190+
"notes": "This research has been partially funded by grants: NSF #BCS-0941268, #EAR- 331906, #ACI-1261582, #ACI-1443013, #OCI-0940824, #OCI-0525308, #OAC-1835834; NIH #1P01AI089556-01A1. Illinois - Indiana Sea Grant #DW92329201, European Commission #RI-261600, XSEDE #OCI-1053575, ARPA- E #DE-AR0000594."
191+
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 1.19.4 - 2021-11-11
8+
9+
### Fixed
10+
- Error with adding dataset to collection. [#306](https://github.com/clowder-framework/clowder/issues/306)
11+
12+
## 1.19.3 - 2021-11-11
13+
14+
See [fix-counts.js](scripts/updates/fix-count.js) for a script that can be run before this update (as well as the
15+
update for 1.19.0) to pre populate the migration. This will speed up the update and will not impact the running
16+
instance.
17+
18+
### Fixed
19+
- If a space has a lot of datasets, rendering the space page is very slow. Files in a space is now cached.
20+
- Set permissions for folders to be 777 this fixes [clowder-helm#5](https://github.com/clowder-framework/clowder-helm/issues/5)
21+
722
## 1.19.2 - 2021-10-20
823

924
### Fixed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ COPY docker/custom.conf docker/play.plugins /home/clowder/custom/
6767
# Containers should NOT run as root as a good practice
6868
# numeric id to be compatible with openshift, will run as random userid:0
6969
RUN mkdir -p /home/clowder/data && \
70-
chmod g+w /home/clowder/logs /home/clowder/data /home/clowder/custom
70+
chmod 777 /home/clowder/logs /home/clowder/data /home/clowder/custom
7171
USER 10001
7272

7373
# command to run when starting docker

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Clowder: Open Source Data Management for Long Tail Data
22

3-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1196568.svg)](https://doi.org/10.5281/zenodo.1196568)
3+
[![DOI](https://zenodo.org/badge/196635389.svg)](https://zenodo.org/badge/latestdoi/196635389)
4+
45

56
A customizable and scalable data management system you can install in the cloud or on your own hardware.
67
More information is available at [https://clowderframework.org/](https://clowderframework.org/).

app/api/Files.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,7 @@ class Files @Inject()(
16781678
val ds_spaces = ds.spaces
16791679
for (ds_s <- ds_spaces) {
16801680
spaces.decrementSpaceBytes(ds_s, file.length)
1681+
spaces.decrementFileCounter(ds_s, 1)
16811682
}
16821683
}
16831684

app/api/Spaces.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Spaces @Inject()(spaces: SpaceService,
4141
val userId = request.user.get.id
4242
val c = ProjectSpace(name = name, description = description, created = new Date(), creator = userId,
4343
homePage = List.empty, logoURL = None, bannerURL = None, collectionCount = 0,
44-
datasetCount = 0, userCount = 0, spaceBytes = 0, metadata = List.empty)
44+
datasetCount = 0, fileCount = 0, userCount = 0, spaceBytes = 0, metadata = List.empty)
4545
spaces.insert(c) match {
4646
case Some(id) => {
4747
appConfig.incrementCount('spaces, 1)

app/controllers/SecuredController.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ trait SecuredController extends Controller {
153153
val spaces: SpaceService = DI.injector.getInstance(classOf[SpaceService])
154154
spaces.get(id) match {
155155
case None => Future.successful(BadRequest(views.html.notFound(spaceTitle + " does not exist.")(user)))
156-
case Some(space) => Future.successful(Forbidden(views.html.spaces.space(space,List(),List(),List(),List(),"", Map(),List(),0,0)(user)))
156+
case Some(space) => Future.successful(Forbidden(views.html.spaces.space(space,List(),List(),List(),List(),"", Map(),List())(user)))
157157
}
158158
}
159159

app/controllers/Spaces.scala

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
167167
var creatorActual: User = null
168168
val collectionsInSpace = spaces.getCollectionsInSpace(Some(id.stringify), Some(size))
169169
val datasetsInSpace = datasets.listSpace(size, id.toString(), user)
170-
val spaceBytes : Long = s.spaceBytes
171-
val spaceFiles : Integer = getFilesPerSpace(id, user)
172170
val publicDatasetsInSpace = datasets.listSpaceStatus(size, id.toString(), "publicAll", user)
173171
val usersInSpace = spaces.getUsersInSpace(id, None)
174172
var curationObjectsInSpace: List[CurationObject] = List()
@@ -217,7 +215,7 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
217215
case None => List.empty
218216
}
219217
sinkService.logSpaceViewEvent(s, user)
220-
Ok(views.html.spaces.space(Utils.decodeSpaceElements(s), collectionsInSpace, publicDatasetsInSpace, datasetsInSpace, rs, play.Play.application().configuration().getString("SEADservices.uri"), userRoleMap, userSelections, spaceBytes, spaceFiles))
218+
Ok(views.html.spaces.space(Utils.decodeSpaceElements(s), collectionsInSpace, publicDatasetsInSpace, datasetsInSpace, rs, play.Play.application().configuration().getString("SEADservices.uri"), userRoleMap, userSelections))
221219
}
222220
case None => BadRequest(views.html.notFound(spaceTitle + " does not exist."))
223221
}
@@ -414,7 +412,7 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
414412
val newSpace = ProjectSpace(name = formData.name, description = formData.description,
415413
created = new Date, creator = userId, homePage = formData.homePage,
416414
logoURL = formData.logoURL, bannerURL = formData.bannerURL,
417-
collectionCount = 0, datasetCount = 0, userCount = 0, spaceBytes = 0, metadata = List.empty,
415+
collectionCount = 0, datasetCount = 0, fileCount = 0, userCount = 0, spaceBytes = 0, metadata = List.empty,
418416
resourceTimeToLive = formData.resourceTimeToLive * 60 * 60 * 1000L, isTimeToLiveEnabled = formData.isTimeToLiveEnabled,
419417
status = formData.access,
420418
affiliatedSpaces = formData.affSpace)
@@ -640,15 +638,4 @@ class Spaces @Inject() (spaces: SpaceService, users: UserService, events: EventS
640638
case None => BadRequest(views.html.notFound(spaceTitle + " does not exist."))
641639
}
642640
}
643-
644-
private def getFilesPerSpace(spaceId: UUID, user: Option[User]) : Integer = {
645-
var spaceFiles: Integer = 0
646-
val allDatasetsInSpace = datasets.listSpace(0, spaceId.toString(), user)
647-
for (ds <- allDatasetsInSpace) {
648-
val files_in_ds = ds.files.length
649-
spaceFiles += files_in_ds
650-
}
651-
spaceFiles
652-
}
653-
654641
}

app/models/Space.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ case class ProjectSpace (
2222
bannerURL: Option[URL],
2323
collectionCount: Integer,
2424
datasetCount: Integer,
25+
fileCount: Integer,
2526
userCount: Integer,
2627
spaceBytes: Long,
2728
metadata: List[Metadata],

app/services/SpaceService.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ trait SpaceService {
9494

9595
def incrementCollectionCounter(collection: UUID, space: UUID, increment: Int)
9696

97+
def incrementFileCounter(space: UUID, increment: Long)
98+
99+
def decrementFileCounter(space: UUID, decrement: Long)
100+
97101
def incrementSpaceBytes(space: UUID, increment: Long)
98102

99103
def decrementSpaceBytes(space: UUID, decrement: Long)

0 commit comments

Comments
 (0)