Skip to content

Commit

Permalink
Merge pull request #104 from folio-org/release_3.0.3
Browse files Browse the repository at this point in the history
Release 3.0.3
  • Loading branch information
EthanFreestone authored Feb 7, 2024
2 parents cc6e37c + 994aba7 commit ddf3a62
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.3 2024-02-07
* SI-45 Dashboards not displaying after upgrade to Poppy
* New endpoint: `/servint/admin/ensureDisplayData` to add (empty) display data for all dashboards which are missing it.

## 3.0.2 2023-11-23
* ERM-3112 org.json:json:20201115 DoS/OOM

Expand Down
2 changes: 1 addition & 1 deletion service/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gorm.version=7.3.3

# Application
appName=mod-service-interaction
appVersion=3.0.2
appVersion=3.0.3
dockerTagSuffix=
dockerRepo=folioci

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,14 @@ class AdminController {
result.status = 'OK'
render result as JSON
}

public ensureDisplayData() {
def result = [:]
log.debug("AdminController::ensureDisplayData");
utilityService.ensureDisplayData()

result.status = 'OK'
render result as JSON
}
}

14 changes: 14 additions & 0 deletions service/grails-app/services/org/olf/UtilityService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,18 @@ class UtilityService {
}
}

public void ensureDisplayData() {
log.info("UtilityService::EnsureDisplayData")
Dashboard.executeQuery("""
SELECT d.id FROM Dashboard AS d
LEFT JOIN DashboardDisplayData AS ddd
ON d.id = ddd.dashId
WHERE ddd.id IS NULL
""".toString()).each{ dashId ->
log.debug("Found dashboard without display data (${dashId}), creating.")
DashboardDisplayData ddd = new DashboardDisplayData([
dashId: dashId
]).save(flush: true, failOnError: true);
}
}
}

0 comments on commit ddf3a62

Please sign in to comment.