Skip to content

Commit cf768e5

Browse files
authored
Merge pull request #166 from clowder-framework/release/1.14.1
Release/1.14.1
2 parents 7a0c181 + 92773e5 commit cf768e5

File tree

18 files changed

+83
-54
lines changed

18 files changed

+83
-54
lines changed

CHANGELOG.md

Lines changed: 17 additions & 2 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.14.1 - 2021-02-02
8+
9+
- Google will no longer work as login provider, we are working on this issue [#157](https://github.com/clowder-framework/clowder/issues/157).
10+
- If non local accounts are used the count can be wrong. Use the [fixcounts](https://github.com/clowder-framework/clowder/blob/develop/scripts/updates/fix-counts.js)
11+
script to fix this.
12+
13+
### Fixed
14+
- Error logging in with Orcid due to changed URL. [#91](https://github.com/clowder-framework/clowder/issues/91)
15+
- Fixed error in url for Twitter login.
16+
- Users count was not correct if using anything else but local accounts. [#136](https://github.com/clowder-framework/clowder/issues/136)
17+
- Files were not properly reindexed when the Move button was used to move a file into or out of a folder in a dataset.
18+
- When adding a file to a dataset by URL, prioritize the URL `content-type` header over the file content type established
19+
by looking at the file name extension. [#139](https://github.com/clowder-framework/clowder/issues/139)
20+
- Wrap words across lines to stay within interface elements. [#160](https://github.com/clowder-framework/clowder/issues/160)
21+
722
## 1.14.0 - 2021-01-07
823

924
### Added
@@ -14,6 +29,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1429
### Changed
1530
- `api/reports/storage/spaces` endpoint now accepts a space parameter for ID rather than requiring a space filter.
1631
- Datasets and collections in the trash are no longer indexed for discovery in search services.
32+
- Switched to loading the 3DHOP libraries used by `viewer_hop.js` from http://vcg.isti.cnr.it/3dhop/distribution to https://3dhop.net/distribution. The new server is a safer https server.
1733

1834
## 1.13.0 - 2020-12-02
1935

@@ -62,8 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6278
- Track user_id with every extraction event. [#94](https://github.com/clowder-framework/clowder/issues/94)
6379
- Added a new storage report at `GET api/reports/storage/spaces/:id` for auditing user storage usage on a space basis.
6480
- The file and dataset metrics reports also have support for since and until ISO8601 date parameters.
65-
- Added `viewer_hop` a 3D models previewer for `*.ply` and `*.nxz` files. Added `mimetype.nxz=model/nxz` and
66-
`mimetype.NXZ=model/nxz` as new mimetypes in `conf/mimetypes.conf`
81+
- Added `viewer_hop` a 3D models previewer for `*.ply` and `*.nxz` files. Added `mimetype.nxz=model/nxz` and `mimetype.NXZ=model/nxz` as new mimetypes in `conf/mimetypes.conf`
6782

6883
### Fixed
6984
- Ignore the `update` field when posting to `/api/extractors`. [#89](https://github.com/clowder-framework/clowder/issues/89)

app/api/Folders.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ class Folders @Inject() (
302302
if(oldFolder.files.contains(fileId)) {
303303
folders.removeFile(oldFolder.id, fileId)
304304
folders.addFile(newFolder.id, fileId)
305+
files.index(fileId)
306+
datasets.index(datasetId)
305307
Ok(toJson(Map("status" -> "success", "fileName" -> file.filename, "folderName" -> newFolder.name)))
306308
} else {
307309
BadRequest("Failed to move file. The file with id: " + file.id.stringify + " isn't in folder with id: " + oldFolder.id.stringify )
@@ -315,6 +317,8 @@ class Folders @Inject() (
315317
if(dataset.files.contains(fileId)) {
316318
folders.addFile(newFolder.id, fileId)
317319
datasets.removeFile(datasetId, fileId)
320+
files.index(fileId)
321+
datasets.index(datasetId)
318322
Ok(toJson(Map("status" -> "success", "fileName" -> file.filename, "folderName" -> newFolder.name)))
319323
} else {
320324
BadRequest("Failed to move file. The file with id: " + file.id.stringify + "Isn't in dataset with id: " + dataset.id.stringify )
@@ -353,6 +357,8 @@ class Folders @Inject() (
353357
if(folder.files.contains(fileId)) {
354358
datasets.addFile(datasetId, file)
355359
folders.removeFile(oldFolderId, fileId)
360+
files.index(fileId)
361+
datasets.index(datasetId)
356362
Ok(toJson(Map("status" -> "success", "fileName"-> file.filename )))
357363
} else {
358364
BadRequest("The file you are trying to move isn't in the folder you are moving it from.")

app/services/SecureSocialEventListener.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import securesocial.core.providers.UsernamePasswordProvider
1010

1111
class SecureSocialEventListener(app: play.api.Application) extends EventListener {
1212
override def id: String = "SecureSocialEventListener"
13+
lazy val userService: UserService = DI.injector.getInstance(classOf[UserService])
14+
lazy val spaceService: SpaceService = DI.injector.getInstance(classOf[SpaceService])
15+
lazy val appConfig: AppConfigurationService = DI.injector.getInstance(classOf[AppConfigurationService])
1316

1417
def onEvent(event: Event, request: RequestHeader, session: Session): Option[Session] = {
15-
val userService: UserService = DI.injector.getInstance(classOf[UserService])
16-
val spaceService: SpaceService = DI.injector.getInstance(classOf[SpaceService])
17-
1818
event match {
1919
case e: SignUpEvent => {
2020
userService.findByIdentity(event.user) match {
@@ -40,6 +40,7 @@ class SecureSocialEventListener(app: play.api.Application) extends EventListener
4040
val subject = s"[${AppConfiguration.getDisplayName}] new user signup"
4141
val body = views.html.emails.userSignup(user)(request)
4242
util.Mail.sendEmailAdmins(subject, Some(user), body)
43+
appConfig.incrementCount('users, 1)
4344
}
4445
user.email match {
4546
case Some(e) => spaceService.processInvitation(e)

app/util/FileUtils.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,18 @@ object FileUtils {
661661
case Some((loader_id, loader, length)) => {
662662
files.get(file.id) match {
663663
case Some(f) => {
664-
val fixedfile = f.copy(contentType=conn.getContentType, loader=loader, loader_id=loader_id, length=length)
665-
files.save(fixedfile)
664+
// if header's content type is application/octet-stream leave content type as the one based on file name,
665+
// otherwise replace with value from header.
666+
val fixedFile = if (conn.getContentType == play.api.http.ContentTypes.BINARY) {
667+
f.copy(loader = loader, loader_id = loader_id, length = length)
668+
} else {
669+
f.copy(contentType = conn.getContentType, loader = loader, loader_id = loader_id, length = length)
670+
}
671+
files.save(fixedFile)
666672
appConfig.incrementCount('files, 1)
667673
appConfig.incrementCount('bytes, f.length)
668674
Logger.debug("Uploading Completed")
669-
Some(fixedfile)
675+
Some(fixedFile)
670676
}
671677
case None => {
672678
Logger.error(s"File $loader_id was not found anymore")

app/views/collectionofdatasets.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
</ol>
9191
<div class="col-xs-12 collection-title" id="coll-title">
92-
<h1 id ="collectiontitle" class="inline"><span class="glyphicon glyphicon-th-large"></span> @Html(collection.name)</h1>
92+
<h1 id ="collectiontitle" class="inline break-word"><span class="glyphicon glyphicon-th-large"></span> @Html(collection.name)</h1>
9393
@if(!collection.trash && Permission.checkPermission(Permission.EditCollection, ResourceRef(ResourceRef.collection, collection.id))) {
9494
<h3 id="h-edit-title" class="hiddencomplete">
9595
<a id="edit-title" href="javascript:updateTitle()" edit="Click to edit title">

app/views/datasets/listitem.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="col-md-8 col-lg-8 col-sm-8">
3030
<div class="row">
3131
<div class="col-xs-12">
32-
<span class="h2"><a href="@(routes.Datasets.dataset(dataset.id))">@Html(dataset.name)</a></span>
32+
<span class="h2"><a href="@(routes.Datasets.dataset(dataset.id))" class="break-word">@Html(dataset.name)</a></span>
3333
</div>
3434
</div>
3535
<div class="row">

app/views/file.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
<div class="row">
258258
<div id="file-name-div" class="file-title-div col-xs-12">
259259
<div id="prf-file-name" class="text-left inline">
260-
<h1 id="file-name-title" class="inline"> <span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
260+
<h1 id="file-name-title" class="inline break-word"> <span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
261261
@if(Permission.checkPermission(Permission.EditFile, ResourceRef(ResourceRef.file, file.id))) {
262262
<div id="h-edit-file" class="hiddencomplete">
263263
<a id ="edit-file" href="javascript:updateFileName()" title="Click to edit file name.">

app/views/files/linkDownload.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@main("Download File") {
44
<div class="row">
55
<div class="col-md-12">
6-
<h1 id="file-name-title" class="inline"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
6+
<h1 id="file-name-title" class="inline break-word"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
77
</div>
88
</div>
99
<div class="row">

app/views/files/listitem.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</div>
2424

2525
<div class="col-md-10 col-sm-10 col-lg-10">
26-
<h3><a href="@(routes.Files.file(file.id, dataset, space, folder))">@file.filename</a></h3>
26+
<h3><a href="@(routes.Files.file(file.id, dataset, space, folder))" class="break-word">@file.filename</a></h3>
2727
<div class="row">
2828
<div class="col-md-8 col-lg-8 col-sm-8">
2929
<ul class="list-unstyled">

app/views/files/share.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@main("Share") {
44
<div class="row">
55
<div class="col-md-12">
6-
<h1 id="file-name-title" class="inline"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
6+
<h1 id="file-name-title" class="inline break-word"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
77
</div>
88
</div>
99
<div class="row">

0 commit comments

Comments
 (0)