Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 4.2 from dev into master #808

Merged
merged 82 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f1df094
Base on displayOption, find all images with Excluded or Included from…
mracer0102 Aug 18, 2023
76ca04e
delete useless codes
mracer0102 Aug 21, 2023
69b4660
Merge pull request #775 from AtlasOfLivingAustralia/feature/fathom
schoicsiro Jun 29, 2023
1776848
#691-Main image problem when profile contains private image
schoicsiro Aug 22, 2023
8c1e83e
remove comments codes and put comments for logic
schoicsiro Aug 29, 2023
79e56b9
remove comments code and change variable name
schoicsiro Aug 29, 2023
e68b6d1
change test case and add staged image case
schoicsiro Aug 30, 2023
2c40f35
change the condition for readonly view
schoicsiro Aug 30, 2023
e6ef8d8
Remove stagedImage case
schoicsiro Sep 1, 2023
8022de8
Change logic for filter private images based on readonly or edit and …
schoicsiro Sep 6, 2023
49ee047
add new branch
schoicsiro Sep 6, 2023
e6a5ebc
Merge pull request #779 from AtlasOfLivingAustralia/#745-Problem-sele…
schoicsiro Sep 6, 2023
9cb4074
#777 Add API to list collections
schoicsiro Sep 13, 2023
734f254
#777 remove comment
schoicsiro Sep 13, 2023
7109714
#777 change logic and use existing Opus
schoicsiro Sep 14, 2023
9f28e22
#777 add pojo
schoicsiro Sep 14, 2023
d6e3c9d
#777 add @GrantAccess and logic for grant access
schoicsiro Sep 14, 2023
0d7fe87
Merge branch 'master' into dev
temi Sep 14, 2023
056631b
4.2-SNAPSHOT
temi Sep 14, 2023
552564c
#647 Move the "Delete Collection" button
schoicsiro Sep 15, 2023
8342719
#647 add help text
schoicsiro Sep 15, 2023
cf26e1c
#647 check if user is alaAdmin
schoicsiro Sep 18, 2023
6cbb2be
#647 revert
schoicsiro Sep 18, 2023
9e5f5a6
Merge pull request #784 from AtlasOfLivingAustralia/feature/#647
schoicsiro Sep 18, 2023
dc9cc21
Placeholder - Editing user roles comes back with error " User already…
schoicsiro Sep 19, 2023
3332259
#700 change codes for removing disabled button
schoicsiro Sep 19, 2023
555d64b
#700 fix javascript fail during build
schoicsiro Sep 20, 2023
f3fb553
#658 Error when saving comments
schoicsiro Sep 21, 2023
3d334b2
#658 Error when saving comments
schoicsiro Sep 21, 2023
ac05c49
#785 Add APIs to access images
schoicsiro Sep 26, 2023
920544e
#785 Add GrantAccess
schoicsiro Sep 26, 2023
25cd8c3
#728 Add a feature to clear cache
schoicsiro Sep 29, 2023
7fa17b9
#728 replace UI as table and remove unused import
schoicsiro Oct 5, 2023
40f15f3
Merge pull request #787 from AtlasOfLivingAustralia/feature/#658
schoicsiro Oct 5, 2023
f4e5adf
#728 update APIController
schoicsiro Oct 5, 2023
f567174
#785 fix code
schoicsiro Oct 5, 2023
c683d02
#700 save button should disable when public access mode is back
schoicsiro Oct 6, 2023
f7f6f44
#700 make sure this function if reset action
schoicsiro Oct 6, 2023
175ce3b
#700 make sure only access option has changed
schoicsiro Oct 6, 2023
e810dd2
Merge pull request #786 from AtlasOfLivingAustralia/feature/#700
schoicsiro Oct 6, 2023
afa67cc
#785 chang logic as code review comments
schoicsiro Oct 6, 2023
d8ef783
#785 chang logic as code review comments
schoicsiro Oct 8, 2023
c3b343a
#785 fix as comment
schoicsiro Oct 9, 2023
fa0e082
#790 Adding a private image on gives error
schoicsiro Oct 9, 2023
ce5f56d
#777 fix them as comments
schoicsiro Oct 9, 2023
b446fc1
#777 move class
schoicsiro Oct 9, 2023
56e4762
Merge pull request #783 from AtlasOfLivingAustralia/feature/#777
schoicsiro Oct 9, 2023
1a3c819
#785 fix as comments
schoicsiro Oct 9, 2023
d53804b
Merge branch 'dev' into feature/#785
schoicsiro Oct 9, 2023
78402d7
Merge pull request #793 from AtlasOfLivingAustralia/feature/#790
schoicsiro Oct 9, 2023
11fee72
Merge pull request #788 from AtlasOfLivingAustralia/feature/#785
temi Oct 9, 2023
a5cfb6e
#728 fix as comments
schoicsiro Oct 10, 2023
c12a994
#728 write test case
schoicsiro Oct 11, 2023
818b019
#728 add send error and HttpStatus
schoicsiro Oct 11, 2023
0103d97
Feature/#781 (#782)
schoicsiro Oct 13, 2023
ace1bb7
#657 Error when deleting comments on first go, ok after that
schoicsiro Oct 13, 2023
65c49c6
#657 changed logic
schoicsiro Oct 15, 2023
9a30cc0
#657 fix test cases
schoicsiro Oct 16, 2023
906a680
#728 code changes and fix test case
schoicsiro Oct 17, 2023
53bfa1f
#728 code changes and fix test case
schoicsiro Oct 18, 2023
b9034fb
Merge pull request #791 from AtlasOfLivingAustralia/Feature/#728
schoicsiro Oct 18, 2023
76b9496
Merge pull request #794 from AtlasOfLivingAustralia/feature/#657
temi Oct 18, 2023
dd6a660
Merge pull request #780 from AtlasOfLivingAustralia/Feature-#691
temi Oct 18, 2023
93cec14
#735 "My Profile" menu item displays error (page not found)
schoicsiro Oct 19, 2023
551697c
#797 upgrade ALA security plugin
schoicsiro Oct 19, 2023
9516586
Merge pull request #795 from AtlasOfLivingAustralia/feature/#735
temi Oct 19, 2023
c3c6319
#800 Add new categories to attachments
schoicsiro Oct 31, 2023
01475b0
#800 add test case
schoicsiro Oct 31, 2023
796356c
#800 change value name
schoicsiro Nov 1, 2023
a24aae9
Merge pull request #801 from AtlasOfLivingAustralia/feature/#800
temi Nov 7, 2023
114dee4
#800 replace imageId to fileName
schoicsiro Nov 13, 2023
415134c
#785_2 fix
schoicsiro Nov 14, 2023
2cefd40
Merge pull request #803 from AtlasOfLivingAustralia/feature/#785_2
temi Nov 14, 2023
c659f1c
#785_3 fix content-type
schoicsiro Nov 16, 2023
80c2d13
Merge pull request #804 from AtlasOfLivingAustralia/feature/#785_3
schoicsiro Nov 16, 2023
e1efba6
Merge pull request #799 from AtlasOfLivingAustralia/feature/#797
temi Nov 21, 2023
5a99814
version update 4.2-SNAPSHOT
temi Nov 21, 2023
136a451
- updated api docs
temi Nov 28, 2023
4007608
#781 fix to publication is not showing in edit mode
schoicsiro Nov 28, 2023
580ae4c
Merge pull request #806 from AtlasOfLivingAustralia/feature/#781_2
temi Nov 28, 2023
a5bf33d
#800_1 : fix category option issue
schoicsiro Nov 30, 2023
6427066
Merge pull request #807 from AtlasOfLivingAustralia/feature/#800_1
temi Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- master
- feature/**
- hotfix/**
- #745-Problem selecting and displaying multiple images when there are private images

env:
TZ: Australia/Canberra
Expand Down
34 changes: 0 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ dependencies {
implementation 'org.apache.tika:tika-parsers:1.3'
implementation "commons-fileupload:commons-fileupload:1.3.1"

implementation 'net.sf.jasperreports:jasperreports:6.4.1'
implementation 'net.sf.jasperreports:jasperreports-functions:6.4.1'
implementation 'au.org.ala:jasper-liberation-fonts-2.00.1:1.3'
implementation 'net.glxn:qrgen:1.4'
implementation 'org.apache.xmlgraphics:batik-bridge:1.9'
implementation 'org.apache.xmlgraphics:batik-svggen:1.9'
Expand Down Expand Up @@ -218,35 +215,4 @@ bootWar {

publish {
dependsOn assemble
}


tasks.register('reportCompile') {
ant.property(name: 'jasper.path', value: 'jasperreports-6.4.1.jar')

// ant.taskdef(resource: "com/abc/ant/antlib.xml", classpath: ant.properties['jasper.path'], loaderref: 'abc')


println "\n- Starting JasperReports *.jrxml compilation process..."
println configurations.runtimeClasspath.asPath
// define the Jasper Reports Compile Task
ant.taskdef(name:'reportCompile', classname: 'net.sf.jasperreports.ant.JRAntCompileTask', classpath: configurations.runtimeClasspath.asPath)

// remove existing jasper files
ant.delete{
fileset('dir':'grails-app/conf/reports', 'defaultexcludes':'yes'){
include('name':'**/*.jasper')
}
}

// create a temporary directory for use by the jasper compiler
ant.mkdir(dir:'target/jasper')

// compile the reports
ant.reportCompile(srcdir:'grails-app/conf/reports', destdir:'grails-app/conf/reports', tempdir:'target/jasper', keepJava:true, xmlvalidation:true){
include(name:'**/*.jrxml')
// include(classpath: configurations.developmentOnly.asPath)
// include(name:'**/*.jrtx')
}
println "-------\n- JasperReports compilation process finished"
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
profileHubVersion=4.1
profileHubVersion=4.2-SNAPSHOT
grailsVersion=5.2.4
grailsGradlePluginVersion=5.2.3
groovyVersion=3.0.11
alaSecurityLibsVersion=6.0.0
alaSecurityLibsVersion=6.2.0
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx2g
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ profileEditor.controller('ALAAdminController', function ($http, util, messageSer
};

self.tags = [];
self.cacheRegions = [];

loadBackupFileList();
loadOpusList();
loadPendingJobs();
loadTags();
cacheManagement();

self.reloadHelpUrls = function() {
var promise = $http.post(util.contextRoot() + "/admin/reloadHelpUrls");
Expand Down Expand Up @@ -225,4 +227,28 @@ profileEditor.controller('ALAAdminController', function ($http, util, messageSer
self.loadingTags = false;
});
}

function cacheManagement() {
self.loadingCacheManagement = true;
var promise = $http.get(util.contextRoot() + "/admin/cacheManagement");
promise.then(function (response) {
self.cacheRegions = response.data || [];
self.loadingCacheManagement = false;
}, function() {
self.loadingCacheManagement = false;
});
}

self.clearCache = function (cache) {
var promise = $http.get(util.contextRoot() + "/admin/clearCache/" + cache);
promise.then(function(response) {
if (response.data.error) {
messageService.alert(response.data.error);
} else {
messageService.success(response.data.resp);
}
}, function() {
messageService.alert("Failed to clear cache the job");
});
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ profileEditor.controller("AttachmentUploadController", function (profileService,
self.types = [pdfType, urlType];

self.metadata = angular.isDefined(attachment) ? _.clone(attachment) : {};

if (self.categories == null) {
profileService.getCategories().then(function (data) {
self.categories = data.resp;
if (self.metadata.category == null) {
self.metadata.category = self.categories[0].value;
}
});
}

self.files = null;
self.error = null;
self.type = angular.isDefined(attachment.url) && attachment.url ? urlType.key : pdfType.key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ profileEditor.controller('CommentController', function (profileService, util, co
var self = this;

self.comments = [];
self.savedComments = [];
self.currentComment = null;
self.opusId = util.getEntityId("opus");
self.profileId = util.getEntityId("profile");
Expand All @@ -19,6 +20,7 @@ profileEditor.controller('CommentController', function (profileService, util, co
var promise = profileService.getComments(self.opusId, self.profileId);
promise.then(function(data) {
self.comments = orderBy(data, 'dateCreated');
self.savedComments = self.comments;
})
};

Expand Down Expand Up @@ -76,7 +78,12 @@ profileEditor.controller('CommentController', function (profileService, util, co
}
comment.children.push(data);
} else {
if (!Array.isArray(self.comments)) {
self.comments = [];
self.savedComments = []
}
self.comments.push(data);
self.savedComments.push(data);
}

self.currentComment = null;
Expand All @@ -86,9 +93,12 @@ profileEditor.controller('CommentController', function (profileService, util, co
};

function find(path) {
var array = self.comments;
var array = self.savedComments;
var comment = null;
angular.forEach(path, function(index) {
if (index > array.length-1) {
index = array.length-1
}
comment = array[index];
if (comment.children) {
array = orderBy(comment.children, 'dateCreated');
Expand All @@ -114,7 +124,13 @@ profileEditor.controller('CommentController', function (profileService, util, co

comment.children.splice(lastIndex, 1);
} else {
self.comments.splice(path[0], 1);
let selectedComment = self.savedComments[path[0]]
let filterdComments = self.comments.filter(i => i !== selectedComment)
self.comments = filterdComments;

if (self.comments.length === 0) {
self.savedComments = [];
}
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,24 @@ profileEditor.controller('UserAccessController', function (messageService, util,
});
};

self.privateModeChanged = function() {
self.privateModeChanged = function(form, isOptionChanged) {
if (self.opus.privateCollection) {
self.roles.push(userRole);
} else {
if (isOptionChanged) {
var hasRole_USER = self.users.find(it => it.role === 'ROLE_USER')
if (hasRole_USER) {
self.users = self.users.filter(it => it.role !== 'ROLE_USER')
var data = {privateCollection: self.opus.privateCollection, authorities: self.users};
var promise = profileService.updateUsers(self.opusId, data);
promise.then(function () {
form.$setPristine();
messageService.success("User access has been successfully updated.");
}, function () {
messageService.alert("An error has occurred while updating user access.");
});
}
}
self.roles.splice(4, 1)
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,11 @@ profileEditor.service('profileService', function ($http, util, $cacheFactory, co
return util.toStandardPromise(future);
},

getCategories: function () {
var future = $http.get(util.contextRoot() + "/attachment/categories", {cache: true});
return util.toStandardPromise(future);
},

getLicences: function () {
var future = $http.get(util.contextRoot() + "/licences", {cache: true});
return util.toStandardPromise(future);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ <h4 class="modal-title">Add an attachment</h4>
<div class="col-sm-9">
<select id="category" ng-model="attachmentUploadCtrl.metadata.category" class="form-control">
<option value="">Select a category</option>
<option value="General">General</option>
<option value="Management">Management</option>
<option ng-repeat="category in attachmentUploadCtrl.categories | orderBy:'toString()'" value="{{category.key}}"
ng-selected="attachmentUploadCtrl.metadata.category == category.key">{{category.key}}</option>
</select>
</div>
</div>
Expand Down

This file was deleted.

3 changes: 3 additions & 0 deletions grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ grails:
profile: web
codegen:
defaultPackage: au.org.ala.profile.hub
cache:
ehcache:
ehcacheXmlLocation: 'classpath:profile-ehcache.xml'
gorm:
reactor:
# Whether to translate GORM events into Reactor events
Expand Down
3 changes: 0 additions & 3 deletions grails-app/conf/jasperreports.properties

This file was deleted.

43 changes: 43 additions & 0 deletions grails-app/conf/profile-ehcache.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'>

<persistence directory="/data/profile-hub/ehcache"/>

<cache alias="userDetailsCache">
<expiry>
<ttl unit="days">1</ttl>
</expiry>
<resources>
<heap unit="entries">2000</heap>
</resources>
</cache>

<cache alias="userDetailsByIdCache">
<expiry>
<ttl unit="days">1</ttl>
</expiry>
<resources>
<heap unit="entries">2000</heap>
</resources>
</cache>

<cache alias="userListCache">
<expiry>
<ttl unit="days">1</ttl>
</expiry>
<resources>
<heap unit="entries">2000</heap>
</resources>
</cache>

<cache alias="vocabListCache">
<expiry>
<ttl unit="days">1</ttl>
</expiry>
<resources>
<heap unit="entries">20000</heap>
</resources>
</cache>

</config>
Loading
Loading