Compare commits

...

1600 Commits

Author SHA1 Message Date
Tim Donohue
686a402d40 Merge pull request #1090 from tdonohue/update_docker
Update Docker Compose scripts to resync with DSpace/DSpace
2021-04-15 14:17:20 -05:00
Tim Donohue
8dd8b06409 Ensure Entities submission config is setup & ensure Solr image starts after main one 2021-04-15 12:37:09 -05:00
Tim Donohue
b998f82b8d Bug fix: 'dspacesolr' container must have a copy of the Solr configs from 'dspace' container as they aren't in the dspace-angular codebase 2021-04-14 17:03:38 -05:00
Tim Donohue
1741678807 Update Docker Compose scripts to resync with DSpace/DSpace 2021-04-14 15:43:16 -05:00
Tim Donohue
f81acb575d Merge pull request #1099 from atmire/w2p-78407_allow-html-in-license-section
Quick win: Allow html in license section of submission form
2021-04-14 12:48:42 -05:00
Bruno Roemers
c074d6827f Merge remote-tracking branch 'upstream/main' into w2p-78407_allow-html-in-license-section 2021-04-14 19:06:44 +02:00
Tim Donohue
485a35eb1a Merge pull request #1098 from tdonohue/minor_theme_updates
Minor updates to base and dspace theme for Testathon.
2021-04-14 11:46:18 -05:00
Tim Donohue
9920aaba97 Merge pull request #1096 from atmire/fix-1094
Fix support for adding and removing relationships in relationship-only fields in the submission
2021-04-14 11:45:50 -05:00
Art Lowel
6d612c39c0 hide hint for relationship fields that aren't repeatable but do have a value 2021-04-14 17:51:25 +02:00
Kristof De Langhe
43e9b145b9 78406: Test fixes 2021-04-14 17:51:25 +02:00
Art Lowel
56a54ae1c9 don't hide the lookup button for virtual relationship fields 2021-04-14 17:51:25 +02:00
Art Lowel
a4a747e922 fix issue where the submission form wouldn't update after a relationship was added 2021-04-14 17:51:25 +02:00
Tim Donohue
ef8e66546b Minor updates to default and dspace theme for Testathon. Also updating DuraSpace to LYRASIS in several places. 2021-04-14 10:50:21 -05:00
Tim Donohue
9c0c1b408c Merge pull request #1100 from atmire/link-webdriver-version-to-chrome-version
Sync webdriver and chrome versions
2021-04-14 10:40:50 -05:00
Art Lowel
6e7fe85b47 use the chromedriver npm package to download the webdriver version compatible with the installed chrome version 2021-04-14 17:13:26 +02:00
Bruno Roemers
59560b993c 78407: Allow html in submission license section 2021-04-14 10:45:43 +02:00
Tim Donohue
edc4753efc Merge pull request #1092 from 4Science/CST-3782-final-adjustments
Repeatable fields with look up still broken in some cases
2021-04-13 11:42:49 -05:00
Alessandro Martelli
31e4aa788e [CST-3782] lookup click doesn't clear the plain value 2021-04-13 13:37:04 +02:00
Alessandro Martelli
b537f70d7b [CST-3782] possibility to remove the only relationship 2021-04-12 10:04:49 +02:00
Tim Donohue
3bd5f3fa09 Merge pull request #1063 from atmire/simple-dspace-theme
Minimal 'dspace' theme
2021-04-09 09:16:58 -05:00
Alessandro Martelli
4e21bdaf1f [CST-3782] repeatable with lookup fixes 2021-04-09 10:16:56 +02:00
Tim Donohue
e74c8f4daf Merge pull request #1004 from atmire/w2p-76150_Add-a-bitstream-download-page
Bitstream download page
2021-04-08 12:23:43 -05:00
Art Lowel
9bf2465ee8 change the font and overlay color on the home-page background image to improve readability 2021-04-08 14:18:13 +02:00
Tim Donohue
3d51110217 Merge pull request #1048 from atmire/w2p-76654_PaginationService
PaginationService
2021-04-06 12:12:51 -05:00
Tim Donohue
88f5a3d256 Merge pull request #1087 from atmire/w2p-77631_dropzone-issues
Submission dropzone issues [Fixed]
2021-04-06 11:22:03 -05:00
Art Lowel
7cbce550e2 remove commented out line 2021-04-06 17:28:19 +02:00
Art Lowel
6b7da66c81 update link href 2021-04-06 17:26:17 +02:00
Art Lowel
b8cb8f90b0 increase contrast to improve accessibility 2021-04-06 17:26:00 +02:00
Art Lowel
425f530f08 fix LGTM warnings 2021-04-06 16:58:37 +02:00
Art Lowel
3c93777e84 don't use CSR fallback when the headers are changed after the response is sent 2021-04-06 16:46:21 +02:00
Art Lowel
ff4bd59de0 use GET for shortlivedtoken requests on the server, POST on the client 2021-04-06 16:46:21 +02:00
Yana De Pauw
72ca74bdf3 Fix checkstyle issue 2021-04-06 16:46:21 +02:00
Yana De Pauw
99a96451b1 Update metadataservice citation tag to refer to new download page 2021-04-06 16:46:21 +02:00
Yana De Pauw
69c29407a2 Remove comment 2021-04-06 16:46:21 +02:00
Yana De Pauw
a1abface13 Fix lint issues 2021-04-06 16:46:21 +02:00
Yana De Pauw
3137f3e6c1 76150: Implement feedback 2021-04-06 16:46:21 +02:00
Yana De Pauw
868b7ad37b 76150: Add a bitstream download page 2021-04-06 16:46:21 +02:00
Yana De Pauw
73319533d1 Implement feedback 2021-04-06 16:36:01 +02:00
lotte
3482db0686 Unreverted changes from #1053 2021-04-06 13:27:33 +02:00
lotte
b16a565f7c fixed dropzone layover issue 2021-04-06 13:20:21 +02:00
Yana De Pauw
acafae77bd Merge remote-tracking branch 'upstream/main' into w2p-76654_PaginationService 2021-04-06 10:43:20 +02:00
Tim Donohue
9586428b12 Merge pull request #1083 from DSpace/revert-1053-w2p-77631_dropzone-issues
Revert "Submission dropzone issues"
2021-04-02 16:53:20 -05:00
Tim Donohue
d7bd3f6f54 Revert "Submission dropzone issues" 2021-04-02 16:28:40 -05:00
Tim Donohue
335d6fb339 Merge pull request #1053 from atmire/w2p-77631_dropzone-issues
Submission dropzone issues
2021-04-02 10:19:16 -05:00
Art Lowel
cbee776fa4 fix issues with path separators in windows 2021-04-02 16:58:37 +02:00
Art Lowel
60d917bb8a style home-page-news 2021-04-02 16:58:29 +02:00
Art Lowel
619f4d74c2 make dspace the default theme 2021-04-02 16:29:38 +02:00
Art Lowel
fb90bf64d9 create simple dspace theme based on mantis 2021-04-02 16:29:38 +02:00
Tim Donohue
0f7a32d0df Merge pull request #1055 from tdonohue/entity_type_storage
(Angular UI) Rename / move 'relationship.type' metadata field to 'dspace.entity.type'
2021-04-02 09:22:53 -05:00
Art Lowel
77a85793b6 delete mantis theme 2021-04-02 16:21:36 +02:00
Giuseppe
7402286954 #728 accessibility theming (#1057)
* [CST-3763] Change base theme colors

* [CST-3763] added new custom variables

* [CST-3763] applied changes to the header in order to have two different navbar

* [CST-3763] applied changes to breadcrumbs navbar

* [CST-3763] fix sidebar colors

* [CST-3763] applied changes footer in order to have two different sections

* [CST-3763] change home news jumbotron background color

* [CST-3763] fix issue with search-navbar.component z-index

* [CST-3763] fix issue with search-form.component that didn't use the brand colo parameter

* [CST-3763] fix issue with menu navbar on small window view

* [CST-3763] changed position for browse all button in the access control pages

* [CST-3763] Change form.component in order to have possibilities to display better additional form buttons

* [CST-3763] Change confirmation-modal.component in order to allow different colors and icons for confirm button

* [CST-3763] added confirmation icon

* [CST-3763] fixed accessibility for admin access control components

* [CST-3763] Added placeholder for search boxes

* [CST-3763] Added repository logo alt label

* [CST-3763] Adjust notification icons

* [CST-3763] Fix issue with hideReturnButton param in edit-comcol-page.component that was not initialized on page refresh

* Accessibility fix

* [CST-3763] Adjust usability for community/collection edit

* [CST-3763] fix error while running test

* [CST-3763] Added dynamically a title prefix to all dspace page

* [CST-3763] add breadcrumbs to the page where are missing

* [CST-3763] fixed failed tests

* [CST-3763] fixed failed e2e test

* [CST-3763] fixed failed e2e test

* Buttons fixes for accessibility

* [CST-3973] fixed issue with redirect after changing language

* Buttons and sections fixes for accessibility

* Buttons and sections fixes for accessibility

* [CST-3763] fixed colors for chips component

* [CST-3977] fixed issue with selecting a tag submission field

* [CST-3763] add breadcrumbs to the page where are missing

* [CST-3763] fixed edit workflowitem buttons color

* [CST-3977] removed unintentional committed log

* [CST-3763] Fix issue with tab selection in item edit page

* [CST-3763] Fix position of back button in the item edit page

* [CST-3763] icon and colors for search and browse all buttons

* [CST-3763] added atkinson font

* [CST-3763] remove dspace logo from home news

* [CST-3763] fix buttons colors for administrative search

* [CST-3763] Change background color for user menu

* [CST-3763] remove gradient from home page news component

* [CST-3763] fix issue with edit dso button

* [CST-3763] revert color schema

* [CST-3763] remove Atkinson-Hyperlegible font

* [CST-3763] fix use of header-logo-height variable

* [CST-3763] fix homepage link color

* [CST-3763] fix contrast color issue for navbar menu entries

* [CST-3763] add variable to show/hide top footer container

* [CST-3763] change dso edit button style

* [CST-3763] ensure to use "back" and "save" labels

* [CST-3763] Remove border from header

* [CST-3763] Change header in order to have only navigation bar in a single row

* Update src/app/root/root.component.html

Co-authored-by: Art Lowel <art.lowel@gmail.com>

* [CST-3763] Fix issue with wrong grid-breakpoints that cause issue on navbar collapsing

* [CST-3763] Fix issue with language dropdown when navbar is collapsed

* [CST-3763] Fix issue after merging

Co-authored-by: Matteo Perelli <matteo.perelli@4science.it>
Co-authored-by: Art Lowel <art.lowel@gmail.com>
2021-04-02 09:14:56 -05:00
Giuseppe Digilio
13c239cbc3 Add isSectionTypeAvailable method and use it to check if upload section is available 2021-04-02 15:58:02 +02:00
Tim Donohue
63edb7b7d0 Merge pull request #1066 from 4Science/CSTPER-321-deleteitem
Error deleting an item when its entity type has no relations
2021-04-01 14:07:35 -05:00
Tim Donohue
1dd1c98846 Merge pull request #1025 from 4Science/CST-3782-fix-repeatable-fields
Cst 3782 fix repeatable fields
2021-04-01 13:53:36 -05:00
Tim Donohue
3815bdbd8c Merge pull request #1041 from atmire/w2p-77205_issue-927-Non-site-admin-edit-authorization-group
Getting 401 when Community or Collection Administrator tries to edit Collection Authorization Group
2021-04-01 13:47:08 -05:00
Giuseppe Digilio
44b37f673a Merge remote-tracking branch 'origin/main' into CST-3782-fix-repeatable-fields
# Conflicts:
#	src/styles/_global-styles.scss
2021-04-01 20:07:06 +02:00
Giuseppe Digilio
94c0af5d86 [CST-3620] Remove drag and drop placeholder 2021-04-01 20:03:54 +02:00
Yana De Pauw
824ee029b3 Change p. to page and reverse id and pagination info 2021-04-01 16:28:20 +02:00
lotte
d3763ea642 cleaned up debugging remnants 2021-04-01 14:23:02 +02:00
lotte
7c5dbae549 removed unnecessary import 2021-04-01 12:38:43 +02:00
lotte
41e1d06594 applied feedback for submission upload section 2021-04-01 12:23:26 +02:00
Tim Donohue
ae240ff36b After rebase, replace new references to relationship.type with dspace.entity.type 2021-03-31 15:33:01 -05:00
Tim Donohue
c308e5fd4d Other minor corrections of "relationship type" to "entity type" 2021-03-31 15:23:51 -05:00
Tim Donohue
d36ac7e6fa Rename / move 'relationship.type' metadata field to 'dspace.entity.type' 2021-03-31 15:23:51 -05:00
Tim Donohue
cfbf587184 Merge pull request #1076 from atmire/1067-blank-qualifier
UI sends wrong request when creating new metadata field without qualifier
2021-03-31 12:42:29 -05:00
Tim Donohue
1b1421bc79 Merge pull request #1060 from atmire/w2p-77215_lgtm-issues-and-sanitization
Fix or address string escaping / replacement issues reported by LGTM
2021-03-31 12:17:30 -05:00
Tim Donohue
4475d59bbf Merge pull request #888 from qultoltd/#885-media-viewer
#885 media viewer
2021-03-31 12:17:15 -05:00
Alessandro Martelli
08afa4723b [CST-3782] patch add entire array on item remove 2021-03-31 15:21:32 +02:00
Raf Ponsaerts
947d792f27 Fixed * replace all 2021-03-31 14:49:32 +02:00
lotte
7afcebfd11 changed replace to global replace 2021-03-31 13:51:40 +02:00
Dániel Péter Sipos
ff8ff7f496 #885 fix media image viewer 2021-03-31 13:21:33 +02:00
Alessandro Martelli
f9e80ea288 [CST-3782] restored correct drag styles after merge 2021-03-31 12:28:14 +02:00
Alessandro Martelli
052dbdaf1e [CST-3782] patch add full array in case of DynamicRowArrayModel 2021-03-31 12:26:45 +02:00
Alessandro Martelli
8c60bd4280 [CST-3782] restored submission save after openLookup 2021-03-31 12:26:41 +02:00
Alessandro Martelli
d47660b5c2 [CST-3782] possibility to configure the isDraggable feature to DynamicRowArrayModel 2021-03-31 12:25:47 +02:00
Alessandro Martelli
d224333a1c [CST-3782] added hint to the last entity value 2021-03-31 12:25:42 +02:00
Alessandro Martelli
88556c40f6 Merge remote-tracking branch 'origin/main' into CST-3782-fix-repeatable-fields 2021-03-31 12:23:16 +02:00
Tim Donohue
ea3886bbfa Merge pull request #1065 from atmire/w2p-77583_Issue-3113_Fix-item-handle-redirect
Handle redirect for items not working fix
2021-03-30 09:50:05 -05:00
Dániel Péter Sipos
3577335399 #885 revert and fix width 2021-03-30 13:48:03 +02:00
Dániel Péter Sipos
861192ea25 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2021-03-30 10:29:20 +02:00
Yura Bondarenko
e5d52ce96a Merge remote-tracking branch 'upstream/main' into w2p-77205_issue-927-Non-site-admin-edit-authorization-group 2021-03-30 09:25:11 +02:00
Tim Donohue
e4400acfd7 Merge pull request #1075 from atmire/Edit-item-page-permissions-fixes
Edit item page permissions fixes
2021-03-29 12:01:18 -05:00
Tim Donohue
3e0daefc9b Merge pull request #1064 from atmire/w2p-77742_Collection-item-template-bugfixes
Bugs on Collection Item Template fix
2021-03-29 11:27:58 -05:00
Tim Donohue
436b95222b Merge pull request #1077 from atmire/fix-themed-submission
Fix issue where the themed submission page would crash
2021-03-29 11:05:13 -05:00
Art Lowel
05545f703b fix issue where the themed submission page would crash because the component couldn't be found 2021-03-29 17:09:26 +02:00
Yana De Pauw
a4076ed1fd Fix lgtm issue 2021-03-29 16:13:20 +02:00
Yana De Pauw
afe345ebac 76654: Implement feedback 2021-03-29 15:31:27 +02:00
Yura Bondarenko
61767c196c 77205: Additional authorization checks for sidebar menu items 2021-03-29 14:01:36 +02:00
Dániel Péter Sipos
064c43a763 #885 fix merge conflict 2021-03-26 18:01:12 +01:00
Dániel Péter Sipos
97e1b1dee1 Merge branch 'main' into #885-media-viewer
# Conflicts:
#	src/app/+item-page/item-page.module.ts
#	src/app/+item-page/simple/item-types/shared/item.component.ts
#	src/app/app.component.scss
#	src/environments/mock-environment.ts
2021-03-26 16:57:07 +01:00
Tim Donohue
d7daaf4188 Merge pull request #1042 from atmire/add-themeable-components
Make all non-admin page-level components themeable
2021-03-25 15:20:18 -05:00
Tim Donohue
a2450b678e Merge pull request #1056 from atmire/stale-issue
Fix issue where stale RemoteData is emitted first
2021-03-25 14:44:24 -05:00
lotte
6cc56176b2 fixed path for custom theme item-page 2021-03-25 17:27:34 +01:00
Art Lowel
d7a0f27f08 remove workaround 2021-03-25 17:23:27 +01:00
Art Lowel
4a15720b4b rewrite all comcoldataservice tests in hopes of catching the one that sometimes fails at random 2021-03-25 17:22:02 +01:00
Art Lowel
9964f07ff6 rewrite community scope test that sometimes failed at random 2021-03-25 17:22:02 +01:00
Art Lowel
2f7060a752 fix issue where stale remotedata objects could be returned first from findBy methods on dataservices 2021-03-25 17:22:02 +01:00
Samuel
0c99557010 fix #1067 UI sends wrong request when creating new metadata field without qualifier 2021-03-24 17:39:03 +01:00
lotte
623688304d removed unused import 2021-03-24 15:30:54 +01:00
lotte
029308b52f Added missing typedoc 2021-03-24 15:06:27 +01:00
lotte
650f7106c2 removed unused imports 2021-03-24 14:36:23 +01:00
lotte
11f3962326 added tests 2021-03-24 14:33:32 +01:00
lotte
8d6156df37 77818: edit page permission fixes 2021-03-23 16:30:38 +01:00
Tim Donohue
a5bc6c1bf7 Merge pull request #1062 from atmire/w2p-77643_fix-trail-not-showing-on-item-pages
Fix trail not showing on item pages
2021-03-22 14:44:36 -05:00
Tim Donohue
a9f553a8bb Merge pull request #1061 from atmire/w2p-77472_unclickable-title-in-search-list
Unclickable title in search list fix
2021-03-22 12:36:58 -05:00
Yura Bondarenko
5018d36377 Fix lint error 2021-03-19 14:22:59 +01:00
lotte
ff1014779e fix lgtm issue 2021-03-18 18:02:37 +01:00
lotte
df5666e52f sticky progress bar for uploads in submission 2021-03-18 18:02:37 +01:00
lotte
7d774d43e8 fixed dropzone issues 2021-03-18 18:02:37 +01:00
Raf Ponsaerts
3a0dc277e4 fix lgtm issues 2021-03-18 18:02:07 +01:00
Raf Ponsaerts
01def4e8e4 Fixed other item types title 2021-03-18 18:02:07 +01:00
lotte
b833407dd1 77472: Fix unclickable titles in search lists 2021-03-18 18:02:07 +01:00
lotte
0488cd6b45 Solved lgtm and regex sanitization issues 2021-03-18 18:01:42 +01:00
Raf Ponsaerts
06cac3203c fixed compiling issue 2021-03-18 16:08:43 +01:00
Raf Ponsaerts
1a9a6cf03c Merge remote-tracking branch 'dspace/main' into w2p-77205_issue-927-Non-site-admin-edit-authorization-group 2021-03-18 15:55:02 +01:00
lotte
c19ee0d49e Updated TypeDoc for themed components 2021-03-18 15:46:53 +01:00
lotte
b12e616ff6 Added themable breadcrumbs 2021-03-18 15:46:53 +01:00
lotte
d50bef9c8a Fixed LGTM import issues 2021-03-18 15:46:53 +01:00
lotte
1d4c77e485 Added themable header, footer and navbar 2021-03-18 15:46:53 +01:00
lotte
f5a34bb14e fixed lgtm issues 2021-03-18 15:46:53 +01:00
Art Lowel
05aaa5400d fix lint issues 2021-03-18 15:46:53 +01:00
lotte
d3dd8fb565 Finished themeable components 2021-03-18 15:46:53 +01:00
lotte
cddbdbfed7 77350: wip 2021-03-18 15:46:53 +01:00
Yana De Pauw
1c4763b409 77349: Add additional properties and update comment 2021-03-18 15:46:53 +01:00
Art Lowel
2a354c87e1 fix issue with themed ConfigurationSearchPageComponent 2021-03-18 15:46:53 +01:00
Yana De Pauw
8b7a33bff2 77349: Add themeable components - pt. 1 2021-03-18 15:46:53 +01:00
Art Lowel
66463cfc04 Merge pull request #1068 from tdonohue/github_actions_fixes
Ensure REST API is up/available for e2e tests
2021-03-18 15:41:25 +01:00
Tim Donohue
e43955903f Merge pull request #1040 from atmire/wZp-77237-overwriteMerge-config
Environment files merging with overwriteMerge
2021-03-18 09:32:35 -05:00
Tim Donohue
43d2351ada Wait on /api/core/sites to also ensure database is up 2021-03-18 09:01:44 -05:00
Yana De Pauw
659117dfbd Fix import itssue 2021-03-18 14:55:39 +01:00
Yana De Pauw
c584415e8a Merge remote-tracking branch 'upstream/main' into w2p-76654_PaginationService 2021-03-18 14:55:23 +01:00
Raf Ponsaerts
b228ae5bb6 Merge remote-tracking branch 'dspace/main' into w2p-77205_issue-927-Non-site-admin-edit-authorization-group
Conflicts:
	src/app/+collection-page/collection-page.component.html
	src/app/+collection-page/collection-page.component.ts
	src/app/+community-page/community-page.component.html
	src/app/+community-page/community-page.component.ts
	src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
2021-03-18 10:37:06 +01:00
Tim Donohue
ba4c7a8e88 Add a step to wait until REST API is ready (returns 200) 2021-03-17 15:52:32 -05:00
Tim Donohue
12f8e82aa2 Add step to verify REST API is up/available for e2e tests 2021-03-17 15:02:59 -05:00
Alessandro Martelli
34990c6f13 [CSTPER-321] Delete an item is not working 2021-03-17 17:11:04 +01:00
Tim Donohue
1115c58537 Merge pull request #1049 from atmire/w2p-77178_Support-embed-sizes-and-use-in-ComCol-tree
Use of embed sizes in the ComCol tree
2021-03-16 09:47:24 -05:00
Yura Bondarenko
6fabf436e3 77583: Specify id type ~ /api/pid/find?id=hdl:... 2021-03-16 15:01:35 +01:00
Kristof De Langhe
fd6605cc27 77742: Collection template-item loading indicator and error alert 2021-03-16 13:18:11 +01:00
Kristof De Langhe
0465ce0bc8 77742: Collection item-template bugfixes 2021-03-16 13:03:34 +01:00
Marie Verdonck
e033cdf0f4 PR #1049: Reduced number of communities/collections in comcol tree retrieved per page to 20 2021-03-15 20:57:51 +01:00
Bruno Roemers
2e7e041f3a 77643: Update tests 2021-03-15 16:37:45 +01:00
Bruno Roemers
37d46f7b18 77643: BUGFIX: Remove unnecassary dependencies 2021-03-15 15:07:55 +01:00
Bruno Roemers
51e1ac09e7 77643: BUGFIX: Init BreadcrumbsService before routing 2021-03-15 11:40:24 +01:00
Tim Donohue
d1ab193f5d Merge pull request #1001 from atmire/Item-page-redirects
DS-4283: (Google Scholar) Provide Entity Type Label/Name as part of URL path
2021-03-12 13:13:46 -06:00
Art Lowel
4280475364 Merge branch 'main' into Item-page-redirects 2021-03-12 18:19:11 +01:00
Bruno Roemers
c2ca35c522 77643: WIP: Refactor BreadcrumbsComponent into service 2021-03-12 15:36:00 +01:00
Bruno Roemers
7b455c47c8 77643: Rename BreadcrumbsService to BreadcrumbsProviderService 2021-03-12 11:06:42 +01:00
Bram Luyten
b5c1b8cb14 Merge pull request #1052 from bram-atmire/PR1052-i18n-catalogs-update
Sync up translations with latest changes to en.json5
2021-03-11 19:00:38 +01:00
Bram Luyten
b7dbfb9745 Sync up translations with latest changes to en.json5 2021-03-11 18:51:32 +01:00
Bram Luyten
c5d7826a72 Merge pull request #1051 from bram-atmire/PR1050-PT
Addressing Issue 570 - Split of Portuguese translation catalogs
2021-03-11 17:59:34 +01:00
Bram Luyten
2d95d58c3c Addressing Issue 570 - Split of Portuguese translation catalogs 2021-03-11 17:56:50 +01:00
Bram Luyten
28c38972b0 Merge pull request #828 from marciofoz/marciofoz-patch-1
Update pt.json5
2021-03-11 17:36:34 +01:00
marciofoz
42519fc7a0 Update pt.json5 2021-03-11 17:29:19 +01:00
Bram Luyten
bff92f1bc9 Merge pull request #1012 from akoscomp/main
Translate new lines to Hungarian
2021-03-11 17:19:09 +01:00
Bram Luyten
6bbb2aab6f Merge pull request #1018 from reetagithub/main
Update fi.json5
2021-03-11 16:57:57 +01:00
Marie Verdonck
5ecab7de12 77178: Tests for getEmbedSizeParams selector 2021-03-11 16:41:22 +01:00
Yana De Pauw
1172869549 Fix LGTM issues 2021-03-11 15:45:04 +01:00
Yana De Pauw
b4e40c820f Fix issue with clear pagination test 2021-03-11 12:47:44 +01:00
Yana De Pauw
e73f4ca57a 76654: Remove console.logs, fix some issues 2021-03-11 12:09:55 +01:00
Art Lowel
da43a56a0b fix error when state is undefined 2021-03-11 12:09:55 +01:00
Yana De Pauw
b18f9c7c9f Add tests and fix tests 2021-03-11 12:09:54 +01:00
Yana De Pauw
d07f44ac41 76654: Feedback to pagination 2021-03-11 12:08:04 +01:00
Yana De Pauw
fab226912f 76654: PaginationService 2021-03-11 12:08:04 +01:00
Giuseppe Digilio
b3afaa55c7 Merge remote-tracking branch 'origin/main' into CST-3782-fix-repeatable-fields
# Conflicts:
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.scss
2021-03-11 09:29:40 +01:00
Tim Donohue
11b6b3c929 Merge pull request #1035 from atmire/dynamic-theme-support
Add support for dynamic themes
2021-03-10 15:11:14 -06:00
Art Lowel
c004365cee fix tests after merge 2021-03-10 17:33:20 +01:00
Alessandro Martelli
996d54f37e [CST-3782] item deletion on lookup disabled 2021-03-10 17:11:53 +01:00
Art Lowel
95c43c1b00 Merge branch 'main' into dynamic-theme-support 2021-03-10 16:59:03 +01:00
Tim Donohue
31c557062f Merge pull request #978 from 4Science/CST-3620
Update /claimedtasks and /pooltasks to support reloading of workflow actions on individual WorkflowItems
2021-03-10 09:11:11 -06:00
Alessandro Martelli
28894f6764 [CST-3782] lookup search icon 2021-03-10 11:24:42 +01:00
Art Lowel
f1fa69bb3b use embed size in alternative link 2021-03-09 14:33:05 +01:00
Art Lowel
0ae4016f91 fix find-replace mistake 2021-03-08 18:20:41 +01:00
Art Lowel
75c9be026e remove css variables in media queries 2021-03-08 17:51:03 +01:00
Art Lowel
afa7b67532 roll back test changes 2021-03-08 12:10:56 +01:00
Marie Verdonck
fead3bc3fe 77178: Support embed sizes and use them in the ComCol tree 2021-03-05 13:27:42 +01:00
Alessandro Martelli
5201b4a31d [CST-3782] qualdrop move restored 2021-03-04 18:26:03 +01:00
Raf Ponsaerts
83819c5b18 fixed lint issues 2021-03-04 14:32:14 +01:00
Raf Ponsaerts
7a1b98ce83 remove unused import 2021-03-04 13:30:07 +01:00
Alessandro Martelli
5eb0a8744f [CSTPER-3782] custom move events handled correctly 2021-03-04 12:36:57 +01:00
Raf Ponsaerts
4f08ad453f removed whitelines 2021-03-04 09:48:27 +01:00
Tim Donohue
e4454de78c Merge pull request #1024 from tdonohue/add_csrf_support_to_uploader
Add CSRF support to uploader Component
2021-03-03 11:26:05 -06:00
Art Lowel
1bb2d5da29 add support for static assets in theme folders 2021-03-03 17:43:37 +01:00
Art Lowel
7a42a18bfb re-comment css style override example that got accidentally uncommented 2021-03-02 10:03:58 +01:00
Tim Donohue
82035516a7 Bug fix. Ensure onCompleteItem and onErrorItem both reset the CSRF Header (for next item in queue), as onBeforeUploadItem does not seem to be called for every item in the queue. 2021-03-01 16:51:56 -06:00
Art Lowel
2b03d22498 update mock data 2021-03-01 14:31:26 +01:00
Kristof De Langhe
91ca5af1d4 additional theme support tests 2021-03-01 10:38:12 +01:00
Art Lowel
5a6e4b1278 Add support for dynamic themes 2021-03-01 10:38:05 +01:00
Tim Donohue
4a72cb033b Bug fix. Ensure we check for changed token in empty responses. Also ensure we send token before each upload (as it might change between uploads) 2021-02-26 12:39:33 -06:00
Tim Donohue
59676b7c52 Fix broken tests via a new HttpXsrfTokenExtractorMock class. 2021-02-26 12:39:33 -06:00
Tim Donohue
5589016a4e Add XSRF support to uploader component 2021-02-26 12:39:33 -06:00
Tim Donohue
eb7d110683 Export all XSRF constants so they can be used elsewhere 2021-02-26 12:39:33 -06:00
Tim Donohue
70dac6bc8f Merge pull request #1038 from atmire/remove-ng-high-memory
Remove ng-high-memory & remove Node v10 support
2021-02-26 12:32:41 -06:00
lotte
913ead6019 77237: overwriteMerge environment files merge 2021-02-26 17:27:02 +01:00
Art Lowel
f54e582297 bump supported node versions to 12 and 14 2021-02-26 16:24:31 +01:00
Yura Bondarenko
8b2db86268 77205: Workaround: add access_control parent section after child sections 2021-02-26 16:13:20 +01:00
Yura Bondarenko
e23e46b212 Revert "TESTING: sectionID argument to debug getComponentForMenu"
This reverts commit bfbe598bdd.
2021-02-26 16:13:20 +01:00
Yura Bondarenko
bfbe598bdd TESTING: sectionID argument to debug getComponentForMenu 2021-02-26 15:25:00 +01:00
Yura Bondarenko
7e0866afe7 77205: Fix leftover links to /admin/access-control/ 2021-02-26 11:15:17 +01:00
Yura Bondarenko
47adba98b5 77205: Extend FeatureAuthorizationGuard for isCommunityAdmin/isCollectionAdmin 2021-02-26 10:21:51 +01:00
Art Lowel
7e6755bd0a remove ng-high-memory 2021-02-26 10:17:16 +01:00
Yura Bondarenko
1c030e6bad 77205: Add unit tests for authorization-dependent admin menu content 2021-02-26 10:00:42 +01:00
Art Lowel
7a5fecb7a2 Merge pull request #1033 from tdonohue/i18n_cleanup
Cleanup duplicative or incorrect Angular UI i18n keys
2021-02-26 09:39:44 +01:00
Yura Bondarenko
3d4f8c5222 77205: Wrap all section-specific methods in createMenu 2021-02-26 08:33:28 +01:00
Tim Donohue
1537b4e444 Cleanup duplicative or incorrect i18n keys 2021-02-25 16:33:34 -06:00
Alessandro Martelli
a66ec43ccc [CST-3782] Disabled drag when only one value is present 2021-02-25 19:07:51 +01:00
Tim Donohue
4eb16c131c Merge pull request #1031 from tdonohue/fix_1005
Comment out Edit Item tabs which are not yet implemented.
2021-02-25 11:12:53 -06:00
Giuseppe Digilio
a6effcad34 [CST-3620] Changes to show lookup button next to the field 2021-02-25 17:09:33 +01:00
Yura Bondarenko
70e9bb1180 77205: Use existing admin authorization guards for comm/coll 2021-02-25 16:48:33 +01:00
Yura Bondarenko
3f4e032bb5 77205: Add Comm/Coll admin guards & authorization checks 2021-02-25 15:12:31 +01:00
Yura Bondarenko
d401a92a17 77205: Add CanManageGroupGuard & configure routing 2021-02-25 15:12:31 +01:00
Yura Bondarenko
801cea4062 77205: Separate access control section in admin sidebar 2021-02-25 15:12:31 +01:00
Yura Bondarenko
a8544a7f32 77205: Remove access-control from admin routes 2021-02-25 15:12:31 +01:00
Yura Bondarenko
d9eb05d40e 77205: Refactor admin-access-control to access-control 2021-02-25 15:12:31 +01:00
Yura Bondarenko
5eec2efa9c 77205: Move admin-access-control out of +admin 2021-02-25 15:12:31 +01:00
Giuseppe Digilio
ee07d42c9c [CST-3620] fix typo 2021-02-25 13:17:47 +01:00
Tim Donohue
518bbb2cc4 Merge pull request #1015 from atmire/869-submission-embargo-bug
fix #869 Submission embargo bug
2021-02-24 16:29:43 -06:00
Alessandro Martelli
975ef7ebd2 [CST-3782] Style refinements and qualdrop moves fixed 2021-02-24 15:34:21 +01:00
Tim Donohue
be96c6bee6 Comment out tabs which are not yet implemented. 2021-02-23 11:44:22 -06:00
Alessandro Martelli
523b7a497c [CSTPER-3620] Fixed workspace followlink and search filters update 2021-02-22 16:56:29 +01:00
Tim Donohue
2ff232f437 Merge pull request #1022 from atmire/w2p-76922_Search-filter-from-entity-page-carries-over-to-discovery
Fix: Search filter from entity page carries over to discovery
2021-02-19 16:33:40 -06:00
Giuseppe Digilio
c78cd9ad71 [CST-3620] Remove console logs 2021-02-19 13:09:38 +01:00
Giuseppe Digilio
27905b2038 [CST-3620] Fix issue with TasksService findByItem method that returns stale response when second request is made 2021-02-19 13:08:38 +01:00
Giuseppe Digilio
8b57610be4 [CST-3620] Add component destroy on reload of loaded object within the listable-object-component-loader.component.ts 2021-02-19 12:09:12 +01:00
Giuseppe Digilio
8e7fad43b8 [CST-3782] Fix issue with remove button when repeatable group has only one field 2021-02-19 10:49:58 +01:00
Giuseppe Digilio
797596dc45 [CST-3782] Fix issue with merge 2021-02-19 10:46:39 +01:00
Giuseppe Digilio
39b0088c99 Merge remote-tracking branch 'origin/main' into CST-3782-fix-repeatable-fields
# Conflicts:
#	src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts
2021-02-19 10:27:26 +01:00
Tim Donohue
554dcde8bc Merge pull request #1017 from atmire/w2p-75832_Issue-962_fix-unnecessary-calls-creating-deleting-groups
Fix unnecessary calls when creating/deleting groups
2021-02-18 14:44:47 -06:00
Tim Donohue
777abff666 Merge pull request #984 from atmire/Submission-external-sources-limited-on-metadata-field
Submission external sources limited on metadata field
2021-02-18 14:03:00 -06:00
Giuseppe Digilio
42636c6f95 [CST-3782] Fix issue with dispatchOperationsFromRemoveEvent method 2021-02-18 09:58:06 +01:00
Tim Donohue
f3246fb948 Merge pull request #1014 from atmire/w2p-76634_google-analytics-tracking-id-from-backend
W2p 76634 google analytics tracking id from backend
2021-02-17 17:07:05 -06:00
Giuseppe Digilio
1901ace5a6 [CST-3782] Changes in order to display add more and lookup button at the end of the repeatable fields array 2021-02-17 20:25:46 +01:00
Alessandro Martelli
d208cf16fa [CST-3782] Drag drop restored 2021-02-17 17:57:29 +01:00
Giuseppe Digilio
151b02aeec [CST-3782] Make changes in order to remove template row in form's repeatable fields 2021-02-17 16:10:22 +01:00
Dániel Péter Sipos
ce7e76b609 #885 fix 2021-02-16 16:14:10 +01:00
Dániel Péter Sipos
3b2037a70f #885 ad doctype 2021-02-16 16:01:02 +01:00
Dániel Péter Sipos
4621c0be73 #885 add comment 2021-02-16 15:47:08 +01:00
Dániel Péter Sipos
d6ccf72119 #885 move size to css 2021-02-16 15:41:39 +01:00
Dániel Péter Sipos
80e5199e37 #885 add size to config 2021-02-16 15:07:06 +01:00
Dániel Péter Sipos
488075b9c2 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2021-02-16 14:03:14 +01:00
Yura Bondarenko
fd11ab3751 76922: Add unit tests for ConfigurationSearchPageComponent 2021-02-15 12:39:49 +01:00
Yura Bondarenko
4f0a630e87 76922: Reset router parameters on destroy ConfigurationSearchPageComponent 2021-02-15 11:47:34 +01:00
reetagithub
be09ea939c Update fi.json5
Due to different grammar in Finnish, removed comma from the key "uploader.or"
2021-02-15 10:29:51 +02:00
reetagithub
6b69f82d6d Update fi.json5
Changed the Finnish translations of two 'has files' translation keys, namely search.filters.filter.has_content_in_original_bundle.head and search.filters.applied.f.has_content_in_original_bundle
2021-02-15 09:56:39 +02:00
Kristof De Langhe
91b647e6e5 75940: Unused import fix 2021-02-11 17:42:53 +01:00
Kristof De Langhe
3f6e605cd7 Merge branch 'main' into w2p-75939_Item-links-by-entity
Conflicts:
	src/app/+item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts
2021-02-11 17:33:39 +01:00
Kristof De Langhe
216e09f889 75316: Feedback 2021-02-11 - import fixes 2021-02-11 17:04:38 +01:00
Marie Verdonck
dd241c86b2 75832: [Issue 962]: Fix no change in search result if no results & fix 404 messages at delete in registry 2021-02-11 12:47:29 +01:00
Andrew Wood
f0a710a9fc fix #869 Submission embargo bug 2021-02-11 10:46:45 +01:00
Alessandro Martelli
d015b6caef [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Test fixes
2021-02-09 16:19:07 +01:00
Bruno Roemers
6424654e6e Fix LGTM Alert for PR #1014 2021-02-09 14:49:26 +01:00
Alessandro Martelli
5f6ad03f6f [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Merge cache part 2
2021-02-09 14:42:38 +01:00
Alessandro Martelli
807d4f5fc7 Merge branch 'main' into CST-3620 2021-02-09 11:23:24 +01:00
Tim Donohue
942dd2e72e Merge pull request #977 from tdonohue/reenable_csrf_protection
Enable Customized CSRF Protection in Angular UI
2021-02-08 11:45:12 -06:00
Tim Donohue
e41a6c1292 Merge pull request #983 from atmire/collection-mapper
Collection mapper
2021-02-08 11:36:31 -06:00
Dániel Péter Sipos
1f566f7993 #885 fix merge error 2021-02-08 16:22:23 +01:00
Marie Verdonck
569f354370 75832: [Issue 962]: Members total in Group registry fixed with GroupDTO 2021-02-08 15:05:27 +01:00
Dániel Péter Sipos
398e9fccc5 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2021-02-08 10:57:40 +01:00
Tim Donohue
31b346d932 Bug fix: Ensure we also look for a change in XSRF token during error responses. 2021-02-05 15:53:27 -06:00
Tim Donohue
43c37c2b75 Update Logout to use POST instead of GET 2021-02-05 15:53:27 -06:00
Tim Donohue
5b23ffa2dc Add custom XSRF interceptor which works with cross domain requests, using new DSPACE-XSRF-TOKEN header 2021-02-05 15:53:26 -06:00
Tim Donohue
3f95b5009f Merge pull request #975 from atmire/cache-redesign-part-2
Cache redesign part 2
2021-02-05 15:35:36 -06:00
Art Lowel
8c0459241f apply cache changes to root dataservice 2021-02-05 17:56:59 +01:00
Art Lowel
1e94e7a5a9 Merge branch 'main' into cache-redesign-part-2 2021-02-05 17:40:32 +01:00
Art Lowel
2afc6a07f0 fix cache issues with edit metadata and resource policy pages 2021-02-05 17:37:59 +01:00
Tim Donohue
8e458554d8 Merge pull request #999 from 4Science/#997
Fix issue with import from external source page
2021-02-05 09:31:52 -06:00
Dániel Péter Sipos
7d02e763f4 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2021-02-05 13:54:15 +01:00
Nagy Akos
3044a91cae Match all lines with English version 2021-02-04 22:53:05 +02:00
Nagy Akos
6105e038b1 Translate new lines to Hungarian 2021-02-04 21:26:18 +02:00
Giuseppe Digilio
ce8e1efa48 Fix issue with comcol-data.service.spec.ts 2021-02-04 18:12:20 +01:00
Tim Donohue
22f5e0a78b Merge pull request #968 from atmire/w2p-74647_Add-meta-generator-page-header
Meta "generator" tag in page header
2021-02-04 10:25:10 -06:00
Bram Luyten
328eb8ac4c Merge pull request #834 from MixonZ/latvian-translation
latvian translation update
2021-02-04 17:17:37 +01:00
Dániel Péter Sipos
22afa57a26 #885 fix media 2021-02-04 17:12:41 +01:00
Mikus
8f54600a6e latvian translation updated 2021-02-04 16:54:24 +01:00
Sascha Szott
3143154d2b German translation fixes (#906)
Contributions to the german message keys by saschaszott
2021-02-04 16:45:50 +01:00
Bram Luyten
64f0a0afbf Merge pull request #705 from akoscomp/master
Add Hungarian translation
2021-02-04 16:24:29 +01:00
Bram Luyten
a6e91ea294 Corrected illegal characters/escaping in hungarian labels 2021-02-04 16:19:09 +01:00
Dániel Péter Sipos
9e0ef1d9dd Merge remote-tracking branch 'upstream/main' into #885-media-viewer
# Conflicts:
#	package.json
#	src/app/+item-page/item-page.module.ts
#	src/app/+item-page/simple/item-types/shared/item.component.ts
#	yarn.lock
2021-02-04 15:28:23 +01:00
Bram Luyten
21cd1a7220 Switching REST to api7.dspace.org and activating Hungarian translation 2021-02-04 14:50:32 +01:00
Nagy Akos
ac75b095c1 translate hu.json5 by Transylvanian Museum Society 2021-02-04 14:50:31 +01:00
Nagy Akos
ba690eeeb9 add Hungarian translation 2021-02-04 14:50:31 +01:00
Bram Luyten
4a5da6d913 Merge pull request #1008 from reetagithub/main
Add the Finnish translation keys of Dspace 7.0
2021-02-04 14:16:50 +01:00
Marie Verdonck
dde149acea 75832: [Issue 962]: Fix unnecessary calls creating/deleting groups - feedback 2021-02-04 12:11:18 +01:00
reetagithub
eb42b5f760 Update fi.json5
The rest of the Finnish translation keys from the third set from the beginning of year 2021.
2021-02-04 09:41:20 +02:00
Kristof De Langhe
9a0e2bf996 74647: Fixed tslint issues 2021-02-03 17:11:11 +01:00
Kristof De Langhe
ccf4afe2e1 Merge branch 'main' into w2p-74647_Add-meta-generator-page-header 2021-02-03 16:58:59 +01:00
Bruno Roemers
ed98e7e39d 76634: Bugfixes 2021-02-02 14:41:36 +01:00
Bruno Roemers
3a486eb81f 76634: Add documentation 2021-02-02 14:40:56 +01:00
Bruno Roemers
3f6cf777b6 76634: Update tests for AppComponent 2021-02-02 12:28:26 +01:00
Bruno Roemers
ce5da5723b 76634: Write tests for GoogleAnalyticsService 2021-02-02 11:54:52 +01:00
Bruno Roemers
20f896e939 76634: Inject document into GoogleAnalyticsService 2021-02-02 11:54:38 +01:00
Bruno Roemers
d574ffafa4 76634: Implement GoogleAnalyticsService 2021-02-01 19:10:15 +01:00
Alessandro Martelli
54c405994c [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Lint
2021-01-29 19:31:54 +01:00
Alessandro Martelli
c65dfc7303 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Fixed test after angular 10 migration
2021-01-29 18:45:41 +01:00
Tim Donohue
d21cca2875 Merge pull request #1003 from atmire/fix-direct-csr
Fix prod mode with preboot disabled
2021-01-29 10:16:29 -06:00
Alessandro Martelli
5ef5a27e2b Merge branch 'main' into CST-3620
# Conflicts:
#	src/app/+my-dspace-page/my-dspace-page.module.ts
#	src/app/core/tasks/tasks.service.ts
#	src/app/shared/mydspace-actions/claimed-task/abstract/claimed-task-actions-abstract.component.ts
#	src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts
#	src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts
#	src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts
#	src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts
#	src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.spec.ts
#	src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts
#	src/app/shared/mydspace-actions/mydspace-actions.ts
#	src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts
#	src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts
#	src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts
#	src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts
#	src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts
#	src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts
#	src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts
#	src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts
#	src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts
#	src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts
2021-01-29 16:02:07 +01:00
Art Lowel
4b69b48007 fix issue where the app wouldn't start in prod mode if preboot was disabled 2021-01-29 11:26:26 +01:00
Kristof De Langhe
fda24a3838 Merge branch 'main' into w2p-75939_Item-links-by-entity
Conflicts:
	src/app/+collection-page/collection-page.component.ts
2021-01-28 12:56:05 +01:00
Art Lowel
43eb15349b fix LGTM warnings 2021-01-27 18:25:03 +01:00
Art Lowel
15495902ab redirect back to the list after an eperson add, edit or delete 2021-01-27 18:09:36 +01:00
Marie Verdonck
f1407b7f5b 75832: Groups registry refactor 2021-01-27 17:59:26 +01:00
Art Lowel
892512192b fix issue where private files could no longer be downloaded 2021-01-27 17:32:15 +01:00
Art Lowel
0f5c3fdc92 fix issue where a bunch of unnecessary requests where made when creating or removing a metadata field 2021-01-27 17:20:38 +01:00
Tim Donohue
a64cb63d99 Merge pull request #979 from atmire/680-recent-submision-pagination-reload
680 Fix change event reference for recent submission
2021-01-27 10:18:55 -06:00
Kristof De Langhe
7ce8b3d460 75940: missing semicolons 2021-01-27 12:58:38 +01:00
Kristof De Langhe
694d45fd2c 75939: Encode and lowercase entity type url 2021-01-27 11:50:47 +01:00
Kristof De Langhe
1d9d174f87 75940: Item page redirects 2021-01-27 11:50:47 +01:00
Kristof De Langhe
8e75132086 75939: (edit) item links refactored to contain entity types 2021-01-27 11:50:47 +01:00
Yana De Pauw
1942e0e2ba 75895: Angular - Handle redirects 2021-01-27 11:44:12 +01:00
Yana De Pauw
f2da1fa59e 75894: Angular - Routing 2021-01-27 11:44:11 +01:00
Kristof De Langhe
d69bde1327 75316: TSlint error fix 2021-01-27 11:24:40 +01:00
Kristof De Langhe
28ffe18b07 75316: Build error fix 2021-01-27 11:20:07 +01:00
Kristof De Langhe
3c296620c6 v1.22.10 2021-01-27 10:43:14 +01:00
Kristof De Langhe
3ffef2bffa 75316: TSLint fix 2021-01-27 10:31:37 +01:00
Art Lowel
e4d518fca7 fix issue where a relationshiptype wouldn't be found if the subscriber unsubscribed before all types were checked 2021-01-27 10:31:36 +01:00
Kristof De Langhe
d13eabe386 75316: Test fixes 2021-01-27 10:29:55 +01:00
Kristof De Langhe
a08b515335 75316: Only show external sources when configured 2021-01-27 10:27:40 +01:00
Kristof De Langhe
64f726bf30 75316: Deselect relationship on failure + show only enabled externalSources 2021-01-27 10:27:40 +01:00
Andrew Wood
b143ea7e61 680 add typedocs to new interface 2021-01-26 11:41:28 -05:00
Andrew Wood
771183097c 680 Untype incorrectly typed params 2021-01-26 11:39:55 -05:00
Andrew Wood
ee2e3be057 680 Add paginationChangeEvent interface and move to PaginationComponent impl for event handling 2021-01-26 11:39:55 -05:00
Andrew Wood
a51055cc14 680 Fix change event reference for recent submission 2021-01-26 11:39:55 -05:00
Marie Verdonck
62bd8fd278 75413: test fixes 2021-01-26 14:56:07 +01:00
Art Lowel
8efbaebc9c fix issues regarding item and collection mappings 2021-01-26 14:06:19 +01:00
Marie Verdonck
dbfab94a47 75413: collection/item mapper pages as tab in edit pages 2021-01-26 14:04:15 +01:00
Art Lowel
17e8881380 fix LGTM warnings 2021-01-26 11:58:53 +01:00
Art Lowel
57547fda15 add additional tests for shouldDispatchRequest 2021-01-26 11:46:02 +01:00
Art Lowel
298250f654 fix issue where interceptors were executed multiple times for each request 2021-01-26 10:40:59 +01:00
Giuseppe Digilio
743bd0bba2 Fix issue with comcol-data.service.spec.ts 2021-01-26 10:29:23 +01:00
Giuseppe Digilio
653776f119 Fix issue with import from external source page 2021-01-26 09:06:44 +01:00
Art Lowel
d8e6ccf76a fix issue where facets would be empty if you went straight to a search url in prod mode 2021-01-25 18:54:29 +01:00
Tim Donohue
ac9b97d388 Merge pull request #996 from atmire/update-rest-hostname
Update the rest hostname to api7.dspace.org
2021-01-25 09:08:19 -06:00
Art Lowel
3b67efe09d fix group tests and fix issues with the process detail page 2021-01-25 15:39:56 +01:00
Art Lowel
a54275ae21 update the rest hostname to api7.dspace.org 2021-01-22 16:35:42 +01:00
reetagithub
b85c6a0aa1 Update fi.json5
New Finnish translations
2021-01-22 12:05:29 +02:00
Art Lowel
634836158b fix issues with the group edit page 2021-01-21 14:30:59 +01:00
Art Lowel
c66de4fe91 Cache redesign part 2 2021-01-20 17:43:40 +01:00
Tim Donohue
64ba6293c9 Merge pull request #970 from 4Science/upgrade_angular10
Upgrade angular10
2021-01-19 10:00:59 -06:00
Alessandro Martelli
2becaca1b0 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Fixes and debug log
2021-01-19 09:10:24 +01:00
Giuseppe Digilio
c2ba368b40 Fix metadata schema form layout 2021-01-18 19:35:50 +01:00
Giuseppe Digilio
1b1c7f7d2a Fix metadata field form layout 2021-01-18 19:35:35 +01:00
Art Lowel
3c26c61cde import dynamic components in admin search module 2021-01-18 16:57:30 +01:00
Art Lowel
4e826f7ee8 fix SSR injection context issue with Angulartics 2021-01-18 16:57:25 +01:00
Art Lowel
9db9539725 add dynamic item page components to ENTRY_COMPONENTS 2021-01-18 16:57:22 +01:00
Art Lowel
8df117f8ef add dynamic menu components to ENTRY_COMPONENTS 2021-01-18 16:57:19 +01:00
Art Lowel
0308c8bc8e Revert "replace menu decorators with switches to solve an issue where decorators were not loaded in time"
This reverts commit ece84332a0.
2021-01-18 16:57:15 +01:00
reetagithub
0d421a141f Merge pull request #4 from DSpace/main
New Finnish keys January 2021
2021-01-18 11:07:40 +02:00
Giuseppe Digilio
a27c10e980 Fix comment for submission autosave configuration 2021-01-15 18:22:01 +01:00
Giuseppe Digilio
debf70b0e5 Revert "Fix issue with submission save when auto save is enabled"
This reverts commit 2b2b6df9
2021-01-15 18:17:31 +01:00
Giuseppe Digilio
2b2b6df919 Fix issue with submission save when auto save is enabled 2021-01-15 18:09:45 +01:00
Giuseppe Digilio
31045ff156 Removed nested subscribe 2021-01-15 15:20:47 +01:00
Giuseppe Digilio
00153fa92f Removed providedIn attribute for services that don't need 2021-01-15 14:34:28 +01:00
Giuseppe Digilio
9aea3f20ea Fix issue with components that using a custom decorator are not loaded during CSR 2021-01-15 14:18:18 +01:00
Giuseppe Digilio
d8df9c46a5 Fix issue with workspaceitem and workflowitem detail search components 2021-01-15 14:05:40 +01:00
Giuseppe Digilio
44454ec378 import modules optimization 2021-01-14 19:44:46 +01:00
Giuseppe Digilio
3192d190bb change comments for @angular/localize import 2021-01-12 11:16:25 +01:00
Giuseppe Digilio
2b8f436634 changes to address feedback 2021-01-12 10:42:46 +01:00
Giuseppe Digilio
480653cf8f fix deprecated warning 2021-01-12 10:12:32 +01:00
Alessandro Martelli
258e48e9a2 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Text fix
2021-01-11 17:39:35 +01:00
Alessandro Martelli
2bd8084046 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Provided mock and stub instead of empty objects
2021-01-11 16:49:18 +01:00
Giuseppe Digilio
665e07ae1f Changes based on feedback 2021-01-08 14:56:28 +01:00
Giuseppe Digilio
aad23c8001 Remove circular dependencies 2021-01-08 11:12:45 +01:00
Giuseppe Digilio
21d275fc8d Removed unused imports 2021-01-08 09:58:17 +01:00
Giuseppe Digilio
ae18027669 Fix lint error 2021-01-08 09:17:16 +01:00
Giuseppe Digilio
e5af894077 Removed deprecated helper function async 2021-01-07 20:12:15 +01:00
Giuseppe Digilio
4d4e920f0d Merge remote-tracking branch 'origin/main' into upgrade_angular10
# Conflicts:
#	src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.spec.ts
#	src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts
#	src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts
#	src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.spec.ts
#	src/app/+admin/admin-access-control/group-registry/group-form/members-list/members-list.component.spec.ts
#	src/app/+admin/admin-access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts
#	src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts
#	src/app/+admin/admin-import-metadata-page/metadata-import-page.component.ts
#	src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts
#	src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts
#	src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.spec.ts
#	src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.spec.ts
#	src/app/+bitstream-page/bitstream-page.resolver.ts
#	src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts
#	src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
#	src/app/+collection-page/collection-item-mapper/collection-item-mapper.component.ts
#	src/app/+collection-page/collection-page.component.ts
#	src/app/+collection-page/edit-collection-page/collection-roles/collection-roles.component.ts
#	src/app/+collection-page/edit-item-template-page/item-template-page.resolver.spec.ts
#	src/app/+collection-page/edit-item-template-page/item-template-page.resolver.ts
#	src/app/+item-page/edit-item-page/item-authorizations/item-authorizations.component.ts
#	src/app/+item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts
#	src/app/+item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts
#	src/app/+item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts
#	src/app/+item-page/edit-item-page/item-private/item-private.component.ts
#	src/app/+item-page/edit-item-page/item-public/item-public.component.ts
#	src/app/+item-page/edit-item-page/item-reinstate/item-reinstate.component.ts
#	src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts
#	src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts
#	src/app/+item-page/edit-item-page/item-withdraw/item-withdraw.component.ts
#	src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts
#	src/app/+my-dspace-page/collection-selector/collection-selector.component.spec.ts
#	src/app/+search-page/search-tracker.component.ts
#	src/app/app-routing.module.ts
#	src/app/community-list-page/community-list-service.ts
#	src/app/community-list-page/community-list.reducer.spec.ts
#	src/app/core/auth/auth-response-parsing.service.spec.ts
#	src/app/core/auth/auth.interceptor.spec.ts
#	src/app/core/browse/browse.service.spec.ts
#	src/app/core/browse/browse.service.ts
#	src/app/core/cache/builders/link.service.spec.ts
#	src/app/core/cache/builders/remote-data-build.service.ts
#	src/app/core/cache/object-cache.service.spec.ts
#	src/app/core/cache/response.models.ts
#	src/app/core/data/base-response-parsing.service.ts
#	src/app/core/data/bitstream-data.service.ts
#	src/app/core/data/bitstream-format-data.service.ts
#	src/app/core/data/bundle-data.service.spec.ts
#	src/app/core/data/bundle-data.service.ts
#	src/app/core/data/change-analyzer.ts
#	src/app/core/data/collection-data.service.spec.ts
#	src/app/core/data/collection-data.service.ts
#	src/app/core/data/comcol-data.service.spec.ts
#	src/app/core/data/comcol-data.service.ts
#	src/app/core/data/data.service.ts
#	src/app/core/data/entity-type-data.service.ts
#	src/app/core/data/entity-type.service.ts
#	src/app/core/data/feature-authorization/authorization-data.service.ts
#	src/app/core/data/feature-authorization/feature-data.service.ts
#	src/app/core/data/item-template-data.service.ts
#	src/app/core/data/license-data.service.ts
#	src/app/core/data/metadata-field-data.service.ts
#	src/app/core/data/processes/process-data.service.ts
#	src/app/core/data/processes/script-data.service.ts
#	src/app/core/data/relationship.service.spec.ts
#	src/app/core/data/relationship.service.ts
#	src/app/core/data/remote-data.ts
#	src/app/core/data/request.actions.ts
#	src/app/core/data/request.effects.ts
#	src/app/core/data/request.reducer.spec.ts
#	src/app/core/data/request.reducer.ts
#	src/app/core/data/request.service.spec.ts
#	src/app/core/data/request.service.ts
#	src/app/core/dspace-rest/dspace-rest.service.spec.ts
#	src/app/core/eperson/eperson-data.service.spec.ts
#	src/app/core/eperson/eperson-data.service.ts
#	src/app/core/eperson/group-data.service.spec.ts
#	src/app/core/eperson/group-data.service.ts
#	src/app/core/forward-client-ip/forward-client-ip.interceptor.spec.ts
#	src/app/core/index/index.reducer.ts
#	src/app/core/json-patch/json-patch-operations.service.spec.ts
#	src/app/core/json-patch/json-patch-operations.service.ts
#	src/app/core/locale/locale.interceptor.spec.ts
#	src/app/core/registry/registry.service.ts
#	src/app/core/resource-policy/resource-policy.service.ts
#	src/app/core/shared/operators.ts
#	src/app/core/shared/search/search.service.ts
#	src/app/core/submission/submission-object-data.service.ts
#	src/app/core/submission/submission-rest.service.ts
#	src/app/core/submission/vocabularies/vocabulary-entries-response-parsing.service.spec.ts
#	src/app/core/submission/vocabularies/vocabulary.service.spec.ts
#	src/app/core/submission/vocabularies/vocabulary.service.ts
#	src/app/core/submission/workflowitem-data.service.ts
#	src/app/core/tasks/tasks.service.ts
#	src/app/curation-form/curation-form.component.ts
#	src/app/process-page/process-page.resolver.ts
#	src/app/shared/collection-dropdown/collection-dropdown.component.spec.ts
#	src/app/shared/collection-dropdown/collection-dropdown.component.ts
#	src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.spec.ts
#	src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.ts
#	src/app/shared/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component.spec.ts
#	src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.spec.ts
#	src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts
#	src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
#	src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/relationship.effects.ts
#	src/app/shared/form/builder/form-builder.service.ts
#	src/app/shared/item/item-versions/item-versions.component.ts
#	src/app/shared/mocks/remote-data-build.service.mock.ts
#	src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts
#	src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.spec.ts
#	src/app/shared/object-select/collection-select/collection-select.component.spec.ts
#	src/app/shared/object-select/item-select/item-select.component.spec.ts
#	src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.spec.ts
#	src/app/shared/pagination-drag-and-drop/abstract-paginated-drag-and-drop-list.component.ts
#	src/app/shared/resource-policies/form/eperson-group-list/eperson-group-list.component.ts
#	src/app/shared/search/search-query-response.model.ts
#	src/app/statistics/statistics.module.ts
#	src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.spec.ts
#	src/app/submission/sections/form/section-form.component.ts
#	src/app/submission/sections/upload/section-upload.component.spec.ts
#	src/app/submission/sections/upload/section-upload.component.ts
#	src/app/submission/submission.service.spec.ts
#	src/app/submission/submission.service.ts
2021-01-07 19:17:19 +01:00
Alessandro Martelli
d542072a37 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Fixed test.
Removed unused imports.
2021-01-07 15:29:06 +01:00
Alessandro Martelli
4e5e08671e Merge branch 'main' into CST-3620
# Conflicts:
#	src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts
#	src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts
2021-01-07 15:04:29 +01:00
Tim Donohue
8530357676 Merge pull request #972 from atmire/Private-withdrawn-badges-for-items-everywhere
Private/Withdrawn badges for items everywhere
2021-01-04 11:03:14 -06:00
Tim Donohue
fd7aeacab3 Merge pull request #960 from 4Science/CSTPER-260
Auto-save in new Item Submission form breaks the form
2021-01-04 10:25:41 -06:00
Dániel Péter Sipos
9d61a24f03 #885 fix merge 2021-01-04 10:53:37 +01:00
Dániel Péter Sipos
742a895f13 Merge branch 'main' into #885-media-viewer 2021-01-04 10:30:09 +01:00
Dániel Péter Sipos
09dc9491a3 Merge branch 'main' into #885-media-viewer
# Conflicts:
#	src/app/+item-page/item-page.module.ts
2021-01-04 10:18:05 +01:00
Kristof De Langhe
a06599ef3f 74647: Test case fix 2020-12-24 14:06:20 +01:00
Kristof De Langhe
aed0750d47 Merge branch 'main' into w2p-74647_Add-meta-generator-page-header
Conflicts:
	src/app/core/core.module.ts
	src/app/core/data/root.model.ts
	src/app/core/shared/hal-endpoint.service.ts
2020-12-24 13:44:48 +01:00
Kristof De Langhe
d70685a5f2 74647: findByHref and findAllByHref for RootDataService 2020-12-24 13:39:37 +01:00
Alessandro Martelli
5700450eec [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Failing tests in CI environment refactored
2020-12-22 18:20:22 +01:00
Alessandro Martelli
b80282c243 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Test fix and environment settings restored
2020-12-22 17:32:56 +01:00
Alessandro Martelli
e41e7dfa07 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Cleanup
2020-12-22 16:25:26 +01:00
Alessandro Martelli
704d67da79 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Removed abstraction on claimed-search-result-list-element components
2020-12-22 15:53:43 +01:00
Alessandro Martelli
8013260f78 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Task Service implementation.
ReloadableAction abstraction.
2020-12-22 13:48:12 +01:00
Alessandro Martelli
e32c86f127 [CSTPER-3620] Workflow Actions refresh entire MyDSpace page instead of just WorkflowItem
Task Service implementation.
ReloadableAction abstraction.
2020-12-22 12:58:19 +01:00
Alessandro Martelli
6cf6dee5e6 [835] Auto-save in new Item Submission form breaks the form
Fixed unused imports.
2020-12-22 08:33:23 +01:00
Alessandro Martelli
8e77fac638 [835] Auto-save in new Item Submission form breaks the form
Minor fixes and method computeSectionConfiguredMetadata tested
2020-12-21 19:21:49 +01:00
Alessandro Martelli
042d2e71f0 [835] Auto-save in new Item Submission form breaks the form
Improved form touched state in ngrx store.
2020-12-21 17:27:59 +01:00
Alessandro Martelli
e8255927c5 [835] Auto-save in new Item Submission form breaks the form
Autosave timer switched to milliseconds.
2020-12-21 17:27:59 +01:00
Alessandro Martelli
451881ef08 [835] Auto-save in new Item Submission form breaks the form
Methods renaming
2020-12-21 17:27:59 +01:00
Alessandro Martelli
0794c50d19 [835] Auto-save in new Item Submission form breaks the form
Fixed unused imports.
2020-12-21 17:27:59 +01:00
Alessandro Martelli
de372896e7 [835] Auto-save in new Item Submission form breaks the form
Submission form Save button disabled when no pending operations are present
2020-12-21 17:24:42 +01:00
Alessandro Martelli
d47f686b95 [835] Auto-save in new Item Submission form breaks the form
Section Metadata field tested.
Form Touched filter tested.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
eb144b1551 [835] Auto-save in new Item Submission form breaks the form
Test FormSetAdditionalAction.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
0acaa3e57f [835] Auto-save in new Item Submission form breaks the form
Section metadata dispatched to the store and retrieved in subscription.
Added test case for hasMetadataEnrichment.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
9b752b443e [835] Auto-save in new Item Submission form breaks the form
Lint corrections.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
55bcdf0a25 [835] Auto-save in new Item Submission form breaks the form
Minor changes and cleanup.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
999993734f [835] Auto-save in new Item Submission form breaks the form
Tests fixed.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
875a43a14e [835] Auto-save in new Item Submission form breaks the form
Section formId added to the section state.
Error filtering during the parsing of the submission response.
2020-12-21 17:23:03 +01:00
Alessandro Martelli
9f33855a0f [835] Auto-save in new Item Submission form breaks the form
Autosave deactivated
2020-12-21 17:22:33 +01:00
Alessandro Martelli
8111bdd3ce [835] Auto-save in new Item Submission form breaks the form
Store additions:
1. Form AdditionalData: contains the list of the touched metadata
2. Submission metadata: contains the list of the metadata ids assignable for each section

We keep also track whether a section ha focused fields or not.
2020-12-21 17:22:33 +01:00
Alessandro Martelli
82b7b8aa6f [835] Auto-save in new Item Submission form breaks the form
Notifications are enable only for manual submission savings.
2020-12-21 17:14:36 +01:00
Alessandro Martelli
6136162a21 [835] Auto-save in new Item Submission form breaks the form
Notifications are disabled for submission section savings.
2020-12-21 17:14:36 +01:00
Alessandro Martelli
5ae649f7a5 [835] Auto-save in new Item Submission form breaks the form
Label Add on Form Array inputs.
2020-12-21 17:14:36 +01:00
Alessandro Martelli
c9f4568b69 [835] Auto-save in new Item Submission form breaks the form
Disable autosave when timer is equal to 0
2020-12-21 17:14:36 +01:00
Tim Donohue
e867badcb5 Merge pull request #961 from atmire/cache-redesign-part-1
Cache redesign part 1
2020-12-17 10:07:51 -06:00
Art Lowel
ece84332a0 replace menu decorators with switches to solve an issue where decorators were not loaded in time 2020-12-16 17:04:57 +01:00
Giuseppe Digilio
9f22324da0 Update allowed CommonJs dependencies 2020-12-16 17:04:28 +01:00
Art Lowel
54d0569bab adapt klaro code to be compatible with v0.7 2020-12-15 15:18:41 +01:00
Art Lowel
4e18fa35ca Cache redesign part 1, and add support for alternative links 2020-12-14 16:09:33 +01:00
Kristof De Langhe
c3bc730e57 Merge branch 'main' into w2p-75058_Private-Withdrawn-badges-for-items-everywhere
Conflicts:
	src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts
	src/app/shared/shared.module.ts
2020-12-14 11:44:57 +01:00
Tim Donohue
17ca2c4a21 Merge pull request #965 from atmire/Issue-964-getEntityTypeByLabel-impl
issue 964 properly impl getEntityTypeByLabel
2020-12-11 13:56:34 -06:00
Giuseppe Digilio
574caeb528 fix lint error 2020-12-11 18:55:06 +01:00
Giuseppe Digilio
caa4700d06 Fixed merge with main 2020-12-11 18:37:24 +01:00
Giuseppe Digilio
dfa91e04fd Merge remote-tracking branch 'remotes/origin/main' into upgrade_angular10
# Conflicts:
#	src/app/+item-page/item-page.module.ts
#	src/app/core/shared/item.model.ts
#	src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts
#	src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts
#	src/app/shared/shared.module.ts
2020-12-11 18:13:47 +01:00
Giuseppe Digilio
fcec66ebb7 Update dependencies 2020-12-11 18:08:43 +01:00
Tim Donohue
f4853972cc Merge pull request #937 from 4Science/comcol-resource-policies
Comcol resource policies
2020-12-11 10:02:46 -06:00
Giuseppe Digilio
752e415dce Fixed issue with components extends a component without a super call in the constructor 2020-12-11 16:38:47 +01:00
Giuseppe Digilio
c2e0ba9d98 fixed issue with failed request of resource policy edit 2020-12-11 09:53:37 +01:00
Giuseppe Digilio
f86f95e0f9 Merge remote-tracking branch 'remotes/origin/main' into comcol-resource-policies
# Conflicts:
#	src/app/shared/shared.module.ts
2020-12-11 09:30:38 +01:00
Tim Donohue
63e0c2f29a Merge pull request #967 from atmire/item-view-relationship-query-fix
Item view relationship query fix
2020-12-10 16:44:32 -06:00
Tim Donohue
ab9d5b409d Merge pull request #952 from atmire/Filter-queries-correct-operators
Filter queries using correct operators
2020-12-10 16:39:02 -06:00
Tim Donohue
f587170a11 Merge pull request #951 from atmire/w2p-74199_Admin-search-dialogs
Separate components for untyped items
2020-12-10 16:13:22 -06:00
Andrew Wood
06bb213078 Issue 964 make solution synchronous 2020-12-10 12:49:05 -05:00
Andrew Wood
10e09b69be issue 964 properly impl getEntityTypeByLabel 2020-12-10 11:08:22 -05:00
Yana De Pauw
5323477c49 Merge remote-tracking branch 'upstream/main' into w2p-74199_Admin-search-dialogs 2020-12-10 13:57:18 +01:00
Kevin Van de Velde
c0143c0ece Merge remote-tracking branch 'dspace/main' into item-view-relationship-query-fix 2020-12-10 11:04:30 +01:00
Raf Ponsaerts
7610f9cf50 Merge remote-tracking branch 'dspace/main' into w2p-74647_Add-meta-generator-page-header 2020-12-10 11:03:35 +01:00
Tim Donohue
39582c9243 Merge pull request #969 from tdonohue/sync_docker_with_backend
Sync Docker compose scripts with backend (DSpace/DSpace)
2020-12-09 17:19:13 -06:00
Tim Donohue
804905d62e Sync Docker compose scripts with backend (DSpace/DSpace) 2020-12-09 13:38:17 -06:00
Giuseppe Digilio
b1d851a3a8 Fix issue with _font_awesome_imports helper that can't import scss files properly 2020-12-09 14:13:30 +01:00
Kristof De Langhe
f7f784157d 74647: Add Generator meta tag on all pages 2020-12-08 14:51:40 +01:00
Kevin Van de Velde
01d81783fc Fixing an issue where the relationship query did a fuzzy query with UUID's (Test fix) 2020-12-08 14:40:48 +01:00
Kevin Van de Velde
9e9c07b9d7 Fixing an issue where the relationship query did a fuzzy query with UUID's 2020-12-08 14:21:35 +01:00
Kristof De Langhe
2087a20151 75058: message fix, badge placement for entity types grid, alerts on full item pages 2020-12-08 14:07:20 +01:00
Yana De Pauw
52d11932cb Fix issues with type badges in tests 2020-12-08 13:30:31 +01:00
Kristof De Langhe
fa36b3518d 75058: multiple badges fix, item alerts, tests 2020-12-08 13:07:18 +01:00
Yana De Pauw
1cc9349608 Merge remote-tracking branch 'upstream/main' into w2p-74199_Admin-search-dialogs 2020-12-08 10:59:09 +01:00
Kristof De Langhe
d50dd12d3d 75058: Added Withdrawn and Private badges for item list/grid components everywhere 2020-12-07 17:54:30 +01:00
Kristof De Langhe
be05647e5d 74647: Generator meta 2020-12-07 16:42:33 +01:00
Giuseppe Digilio
6da28c1e29 Temporary disable import for themed scss variables 2020-12-07 14:32:44 +01:00
Giuseppe Digilio
eed458569f Fix issue with sass-loader options 2020-12-07 14:28:57 +01:00
Giuseppe Digilio
5db5e0978a update sass-resources-loader 2020-12-07 11:27:59 +01:00
Giuseppe Digilio
84840678d2 Several fixes after merge with main 2020-12-04 14:16:40 +01:00
Giuseppe Digilio
948e002225 Merge remote-tracking branch 'remotes/origin/main' into upgrade_angular10
# Conflicts:
#	package.json
#	server.ts
#	src/app/+admin/admin-access-control/epeople-registry/epeople-registry.component.ts
#	src/app/+admin/admin-access-control/group-registry/group-form/group-form.component.ts
#	src/app/+admin/admin-access-control/group-registry/groups-registry.component.spec.ts
#	src/app/+admin/admin-access-control/group-registry/groups-registry.component.ts
#	src/app/+collection-page/collection-page.component.ts
#	src/app/+item-page/edit-item-page/item-page-reinstate.guard.ts
#	src/app/+item-page/edit-item-page/item-page-withdraw.guard.ts
#	src/app/+item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts
#	src/app/+item-page/edit-item-page/item-relationships/item-relationships.component.ts
#	src/app/+item-page/item-page-administrator.guard.ts
#	src/app/app-routing.module.ts
#	src/app/community-list-page/community-list-service.ts
#	src/app/core/data/entity-type.service.ts
#	src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-feature.guard.spec.ts
#	src/app/core/data/feature-authorization/feature-authorization-guard/feature-authorization.guard.spec.ts
#	src/app/core/data/feature-authorization/feature-authorization-guard/feature-authorization.guard.ts
#	src/app/core/data/feature-authorization/feature-authorization-guard/site-administrator.guard.ts
#	src/app/core/data/feature-authorization/feature-authorization-guard/site-register.guard.ts
#	src/app/core/data/object-updates/object-updates.reducer.ts
#	src/app/core/shared/operators.ts
#	src/app/process-page/detail/process-detail.component.ts
#	src/app/shared/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts
#	src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
#	src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.ts
#	src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.ts
#	src/app/shared/shared.module.ts
#	yarn.lock
2020-12-04 11:36:48 +01:00
Giuseppe Digilio
79fa93bea9 Set providedIn root for services using inject tokens 2020-12-04 11:18:59 +01:00
Giuseppe Digilio
0f77e5cd92 Merge remote-tracking branch 'remotes/origin/main' into comcol-resource-policies 2020-12-04 10:52:30 +01:00
Giuseppe Digilio
18a07b571b Fix build error 2020-12-04 10:46:54 +01:00
Giuseppe Digilio
20b5721e3c Fixed lint errors and add lint fix script 2020-12-04 10:32:46 +01:00
Giuseppe Digilio
587affd064 added missing decorator for classes that use Angular features 2020-12-04 10:30:45 +01:00
Giuseppe Digilio
30d4c6ab5a fixed tests 2020-12-04 09:22:31 +01:00
Tim Donohue
32a29c4a17 Merge pull request #925 from atmire/w2p-74179_Deleting-groups
Fix delete and edit for Groups
2020-12-03 15:59:04 -06:00
Tim Donohue
6e9c129b6e Merge pull request #955 from atmire/401-login-page-and-403-page
401 login page and 403 page
2020-12-03 15:44:30 -06:00
Giuseppe Digilio
09101e83f3 temporary disabled problematic tests 2020-12-03 19:59:00 +01:00
Giuseppe Digilio
6123962e47 further changes for angular 10 2020-12-03 19:55:19 +01:00
Giuseppe Digilio
10d0c2e518 fixed tests after angular 10 upgrade 2020-12-03 19:45:05 +01:00
Giuseppe Digilio
9ed1c74f29 optimized module imports 2020-12-03 19:36:19 +01:00
Giuseppe Digilio
c841a135c9 Merge remote-tracking branch 'remotes/origin/main' into comcol-resource-policies
# Conflicts:
#	src/app/shared/shared.module.ts
2020-12-03 17:21:52 +01:00
Kristof De Langhe
411e2bd746 74612: Remove 401 pages and add login redirect to feature-authorization guards 2020-12-03 14:38:27 +01:00
Dániel Péter Sipos
152923aba7 #885 remove elements form test 2020-12-03 11:19:51 +01:00
Dániel Péter Sipos
84bb449c8e Merge branch 'main' into #885-media-viewer 2020-12-03 11:17:08 +01:00
Giuseppe Digilio
308aa34d8a fixed form builder service after angular 10 upgrade 2020-12-03 10:37:24 +01:00
Giuseppe Digilio
265b74f3d6 fixed SubmissionImportExternalPreviewComponent after angular 10 upgrade 2020-12-03 10:08:59 +01:00
Giuseppe Digilio
ad9b676bec fixed menu effects after angular 10 upgrade 2020-12-03 09:31:00 +01:00
Giuseppe Digilio
58f1cbe5e5 fixed collection selector component after angular 10 upgrade 2020-12-02 16:19:26 +01:00
Giuseppe Digilio
b49d46176b fixed dynamic disabled component after angular 10 upgrade 2020-12-02 12:38:26 +01:00
Giuseppe Digilio
9336693cc7 Removed entry components from module definitions 2020-12-01 20:38:03 +01:00
Giuseppe Digilio
18160b16db fixed absolute import paths 2020-12-01 20:33:17 +01:00
Giuseppe Digilio
ef0c574473 fixed collection dropdown component after angular 10 upgrade 2020-12-01 15:23:41 +01:00
Kristof De Langhe
4145f829a7 Merge branch 'main' into w2p-74612_Ask-unauthenticated-users-to-log-in 2020-12-01 14:52:26 +01:00
Kristof De Langhe
67de6538e5 74606: LGTM issue fixes 2020-12-01 14:47:03 +01:00
Kristof De Langhe
e15b66aa1b Merge branch 'main' into w2p-74606_Ensure-the-correct-operators-are-used-for-filter-queries 2020-12-01 14:38:19 +01:00
Marie Verdonck
2243e8a76c 74848: Check so warn message not shown on new group form 2020-12-01 14:28:47 +01:00
Marie Verdonck
dee3043c9f 74179/PR#925: Test fixes 2020-12-01 13:43:15 +01:00
Marie Verdonck
dfd7468b88 74179/PR#925: Groups with linked dso (workflow groups) => No edit/delete possible + alert on edit page with link to edit roles on comcol page 2020-12-01 13:43:15 +01:00
Marie Verdonck
1fcd4d6c3e 74179: NameAlreadyInUse check removed since not correctly shown if there are similarly named groups (group name search not exact) 2020-12-01 13:43:15 +01:00
Art Lowel
3c20cb7ee1 fix positioning of group delete button and clearing of the cache on delete 2020-12-01 13:43:15 +01:00
Marie Verdonck
46defed6f2 74179: Test fix 2020-12-01 13:43:15 +01:00
Marie Verdonck
f8a8af32da 74179: Delete group cache cleared, redirect & delete button moved on group edit page 2020-12-01 13:43:15 +01:00
Marie Verdonck
e3578a6b0f 74179: Edit group functionality added + test (fixes) 2020-12-01 13:43:15 +01:00
Marie Verdonck
ab88dc3c77 74179: Test fixes after changes for empty results in eperson/group registries 2020-12-01 13:43:15 +01:00
Marie Verdonck
bdd1a675f1 74179: Fix for no result message not shown if no search results epeople/group registry 2020-12-01 13:43:15 +01:00
Marie Verdonck
1903530f77 74179: Deleting groups notifications, authorisation check, button on edit group page 2020-12-01 13:43:14 +01:00
Giuseppe Digilio
5b5d2031d5 fixed date picker form component after angular 10 upgrade 2020-12-01 11:50:27 +01:00
Tim Donohue
aa8feb01b3 Merge pull request #954 from 4Science/orcid_labels
replaced orcidV2 label keys with orcid
2020-11-30 11:10:17 -06:00
Tim Donohue
4a6939f621 Merge pull request #959 from DSpace/tdonohue-correct_build
Update build.yml to not limit by branch
2020-11-30 10:39:44 -06:00
Tim Donohue
96d7f9c2d7 Update build.yml to not limit by branch 2020-11-30 10:12:02 -06:00
Tim Donohue
0bfa425e57 Update build status badge to point to GitHub 2020-11-25 17:08:20 -06:00
Tim Donohue
5e23a84ea3 Merge pull request #956 from tdonohue/github_ci
Add CI to Github via Actions (based on Travis CI config)
2020-11-25 10:20:04 -06:00
Tim Donohue
3f1266e485 Enable only for main branch pushes or PRs 2020-11-25 09:26:43 -06:00
Tim Donohue
49effd14df Rename job to "tests". Space out steps to make it easier to read. 2020-11-25 08:58:38 -06:00
Tim Donohue
d241d4ea6a Revert to checkout@v1 per https://community.codecov.io/t/codecov-status-stuck-at-waiting-for-status-to-be-reported-on-github/341/40 2020-11-25 08:27:25 -06:00
Tim Donohue
e32b435edd Remove .travis.yml Minor comment cleanup to build.yml 2020-11-24 17:07:49 -06:00
Tim Donohue
b036c084b7 Try codecov bash uploader to see if it works 2020-11-24 16:38:07 -06:00
Tim Donohue
8d526f0e80 Move codecov reports to last step 2020-11-24 16:03:22 -06:00
Tim Donohue
bc0b0a26c9 Initial GitHub Actions CI settings. Rename docker-compose-travis to docker-compose-ci 2020-11-24 15:15:58 -06:00
Kristof De Langhe
8486fecc17 74612: Post-merge test fixes 2020-11-24 12:03:34 +01:00
Yana De Pauw
6b69f66a8d 74572: Update type badge to not rely on constructor name 2020-11-24 11:58:16 +01:00
Kristof De Langhe
c28af7d7c8 Merge branch 'main' into w2p-74612_Ask-unauthenticated-users-to-log-in
Conflicts:
	src/app/+item-page/simple/item-page.component.ts
	src/app/process-page/detail/process-detail.component.spec.ts
	src/app/process-page/detail/process-detail.component.ts
2020-11-24 11:34:17 +01:00
Kristof De Langhe
b2369b237e 74612: Redirect bugfix 2020-11-24 10:36:50 +01:00
Giuseppe Digilio
4473395cb9 Fixed "CommonJS or AMD dependencies can cause optimization bailouts." warnings
https://stackoverflow.com/questions/62592903/upgrading-to-angular-10-fix-commonjs-or-amd-dependencies-can-cause-optimizatio/62604034#62604034
2020-11-23 16:52:55 +01:00
Tim Donohue
d78549c2ff Merge pull request #938 from 4Science/CSTPER-222
Metadata identifier for Communities and Collections
2020-11-23 09:21:37 -06:00
Giuseppe Digilio
9f5204992d Replaced deprecated rxjs flatMap operator 2020-11-23 15:38:02 +01:00
Dániel Péter Sipos
b14ae840b0 #885 fix build 2020-11-23 09:47:56 +01:00
Dániel Péter Sipos
b5ffe718d2 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2020-11-23 09:40:09 +01:00
Corrado Lombardi
f8076051b4 replaced orcidV2 label keys with orcid 2020-11-23 09:14:16 +01:00
Tim Donohue
f1b1f8199b Merge pull request #827 from atmire/Support-for-process-output
Support for process output on detail page
2020-11-20 15:10:37 -06:00
Tim Donohue
c5898b4182 Merge pull request #929 from atmire/w2p-74275_Issue-2988_Reset-pw-eperson-created-in-admin-ui
Issue 2988: Password (re)set for eperson with add PatchOperation
2020-11-20 14:31:55 -06:00
Giuseppe Digilio
44a65c7a23 upgrade to angular 10 intermediate commit 2020-11-20 21:10:36 +01:00
Giuseppe Digilio
9abc827fc1 fix for dynamic form after upgrade 2020-11-20 21:10:09 +01:00
Tim Donohue
6e0e5a8fee Merge pull request #941 from atmire/74609-Fix-type-error-on-search-pages
Fix TypeError on search pages
2020-11-20 11:51:16 -06:00
Giuseppe Digilio
59a0263817 upgrade to angular 10 intermediate commit 2020-11-20 17:06:42 +01:00
Giuseppe Digilio
79285b203b Changed to use TestBed.inject method instead of deprecated TestBed.get 2020-11-20 15:21:34 +01:00
Dániel Péter Sipos
dc85bd9bff #885 disable media viewer 2020-11-20 15:12:26 +01:00
Dániel Péter Sipos
2ed7d153fa #885 remove redundant config 2020-11-20 15:11:12 +01:00
Dániel Péter Sipos
81f0663914 Merge branch 'main' into #885-media-viewer
# Conflicts:
#	src/config/global-config.interface.ts
2020-11-20 15:08:53 +01:00
Giuseppe Digilio
32dc9a80a6 Replaced ngx-bootstrap TooltipModule in favour of @ng-bootstrap ngbTooltip 2020-11-20 12:41:13 +01:00
Yana De Pauw
9c2ca90c32 Remove unused import 2020-11-20 11:11:58 +01:00
Yana De Pauw
6c80f0797b Merge remote-tracking branch 'upstream/main' into w2p-74199_Admin-search-dialogs 2020-11-20 10:44:24 +01:00
Tim Donohue
c05f4fc912 Merge pull request #942 from atmire/74615-Remove-baseUrl-api-workaround
Remove workaround for baseUrl ending in /api
2020-11-19 17:04:05 -06:00
Tim Donohue
2fa24b5d5c Merge pull request #953 from DSpace/codecov_patch_info_mode
Switch codecov 'patch' checks to informational only
2020-11-19 16:25:04 -06:00
Tim Donohue
130e2e500b Merge pull request #944 from atmire/w2p-74345_Fix-comcol-tree-issues
Fix com/col tree issues (#899 & #908)
2020-11-19 16:23:39 -06:00
Tim Donohue
c9f4baa4d4 Merge pull request #916 from 4Science/CSTPER-66
Communities and collections not shown right after creation
2020-11-19 14:52:46 -06:00
Tim Donohue
de28b02cf6 Switch patch checks to informational only 2020-11-19 14:41:41 -06:00
Tim Donohue
8bc85d5ed1 Merge pull request #933 from atmire/w2p-74348_Fix-security-issues-LGTM
Fix security issues reported by LGTM
2020-11-19 14:20:53 -06:00
Giuseppe Digilio
764ad4a0c0 fix update of @ng-dynamic-forms libs 2020-11-19 18:29:40 +01:00
Art Lowel
921fbe5269 Merge pull request #926 from qultoltd/#674-fix-thumbnail
#674 fix thumbnail
2020-11-19 16:53:15 +01:00
Yana De Pauw
bc8c0aaeac Merge remote-tracking branch 'upstream/main' into 74609-Fix-type-error-on-search-pages 2020-11-19 14:03:16 +01:00
Yana De Pauw
c1fba059ca 74572: Fix typo 2020-11-19 13:12:53 +01:00
Yana De Pauw
c38cee7561 74572: Separate components for untyped items 2020-11-19 13:12:53 +01:00
Yana De Pauw
963d72ddcd 74348: Increase ratelimiter to 500 2020-11-19 12:11:40 +01:00
Giuseppe Digilio
92a4b9fa78 updated @ng-bootstrap and @ng-dynamic-forms 2020-11-19 11:25:23 +01:00
Tim Donohue
8d44b5d2f0 Merge pull request #934 from atmire/w2p-74354_Handle-redicts-fix
Fix for handle redirects
2020-11-18 16:22:04 -06:00
Tim Donohue
1ed39d8040 Merge pull request #545 from atmire/w2p-67685_Add-relationships-in-edit-item
Create relationships as an admin in edit item
2020-11-18 14:48:13 -06:00
Tim Donohue
cdf26f12d4 Merge pull request #946 from atmire/GH-945_rimraf-clean
#945 Clean node at end to avoid rimraf error
2020-11-18 14:43:12 -06:00
Tim Donohue
b70daafda2 Merge pull request #930 from atmire/Admin-search-dialogs
Admin search dialogs
2020-11-18 14:27:41 -06:00
Giuseppe Digilio
1e918d6df8 updated Angular Universal 2020-11-18 19:06:25 +01:00
Giuseppe Digilio
1b21af3191 updated to the latest 9.x version 2020-11-18 19:02:55 +01:00
Giuseppe Digilio
17d7e10ac3 updated to the latest 8.x version 2020-11-18 18:48:54 +01:00
Giuseppe Digilio
46c748efba set target to es2015 2020-11-18 18:46:46 +01:00
Giuseppe Digilio
1507ec0ffa using dynamic imports for lazy loaded modules via the router 2020-11-18 18:05:40 +01:00
Kristof De Langhe
cb6381f7ee 74606: Move stripping of suggestions to SearchFacetFilter 2020-11-18 17:59:22 +01:00
Kristof De Langhe
ab755d3fd9 74612: 403 page + redirect to login on unauthorized 2020-11-18 14:05:36 +01:00
Alessandro Martelli
2369892c3f [CSTPER-222] handle metadata reading for communities and collections
Removed handle field and the setter from community and collection models.
2020-11-18 12:08:57 +01:00
Corrado Lombardi
dfc26efd12 renamed private function 2020-11-18 10:51:55 +01:00
Chris Wilper
9056514144 #945 Clean node at end to avoid rimraf error 2020-11-17 17:27:30 -05:00
Corrado Lombardi
c2e65e2811 removed unused import 2020-11-17 19:12:34 +01:00
Corrado Lombardi
8da8273d82 removed unused imports 2020-11-17 18:51:49 +01:00
Tim Donohue
12da991630 Merge pull request #932 from atmire/w2p-74356_Issue-867_Missing-labels-externalsources
Submission relationship lookup externalsources: Missing i18n labels & other issues
2020-11-17 11:01:29 -06:00
Kristof De Langhe
05406e6919 74606: Search Utils test cases + test fixes 2020-11-17 15:43:05 +01:00
Yana De Pauw
77ca0f049a 74615: Remove workaround for baseUrl ending in /api 2020-11-17 15:38:30 +01:00
Dániel Péter Sipos
3303094efe #674 imort fix 2020-11-17 14:34:42 +01:00
Dániel Péter Sipos
aca0641232 #674 fix 2020-11-17 14:32:10 +01:00
Kristof De Langhe
6f9e8bd3bf 74606: Ensure the correct operators are used for filter queries 2020-11-17 14:31:07 +01:00
Yana De Pauw
9e4e5e4bdf Fix ping 2020-11-17 14:28:40 +01:00
Yana De Pauw
0a0decfc33 74609: Fix TypeError on search pages 2020-11-17 14:21:14 +01:00
Dániel Péter Sipos
55b6486cda #674 fix 2020-11-17 14:09:03 +01:00
Dániel Péter Sipos
ffd0605511 Merge branch 'main' into #674-fix-thumbnail 2020-11-17 13:36:21 +01:00
Corrado Lombardi
c40f31279f [CSTPER-66] moved refreshCache function to common ComColDataService, tests have been moved accordingly.
Used HalEndpointService to discover communities search top endpoint
2020-11-17 09:29:01 +01:00
Marie Verdonck
140f660cf4 74345: Fix com/col tree issues (#899 & #908):
https://github.com/DSpace/dspace-angular/issues/899
https://github.com/DSpace/dspace-angular/issues/908
2020-11-16 17:57:59 +01:00
Yana De Pauw
82811ebafd 74348: Add comments and update rate limit config 2020-11-16 09:34:34 +01:00
Dániel Péter Sipos
c377a3e45a #674 fix 2020-11-13 17:31:05 +01:00
Dániel Péter Sipos
5923a97336 #674 remove un used imports 2020-11-13 16:51:23 +01:00
Dániel Péter Sipos
bb1d863470 #674 fix tests 2020-11-13 16:08:52 +01:00
Dániel Péter Sipos
cb3131e31b #674 remove un used imports 2020-11-13 14:29:03 +01:00
Dániel Péter Sipos
7b160cdbd3 #674 revert eror throw and ad set/get for grid communities and collections 2020-11-13 14:12:27 +01:00
Marie Verdonck
df5570c7b0 Refactored to use process log bitstream 2020-11-12 17:35:39 +01:00
Art Lowel
0e05184d20 remove unused import 2020-11-12 09:39:16 +01:00
Tim Donohue
2ee815908f Merge pull request #939 from tdonohue/use_codecov_bash_script
Use codecov bash script instead of codecov node module
2020-11-10 14:20:05 -06:00
Tim Donohue
086449d82c Remove 'codecov' node module 2020-11-10 13:28:21 -06:00
Tim Donohue
ff173f1f0f Switch to using Codecov bash script instead of node module to upload reports 2020-11-10 13:28:21 -06:00
Alessandro Martelli
fa8ecd16a7 [CSTPER-222] handle metadata reading for communities and collections
Fixed unused imports.
2020-11-10 14:50:46 +01:00
Alessandro Martelli
4a2fe76ef0 [CSTPER-222] handle metadata reading for communities and collections
Fixed tests
2020-11-10 14:30:52 +01:00
Alessandro Martelli
fa113babc7 [CSTPER-222] handle metadata reading for communities and collections
Community and Collection handle tests
2020-11-10 14:03:40 +01:00
Alessandro Martelli
5c7a111a61 [CSTPER-222] handle metadata reading for communities and collections 2020-11-10 14:00:30 +01:00
Alessandro Martelli
65516b3880 [CSTPER-222] handle metadata reading for communities and collections 2020-11-10 14:00:30 +01:00
Giuseppe Digilio
0072486f96 Fix issue where the edit of resource policies failed even if successfully 2020-11-10 09:53:44 +01:00
Giuseppe Digilio
db7514fd25 Fix issue where the creation of resource policies failed even if successfully 2020-11-10 09:53:30 +01:00
Giuseppe Digilio
926cce8286 Add route to create/edit a collection policies 2020-11-09 19:24:43 +01:00
Giuseppe Digilio
e0c4b836d9 Add route to create/edit a community policies 2020-11-09 19:24:32 +01:00
Giuseppe Digilio
317b61b3a4 moved ResourcePolicyEditComponent and ResourcePolicyCreateComponent to shared.module.ts 2020-11-09 19:13:50 +01:00
Giuseppe Digilio
8b6f99e2be Added i18n labels for communities/collections authorizations edit page 2020-11-09 18:22:42 +01:00
Giuseppe Digilio
29df9c609e Added authorizations edit page for collections 2020-11-09 18:21:37 +01:00
Giuseppe Digilio
042e9a06e8 Added authorizations edit page for community 2020-11-09 18:21:13 +01:00
Dániel Péter Sipos
ccb20ea2d7 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2020-11-09 13:27:08 +01:00
Dániel Péter Sipos
17d629779e #885 remove unused imports 2020-11-09 13:15:55 +01:00
Dániel Péter Sipos
337ecca4a3 #885 fix tests 2020-11-09 12:41:03 +01:00
Marie Verdonck
61f2a3c0f8 Missing key for button title added 2020-11-09 10:06:26 +01:00
Tim Donohue
9fc732085e Merge pull request #935 from tdonohue/fix_codecov
Update Travis to only send coverage reports to codecov *once*
2020-11-06 15:01:49 -06:00
Tim Donohue
9b7eac625c Update Travis to only send coverage reports to codecov *once* 2020-11-06 12:20:25 -06:00
Tim Donohue
b10b972da3 Merge pull request #880 from mwoodiupui/879
[#879] Clarify the use of the production build script, and when configuration is processed
2020-11-06 09:34:49 -06:00
Yana De Pauw
653ceca512 74354: Handle redirects don't work 2020-11-06 15:46:52 +01:00
Yana De Pauw
3a486f5117 Update comment to be more clear 2020-11-06 14:47:14 +01:00
Yana De Pauw
5ef7ae1b86 74348: Fix security issues reported by LGTM 2020-11-06 14:30:39 +01:00
Dániel Péter Sipos
1913094bdf #885 check bitsteam fail 2020-11-06 13:54:11 +01:00
Dániel Péter Sipos
d17b874156 #885 remove auto play and filter unsupported media types 2020-11-06 13:40:28 +01:00
Dániel Péter Sipos
3802436531 Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2020-11-06 13:14:15 +01:00
Dániel Péter Sipos
115a59148f #885 change preview if user is authernticated 2020-11-06 13:13:45 +01:00
Samuel
1ac1a4263a PR 545 Create relationships as an admin in edit item - fix lgtm issues 2020-11-06 11:44:41 +01:00
Samuel
06163ce777 PR 545 Create relationships as an admin in edit item - feedback 2020-11-06 11:33:09 +01:00
Samuel
cba71fc53f PR 545 Create relationships as an admin in edit item 2020-11-06 11:31:15 +01:00
Dániel Péter Sipos
af79945fd8 #885 add enviroment variable for media viewer 2020-11-06 11:05:20 +01:00
Marie Verdonck
e4a1d717a2 Merge branch 'upstream-master' into Support-for-process-output
# Conflicts:
#	src/app/process-page/detail/process-detail.component.ts
2020-11-05 13:01:14 +01:00
Marie Verdonck
5c62fb6d14 unused import removed and observableCombineLatest aligned with convention 2020-11-05 12:05:51 +01:00
Marie Verdonck
4487e2b8ea Fix count results in external source relationship lookup tab label 2020-11-05 11:44:43 +01:00
Marie Verdonck
ecb56413e2 Issue 867 - Missing labels added 2020-11-05 11:13:41 +01:00
Marie Verdonck
d73298daaa fix issue where externalsource search results couldn't be rendered on fields without name 2020-11-05 11:12:56 +01:00
Art Lowel
a937579b8a Merge pull request #905 from saschaszott/issue-904
bugfix of issue #904
2020-11-05 10:22:05 +01:00
Kristof De Langhe
5835c661ac 74199: Lint and LGTM fixes + HoverClassDirective JSDocs and tests 2020-11-04 14:59:10 +01:00
Kristof De Langhe
7bd7f38259 74199: AuthorizedCollectionSelectorComponent current dso query fix 2020-11-04 14:11:46 +01:00
Dániel Péter Sipos
ae079f06ed #885 quick fix 2020-11-03 16:09:34 +01:00
Dániel Péter Sipos
263c12e8f2 #885 fix other thumbnail 2020-11-03 13:27:17 +01:00
Dániel Péter Sipos
66f0b5f77d #885 fix thumbnail size 2020-11-03 11:15:16 +01:00
Dániel Péter Sipos
4312776b2d #885 fix loading bitstream format 2020-11-03 10:59:31 +01:00
Kristof De Langhe
b7aff5894a Merge branch 'main' into w2p-74199_Admin-search-dialogs
Conflicts:
	src/app/+item-page/simple/item-page.component.ts
2020-11-02 12:48:02 +01:00
Kristof De Langhe
52ab6f8a4e 74199: HoverClassDirective and Home parent 2020-11-02 11:49:02 +01:00
Art Lowel
f06c4a20b0 make breadcrumb home text i18nable 2020-10-30 17:40:12 +01:00
Art Lowel
96c31d84d6 support truncation on different backgrounds 2020-10-30 17:16:49 +01:00
Tim Donohue
1e87f2b742 Merge pull request #894 from 4Science/CSTPER-138
miscellaneous fixes for import from external source page
2020-10-30 09:51:32 -05:00
Art Lowel
48c7fff930 add loading indicator to infinite scroll, few style tweaks 2020-10-30 13:36:39 +01:00
Dániel Péter Sipos
9339cfaafd #674 remove un used import 2020-10-29 16:14:35 +01:00
Dániel Péter Sipos
17455a7860 #674 add dock type 2020-10-29 15:19:04 +01:00
Dániel Péter Sipos
22fe184142 #674 ad doctype 2020-10-29 14:57:09 +01:00
Dániel Péter Sipos
9a1b21aeef #675 remove unused imports 2020-10-29 14:43:17 +01:00
Dániel Péter Sipos
71ca57a5ce #674 update other grid elements 2020-10-29 14:35:44 +01:00
Dániel Péter Sipos
6f7a226b81 #674 refactore thumbnail 2020-10-29 14:28:49 +01:00
Dániel Péter Sipos
431d884e8a Merge remote-tracking branch 'upstream/main' into #674-fix-thumbnail 2020-10-29 11:23:16 +01:00
Dániel Péter Sipos
77e7d0effd #674 remove consle logs 2020-10-29 11:23:02 +01:00
Marie Verdonck
9ae7e8174e 74275: [Issue 2988]: Password (re)set for eperson with add PatchOperation 2020-10-29 10:08:19 +01:00
Tim Donohue
09bdc7a0e3 Merge pull request #891 from atmire/DSO-404-fix
Fix DSO 404 pages
2020-10-28 13:04:57 -05:00
Dániel Péter Sipos
7925e9134a Revert "#674 remove async"
This reverts commit 371b8e72f7.
2020-10-28 16:29:02 +01:00
Dániel Péter Sipos
371b8e72f7 #674 remove async 2020-10-28 16:13:41 +01:00
Dániel Péter Sipos
0ea105c73e #674 fix community and collection thumblogo 2020-10-28 16:01:26 +01:00
Dániel Péter Sipos
0d8049494f Merge branch 'main' into #0-fix-thumbnail 2020-10-28 10:44:59 +01:00
Dániel Péter Sipos
23c01b4683 #0-remove 2020-10-28 10:44:51 +01:00
Kristof De Langhe
d52da292a6 74053: Fix double slash in route 2020-10-27 13:14:01 +01:00
Kristof De Langhe
2d67b0b13e 74053: remove fdescribe + use consts for routing paths 2020-10-27 12:29:39 +01:00
Kristof De Langhe
736704aae8 74053: redirectOn404Or401 2020-10-27 11:25:12 +01:00
Kristof De Langhe
18577f016c 74200: DsoPageEditButtonComponent test cases 2020-10-27 10:46:33 +01:00
Dániel Péter Sipos
d7d527b735 #0 fix thumbnail 2020-10-27 10:00:21 +01:00
Kristof De Langhe
06769493e1 74199: Edit current DSO button 2020-10-26 17:49:56 +01:00
Kristof De Langhe
892e7bdaa1 74199: Tests 2020-10-26 15:43:15 +01:00
Tim Donohue
e3c4884bf9 Merge pull request #913 from atmire/fix-item-grid-shadows
Fix grid search result shadows
2020-10-23 16:42:57 -05:00
Tim Donohue
418fe5c5ce Merge pull request #881 from jonas-atmire/w2p-72326-Back-link-on-bitstream-edit-page
Back link on bitstream edit page
2020-10-23 16:18:36 -05:00
Kristof De Langhe
40891a3c35 74199: Admin search dialogs - Current DSO + context for new item/collection 2020-10-23 17:29:10 +02:00
Corrado Lombardi
9658da4fc0 [CSTPER-66] removed detectChanges in single tests, removed TranslateService stub provision, added _links section in community objects 2020-10-23 16:40:49 +02:00
Corrado Lombardi
4bed16af32 [CSTPER-66] onConfirm tests executed within a scheduler and provided _links section on tested data 2020-10-23 11:54:07 +02:00
Corrado Lombardi
564e4e0b02 [CSTPER-66] onSubmit test executed within a scheduler and provided _links section on tested data 2020-10-23 11:53:35 +02:00
Corrado Lombardi
d50d1506ef [CSTPER-66] provided RequestService 2020-10-22 23:41:18 +02:00
Corrado Lombardi
8424ab89d7 [CSTPER-66] provided RequestService in constructor and parent community empty link 2020-10-22 20:15:08 +02:00
Kristof De Langhe
ade5eb53cc 74199: Infinite scroll size changes 2020-10-22 18:03:32 +02:00
Giuseppe Digilio
c374627c27 [CSTPER-138] Fixed failed test 2020-10-22 17:24:18 +02:00
Corrado Lombardi
5ef329f7a6 [CSTPER-66] removed consecutive blank lines 2020-10-22 16:44:49 +02:00
Corrado Lombardi
be6a6a2f62 [CSTPER-66] when a community or a collection is created or deleted, angular cache is refreshed so that in case of new community or collection it appears immediately in pages where communities and collections lists are displayed, in case of community or collection deletion deleted community or collection does not appear anymore in pages where communities and collections lists are displayed. 2020-10-22 15:50:44 +02:00
Corrado Lombardi
20c7afce06 [CSTPER-66] utility functions to create remote data object without content 2020-10-22 15:46:29 +02:00
Corrado Lombardi
e1cce311e8 [CSTPER-66] utility method to check if remote data has no content 2020-10-22 15:46:05 +02:00
Corrado Lombardi
1127b363e9 [CSTPER-66] function to get succeeded or no content response 2020-10-22 15:45:39 +02:00
Giuseppe Digilio
826957a66d [CSTPER-138] Fixed issue where results are the same when pagination changed while retrieving external source providers 2020-10-22 09:18:03 +02:00
Kristof De Langhe
8b2b28df25 74199: Infinite scrollable dso-selector + collection/community implementation + authorized-collection-selector 2020-10-21 18:04:03 +02:00
Tim Donohue
d103092a81 Merge pull request #901 from qultoltd/#895-search-grid-layout
#895 fix grid layout
2020-10-21 08:50:44 -05:00
Kristof De Langhe
f79ea2b844 74199: Admin search dialogs - sidebar search list element implementations - intermediate commit 2020-10-21 13:24:21 +02:00
Art Lowel
c4687116e5 add isCollapsed to mock TruncatableService 2020-10-21 11:35:05 +02:00
Art Lowel
1dcfb729a8 fix issue where item search results would always have a shadow, instead of only when they're focused 2020-10-21 10:23:56 +02:00
Kristof De Langhe
ac44bb9cb9 74199: Admin search dialogs - intermediate commit 2020-10-20 17:54:12 +02:00
Kristof De Langhe
6a016cd17f 74199: ItemResolver item to dso refactor 2020-10-20 16:40:01 +02:00
Corrado Lombardi
a2c5ddbfce Merge branch 'main' into CSTPER-66 2020-10-19 08:59:18 +02:00
Sascha Szott
4e4ef36c34 bugfix of issue #904 2020-10-17 21:42:47 +02:00
Dániel Péter Sipos
9a324ba456 #895 revert changes fix layout 2020-10-16 17:12:25 +02:00
Dániel Péter Sipos
3d1ffa6738 #895 fix colums sorting 2020-10-16 17:05:46 +02:00
Dániel Péter Sipos
622871fcde #895 fix grid layout 2020-10-16 14:53:58 +02:00
Tim Donohue
f7883492c6 Correct syntax for referencing related issues/PRs 2020-10-15 15:41:08 -05:00
Giuseppe Digilio
988747e392 [CSTPER-138] Fixed issue with request pagination while retrieving external source providers 2020-10-15 12:50:02 +02:00
Giuseppe Digilio
7599938516 [CSTPER-138] Added label for arXiv external providers 2020-10-15 12:47:12 +02:00
Giuseppe Digilio
ed1e93f73d [CSTPER-138] Fixed issue with infinite scroll within the dropdown of the external source providers 2020-10-15 12:09:05 +02:00
Giuseppe Digilio
f1256b3795 [CSTPER-138] Fixed issue with request pagination while retrieving external source providers 2020-10-15 12:07:47 +02:00
Giuseppe Digilio
f8afc6355b [CSTPER-138] Fixed issue that blocked route change within the import-external page 2020-10-15 12:06:32 +02:00
Kristof De Langhe
d4bd128b67 74053: Remove unused imports 2020-10-13 14:19:56 +02:00
Dániel Péter Sipos
401bbf3a8e #885 fix default tumbnail 2020-10-13 13:38:30 +02:00
Dániel Péter Sipos
22de03e7aa Merge remote-tracking branch 'upstream/main' into #885-media-viewer 2020-10-13 13:33:37 +02:00
Kristof De Langhe
5e21bfa5ca 74053: fix issue #865 2020-10-13 13:28:47 +02:00
Dániel Péter Sipos
9b63767d63 #885 add default thumbnail 2020-10-13 13:20:46 +02:00
Dániel Péter Sipos
6642cbb088 #885 add more unit test 2020-10-13 10:32:56 +02:00
Corrado Lombardi
6892efc6a3 Merge branch 'main' into fix_com_col_refresh 2020-10-12 16:36:23 +02:00
Dániel Péter Sipos
681904639b QREPO-110 quick test fix 2020-10-12 14:53:35 +02:00
Dániel Péter Sipos
0294c6c234 QREPO-110 add more tests 2020-10-12 14:52:50 +02:00
Dániel Péter Sipos
f46c8ef7b3 QREPO-110 add commnets 2020-10-12 11:02:21 +02:00
Dániel Péter Sipos
c044f458e1 #885 fix lint 2020-10-09 14:28:24 +02:00
Dániel Péter Sipos
88a64b1bd7 #855 fix tests and add angular 8 compatible gallery 2020-10-09 14:25:44 +02:00
Tim Donohue
d9634a84ae Merge pull request #874 from atmire/w2p-72956_delete-eperson
Delete eperson
2020-10-08 12:08:29 -05:00
Dániel Péter Sipos
cfe6eb6e61 #885 fix enviroment 2020-10-08 15:46:59 +02:00
Dániel Péter Sipos
55cca0538a #885 fix for linter 2020-10-08 15:43:31 +02:00
Dániel Péter Sipos
a740453e88 #885 fix gallery 2020-10-08 14:45:37 +02:00
Dániel Péter Sipos
a157552a13 #885 add media viewer 2020-10-08 14:15:16 +02:00
Tim Donohue
5bf6d0f287 Merge pull request #851 from atmire/usage-reports
Add statistics pages
2020-10-07 12:34:04 -05:00
Samuel
d843230158 Add statistics pages - fix link caching issue 2020-10-07 13:53:20 +02:00
Tim Donohue
bb935be0b6 Merge pull request #866 from atmire/Metadata-edit-patch-error-fix
Metadata edit patch error fix
2020-10-06 09:54:55 -05:00
Raf Ponsaerts
fbe6ec61de [Task 72956] applied feedback to the delete eperson error message 2020-10-02 16:38:19 +02:00
jonas-atmire
be2bfbe066 Fixing LGTM - Unused imports 2020-10-01 09:33:38 +02:00
jonas-atmire
a45bc349cc Small doc update 2020-10-01 09:11:25 +02:00
jonas-atmire
ce553e3272 Fixing lint error(s) 2020-10-01 09:09:05 +02:00
Mark H. Wood
17caa779c1 [#879] Clarify the use of the production build script, and when configuration is processed. 2020-09-30 17:04:45 -04:00
Tim Donohue
03bba0f578 Merge pull request #877 from atmire/remove-api-from-rest-config
remove remaining uses of /api in the rest namespace
2020-09-30 11:33:16 -05:00
Tim Donohue
098eb291b6 Merge pull request #878 from atmire/reomve-circular-dependencies-part-2
Remove circular dependencies part 2
2020-09-30 11:02:57 -05:00
Art Lowel
4f16f21a7d remove remaining uses of /api in the rest namespace 2020-09-30 17:14:31 +02:00
Tim Donohue
6511920d0c Merge pull request #868 from atmire/google-scholar-fixes
Google scholar fixes
2020-09-30 09:48:17 -05:00
Tim Donohue
b4120f2053 Update Codecov settings
This makes patch checks slightly more lenient, as they are not required.
2020-09-30 09:14:23 -05:00
Raf Ponsaerts
2621454cdb [Task 72956] fixed LGTM issue 2020-09-30 15:26:46 +02:00
Raf Ponsaerts
5615390ce5 [Task 72956] fixed EPerson deletion issues with page not refreshing 2020-09-30 14:46:03 +02:00
Art Lowel
3e191bb56e move info module paths to separate file 2020-09-30 13:53:04 +02:00
Raf Ponsaerts
e12559544b Merge remote-tracking branch 'dspace/main' into w2p-72956_delete-eperson
Conflicts:
	src/app/core/data/feature-authorization/feature-id.ts
2020-09-30 13:06:18 +02:00
jonas-atmire
aa757cfe23 Redirecting to item edit page on the bitstream tab, instead of the item viewing page 2020-09-30 13:04:34 +02:00
Raf Ponsaerts
24c07536b0 [Task 72956] fixing tests 2020-09-30 13:01:12 +02:00
jonas-atmire
5de774842d Merge remote-tracking branch 'community/main' into w2p-72326-Back-link-on-bitstream-edit-page 2020-09-30 12:34:11 +02:00
jonas-atmire
988079caed Merge conflict fixes 2020-09-30 12:34:03 +02:00
Art Lowel
24706f0cc4 remove remaining uses of /api in the rest namespace 2020-09-30 11:15:50 +02:00
Art Lowel
764cfc5d95 add comment to explain rewriteDownloadUrls 2020-09-30 10:44:37 +02:00
Tim Donohue
c67d2e6718 Merge pull request #873 from atmire/w2p-fix-bitstreams-pagination-on-item-page
Fix bug concerning bistream pagination on the item page
2020-09-29 11:51:02 -05:00
Raf Ponsaerts
8a07b3bb2b [Task 72956] fix LGTM issue 2020-09-29 14:20:20 +02:00
Raf Ponsaerts
f6fea087c3 [Task 72956] further development on delete eperson 2020-09-29 14:18:15 +02:00
Samuel
b6ff9369e4 Add statistics pages - move data service and add ds-loading 2020-09-29 14:14:28 +02:00
jonas-atmire
dddf8df2b2 Merge conflict fixes 2020-09-25 11:38:11 +02:00
jonas-atmire
27f8c7da2e Merge remote-tracking branch 'community/main' into w2p-72326-Back-link-on-bitstream-edit-page 2020-09-24 15:30:23 +02:00
Corrado Lombardi
367470a912 cache cleared with parent community reference once a collection or a community is created or deleted 2020-09-24 13:03:29 +02:00
Corrado Lombardi
d9c177b100 added RequestService 2020-09-24 13:02:38 +02:00
Kristof De Langhe
15de3a2eeb Merge branch 'main' into w2p-73014_Metadata-edit-patch-error-fix
Conflicts:
	src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts
2020-09-24 10:16:01 +02:00
Tim Donohue
6e6253c2d8 Merge pull request #860 from atmire/w2p-71894_metadatafields-byFieldName-search-endpoint
Item edit page metadatafields suggestion & validation
2020-09-23 16:31:38 -05:00
Samuel
6ff9429bc0 Add statistics pages - add support for parameters in menu sections and add id params 2020-09-23 23:28:06 +02:00
Tim Donohue
aa84a56c2b Merge pull request #861 from atmire/Cookie-preferences
Cookie consent preferences
2020-09-23 15:14:24 -05:00
Samuel
e7e408dacb Add statistics pages - feedback 2020-09-23 21:57:53 +02:00
Samuel
b7382de29a Add statistics pages 2020-09-23 21:57:52 +02:00
Tim Donohue
1ef3d40904 Merge pull request #822 from atmire/Features-support-part-2
Features support part 2
2020-09-23 14:37:30 -05:00
Tim Donohue
1fba45a08b Customize Codecov settings 2020-09-23 13:31:53 -05:00
lotte
456551fd94 fixed tests 2020-09-23 16:57:08 +02:00
Tim Donohue
a0414e11bc Merge pull request #872 from tdonohue/replace_coveralls_with_codecov
Switch from Coveralls.io to Codecov.io
2020-09-23 08:36:54 -05:00
Raf Ponsaerts
3de2b50d10 [Task 72956] applied feedback to the deletion of epersons 2020-09-23 15:07:38 +02:00
Yana De Pauw
ddc1cbbd73 73249: Fix message and filter issue 2020-09-23 11:36:10 +02:00
Yana De Pauw
cfadb4314e Remove console.log 2020-09-23 10:57:41 +02:00
Yana De Pauw
dfbbd98862 73249: Fix issues with bitstream pagination on item pages. 2020-09-23 10:57:41 +02:00
Tim Donohue
047fbfee1f Switch from Coveralls.io to Codecov.io 2020-09-22 16:19:07 -05:00
Tim Donohue
6960597381 Merge pull request #871 from atmire/fix-express-error-handler
Ensure CSR fallback only happens on actual errors
2020-09-22 12:43:12 -05:00
Kristof De Langhe
124ed4aff2 71764: LGTM Issue fix 2020-09-22 09:14:07 +02:00
Kristof De Langhe
dd7f34e541 Merge branch 'main' into w2p-71764_Features-support-part-2
Conflicts:
	src/app/+collection-page/collection-page-routing.module.ts
	src/app/+community-page/community-page-routing.module.ts
	src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts
	src/app/+item-page/edit-item-page/item-status/item-status.component.ts
	src/app/+item-page/item-page-routing.module.ts
	src/app/app-routing.module.ts
	src/app/core/core.module.ts
	src/app/shared/log-in/log-in.component.html
	src/app/shared/log-in/log-in.component.spec.ts
	src/app/shared/log-in/log-in.component.ts
2020-09-22 08:36:16 +02:00
Art Lowel
5afd4a6930 ensure CSR fallback only happens on actual errors 2020-09-21 18:41:10 +02:00
Raf Ponsaerts
f8dab74b64 [Task 72956] improvement to the spyOn in EPersonFormComponent test 2020-09-21 14:56:29 +02:00
Raf Ponsaerts
2d2fb0210c [Task 72956] removed console logs 2020-09-21 14:29:04 +02:00
Raf Ponsaerts
05f3b7e7c6 [Task 72956] implemented the deletion of EPerson in the EPerson Form and Registry 2020-09-21 14:24:55 +02:00
lotte
9886ba8dc9 fixed linting errors 2020-09-21 09:12:22 +02:00
lotte
8e04dff09d fixed lgtm issues 2020-09-21 09:05:29 +02:00
Art Lowel
9757e6651e fix test 2020-09-18 18:05:37 +02:00
Art Lowel
47edd9b6d8 add docs on configuring rewriteDownloadUrls 2020-09-18 17:46:49 +02:00
lotte
f96549d5c7 added urlcombiner 2020-09-18 17:46:45 +02:00
lotte
9c01c1b3f3 fixed test issues 2020-09-18 17:46:36 +02:00
lotte
1b10ec63d6 fixed google scholar links, todo: fix tests 2020-09-18 17:46:29 +02:00
Tim Donohue
9f396f7120 Merge pull request #862 from atmire/User-agreement
User agreement
2020-09-17 11:17:43 -05:00
Tim Donohue
54e61e00ce Merge pull request #856 from atmire/Hard-redirect-after-log-in
Hard redirect after log in
2020-09-17 08:25:18 -05:00
Kristof De Langhe
11b62daa44 73014: metadata edit - notification on patch error 2020-09-17 14:24:44 +02:00
Kristof De Langhe
4e10db8a53 72541: user-agreement update to patch 2020-09-17 13:13:32 +02:00
Kristof De Langhe
b68fe23310 72699: Additional test fix 2020-09-17 11:40:30 +02:00
Kristof De Langhe
d5927a76fc 72699: Test fix 2020-09-17 10:49:24 +02:00
Kristof De Langhe
b77dce25ce 72699: Shibboleth login redirect fix 2020-09-17 10:44:10 +02:00
Marie Verdonck
ade3bffcb7 71894: prod build permission issue fix 2020-09-17 10:30:23 +02:00
Tim Donohue
4214ddec8c Merge pull request #863 from atmire/SSR-preboot-and-error-handling
Fixes for preboot and SSR error handling
2020-09-16 16:06:58 -05:00
Marie Verdonck
5db42a6da8 71894: also disable save button if invalid input field 2020-09-16 16:33:38 +02:00
Marie Verdonck
75058a735a 71894: confirm edit metadata button disabled if invalid &
removed unneeded service
2020-09-16 14:50:29 +02:00
Kristof De Langhe
8c4f5002f5 73014: Remove sending patch to cache + small refactoring changes 2020-09-16 12:01:43 +02:00
Kristof De Langhe
2e8a78151e 73014: MetadataPatchOperation refactoring + add operation fix 2020-09-15 17:49:30 +02:00
lotte
5e21c5fd26 Merge branch 'Hard-redirect-after-log-in' into w2p-72635_cookie-preferences 2020-09-15 09:42:09 +02:00
lotte
fc35c9fd67 Merge branch 'Hard-redirect-after-log-in' into w2p-72635_cookie-preferences 2020-09-15 09:39:23 +02:00
Kristof De Langhe
e53548a95a 73014: Item metadata patch tests 2020-09-14 16:53:36 +02:00
Kristof De Langhe
eee57f5b41 73014: MetadataPatchOperationService create patch in two steps to fix remove operation issue 2020-09-14 13:34:30 +02:00
Kristof De Langhe
1647c95600 73014: Create patch from object-updates and send immediate patch for item-metadata-edit 2020-09-11 17:34:37 +02:00
Art Lowel
abab73b909 Merge branch 'Hard-redirect-after-log-in' into User-agreement 2020-09-11 16:54:17 +02:00
Art Lowel
7eb88f9fda Merge branch 'main' into Hard-redirect-after-log-in 2020-09-11 16:52:01 +02:00
Tim Donohue
0be3c61eeb Merge pull request #751 from 4Science/authorities_and_controlled_vocabularies
Refactoring authority framework, value pairs and controlled vocabulary [Angular]
2020-09-11 09:42:37 -05:00
Giuseppe Digilio
e7ef068352 Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies 2020-09-11 15:52:58 +02:00
Giuseppe Digilio
c5cb1a2837 [CSTPER-75] Fixed confidence status for linked metadata with authority 2020-09-11 15:38:41 +02:00
Giuseppe Digilio
a178e215f0 Fixed issue with preparing patch operation's value when value has an authority id but is not an instance of VocabularyEntry or FormFieldMetadataValueObject 2020-09-11 15:35:50 +02:00
Giuseppe Digilio
fab0a09727 Fixed issue with adding lookup repeatable fields 2020-09-11 15:33:05 +02:00
Giuseppe Digilio
1e8669a738 Fixed issue with change not detected 2020-09-11 15:30:38 +02:00
Marie Verdonck
1885933f89 Merge remote-tracking branch 'upstream/main' into Support-for-process-output 2020-09-10 17:32:55 +02:00
lotte
a6dd87f78c updated server.ts to latest fixes 2020-09-09 16:08:01 +02:00
lotte
cced7a2914 fixed preboot issues and error handling 2020-09-09 16:07:19 +02:00
lotte
3f4a0d1fd9 removing proboot option from config 2020-09-09 16:07:19 +02:00
Tim Donohue
4b11e1d9cd Merge pull request #857 from 4Science/issue#819
Issue#819
2020-09-08 09:40:09 -05:00
Kristof De Langhe
b82e840935 72541: Removed unused import 2020-09-08 11:16:12 +02:00
Kristof De Langhe
c5e975601a Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement
Conflicts:
	src/app/app-routing.module.ts
2020-09-08 10:17:44 +02:00
lotte
99b84223e2 fixed lgtm error 2020-09-08 09:26:38 +02:00
lotte
d4027cc1d1 debounce for update requests 2020-09-08 09:13:17 +02:00
lotte
90f0597baa bugfix for users without metadata value for cookie 2020-09-08 09:13:17 +02:00
lotte
48ffb2105f added missing typedoc 2020-09-08 09:13:17 +02:00
lotte
d7f6885232 updated consent configuration 2020-09-08 09:13:17 +02:00
lotte
8d29090f24 small fixes 2020-09-08 09:13:17 +02:00
lotte
c19f49fb96 added tests 2020-09-08 09:13:17 +02:00
lotte
19ca179e7a commit before rebase 2020-09-08 09:13:17 +02:00
lotte
f6e8448164 fixed SSR issue, added code for storing the users cookie consents and restoring them 2020-09-08 09:13:17 +02:00
lotte
b3b934033c added klaro exclusion to webpack/tsconfig 2020-09-08 09:13:17 +02:00
lotte
3e1fb243a1 solving SSR issue 2020-09-08 09:13:17 +02:00
lotte
33aeccdd43 72635: Fixed initialize code and started on storageName 2020-09-08 09:13:17 +02:00
lotte
0b3b82b485 finished basic Klaro setup 2020-09-08 09:13:17 +02:00
lotte
472154c0df 72635: Cookie preferences first committ 2020-09-08 09:13:17 +02:00
Kristof De Langhe
de9f642bf9 72541: Fix tests, remove redundant injection and added JSDocs 2020-09-07 12:01:23 +02:00
Kristof De Langhe
f0940aad57 Merge branch 'w2p-72699_Hard-redirect-after-log-in' into Hard-redirect-after-log-in 2020-09-07 10:30:09 +02:00
Kristof De Langhe
4141ae7ad7 72699: JSDocs 2020-09-07 10:27:39 +02:00
Kristof De Langhe
b89c21ec3b Merge branch 'main' into w2p-72699_Hard-redirect-after-log-in
Conflicts:
	src/app/app-routing.module.ts
2020-09-07 10:22:37 +02:00
Giuseppe Digilio
ac86976115 Disabled EPerson language when sending Accept-Language header 2020-09-07 09:27:38 +02:00
Giuseppe Digilio
6feb344aa0 Revert "Fixed issue with LocaleInterceptor that blocked new request"
This reverts commit a76e0796
2020-09-07 09:26:23 +02:00
Giuseppe Digilio
b58defc0f3 Revert "Fixed issue that emits successful remote data twice with undefined payload in the first one"
This reverts commit 99c0f6ce
2020-09-07 09:26:02 +02:00
Kristof De Langhe
18fdf7585e Merge branch 'w2p-72541_User-agreement-and-Privacy-statement' of https://git.atmire.com/contributions/dspace-angular into w2p-72541_User-agreement-and-Privacy-statement 2020-09-04 17:46:11 +02:00
Kristof De Langhe
aa1b568bf4 72541: Redirect through query param at EndUserAgreement 2020-09-04 17:46:05 +02:00
Tim Donohue
dd037459cf Merge pull request #715 from 4Science/DS-4515_submit-external-source
DS-4515: Start new submission via Search or ID Lookup (i.e. submit external source)
2020-09-04 09:49:55 -05:00
Art Lowel
7997100a7e Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement 2020-09-04 14:35:24 +02:00
Art Lowel
5965f4e929 remove circular dependency 2020-09-04 14:32:13 +02:00
Marie Verdonck
1e82943f4a Remove unused imports 2020-09-04 13:04:57 +02:00
Marie Verdonck
dcbb002630 71894: small fix after rebase 2020-09-04 12:52:15 +02:00
Marie Verdonck
810f009582 71894: position dropdown right underneath input 2020-09-04 12:23:31 +02:00
Marie Verdonck
b602a736de 71894: Refactored exact FieldName search for validator after change endpoint 2020-09-04 12:23:31 +02:00
Art Lowel
10b314cf20 fix tests 2020-09-04 12:23:30 +02:00
Marie Verdonck
1f4ae7a035 71894: refactor with new operator metadataFieldsToString instead of schemaResolved 2020-09-04 12:23:30 +02:00
Marie Verdonck
2ebb1640b4 71894: WIP: fix EditInPlace tests 2020-09-04 12:22:24 +02:00
Marie Verdonck
4a0444d669 71894: mdField validation; TODO: fix EditInPlace tests 2020-09-04 12:22:24 +02:00
Marie Verdonck
a6c0a60bd7 71894: Start of mdField validator; todo: show error & some backend changes 2020-09-04 12:22:24 +02:00
Marie Verdonck
77b2506112 71894: MD field suggestions on edit item page 2020-09-04 12:22:24 +02:00
Kristof De Langhe
bd522038a1 72541: Additional tests and fixes 2020-09-03 17:52:52 +02:00
Kristof De Langhe
eda1a34da5 72541: EndUserAgreementCurrentUserGuard and EndUserAgreementCookieGuard 2020-09-03 17:22:38 +02:00
Kristof De Langhe
a0759098ea Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement
Conflicts:
	src/app/+collection-page/collection-page-routing.module.ts
	src/app/+community-page/community-page-routing.module.ts
	src/app/+item-page/item-page-routing.module.ts
	src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts
	src/app/app-routing.module.ts
	src/app/core/shared/operators.ts
2020-09-03 16:06:59 +02:00
Giuseppe Digilio
a76e0796c6 Fixed issue with LocaleInterceptor that blocked new request 2020-09-03 14:46:52 +02:00
Giuseppe Digilio
99c0f6ceaa Fixed issue that emits successful remote data twice with undefined payload in the first one 2020-09-03 14:45:10 +02:00
Kristof De Langhe
59def51ebe 72699: LGTM alert fixes 2020-09-03 13:36:16 +02:00
Kristof De Langhe
5e970bcff2 72699: isAuthBlocking$ rename to isNotAuthBlocking$ 2020-09-03 13:32:13 +02:00
Kristof De Langhe
3d08eb0ae1 Merge branch 'main' into w2p-72699_Hard-redirect-after-log-in
Conflicts:
	src/app/app-routing.module.ts
	src/app/shared/log-in/log-in.component.ts
2020-09-03 13:19:36 +02:00
Art Lowel
e9a2b4b368 made the redirect after logging out blocking as well 2020-09-03 12:58:40 +02:00
Giuseppe Digilio
b8138ee3b9 Fixed lint error 2020-09-03 12:27:55 +02:00
Giuseppe Digilio
b15113ad96 Fixed failed test 2020-09-03 11:36:28 +02:00
Giuseppe Digilio
a504b7cbd3 Fixed issue with form field losing confidence value 2020-09-03 11:18:32 +02:00
Kristof De Langhe
306d6d15c5 Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement
Conflicts:
	src/app/app-routing.module.ts
2020-09-03 10:49:06 +02:00
Giuseppe Digilio
7d22bcc59c Merge remote-tracking branch 'remotes/atmire/fix-entities-issue-pr-751' into authorities_and_controlled_vocabularies 2020-09-03 10:07:34 +02:00
Giuseppe Digilio
94119668dd Fixed merge 2020-09-03 09:57:24 +02:00
Giuseppe Digilio
5ebd4fcbc8 Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/core/integration/models/authority.value.ts
#	src/app/shared/chips/models/chips-item.model.ts
#	src/app/shared/chips/models/chips.model.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts
#	src/app/shared/form/builder/models/form-field-metadata-value.model.ts
2020-09-03 09:36:39 +02:00
Tim Donohue
cd6c5b70c8 Merge pull request #853 from atmire/w2p-72741_upload-section-id
844: Fix file upload to use section ID instead of 'upload'
2020-09-02 15:00:36 -05:00
Marie Verdonck
f82e6fa48b 72403: Process output logs only retrieved at button press + tests 2020-09-02 19:35:35 +02:00
Tim Donohue
16a68dae42 Merge pull request #855 from atmire/Curation-task-email-parameter-removal
Removal of email option for the curation script
2020-09-02 11:14:34 -05:00
jonas-atmire
be79663df9 Removal of email option for the curation script -> See https://github.com/DSpace/DSpace/pull/2926#pullrequestreview-477868288 for full explanation 2020-09-02 14:59:44 +02:00
Kristof De Langhe
17249e9541 72699: Additional fixes for maintaining and clearing the redirect url on login components 2020-09-01 16:22:16 +02:00
Tim Donohue
f4946003e2 Add action to auto-label PRs with merge conflicts 2020-09-01 09:08:25 -05:00
Art Lowel
f167d5a629 fix issue where combining entities and authority control in the same field wouldn't work 2020-09-01 14:25:50 +02:00
Art Lowel
724e5d1f12 add blocking state to make dealing with log in errors more user friendly 2020-09-01 10:10:39 +02:00
Tim Donohue
bc0be9e235 Merge pull request #850 from atmire/remove-cirular-dependencies
Remove circular dependencies
2020-08-31 15:14:06 -05:00
Yana De Pauw
f222cd8b33 72741: Fix file upload to use section ID instead of 'upload' 2020-08-28 17:24:52 +02:00
Tim Donohue
a63bfdf2fd Merge pull request #845 from atmire/w2p-72444_Support-multiple-dsoType-values-in-discovery
Support multiple dso type values in discovery
2020-08-28 09:05:20 -05:00
Tim Donohue
43ae3fc952 Merge pull request #841 from 4Science/ISSUE_840
Hide EPerson search section in the edit mode
2020-08-28 08:48:05 -05:00
Kristof De Langhe
cb3ef1dde4 72541: End-User-Agreement redirect via store 2020-08-28 13:05:02 +02:00
Art Lowel
bbc7844b5d fix lgtm issues 2020-08-28 11:58:43 +02:00
Kristof De Langhe
76b9fd4702 Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement 2020-08-28 11:46:38 +02:00
Kristof De Langhe
61e0b9efb0 72699: Remove redundant subscribe + fix tests 2020-08-28 11:40:22 +02:00
Art Lowel
21e8879f77 remove circular dependencies 2020-08-28 11:34:17 +02:00
Kristof De Langhe
beca98b441 Merge branch 'w2p-72699_Hard-redirect-after-log-in' into w2p-72541_User-agreement-and-Privacy-statement
Conflicts:
	src/app/app-routing.module.ts
	src/app/core/core.module.ts
2020-08-28 10:40:01 +02:00
Kristof De Langhe
32cf92eba9 72541: Spacing between checkbox and buttons 2020-08-28 10:37:55 +02:00
Marie Verdonck
81fc26b844 72444: Statistics search event dsoType single string & small fix 2020-08-27 15:17:02 +02:00
Kristof De Langhe
a3df6ce474 72699: Remove unnecessary method 2020-08-27 14:56:20 +02:00
Kristof De Langhe
55c45f5f6c 72699: Hard redirect after log in - loading fixes 2020-08-27 14:50:13 +02:00
Marie Verdonck
e9d77c4d2c 72444: statistics searchevent.dsoTypes changed until backend changes
& error on export modal dso selector for item removed, only returns comcols, not items now
& test fixes
2020-08-27 14:37:31 +02:00
Marie Verdonck
e89d064934 multiple dsoType allowed in search & in selector modals 2020-08-27 14:37:31 +02:00
Giuseppe Digilio
92207cf66d Added missing TypeDocs 2020-08-27 09:30:38 +02:00
Kristof De Langhe
7fbae8997d 72699: JSDocs and Test cases 2020-08-26 16:32:03 +02:00
Giuseppe Digilio
4080cce8fd Fixed check for Hierarchical Vocabulary 2020-08-26 15:57:34 +02:00
Giuseppe Digilio
ee2f11f602 Fixed template 2020-08-26 15:33:52 +02:00
Giuseppe Digilio
87bed6d288 Fixed check for vocabulary options on DsDynamicListComponent 2020-08-26 15:24:01 +02:00
Giuseppe Digilio
3178e5578c Fixed issue after merge 2020-08-26 14:45:53 +02:00
Giuseppe Digilio
67bd19a340 Fixed template 2020-08-26 14:42:47 +02:00
Giuseppe Digilio
ab190e381d Fixed test 2020-08-26 14:35:23 +02:00
Kristof De Langhe
7367f91176 72699: Hard redirect after log in 2020-08-26 14:20:47 +02:00
Giuseppe Digilio
4b35828bbe Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/shared/shared.module.ts
2020-08-26 13:58:49 +02:00
Giuseppe Digilio
94b4115ecd Removed unintentional fdescribe 2020-08-26 12:53:50 +02:00
Tim Donohue
cc618ebadd Merge pull request #838 from atmire/file-pagination-simple-and-full-item-pages
File pagination simple and full item pages
2020-08-21 16:30:25 -05:00
Luca Giamminonni
547ade276c Hide EPerson search section in the edit mode 2020-08-21 19:01:08 +02:00
Kristof De Langhe
de1e1a70d1 72541: End User Agreement test cases 2020-08-21 16:05:19 +02:00
jonas-atmire
95de75dbf9 Failing test fixing + additional tests for the call that handles the actual navigation routing 2020-08-21 11:28:16 +02:00
Kristof De Langhe
ecf75efe99 72541: Renamed end-user-agreement-guard and -service; Add metadata on registry; privacy statement component 2020-08-21 11:22:02 +02:00
jonas-atmire
11d81d8afc Initial tests added (Still failing) 2020-08-21 09:30:06 +02:00
Kristof De Langhe
d46355e274 72541: Accepting the End User Agreement + UserAgreementService 2020-08-20 17:28:25 +02:00
Tim Donohue
708b5495c7 Merge pull request #825 from atmire/Add-robots-txt
Add robots.txt
2020-08-20 10:18:08 -05:00
Tim Donohue
0fc757ba4d Add link to Code Testing Guide in PR template 2020-08-20 10:09:05 -05:00
Kristof De Langhe
8768645e4a 72541: InfoModule, EndUserAgreementComponent, UserAgreementGuard 2020-08-19 17:47:33 +02:00
Tim Donohue
6b90ac073c Merge pull request #798 from atmire/Export-Import_metadata_CSV
Export/Import metadata CSV
2020-08-19 10:10:03 -05:00
Raf Ponsaerts
1247088df9 Fixed tslint issues 2020-08-17 16:29:57 +02:00
Raf Ponsaerts
a38d365bab Updated message for the collapse bitstreams for the bitstream pagination on simple item pages 2020-08-17 15:18:25 +02:00
Raf Ponsaerts
18fb47c9b6 [Task 72397] applied feedback on the file section and full file section components 2020-08-17 10:14:05 +02:00
Danilo Di Nuzzo
cfd819cd62 Merge branch 'authorities_and_controlled_vocabularies' of https://github.com/4Science/dspace-angular into authorities_and_controlled_vocabularies 2020-08-14 12:56:57 +02:00
ddinuzzo
3f8a670dcf Merge branch 'main' into authorities_and_controlled_vocabularies 2020-08-14 12:53:38 +02:00
Marie Verdonck
02c693363b Unneeded ts-ignore removed 2020-08-13 12:31:42 +02:00
Art Lowel
0a06368340 add a proxy for the sitemaps 2020-08-12 17:31:33 +02:00
Art Lowel
a2fa51cef5 deprecate the use of /api in the rest nameSpace 2020-08-12 14:38:06 +02:00
Danilo Di Nuzzo
66cabcb342 refactory for metadata and collection params 2020-08-12 14:01:29 +02:00
Art Lowel
8f822ba4f7 add robots.txt 2020-08-12 13:20:11 +02:00
Art Lowel
05a92f8e5b refactor webpack config 2020-08-12 13:19:23 +02:00
lotte
82d780b6c2 Fixed PageInfo SSR issue 2020-08-12 11:56:49 +02:00
Raf Ponsaerts
cb7335208f [Task 72397] undo test consoles and fix pagination issue 2020-08-11 13:13:02 +02:00
Raf Ponsaerts
0553f68607 [Task 72397] adding debug consoles and pageSize 2020-08-11 11:58:42 +02:00
Matteo Perelli
25d912b006 Merge with main 2020-08-11 10:01:16 +02:00
Raf Ponsaerts
f6f87a5738 [Task 72397] implemented the bitstream pagination on simple and full item pages 2020-08-07 16:07:33 +02:00
jonas-atmire
e78a1ee63e Routing back to the item page from bitstream edit 2020-08-07 09:51:33 +02:00
Tim Donohue
f1db0c044b Merge pull request #829 from atmire/Put-dynamic-workflowgroup-links-on-Collections-in-an-array
Put dynamic workflowgroup links on Collections in an array
2020-08-06 15:52:23 -05:00
Tim Donohue
9c83cd9b53 Merge pull request #830 from atmire/submission-repeatable-issue
Fix issue with repeatable scrollable dropdowns in the submission
2020-08-06 15:14:45 -05:00
Tim Donohue
4f608eb3cf Merge pull request #724 from 4Science/CST-3091
DS-4514 start a new submission via file
2020-08-06 08:45:50 -05:00
Kristof De Langhe
42978931de Merge branch 'main' into w2p-71764_Features-support-part-2
Conflicts:
	src/app/core/core.module.ts
2020-08-06 13:50:48 +02:00
Samuel
261f79daab Put dynamic workflowgroup links on Collections in an array - fix lgtm warnings 2020-08-05 16:17:27 +02:00
Art Lowel
d560e08b20 only clone for add events 2020-08-05 16:03:51 +02:00
Art Lowel
8bfccaa624 fix issue where adding multiple fields at the same time to an empty dropdown would only add the last field 2020-08-05 15:37:10 +02:00
Art Lowel
c2fd019ebd fix exception when adding a field for a repeatable dropdown 2020-08-05 13:55:26 +02:00
Samuel
a29de15f71 Put dynamic workflowgroup links on Collections in an array 2020-08-05 12:41:11 +02:00
jonas-atmire
82587b5ff8 Move followLink for format to bitstream-page.resolver 2020-08-05 11:14:21 +02:00
jonas-atmire
97ce951bd8 FollowLink addition to bitstream/bundle models 2020-08-05 11:01:56 +02:00
Marie Verdonck
f2a3816430 72403: tab removed process output, message change & redundant switchmap removed 2020-08-04 15:00:08 +02:00
Marie Verdonck
8325a34910 72403: Support for process output on detail page 2020-08-04 14:15:25 +02:00
Danilo Di Nuzzo
6422288207 added TypeDocs on collection selectior component 2020-08-04 11:55:24 +02:00
ddinuzzo
73b5a376b3 Merge branch 'main' into CST-3091 2020-08-04 11:53:35 +02:00
Danilo Di Nuzzo
4a30e5d7d5 fix response for test submission/vocabularies 2020-08-04 09:43:36 +02:00
Danilo Di Nuzzo
9b69aaaa07 added missing unsubscription in onebox component 2020-08-03 16:52:28 +02:00
Marie Verdonck
e06ff5057a lint 2020-08-03 16:26:10 +02:00
Marie Verdonck
4338250d8d abort travis after script fail, to be able to find cause of failure 2020-08-03 16:26:10 +02:00
Marie Verdonck
26905860ba 71712: Test fixes: eventemitter to subject in confirmation modal 2020-08-03 16:26:10 +02:00
Marie Verdonck
3e0f4a54e6 71712: confirmation modal for export + tests &
- request causing error because of issue #756, commented out for now &
- drop event prevention in a HostListener like dragover event
2020-08-03 16:26:10 +02:00
Marie Verdonck
66cdf9dd18 fdescribe removed 2020-08-03 16:25:38 +02:00
Marie Verdonck
e160d46b81 71713: Dropzone without uploader to own component 2020-08-03 16:25:38 +02:00
Marie Verdonck
9e095d09b6 lint fixes 2020-08-03 16:25:38 +02:00
Marie Verdonck
930512efaa 71713: dropzone padding 2020-08-03 16:25:38 +02:00
Marie Verdonck
393bdf0786 71713: restyle dropzone & rewrite antipattern nested subscribes 2020-08-03 16:25:38 +02:00
Marie Verdonck
9ae68fee32 71713: Tests Import metadata CSV page added 2020-08-03 16:25:38 +02:00
Marie Verdonck
2898cbac6d 71713: Import metadata CSV 2020-08-03 16:25:38 +02:00
Marie Verdonck
d295fa422f 71712: Item export no longer redirects & test async fixes 2020-08-03 16:25:09 +02:00
Marie Verdonck
8f28e989a1 71712: Test fixes 2020-08-03 16:25:09 +02:00
Marie Verdonck
311d93efad 71712: Left out the filter for authorized & metadata-export script exists to show export metadata option for now, until #635 is fixed
See https://github.com/DSpace/dspace-angular/issues/635
If uncommented now: in prod mode: button only available after refresh after login; in dev mode: button not available in any way because authorisation request header is not added to script request
2020-08-03 16:25:09 +02:00
Art Lowel
2f946ba2a3 fix issue where the menu wouldn't update if an option was added after the initial render 2020-08-03 16:25:09 +02:00
Marie Verdonck
d2523ade9b 71712: Check script exists with findBy Id & new tests & test fixes 2020-08-03 16:25:09 +02:00
Marie Verdonck
902d4c2330 71712: Export metadata CSV; WIP 2020-08-03 16:25:09 +02:00
ddinuzzo
793698a6d8 Merge branch 'main' into authorities_and_controlled_vocabularies 2020-08-03 11:00:38 +02:00
Tim Donohue
eb9809801f Merge pull request #799 from atmire/w2p-71806_Curation-tasks-UI
Curation Task Admin UI
2020-07-31 14:14:25 -05:00
Giuseppe Digilio
34da1dc055 Removed angular material dependency 2020-07-31 15:18:41 +02:00
Giuseppe Digilio
0582bc5622 Fixed issue when adding repeatable onebox field with vocabulary 2020-07-31 15:17:51 +02:00
Giuseppe Digilio
79db49043f Make metadata and scope properties as optional in the VocabularyOptions 2020-07-31 14:16:20 +02:00
Giuseppe Digilio
2ed144bd1c Fixed wrong links in mock object 2020-07-31 13:37:26 +02:00
Giuseppe Digilio
c9519f44fb Retrieve entries url from vocabulary's link 2020-07-31 13:30:23 +02:00
Giuseppe Digilio
9ced3530ab Added inline comments 2020-07-30 19:13:59 +02:00
Giuseppe Digilio
090fb94c4d Normalized submission section data when retrieving them from item object 2020-07-30 18:50:47 +02:00
Giuseppe Digilio
85506238b3 Fixed issue with form dropdown field which didn't close menu after entry selection 2020-07-30 18:46:17 +02:00
Giuseppe Digilio
1a9d20161c Fixed issue while preparing json patch value in case of array in the JsonPatchOperationsBuilder 2020-07-30 18:43:19 +02:00
Giuseppe Digilio
7dae82cbbd added virtualValue property to FormFieldMetadataValueObject 2020-07-30 18:41:04 +02:00
Giuseppe Digilio
7e7ce7b06e Added check for VocabularyEntry when initializing a controlled vocabulary component's init model 2020-07-30 18:37:45 +02:00
Yana De Pauw
ce5247253c Remove unused imports 2020-07-30 16:01:59 +02:00
Yana De Pauw
90f68eed7e Add check for config properties provided by server 2020-07-30 15:11:42 +02:00
Yana De Pauw
76ad72f536 71806: Use server config for curation tasks 2020-07-30 14:31:59 +02:00
Kristof De Langhe
23354b45c1 71764: Test changes 2020-07-30 11:24:58 +02:00
Kristof De Langhe
adb51bc06c 71764: authorization-data-service remove eperson param unless provided 2020-07-30 11:09:16 +02:00
Tim Donohue
8b639bc7ba Add keyword fixes & reminder to link to REST PR 2020-07-27 10:46:28 -05:00
Giuseppe Digilio
4779dd209e [CST-3092] fix context 2020-07-27 11:15:15 +02:00
Giuseppe Digilio
3f77ffa1e6 [CST-3092] remove margin bottom 2020-07-27 11:14:56 +02:00
Giuseppe Digilio
2529c91868 Merge remote-tracking branch 'remotes/DSpacegithub/main' into DS-4515_submit-external-source 2020-07-27 09:49:33 +02:00
Tim Donohue
1a46031e4d Add comments about syncing with local.cfg
This seems to be a common question of users. Clarifying via comments.
2020-07-24 11:36:52 -05:00
Giuseppe Digilio
a25ab5620f Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies 2020-07-23 11:41:03 +02:00
Giuseppe Digilio
fb1b6c7a7a Changed findEntryDetailByValue method name to a properly findEntryDetailById 2020-07-22 17:49:36 +02:00
Giuseppe Digilio
d88a863a0d fixed issue that didn't allow to select tree node after a search 2020-07-22 17:40:03 +02:00
Giuseppe Digilio
47ab023e7a fixed VocabularyTreeviewComponent selector 2020-07-22 17:03:52 +02:00
Tim Donohue
095d5f3299 Merge pull request #541 from atmire/metadata-and-relationships-combined-in-submission
Combining relationships and metadata during submission
2020-07-22 09:26:55 -05:00
lotte
725481687d added test 2020-07-22 11:34:45 +02:00
Yana De Pauw
3e8ff05d2d 71806: Update messages 2020-07-22 10:49:59 +02:00
Yana De Pauw
2162153ae9 71806: Curation tasks UI 2020-07-22 10:49:59 +02:00
lotte
091ec6c917 added missing typedoc + removed console.logs 2020-07-22 10:27:57 +02:00
Giuseppe Digilio
c8c7e92717 Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/core/core.module.ts
2020-07-21 18:57:47 +02:00
Giuseppe Digilio
cb11e3c702 Merge remote-tracking branch 'remotes/origin/main' into authorities_and_controlled_vocabularies 2020-07-21 18:55:48 +02:00
Giuseppe Digilio
6fecdfadb2 Fixed issue that redirect always to home page after checking authentication on CSR 2020-07-21 18:53:09 +02:00
Tim Donohue
9d3f58770a Merge pull request #717 from atmire/Features-support
Features support
2020-07-21 11:41:49 -05:00
lotte
ee8ad1293f removed remaining unnecessary imports for lgtm 2020-07-17 10:41:52 +02:00
lotte
a68428cc12 Merge branch 'main' into metadata-and-relationships-combined-in-submission 2020-07-17 10:03:39 +02:00
lotte
d467af4a35 lgtm feedback fixes 2020-07-17 10:01:56 +02:00
Tim Donohue
b3e90cbce9 Merge pull request #792 from atmire/X-Forwarded-For-Interceptor
IP Authentication: X-Forwarded-For Interceptor
2020-07-16 17:18:25 -05:00
Tim Donohue
84451b1f6f Merge pull request #758 from atmire/DS-630-Item_delete_broken
DS 630 - item delete broken
2020-07-16 15:17:32 -05:00
Tim Donohue
cf2759f6ca Update and rename .github/workflows/pull_request_opened.yml to .github/disabled-workflows/pull_request_opened.yml 2020-07-16 14:20:15 -05:00
Giuseppe Digilio
607318f6c5 Fix CommunityDataService's topLinkPath 2020-07-16 19:51:32 +02:00
Giuseppe Digilio
5950fb2e32 Merge remote-tracking branch 'remotes/github4science/master' into DS-4515_submit-external-source 2020-07-16 17:25:21 +02:00
Giuseppe Digilio
efb2922bb3 Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/process-page/form/process-form.component.spec.ts
2020-07-16 17:18:20 +02:00
Giuseppe Digilio
c48b817c2d [CST-3092] Changed start message from external source page 2020-07-16 17:02:12 +02:00
Giuseppe Digilio
1c31deb3df [CST-3092] fixed style issue with external source search bar 2020-07-16 17:01:06 +02:00
Giuseppe Digilio
9225819046 [CST-3092] Removed label from New submission and Import buttons 2020-07-16 17:00:14 +02:00
Giuseppe Digilio
57f436e4ff Merge branch 'DS-4515_submit-external-source' of github.com:4Science/dspace-angular into DS-4515_submit-external-source
 Conflicts:
	src/app/submission/import-external/import-external-preview/submission-import-external-preview.component.spec.ts
2020-07-16 14:51:57 +02:00
Giuseppe Digilio
b8abedb5d6 Fixed test 2020-07-16 14:49:03 +02:00
Giuseppe Digilio
dda2668109 Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies 2020-07-16 14:36:37 +02:00
Giuseppe Digilio
c7ef818454 [CST-3088] fix ProcessFormComponent test 2020-07-16 14:35:57 +02:00
Giuseppe Digilio
c33a63aa90 [CST-3088] Removed metadata and collection params when making vocabulary requests 2020-07-16 13:13:24 +02:00
Giuseppe Digilio
a283476403 [CST-3088] Fixed travis failure 2020-07-16 13:08:17 +02:00
Samuel
130a58870e Merge branch 'main' into DS-630-Item_delete_broken 2020-07-16 12:27:28 +02:00
Tim Donohue
a38df3811b Update issue templates 2020-07-15 15:10:53 -05:00
Tim Donohue
7ff250fb0b Merge pull request #795 from DSpace/tdonohue-pr-action
Auto Assign new Pull Requests to "main" branch to the PR creator
2020-07-15 15:05:35 -05:00
Tim Donohue
31e97eec9c Merge pull request #796 from DSpace/tdonohue-issue-action
Automatically add new Issues to "DSpace Backlog" project board
2020-07-15 15:05:13 -05:00
Tim Donohue
2959b73632 Create issue_opened.yml 2020-07-15 14:56:00 -05:00
Tim Donohue
5088da484e Create pull_request_opened.yml 2020-07-15 14:53:44 -05:00
Art Lowel
eeec39bf3f remove debug log 2020-07-15 18:16:45 +02:00
Tim Donohue
8d399fdde8 Initial issue templates
Starting with just a bug report & feature request.
2020-07-14 16:48:15 -05:00
Tim Donohue
23001b6d26 Merge pull request #794 from tdonohue/rename_master_to_main
Replace all references to `master` with `main`
2020-07-14 12:02:52 -05:00
Tim Donohue
47e735270b Rename master to main 2020-07-14 10:44:38 -05:00
Kristof De Langhe
b8a5edd2f3 Merge branch 'main' into w2p-71809_Add-server-side-X-Forwarded-For-interceptor 2020-07-14 17:37:30 +02:00
Kristof De Langhe
522ad4b3dc Merge branch 'main' into w2p-71429_Features-support-part-1
Conflicts:
	src/app/process-page/form/process-form.component.spec.ts
2020-07-14 17:36:20 +02:00
Tim Donohue
0da19b7c75 Merge pull request #793 from atmire/project-rename
Renamed project back to dspace-angular
2020-07-14 10:32:32 -05:00
lotte
1d7a9cd78b removed unused ci script from package.json 2020-07-14 16:39:04 +02:00
lotte
d558a056aa updates to travis scripts to prevent timeout 2020-07-14 16:37:26 +02:00
lotte
1bfc12fe9b added travis_wait to yarn ci command 2020-07-14 16:21:41 +02:00
lotte
08484d31ca renamed project to dspace-angular and fixed broken tests 2020-07-14 15:54:41 +02:00
Kristof De Langhe
3afe8c0b1d 71764: ItemStatusComponent BehaviorSubject for updating operations 2020-07-14 15:13:21 +02:00
Kristof De Langhe
35ca785695 Merge branch 'master' into w2p-71809_Add-server-side-X-Forwarded-For-interceptor
Conflicts:
	src/modules/app/server-app.module.ts
2020-07-14 13:35:11 +02:00
Tim Donohue
e5742c49d9 Merge pull request #760 from tdonohue/update_coveralls
Move coveralls step to "after_success" in Travis CI
2020-07-13 15:39:22 -05:00
Tim Donohue
4648348bd1 Remove deprecated "sudo" key. Add new recommended "os" key 2020-07-13 14:08:47 -05:00
Tim Donohue
e94fbfdcd0 Allow for any version of coveralls compatible with 3.0.0 2020-07-13 12:22:31 -05:00
Tim Donohue
6cd6c096e3 Move coveralls to after_success 2020-07-13 12:22:11 -05:00
Tim Donohue
e053607a17 Merge pull request #714 from 4Science/language-header
Language header
2020-07-13 11:40:09 -05:00
Tim Donohue
b05420ea88 Merge pull request #755 from atmire/reset-scroll-position-on-route-change
Reset scroll position on route change
2020-07-13 11:08:28 -05:00
Kristof De Langhe
0fa1e17078 71809: ForwardClientIpInterceptor 2020-07-13 15:47:59 +02:00
Kristof De Langhe
7f6bd680b2 71764: Test fixes 2020-07-10 14:18:01 +02:00
Kristof De Langhe
7787a2d0e9 71764: SiteRegisterGuard + hide register link when unauthorized 2020-07-10 13:14:55 +02:00
Kristof De Langhe
02fb4a4e4e 71764: Refactor DsoPageAdministratorGuard to more abstract DsoPageFeatureGuard and add implementations for WithdrawItem / ReinstateItem guards 2020-07-10 13:14:55 +02:00
Kristof De Langhe
9a666731e6 71764: Hide withdraw and reinstate button depending on authorization 2020-07-10 13:14:55 +02:00
Kristof De Langhe
73370fa00d 71764: DsoPageAdministratorGuard 2020-07-10 13:14:55 +02:00
Kristof De Langhe
5784493279 71429: Move curation task menu section to admin list 2020-07-10 13:14:43 +02:00
Art Lowel
95163aa226 fix issue due to method signature change after merge 2020-07-09 17:24:00 +02:00
Kristof De Langhe
3560bc60aa 71429: isAuthorized check on feature ID + hide impersonate button when unauthorized 2020-07-09 15:46:14 +02:00
Art Lowel
56d8a99c51 Merge pull request #757 from DSpace/dependabot/npm_and_yarn/npm-registry-fetch-4.0.5
Bump npm-registry-fetch from 4.0.3 to 4.0.5
2020-07-09 15:06:51 +02:00
Samuel
5a1b82d93c fix #630 Item delete broken - repair tests 2020-07-08 13:45:53 +02:00
Samuel
52289d8d23 fix #630 Item delete broken - handle items without entity type 2020-07-08 12:27:51 +02:00
dependabot[bot]
797a640814 Bump npm-registry-fetch from 4.0.3 to 4.0.5
Bumps [npm-registry-fetch](https://github.com/npm/registry-fetch) from 4.0.3 to 4.0.5.
- [Release notes](https://github.com/npm/registry-fetch/releases)
- [Changelog](https://github.com/npm/npm-registry-fetch/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/registry-fetch/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-08 09:00:35 +00:00
Samuel
deabffd429 fix #630 Item delete broken 2020-07-07 14:31:14 +02:00
Art Lowel
a74dafb959 reset scroll position on route change 2020-07-07 09:51:54 +02:00
Danilo Di Nuzzo
d85b0cb1b1 2020-07-06 18:34:03 +02:00
Kristof De Langhe
bfeeb7c13e Merge branch 'master' into w2p-71429_Features-support-part-1
Conflicts:
	src/app/+admin/admin-sidebar/admin-sidebar.component.ts
	src/app/app-routing.module.ts
	src/app/core/core.module.ts
2020-07-06 16:16:17 +02:00
ddinuzzo
5650a4a235 Merge branch 'master' into language-header 2020-07-06 14:46:14 +02:00
Giuseppe Digilio
a38e5cf632 fixed travis failure 2020-07-06 12:30:53 +02:00
Giuseppe Digilio
7c36051fcc fixed travis failure 2020-07-06 11:24:21 +02:00
Giuseppe Digilio
aa265c02a5 [CST-3088] Fixed travis failure 2020-07-06 10:28:23 +02:00
Matteo Perelli
9ec5709410 CI test fix using TestScheduler 2020-07-06 10:28:17 +02:00
Matteo
633dfaaa6d Merge branch 'master' into DS-4515_submit-external-source 2020-07-06 09:16:07 +02:00
Matteo Perelli
d6a5d9d1dd CI test fix, buttons and searchbar style fix and service methods removed 2020-07-06 09:12:18 +02:00
Giuseppe Digilio
58f18737f7 [CST-3088] tried to resolve travis fail 2020-07-03 15:53:29 +02:00
Giuseppe Digilio
2da96aac25 initialized submission object's sections properly on submission submit 2020-07-03 15:43:08 +02:00
Giuseppe Digilio
9015d50f59 Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/core/core.module.ts
#	src/app/shared/shared.module.ts
2020-07-03 09:29:59 +02:00
Art Lowel
bd9a6c487f Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-07-03 09:26:57 +02:00
Tim Donohue
b731301b39 Merge pull request #749 from atmire/Edit-collection-item-template
Edit collection item template
2020-07-02 12:17:05 -05:00
Art Lowel
d6ab8eff45 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-07-02 18:29:10 +02:00
Art Lowel
fe785f6d2f fix issue where create com/col guards would redirect to 404 for the wrong reason 2020-07-02 18:28:30 +02:00
Tim Donohue
0eb7eb6962 Merge pull request #703 from atmire/CC-License-Submission-Step
Cc license submission step
2020-07-02 11:22:33 -05:00
Tim Donohue
3fb4be27df Merge pull request #700 from atmire/Fix-context-sensitive-menus
Fix context sensitive menus
2020-07-02 11:14:43 -05:00
Giuseppe Digilio
2238599a7d [CST-3088] remove duplicated test 2020-07-02 17:57:31 +02:00
Art Lowel
4fa8d02fb2 remove unused imports 2020-07-02 17:32:34 +02:00
Art Lowel
a68dfc1c01 Merge branch 'master' into Fix-context-sensitive-menus 2020-07-02 17:18:20 +02:00
Tim Donohue
a414f04e96 Merge pull request #752 from paulo-graca/patch-3
DSPACE_HOST example fix
2020-07-02 09:53:41 -05:00
Tim Donohue
c2298f6fee Merge pull request #636 from atmire/scripts-processes
Scripts & processes admin UI
2020-07-02 09:46:50 -05:00
Giuseppe Digilio
e46ee579a3 reverted i18n files to master version 2020-07-02 16:33:16 +02:00
Paulo Graça
cece770e8f DSPACE_HOST example fix 2020-07-02 14:54:25 +01:00
ddinuzzo
8c5347ab0f Merge branch 'master' into language-header 2020-07-02 14:51:17 +02:00
Kristof De Langhe
d562b19d57 71429: LGTM fixes 2020-07-02 14:28:35 +02:00
Giuseppe Digilio
599ddf4653 [CST-3088] Renamed browseEntries variable to entries 2020-07-02 14:28:12 +02:00
Kristof De Langhe
ba3c8d2b9e Merge branch 'master' into w2p-71429_Features-support-part-1
Conflicts:
	src/app/core/core.module.ts
	src/app/core/eperson/eperson-data.service.ts
2020-07-02 14:26:19 +02:00
Giuseppe Digilio
3f0ab2cf13 [CST-3088] Fixed lint errors 2020-07-02 14:15:16 +02:00
Giuseppe Digilio
2ad62dd3e9 Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/core/cache/response.models.ts
#	src/app/core/core.module.ts
#	src/app/core/data/request.models.ts
#	src/app/shared/shared.module.ts
2020-07-02 14:07:18 +02:00
Art Lowel
5e191ff4d1 Merge pull request #722 from DSpace/dependabot/npm_and_yarn/websocket-extensions-0.1.4
Bump websocket-extensions from 0.1.3 to 0.1.4
2020-07-02 13:51:20 +02:00
Samuel
531ef1fb1b Merge branch 'master' into CC-License-Submission-Step 2020-07-02 13:48:38 +02:00
Samuel
f655f5d149 CC License Submission Step - fix error when saving submission 2020-07-02 12:54:27 +02:00
Kristof De Langhe
92e47dee07 65272: AoT Build fix + LGTM fixes 2020-07-02 12:32:21 +02:00
Giuseppe Digilio
30d53c5954 [CST-3088] Renamed DsDynamicTypeaheadComponent to DsDynamicOneboxComponent 2020-07-02 12:14:19 +02:00
Matteo Perelli
e36cb83622 Additional fix for CI tests 2020-07-02 11:50:39 +02:00
Giuseppe Digilio
e8237f196f [CST-3088] added test for hierarchical vocabulary 2020-07-02 11:42:30 +02:00
Kristof De Langhe
b77fd69ac7 Merge branch 'master' into w2p-65272_Edit-collection-item-template
Conflicts:
	src/app/core/auth/auth-request.service.ts
	src/app/core/core.module.ts
2020-07-02 11:39:30 +02:00
Kristof De Langhe
e234c3a44d 65272: Fixed lint error 2020-07-02 11:12:16 +02:00
Kristof De Langhe
6d802f5078 65272: Edit item template - breadcrumb + title 2020-07-02 11:07:41 +02:00
Kristof De Langhe
e9993c8e16 65272: Fixed readonly error + test cases 2020-07-02 10:21:02 +02:00
Matteo
4370f197ec Merge branch 'master' into DS-4515_submit-external-source 2020-07-02 09:47:58 +02:00
Giuseppe Digilio
44381d7653 [CST-3088] fixed code 2020-07-01 22:57:26 +02:00
Tim Donohue
2fe9965411 Merge pull request #716 from atmire/Authorization-for-downloads-of-restricted-bitstreams
Authorization for downloads of restricted bitstreams
2020-07-01 15:43:20 -05:00
Art Lowel
7cfa0f17a5 add support for authorized downloads 2020-07-01 19:00:21 +02:00
Art Lowel
df5d55c246 Merge branch 'Authorization-for-downloads-of-restricted-bitstreams' into scripts-processes 2020-07-01 18:51:23 +02:00
Art Lowel
68ecc7ac31 rename token param to authentication-token 2020-07-01 18:42:24 +02:00
Samuel
9bbdf95bee CC License Submission Step - fix error when changing accepted license 2020-07-01 18:28:48 +02:00
Art Lowel
c36877ae3a remove debug log 2020-07-01 18:19:52 +02:00
Art Lowel
2cffdc8a86 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-07-01 16:59:22 +02:00
Tim Donohue
0e1874d269 Merge pull request #707 from atmire/Forgot-Password
Forgot password
2020-07-01 09:49:14 -05:00
Tim Donohue
71ff276079 Merge pull request #687 from atmire/w2p-70504_New-user-registration
New User Registration
2020-07-01 09:48:23 -05:00
Art Lowel
bcd93de708 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-07-01 16:44:38 +02:00
Art Lowel
09f1b7e01f disable fetching and querying all fields 2020-07-01 16:40:16 +02:00
Art Lowel
1d0f0b8304 move schema on metadatafields to an observable remotedata 2020-07-01 16:12:15 +02:00
Giuseppe Digilio
7e80bcf9e9 Merge remote-tracking branch 'remotes/origin/master' into authorities_and_controlled_vocabularies
# Conflicts:
#	src/app/core/cache/response.models.ts
#	src/app/core/core.module.ts
#	src/app/shared/shared.module.ts
2020-07-01 16:04:11 +02:00
Giuseppe Digilio
ca42e2280c [CST-3088] added management of hierarchical vocabulary on typeahead component 2020-07-01 16:00:09 +02:00
Giuseppe Digilio
81f0391400 [CST-3088] Fix lint errors 2020-07-01 15:35:29 +02:00
Giuseppe Digilio
e0604026c5 [CST-3088] Added component to show hierarchical vocabulary as a tree 2020-07-01 15:16:14 +02:00
Giuseppe Digilio
ce61addc9b [CST-3088] Added method to retrieve parent and children for a vocabulary entry 2020-07-01 15:13:52 +02:00
Kristof De Langhe
e0990aeb4b 65272: Test fixes 2020-07-01 14:07:15 +02:00
Kristof De Langhe
71da279d2f 70597: Build fix 2020-07-01 13:09:55 +02:00
Kristof De Langhe
5884308037 Merge branch 'master' into w2p-65272_Edit-collection-item-template
Conflicts:
	src/app/+collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts
	src/app/+item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts
	src/app/+item-page/edit-item-page/edit-item-page.module.ts
	src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts
	src/app/core/core.module.ts
	src/app/core/data/data.service.ts
2020-07-01 11:47:19 +02:00
Kristof De Langhe
9a4f962a21 71504: Remove unused imports 2020-07-01 11:08:22 +02:00
Kristof De Langhe
9f91fd2ad7 Merge branch 'master' into w2p-71504_Authorization-for-downloads-of-restricted-bitstreams
Conflicts:
	src/app/shared/shared.module.ts
2020-07-01 11:05:05 +02:00
Philip Vissenaekens
150d2cbb71 Merge remote-tracking branch 'origin/w2p-70504_New-user-registration' into Forgot-Password 2020-07-01 10:25:03 +02:00
Philip Vissenaekens
d35f2a419e 70504: removed unused import and variables 2020-07-01 10:15:49 +02:00
lotte
5b46ec1570 fixed test issue 2020-06-30 19:06:46 +02:00
Tim Donohue
199d4bf38f Merge pull request #710 from atmire/w2p-70599_Comcol-tree
Community and Collection Tree fixes
2020-06-30 11:09:18 -05:00
Samuel
ea28998bc1 CC License Submission Step - fix tests bis 2020-06-30 17:31:32 +02:00
Danilo Di Nuzzo
722fdc0124 [CST-2877] rm browser lang for SSR reqs 2020-06-30 16:42:58 +02:00
lotte
a8b7035aff fixed issue with validation 2020-06-30 16:02:32 +02:00
lotte
0348d23aac fixed remove parameter bug 2020-06-30 14:28:58 +02:00
lotte
09665dfbe2 solved lint issues, added typedoc, fixed lgtm warnings 2020-06-30 13:44:38 +02:00
lotte
c7994f9d90 Merge branch 'master' into scripts-processes 2020-06-30 13:25:59 +02:00
Giuseppe Digilio
6ef3f685ca Fixed issue with search requests that weren't fetched again after entry cache was expired 2020-06-30 12:42:48 +02:00
Art Lowel
f4387ac212 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-06-30 12:06:56 +02:00
Art Lowel
3e6195a124 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-06-30 11:49:08 +02:00
Marie Verdonck
f992fe1afd Feedback: - set initial loading moved outside of of NgZone 2020-06-30 10:55:54 +02:00
Marie Verdonck
6433e211a8 Feedback processed: - change so state change behaviourSubjects back in NgZone.run 2020-06-30 10:55:54 +02:00
Marie Verdonck
94e3f2d5e0 Feedback processed: - pagesize comcol changed to 50 &
- loadCommunities inside ngZone.runOutsideAngular
- Chevron size small unexpanded and large expanded when logged in fixed
2020-06-30 10:55:54 +02:00
Ben Bosman
53779cf69e remove console logs 2020-06-30 10:55:54 +02:00
Marie Verdonck
1dfe7ec170 70599: Test fixes comcol tree after changes 2020-06-30 10:55:54 +02:00
Samuel
3f39752550 CC License Submission Step - fix tests 2020-06-30 10:53:56 +02:00
Marie Verdonck
b1e44a7fa5 70599: Improvements comcol tree 2020-06-30 10:49:30 +02:00
Samuel
6ef60351a5 Merge branch 'master' into CC-License-Submission-Step 2020-06-30 10:29:43 +02:00
Danilo Di Nuzzo
99a6bf52ff Merge branch 'master' into CST-3091 2020-06-30 10:25:01 +02:00
dependabot[bot]
31eadf9c94 Bump websocket-extensions from 0.1.3 to 0.1.4
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-30 08:20:00 +00:00
Danilo Di Nuzzo
d611761548 Merge branch 'master' into language-header 2020-06-30 10:17:03 +02:00
Yana De Pauw
fc1ffd0e18 Merge remote-tracking branch 'upstream/master' into w2p-70504_New-user-registration 2020-06-30 10:10:29 +02:00
Yana De Pauw
ea16289013 Merge remote-tracking branch 'upstream/master' into Forgot-Password 2020-06-30 09:49:51 +02:00
Giuseppe Digilio
3225966600 [CST-3088] Created abstract form component to handle vocabularies 2020-06-29 22:20:52 +02:00
Giuseppe Digilio
4cc1a3eecd [CST-3088] Refactored VocabularyService to use VocabularyOptions and added more methods 2020-06-29 22:18:10 +02:00
lotte
1cb0bb72e4 added create-from functionality 2020-06-29 22:17:41 +02:00
Giuseppe Digilio
df26b85c50 [CST-3088] Create abstract response parsing for entries 2020-06-29 22:15:02 +02:00
Tim Donohue
bb4aedc472 Merge pull request #723 from atmire/async-code-in-beforeeach
Wait for async code in beforeEach
2020-06-29 11:33:52 -05:00
Art Lowel
066e6cd142 fixed a number of instances in community-list-service.spec.ts where async code was presumed synchronous 2020-06-29 17:42:16 +02:00
Art Lowel
e119967325 fix issue where beforeEach wouldn't wait for dropBitstream to end 2020-06-29 17:24:00 +02:00
Art Lowel
775becd656 fix issue where hints wouldn't show for non-repeatable fields, and remove commented out bits of code 2020-06-29 15:34:18 +02:00
Yana De Pauw
1a0e5f4098 Merge remote-tracking branch 'upstream/master' into Forgot-Password 2020-06-29 11:45:33 +02:00
Yana De Pauw
2863837bf8 Merge remote-tracking branch 'upstream/master' into w2p-70504_New-user-registration 2020-06-29 10:42:16 +02:00
ddinuzzo
746a72392f Merge branch 'master' into language-header 2020-06-29 09:36:54 +02:00
Matteo
bcb1682e1d Merge branch 'master' into DS-4515_submit-external-source 2020-06-29 09:15:53 +02:00
Tim Donohue
5b82a8a07b Merge pull request #709 from atmire/Simplify-bitstream-drag-and-drop
Simplify bitstream drag and drop
2020-06-26 17:13:04 -05:00
Tim Donohue
ca564b2ad1 Merge pull request #708 from 4Science/CST-3090-collection-dropdown
Collection dropdown on MyDSpace & support enable/disable in Submission UI
2020-06-26 10:58:48 -05:00
Samuel
0888d81310 CC License Submission Step - fix lint issues 2020-06-26 17:30:06 +02:00
Samuel
fd59e02786 Merge branch 'master' into CC-License-Submission-Step 2020-06-26 16:59:48 +02:00
Samuel
02ddf7c8c5 CC License Submission Step - implement contract change 2020-06-26 16:58:45 +02:00
Danilo Di Nuzzo
806843640f [CST-3091] fix close dialog and test 2020-06-26 16:15:16 +02:00
Danilo Di Nuzzo
8df505b4a0 Merge branch 'master' into CST-3091 2020-06-26 15:31:39 +02:00
lotte
32c8d9de03 scripts & processes improvements 2020-06-26 15:27:48 +02:00
Danilo Di Nuzzo
0ca1798537 [CST-3091] fix tests and add new labels 2020-06-26 15:25:58 +02:00
lotte
9677e053f5 solved merge issues 2020-06-26 14:27:28 +02:00
Kristof De Langhe
0c56e0182a Merge branch 'master' into w2p-71380_Simplify-bitstream-drag-and-drop 2020-06-26 14:24:22 +02:00
lotte
6ad7cee7d1 Merge branch 'master' into scripts-processes 2020-06-26 14:14:21 +02:00
Matteo Perelli
e094663a77 Additional fix for CI tests 2020-06-26 11:19:44 +02:00
Kristof De Langhe
9c27be085e Merge branch 'master' into w2p-71504_Authorization-for-downloads-of-restricted-bitstreams
Conflicts:
	src/app/core/core.module.ts
2020-06-26 10:03:07 +02:00
Danilo Di Nuzzo
573968adc0 Merge branch 'CST-3090-collection-dropdown' into CST-3091 2020-06-26 09:56:01 +02:00
Danilo Di Nuzzo
5642a2798a [CST-3090] fix unused import alerts 2020-06-26 09:55:01 +02:00
Danilo Di Nuzzo
e6b0c20377 Merge branch 'CST-3090-collection-dropdown' into CST-3091 2020-06-26 09:44:09 +02:00
Danilo Di Nuzzo
f37de548c0 [CST-3090] fix position of word 'here' 2020-06-26 09:37:43 +02:00
Matteo Perelli
97b4b90585 Additional fix for CI tests 2020-06-26 09:29:11 +02:00
Danilo Di Nuzzo
59564eb44d [CST-3091] add comp collection-selector, fix issue 2020-06-26 09:25:22 +02:00
Kristof De Langhe
f24bd9fe36 71380: Reset page size 2020-06-25 17:52:02 +02:00
Kristof De Langhe
bfdd943d45 71380: Remove redundant code and add subscribable removeByHrefSubstring 2020-06-25 17:51:11 +02:00
Tim Donohue
bb705919f3 Merge pull request #697 from atmire/Refactor-registry-service-and-associated-models
Refactor registry service and associated models
2020-06-25 10:37:16 -05:00
Matteo Perelli
9ada61db28 Multiple call to external source service fix 2020-06-25 16:58:43 +02:00
Giuseppe Digilio
f71fd5737a [CST-3088] Removed authority and integration services 2020-06-25 15:22:20 +02:00
Giuseppe Digilio
63cca76b49 [CST-3088] Replace use of AuthorityService with new VocabularyService 2020-06-25 15:21:44 +02:00
Kristof De Langhe
73c25998e3 71380: Fix loading/cache issue with dropping objects on page 2020-06-25 11:09:37 +02:00
Giuseppe Digilio
3117916d5b [CST-3088] Added vocabularyEntryDetails's methods to VocabularyService 2020-06-24 19:00:13 +02:00
Kristof De Langhe
fcdd1a8ef2 71429: Test fix 2020-06-24 16:40:50 +02:00
Kristof De Langhe
882ff3ea18 71429: Test fixes 2020-06-24 16:08:10 +02:00
Matteo Perelli
ba46f243c8 Test fix for CI 2020-06-24 15:38:45 +02:00
Kristof De Langhe
080ddf8a1f 71429: Unauthorized page fixes 2020-06-24 15:05:24 +02:00
Kristof De Langhe
78a5bd5fce 71429: Unauthorized component 2020-06-24 14:22:28 +02:00
Kristof De Langhe
0cef62ff48 71429: Feedback 2020-06-23 2020-06-24 13:05:58 +02:00
Giuseppe Digilio
c7cf11f421 [CST-3088] Improved VocabularyFindOptions 2020-06-24 12:52:16 +02:00
Danilo Di Nuzzo
c3192047e1 [CST-2877] fix tests 2020-06-24 12:32:33 +02:00
Matteo Perelli
c25085b299 Lint errors fixed 2020-06-24 11:52:34 +02:00
Danilo Di Nuzzo
ea5f727449 [CST-2877] fix method for lang list & add reload after change lang 2020-06-24 10:55:13 +02:00
Giuseppe Digilio
74d1e0bccb Fixed issue with spyOn 2020-06-24 10:48:29 +02:00
Giuseppe Digilio
0f4e881717 Merge branch 'DS-4515_submit-external-source' of github.com:4Science/dspace-angular into DS-4515_submit-external-source 2020-06-24 10:32:06 +02:00
Giuseppe Digilio
1f54094d5a Fixed components import 2020-06-24 10:31:54 +02:00
Matteo Perelli
0b858805f2 Merge branch 'master' into DS-4515_submit-external-source 2020-06-24 10:29:28 +02:00
Matteo Perelli
43f5e08530 External source import completed with tests 2020-06-24 10:16:30 +02:00
Giuseppe Digilio
1156bd3934 [CST-3088] Added vocabulary service and models 2020-06-23 18:17:47 +02:00
Giuseppe Digilio
e1b80bcbaf [CST-3088] changed buildHrefFromFindOptions in the way to use search params while building url 2020-06-23 18:12:02 +02:00
Matteo Perelli
c2c650fa1a External import button added 2020-06-22 20:26:04 +02:00
Matteo Perelli
0e29fbc2ba Fixed conflicts after merge 2020-06-22 20:25:22 +02:00
Matteo Perelli
b4ec056d03 Removing file for conflicts 2020-06-22 20:23:54 +02:00
Matteo Perelli
2f04b6ae83 External source items import new files 2020-06-22 19:59:29 +02:00
Matteo Perelli
e7ef9dab20 External source items import code completed 2020-06-22 19:59:10 +02:00
Danilo Di Nuzzo
d66d5b6a46 [CST-2877] done (angular) 2020-06-22 17:54:37 +02:00
Art Lowel
a49607ed61 restore property that was accidentally removed during merge 2020-06-22 16:46:11 +02:00
Kristof De Langhe
24858fceab 71504: Shortlived tokens + file-download-link test cases 2020-06-22 13:44:16 +02:00
Art Lowel
a281583f6e fix test and lint issues after merge 2020-06-22 12:26:30 +02:00
Art Lowel
05b2489da5 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-06-22 11:50:44 +02:00
Kristof De Langhe
b578aa408b 71504: FileDownloadLinkComponent 2020-06-22 11:40:39 +02:00
Kristof De Langhe
bbaaaed4b5 71504: short-lived token for downloading files through FileService 2020-06-19 17:26:11 +02:00
Kristof De Langhe
72381f4083 71429: Feature and Authorization tests 2020-06-19 15:55:25 +02:00
Giuseppe Digilio
2653980beb Merge remote-tracking branch 'remotes/origin/master' into language-header 2020-06-19 11:19:31 +02:00
Kristof De Langhe
4c1b589158 70834: Use data-service's responseMsToLive for searchBy 2020-06-19 11:09:02 +02:00
Tim Donohue
5cef15eb20 Merge pull request #701 from atmire/Misc-edit-community-and-collection-bugs
Misc edit community and collection fixes
2020-06-18 15:13:40 -05:00
Giuseppe Digilio
63cff331d2 Fixed scrollable dropdown 2020-06-18 19:01:34 +02:00
Kristof De Langhe
89afaaa4a5 71429: Abstract FeatureAuthorizationGuard + small fix 2020-06-18 17:39:11 +02:00
Kristof De Langhe
bbbeddc875 71429: SiteAdministratorGuard on admin routes + authorization check on visibility of admin sidebar sections 2020-06-18 17:13:37 +02:00
Matteo Perelli
fb40b8f031 Submission from an external source initial commit 2020-06-18 16:16:31 +02:00
Danilo Di Nuzzo
f841e45019 [CST-3090] fix tests 2020-06-18 15:38:03 +02:00
Samuel
e963aa9af0 CC License Submission Step - feedback 2020-06-18 15:20:55 +02:00
Kristof De Langhe
8350833b61 71429: FeatureType enum and searchBy override 2020-06-18 14:47:59 +02:00
Samuel
0721b844f5 Misc edit community and collection bugs - repair create top level community 2020-06-18 12:25:50 +02:00
Kristof De Langhe
28891211e4 71380: Reset page size 2020-06-18 12:13:32 +02:00
Kristof De Langhe
82a3014af4 71380: drag-and-drop-list customOrder to avoid elements hopping back after drop + freeze fix 2020-06-18 12:11:20 +02:00
Danilo Di Nuzzo
709726e041 [CST-3105] tests 2020-06-18 12:00:30 +02:00
Danilo Di Nuzzo
136e36afab [CST-3105] done 2020-06-18 11:30:45 +02:00
Samuel
baec130cf3 Merge branch 'master' into Misc-edit-community-and-collection-bugs 2020-06-18 11:15:59 +02:00
Danilo Di Nuzzo
f33f391eb3 [CTS-3090] - fix pagination 2020-06-18 10:23:56 +02:00
Kristof De Langhe
ec998fce30 71429: isAuthenticated and canImpersonate$ 2020-06-18 10:04:18 +02:00
Danilo Di Nuzzo
be2d496335 [CTS-3090] update imports 2020-06-17 17:02:27 +02:00
Danilo Di Nuzzo
3b581b93c5 [CST-3090] fix 2020-06-17 16:31:11 +02:00
Kristof De Langhe
39e0c03593 71429: Feature and Authentication Models and Services 2020-06-17 16:27:25 +02:00
Kristof De Langhe
94cd5b5767 Merge branch 'master' into w2p-68067_Fix-context-sensitive-menus 2020-06-17 13:32:49 +02:00
Kristof De Langhe
752cf97787 71380: Fix tests 2020-06-17 13:12:49 +02:00
Danilo Di Nuzzo
294f5e5f31 [CST-3090] fix services name and dropdown 2020-06-17 10:47:46 +02:00
Giuseppe Digilio
efc476ab31 remove unused disabled$ variable 2020-06-16 17:46:24 +02:00
Yana De Pauw
f5959e9857 Merge remote-tracking branch 'upstream/master' into Forgot-Password 2020-06-16 15:58:59 +02:00
Yana De Pauw
e277a72ebf 71304: Fix spec descriptions 2020-06-16 15:58:19 +02:00
Danilo Di Nuzzo
5f0f665501 [CTS-3090] - fix 2020-06-16 15:51:56 +02:00
Danilo Di Nuzzo
be16134329 Merge branch 'master' into CST-3090-collection-dropdown 2020-06-16 15:18:50 +02:00
Danilo Di Nuzzo
9e05072290 [CST-3090] done 2020-06-16 14:26:59 +02:00
Kristof De Langhe
c6ee46fdea 71380: Reset page size back to normal 2020-06-15 17:57:25 +02:00
Kristof De Langhe
16d3d0e063 71380: Remove object updates for drag-and-drop and send out immediate patch requests for bitstream drag-and-drop 2020-06-15 17:48:03 +02:00
Yana De Pauw
6f9f4ec968 71304: Implement Forgot password components 2020-06-15 11:59:25 +02:00
Samuel
b8ab83ce99 Misc edit community and collection bugs - repair test 2020-06-12 13:58:22 +02:00
Samuel
7421eef223 Misc edit community and collection bugs 2020-06-12 09:54:13 +02:00
Samuel
470c21d8d8 Merge branch 'master' into CC-License-Submission-Step 2020-06-12 09:04:29 +02:00
Samuel
3db47f5791 CC License Submission Step 2 - Storing the results - add SubmissionCcLicenceUrl model 2020-06-12 09:04:00 +02:00
Tim Donohue
8b8d7ba91a Merge pull request #702 from 4Science/CSR-auth-guard-issue
Fixed authentication issue with protected page on CSR
2020-06-11 11:12:37 -05:00
Kristof De Langhe
ee9f5ec7f1 70834: MetadataField search responseMsToLive fix 2020-06-11 15:48:26 +02:00
Giuseppe Digilio
c835d9b9c7 fixed test description 2020-06-11 14:44:42 +02:00
Giuseppe Digilio
6bd04c94ec store token on AUTHENTICATED_SUCCESS action 2020-06-11 14:15:19 +02:00
Samuel
6c1e636f5c fix tests 2020-06-11 13:49:48 +02:00
Art Lowel
405815ac5a fix test 2020-06-11 13:49:48 +02:00
Art Lowel
d27034d634 fix issue where the current collection or community would no longer be selected in the new and edit menus 2020-06-11 13:49:48 +02:00
Kristof De Langhe
9a4fc65331 68067: Fix instance field declaration 2020-06-11 10:50:39 +02:00
Tim Donohue
ea26597b6a Merge pull request #689 from atmire/polyfill-error-fix
fix issue with polyfill order in safari and firefox
2020-06-10 14:20:57 -05:00
Tim Donohue
31b6bfc332 Merge pull request #698 from atmire/FileSizePipe-refactor
FileSizePipe refactor
2020-06-10 13:20:06 -05:00
Yana De Pauw
035a4b6e16 Merge remote-tracking branch 'upstream/master' into Forgot-Password 2020-06-10 17:05:37 +02:00
Kristof De Langhe
9f64fedc7b Merge branch 'master' into w2p-68067_Fix-context-sensitive-menus 2020-06-10 13:10:21 +02:00
Kristof De Langhe
ce04825c4a 71174: FileSizePipe 'jedec' standard 2020-06-10 10:32:58 +02:00
Yana De Pauw
ca7a76b80f Implement community feedback
Remove other registration references
Enabled enter submit in registration form
Fixed create-profile password validation to be on debounce
Fixed register page title
2020-06-10 10:15:06 +02:00
Kristof De Langhe
a51a683215 71174: Breadcrumb test fix 2020-06-04 16:30:16 +02:00
Kristof De Langhe
44386823a3 Merge branch 'master' into w2p-70834_Refactor-registry-service-and-associated-models
Conflicts:
	src/app/core/data/data.service.ts
2020-06-04 16:28:56 +02:00
Kristof De Langhe
b79a3d37f3 Merge remote-tracking branch 'dspace/master' into w2p-71174_FileSizePipe-refactor 2020-06-03 10:56:09 +02:00
Kristof De Langhe
f8f0e5f149 71174: FileSizePipe using filesize.js 2020-06-03 10:54:29 +02:00
Art Lowel
bcb77c8dcc remove comment about zone polyfill 2020-06-02 09:21:49 +02:00
Art Lowel
697be3c610 fix issue with polyfill order in safari and firefox 2020-06-02 09:21:49 +02:00
Tim Donohue
9b7a33cc69 Merge pull request #692 from atmire/fix-minimist-vulnerability
Fix minimist vulnerability
2020-06-01 15:25:17 -05:00
Tim Donohue
3ece498b81 Merge pull request #693 from tdonohue/fix_references_to_environment_js
Fix all outdated references to environment.*.js.
2020-06-01 12:59:48 -05:00
Tim Donohue
b1d39feeda Fix compilation bug in environment.dev.ts used by Docker. Add comments 2020-06-01 11:38:29 -05:00
Bram Luyten
ba9996a3b0 Merge pull request #683 from reetagithub/finnish-msg-keys
Add Finnish translations (first set after master rebase)
2020-05-31 14:48:21 +02:00
Bram Luyten
fcb610412d Activating Finnish in environment.common.ts 2020-05-30 18:15:00 +02:00
Tim Donohue
23e8c8b449 Fix all outdated references to environment.*.js. Fix bug in Docker compose too 2020-05-29 16:52:54 -05:00
Tim Donohue
c423b474ab Merge pull request #691 from atmire/w2p-71201_Angular-UI-does-not-properly-logout-when-clicking-logout
Angular UI does not properly log out when clicking logout
2020-05-29 14:42:18 -05:00
Art Lowel
7b4a481f43 update mkdirp and add resolution for minimist 2020-05-29 17:59:13 +02:00
Art Lowel
ce6b259a3a update karma 2020-05-29 17:35:06 +02:00
Art Lowel
db5ade547d update protractor 2020-05-29 17:28:50 +02:00
Art Lowel
2fbf3afd4a replace deprecated postcss-smart-import with postcss-import 2020-05-29 17:22:34 +02:00
Tim Donohue
45247ff07c Merge pull request #645 from 4Science/#601-resource-policies
#601 resource policies
2020-05-29 10:03:10 -05:00
Art Lowel
d869c6282a Merge pull request #660 from DSpace/dependabot/npm_and_yarn/acorn-6.4.1
Bump acorn from 6.4.0 to 6.4.1
2020-05-29 16:56:12 +02:00
dependabot[bot]
d9749c80c4 Bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-05-29 13:46:12 +00:00
Tim Donohue
acd6e6079e Merge pull request #677 from atmire/w2p-70901_ui-environment-vars
Fixed issue with environment UI variables being ignored
2020-05-28 10:57:40 -05:00
Tim Donohue
4ae2977ef2 Merge pull request #682 from 4Science/authentication_issue_CSR
Authentication issue csr
2020-05-28 10:54:22 -05:00
Tim Donohue
56ee4bbaa0 Merge pull request #675 from atmire/w2p-70905_Breadcrumb-update-issue
Fix delay in breadcrumb rendering
2020-05-28 10:49:05 -05:00
Yana De Pauw
1295e127fd 71201: Add test 2020-05-28 15:25:48 +02:00
Yana De Pauw
d24c51e1cd 71201: #678 Angular UI does not properly logout when clicking logout 2020-05-28 14:30:56 +02:00
Giuseppe Digilio
7227d5eefd Remove cached search request after result was retrieved 2020-05-28 11:47:26 +02:00
Giuseppe Digilio
f0bf87b7f9 Show edit group button only when resource policy has permissions on group 2020-05-28 11:39:42 +02:00
Yana De Pauw
36acb7578f Fix to breadcrumb related injector issues on edit pages 2020-05-28 10:50:49 +02:00
Yana De Pauw
d483d46370 70905: Breadcrumb update issue 2020-05-28 10:50:49 +02:00
Yana De Pauw
8fc2309d48 Fix rebase issues 2020-05-28 10:34:03 +02:00
Yana De Pauw
bca1e8bdd4 70504: Implement feedback 2020-05-28 09:43:47 +02:00
Yana De Pauw
96d76073ef 70504: fix compile issue 2020-05-28 09:41:16 +02:00
Yana De Pauw
f136ea7d4f 70504: New user registration 2020-05-28 09:41:16 +02:00
Giuseppe Digilio
5421d97bc5 Merge remote-tracking branch 'remotes/origin/master' into authentication_issue_CSR 2020-05-28 09:23:22 +02:00
Giuseppe Digilio
a57d5d7c4f Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies 2020-05-28 09:22:11 +02:00
lotte
a9cb6aeaa6 added doc to scripts 2020-05-28 09:15:02 +02:00
lotte
f881c2f428 fixed SSR issues 2020-05-28 09:15:01 +02:00
lotte
e7043f8734 changes to server.ts 2020-05-28 09:15:01 +02:00
lotte
e4a83f0704 fixed ui environment vars issue 2020-05-28 09:15:01 +02:00
Tim Donohue
780b8b7db9 Merge pull request #690 from tdonohue/fix_travis_e2e
Quick fix to Travis e2e testing issues (running against a Docker backend)
2020-05-27 17:00:16 -05:00
Tim Donohue
92b1a4477d Fix Docker local.cfg by correcting UI port to 4000 2020-05-27 15:54:33 -05:00
Kristof De Langhe
7b64d6bc31 68067: JSDocs + menu-effects tests 2020-05-26 14:08:54 +02:00
Kristof De Langhe
0b67bd54fb 68067: Refactoring menu-component resolving route menu data to menu effects 2020-05-26 11:54:33 +02:00
Reeta Kuuskoski
5f6fdf00ec Add Finnish translations (first set after master rebase) 2020-05-25 12:56:34 +03:00
Giuseppe Digilio
460e20284e fixed test 2020-05-22 16:50:48 +02:00
Giuseppe Digilio
b61490341e Added missing class in the authentication form to apply style properly 2020-05-22 16:50:06 +02:00
Giuseppe Digilio
4a65051641 Fixed issue with authentication when SSR is disabled 2020-05-22 16:48:51 +02:00
Giuseppe Digilio
1dde3087ff Fixed failed test 2020-05-22 11:36:02 +02:00
Giuseppe Digilio
c5bf8f6267 Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies
# Conflicts:
#	src/app/shared/shared.module.ts
2020-05-21 19:35:35 +02:00
Tim Donohue
5c7cd4a27d Merge pull request #653 from atmire/Login-as-EPerson
Login as EPerson
2020-05-21 10:10:04 -05:00
Giuseppe Digilio
b41acfdb33 Moved resource policy's group edit link 2020-05-21 12:21:08 +02:00
Giuseppe Digilio
8ef77df651 Fixed issue with resource policies list that was not updated after a delete 2020-05-21 12:19:24 +02:00
Giuseppe Digilio
51620df76c Fixed issue with item edit page 2020-05-21 12:18:17 +02:00
Giuseppe Digilio
09ee329f17 Fixed failed test 2020-05-21 12:17:37 +02:00
Giuseppe Digilio
e1716751d4 Fixed build error 2020-05-20 18:10:17 +02:00
Giuseppe Digilio
b70f8e12f6 Fixed merge with master 2020-05-20 17:05:54 +02:00
Giuseppe Digilio
b5d92590ee Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies
# Conflicts:
#	src/app/core/eperson/eperson-data.service.spec.ts
#	src/app/core/eperson/group-data.service.spec.ts
#	src/app/shared/shared.module.ts
#	src/app/submission/sections/upload/section-upload.component.spec.ts
2020-05-20 15:37:33 +02:00
Kristof De Langhe
49bb61b2ae 70834: Registry breadcrumbs 2020-05-20 13:59:00 +02:00
Samuel
18007048a3 CC License Submission Step 2 - Storing the results - feedback 2020-05-20 13:55:42 +02:00
Kristof De Langhe
59205b174f 70834: refactor createOrUpdate methods to use existing data-service methods 2020-05-20 12:30:17 +02:00
Kristof De Langhe
79eecc7c76 68067: Route menu data - menu ID 2020-05-19 17:34:56 +02:00
Kristof De Langhe
8761d0ac27 68067: Add unsubscribes on open subscriptions in menu component 2020-05-19 16:46:58 +02:00
Kristof De Langhe
6d88381ead 68067: Route data menu sections - tests 2020-05-19 16:35:36 +02:00
Samuel
1071506133 CC License Submission Step 2 - Storing the results 2020-05-19 16:02:05 +02:00
Samuel
e802185657 CC License Submission Step - fix tests 2020-05-19 16:02:05 +02:00
Samuel
245cb45503 CC License Submission Step 2020-05-19 16:02:05 +02:00
Kristof De Langhe
ff0750d053 68067: Add menu sections through route data 2020-05-19 14:37:17 +02:00
Kristof De Langhe
172d0d986b 68067: JSON.stringify to compare menu section changes 2020-05-19 12:08:59 +02:00
Kristof De Langhe
8b78ed3a97 68067: Fix adding/removing menu sections 2020-05-19 11:11:07 +02:00
Kristof De Langhe
ad26ececbf Merge branch 'master' into Login-as-EPerson
Conflicts:
	src/app/shared/shared.module.ts
2020-05-19 10:01:10 +02:00
Tim Donohue
b28f59f087 Merge pull request #676 from bram-atmire/sync-i18n-fix
Ensuring environment.ts is present before sync-i18n-files invocation
2020-05-18 10:21:51 -05:00
Bram Luyten
03f910b45d Ensuring environment.ts is present before sync-i18n-files invocation 2020-05-18 15:52:16 +02:00
Tim Donohue
64478870c0 Merge pull request #650 from atmire/w2p-70136_workflow-search-ui
Administer Workflow
2020-05-14 10:22:59 -05:00
Kristof De Langhe
ad8f31d44a 70834: Test fixes + data service tests 2020-05-14 11:29:35 +02:00
Kristof De Langhe
e42785a7a4 70834: MetadataSchemaComponent test fix 2020-05-13 17:42:38 +02:00
Kristof De Langhe
0e9d624519 70834: RegistryService test fixes 2020-05-13 17:32:12 +02:00
Kristof De Langhe
c97e3e0515 70834: Metadata schema component refactoring and caching issue fix #2 2020-05-13 16:49:39 +02:00
Kristof De Langhe
cd46f33909 70834: Metadata schema component refactoring and caching issue fix 2020-05-13 13:56:42 +02:00
lotte
1afa906b21 fixed issue with test import 2020-05-12 18:37:28 +02:00
Kristof De Langhe
3894b3615d 70373: Test import fix 2020-05-12 17:20:02 +02:00
lotte
aa9570c776 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-05-12 17:19:08 +02:00
lotte
03668e347e added missing typedoc 2020-05-12 17:03:48 +02:00
Kristof De Langhe
f548d5bf20 Merge branch 'master' into Login-as-EPerson
Conflicts:
	src/app/+admin/admin-access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts
	src/app/core/auth/auth.service.spec.ts
	src/app/profile-page/profile-page.component.spec.ts
2020-05-12 16:54:40 +02:00
Kristof De Langhe
7677a673aa 70834: Intermediate commit 2020-05-12 16:36:03 +02:00
lotte
7ced70b7d3 fixed issues with tests 2020-05-12 16:33:42 +02:00
Kristof De Langhe
101f1a76dd 70834: Refactoring registry-service pt1 - removing response-parsing services and using data-services 2020-05-12 14:54:10 +02:00
Giuseppe Digilio
889a91ba52 Fixed merge 2020-05-11 20:28:31 +02:00
Giuseppe Digilio
bdc0304d5a Merge remote-tracking branch 'remotes/origin/master' into language-header
# Conflicts:
#	src/app/app.component.spec.ts
#	src/app/app.component.ts
#	src/app/shared/lang-switch/lang-switch.component.spec.ts
#	src/app/shared/lang-switch/lang-switch.component.ts
2020-05-11 20:09:39 +02:00
Tim Donohue
33be8a4a91 Merge pull request #663 from atmire/resolve-tsconfig-errors-in-spec-files
[Quickfix] Fix IDE issues with spec files
2020-05-11 09:23:07 -05:00
lotte
a58d6da8e0 added jasmine to root tsconfig.json 2020-05-11 15:05:02 +02:00
lotte
6220c51aa6 fixed tests 2020-05-11 13:28:02 +02:00
Kristof De Langhe
67b73ff921 70597: Test fixes 2020-05-11 13:21:01 +02:00
lotte
e8f418b077 Merge branch 'master' into w2p-70136_workflow-search-ui 2020-05-11 11:58:31 +02:00
lotte
a561f37b00 fixed missing comma 2020-05-11 11:29:29 +02:00
lotte
4f7afc578f Merge branch 'master' into scripts-processes 2020-05-11 11:28:52 +02:00
Art Lowel
bb0f28c9c4 Merge pull request #661 from atmire/fix-prod-server-port
Hotfix: use the server port from the environment file
2020-05-08 13:15:19 +02:00
Art Lowel
4580f1b18a use the server port from the environment file 2020-05-08 12:40:31 +02:00
Art Lowel
4fe2c75810 Merge pull request #625 from atmire/angular-cli
Switch to Angular CLI
2020-05-08 09:16:38 +02:00
lotte
b249a91aaa Merge branch 'master' into angular-cli 2020-05-07 16:11:38 +02:00
Kristof De Langhe
f5f4570116 65272: Allow relationship fields to be edited 2020-05-04 17:57:08 +02:00
Kristof De Langhe
b5e1394fce 65272: Post-merge fixes 2020-05-04 17:38:31 +02:00
Kristof De Langhe
07c8c593ec Merge branch 'master' into w2p-65272_Edit-collection-item-template
Conflicts:
	src/app/+collection-page/collection-page-routing.module.ts
	src/app/+item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts
	src/app/+item-page/edit-item-page/edit-item-page.module.ts
	src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts
	src/app/core/cache/server-sync-buffer.effects.ts
	src/app/core/core.module.ts
	src/app/core/data/data.service.ts
	src/app/core/data/dso-change-analyzer.service.ts
	src/app/core/data/object-updates/object-updates.service.ts
2020-05-04 16:36:46 +02:00
Bram Luyten
519046e769 i18n correction English catalog 2020-05-04 15:09:46 +02:00
Bram Luyten
3b30af3e4d i18n correcting two errors in English main catalog 2020-05-04 13:33:55 +02:00
Giuseppe Digilio
bacb778fa7 Fixed resource policy page buttons 2020-04-30 17:25:00 +02:00
Giuseppe Digilio
b338332d13 Added possibility to search for eperson or group while adding a new resource policy 2020-04-30 15:43:52 +02:00
lotte
84d9e4b063 removed debugger; line 2020-04-30 12:35:25 +02:00
lotte
4c48088920 fixed test issues and watch mode for unit tests 2020-04-30 12:13:41 +02:00
Art Lowel
f3ecd3837e fix issue where mydspace would throw an error while loading 2020-04-29 18:07:52 +02:00
lotte
ef91468310 fixed set-env.ts, reverted unnecessary e2e changes, updated travis.yml 2020-04-29 16:28:26 +02:00
Art Lowel
db169826d5 fix issue where the entered value couldn't be used as a query in the entity lookup for oneboxes 2020-04-29 15:18:56 +02:00
Art Lowel
766015d64c use unique list ids for each submission 2020-04-29 15:00:57 +02:00
Art Lowel
2a6e0c796a fix tests 2020-04-29 14:12:45 +02:00
Art Lowel
c87d0895b0 filter out move operations where source and target are the same 2020-04-28 17:52:01 +02:00
Art Lowel
afe394e2a4 Merge branch 'master' into w2p-70237_entities-orgunit-submission-fix 2020-04-28 17:45:29 +02:00
Art Lowel
673926c36b fix tests and lint issues 2020-04-28 16:35:51 +02:00
Art Lowel
df2cc22172 remove clearStateMetaReducer 2020-04-24 14:06:37 +02:00
Art Lowel
c2789dfbf7 fix issue where a hard refresh wouldn't work to clear the state due to the browser caching the html 2020-04-24 13:16:52 +02:00
Giuseppe Digilio
8635209959 Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies 2020-04-23 17:05:38 +02:00
lotte
7ec7d3a455 reinstated other tests 2020-04-23 14:30:46 +02:00
lotte
0f43ff4fea switched back to port 4000 2020-04-23 14:17:05 +02:00
lotte
f1d1761fd7 sync i18n script 2020-04-23 14:14:29 +02:00
Art Lowel
e4c4a1ecd4 remove debug log 2020-04-23 13:17:13 +02:00
Art Lowel
facd2284d2 fix issue where related entites would be rendered as metadata for one box fields 2020-04-23 13:16:43 +02:00
Art Lowel
adc7649820 fix an issue where a relationship in the submission would keep loading until you click the page 2020-04-22 18:17:08 +02:00
Art Lowel
056bac885d don't show the plus button for repeatable relationship only fields 2020-04-22 18:10:29 +02:00
Art Lowel
3aefa690b9 fix issue where the disabled field would be rendered for each selected relationship 2020-04-22 18:07:20 +02:00
lotte
ce9fed7507 fixing e2e:ci 2020-04-22 16:28:17 +02:00
lotte
51dd1b1b2b changing timeout 2020-04-22 16:07:22 +02:00
Art Lowel
ecf4b165b1 Merge branch 'metadata-and-relationships-combined-in-submission' into w2p-70237_entities-orgunit-submission-fix 2020-04-22 15:51:42 +02:00
lotte
2caf88bebe reset env variables 2020-04-22 15:30:45 +02:00
lotte
2e367cb87c testing e2e on travis 2020-04-22 15:29:52 +02:00
Art Lowel
dd7fc2aa6f fix issue where editing template rows caused invald patch requests 2020-04-22 15:13:12 +02:00
lotte
1465cfca37 Merge branch 'metadata-and-relationships-combined-in-submission' into w2p-70237_entities-orgunit-submission-fix 2020-04-22 11:45:00 +02:00
Art Lowel
53fd559a7c fix issues with deleting of reorderable array items 2020-04-22 09:49:32 +02:00
lotte
2a353efa5f updated environment file 2020-04-22 07:44:29 +02:00
lotte
6196a99a98 fixed tests 2020-04-21 18:41:38 +02:00
lotte
ad4b7fa254 test travis with external rest 2020-04-21 16:39:51 +02:00
lotte
42740809c0 changed tasks into wfi's 2020-04-21 16:27:26 +02:00
lotte
172d3891f0 switched port to test with Travis 2020-04-21 15:16:42 +02:00
lotte
cad9dcaf98 Merge branch 'master' into angular-cli 2020-04-21 13:45:55 +02:00
lotte
267db6ddce updated dockers files 2020-04-21 13:41:30 +02:00
Giuseppe Digilio
616a5fe0bd Added LocaleInterceptor to set Accept-Language header 2020-04-20 20:07:24 +02:00
Giuseppe Digilio
145b26d262 Added LocaleService as localization handler 2020-04-20 20:06:50 +02:00
lotte
c4d02ff67d fixed import 2020-04-17 16:43:01 +02:00
lotte
37e4e63f81 fixed compilation issue with abstract component 2020-04-17 16:26:26 +02:00
lotte
bbac79bdfc fixes after merge 2020-04-17 16:09:26 +02:00
lotte
92dca8d4e8 Merge branch 'master' into angular-cli 2020-04-17 16:09:12 +02:00
lotte
5aa09eb363 fixed compilation issues 2020-04-17 13:13:04 +02:00
Art Lowel
19bd36a80f switch to patch for reorderin 2020-04-17 11:24:10 +02:00
lotte
450bfe6b3f Merge branch 'metadata-and-relationships-combined-in-submission' into w2p-70237_entities-orgunit-submission-fix 2020-04-17 11:09:03 +02:00
lotte
b29161988d fixed broken tests 2020-04-17 11:06:02 +02:00
Giuseppe Digilio
c03146e415 Fixed resource policy's group edit link 2020-04-16 17:12:20 +02:00
Kristof De Langhe
a6d7b6444c 70373: Remove unnecessary route navigate 2020-04-16 15:12:41 +02:00
lotte
cb61b0adda fixed issue in effects and removed unnecessary console logs 2020-04-16 14:23:23 +02:00
Art Lowel
9a68969eec ensure PUTs are always executed after the PATCH for a move operation 2020-04-15 17:13:43 +02:00
Kristof De Langhe
5e94cf379c 70373: AuthService impersonate tests 2020-04-15 16:47:18 +02:00
Giuseppe Digilio
98ade2eb63 Fixed issue with merge 2020-04-15 16:35:29 +02:00
Kristof De Langhe
7df5025aa5 70373: EPerson impersonate tests 2020-04-15 16:23:41 +02:00
Giuseppe Digilio
4deaf145b6 Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies
# Conflicts:
#	src/app/core/eperson/eperson-data.service.spec.ts
#	src/app/core/eperson/group-data.service.ts
#	src/app/shared/testing/group-mock.ts
2020-04-15 16:18:27 +02:00
Giuseppe Digilio
b81d8ed900 Added test for ResourcePolicyEditComponent 2020-04-15 16:13:38 +02:00
Giuseppe Digilio
4ac3eb5f9b Added test for ResourcePolicyCreateComponent 2020-04-15 16:13:22 +02:00
Giuseppe Digilio
83a1f9d31d Added test for EpersonGroupListComponent 2020-04-15 16:13:06 +02:00
Giuseppe Digilio
ceaa14e9b2 Added test for ResourcePolicyFormComponent 2020-04-15 16:12:35 +02:00
Giuseppe Digilio
ee38de488c Added test for ResourcePoliciesComponent 2020-04-15 16:12:05 +02:00
Giuseppe Digilio
e7d0c96a26 Added test for ItemAuthorizationsComponent 2020-04-15 16:11:24 +02:00
Kristof De Langhe
4cd11bcbca 70373: Fix existing texts 2020-04-15 15:35:41 +02:00
Art Lowel
2c3d8fd031 remove console log 2020-04-15 15:31:06 +02:00
Art Lowel
d02c41c089 ensure cache times are used for all types of requests 2020-04-15 15:04:31 +02:00
Kristof De Langhe
c48bb2cbb0 70373: Stop impersonating button in navbar + clear cookie on logout 2020-04-15 13:08:04 +02:00
Art Lowel
d6087e3620 remove logs, fix lint issues 2020-04-15 11:24:24 +02:00
Kristof De Langhe
e43aa15a70 70373: Store authenticated EPerson ID in store instead of object 2020-04-15 11:14:41 +02:00
Art Lowel
66a996bb0f add i18n label 2020-04-15 10:55:36 +02:00
Art Lowel
634f4e718e don't pass a query value to the modal if it's readonly 2020-04-15 10:50:10 +02:00
Art Lowel
06cc028c80 use namevariants based on config 2020-04-15 10:34:35 +02:00
Giuseppe Digilio
00f2aa5e1c Renamed ResourcePolicyFormComponent's file 2020-04-14 21:13:43 +02:00
Giuseppe Digilio
46498992a7 Renamed ResourcePolicyFormComponent's file 2020-04-14 20:58:58 +02:00
Kristof De Langhe
638793ca5e 70373: Login as EPerson intermediate commit 2020-04-10 17:41:39 +02:00
Art Lowel
44801701c9 populate submission sections with metadata from single effect 2020-04-10 10:12:21 +02:00
lotte
3d482aed26 removed unnecessary import 2020-04-09 16:17:27 +02:00
lotte
76790be925 Merge branch 'master' into w2p-70136_workflow-search-ui 2020-04-09 11:42:09 +02:00
lotte
3ac575c360 fixed messages for Admin Workflow 2020-04-09 11:29:39 +02:00
Art Lowel
6b0f76c012 fix nullpointer 2020-04-09 10:30:20 +02:00
lotte
9cfed06784 fixed caching issue 2020-04-09 10:20:42 +02:00
Art Lowel
e0d4eb7c9c ensure submissionsection state also contains all metadata after a save 2020-04-08 18:14:29 +02:00
lotte
e43f04e564 finished tests 2020-04-08 15:41:55 +02:00
Art Lowel
85bc11176e Merge branch 'request-by-uuid-issue' into metadata-and-relationships-combined-in-submission 2020-04-07 18:33:11 +02:00
lotte
74db9030b0 working on fixes for OrgUnit field in submission 2020-04-07 18:17:37 +02:00
Art Lowel
558b0b688c Merge branch 'request-by-uuid-issue' into metadata-and-relationships-combined-in-submission 2020-04-07 14:06:26 +02:00
Art Lowel
1fd7989a41 fix test and lint 2020-04-07 11:08:20 +02:00
Art Lowel
e5053c85b0 fix lint issues 2020-04-07 09:30:08 +02:00
Giuseppe Digilio
37fe6d2193 Fixed failed test 2020-04-07 09:29:21 +02:00
Giuseppe Digilio
99c1234a7d Disable policyType and action fields in resource policy edit form 2020-04-07 09:26:24 +02:00
Giuseppe Digilio
0b65bdac46 fixed lint error 2020-04-06 20:47:52 +02:00
Giuseppe Digilio
e078071dfb Intermediate commit 2020-04-06 20:36:56 +02:00
Giuseppe Digilio
b210a36e53 Added new date utils 2020-04-06 20:11:37 +02:00
Giuseppe Digilio
4c391bbae4 Fixed issue with delete operation 2020-04-06 20:11:20 +02:00
Art Lowel
493cbc65fe fix issue where reordering wouldn't work for relationships to cached items 2020-04-06 18:35:10 +02:00
Art Lowel
61624bf606 remove PATCH workaround and fix issue where name variants wouldn't be stored in the Item 2020-04-06 18:20:45 +02:00
Art Lowel
807500db41 fix issue where results wouldn't update after a name variant change 2020-04-06 18:11:27 +02:00
lotte
d003400c16 started fixing tests 2020-04-06 17:45:27 +02:00
Art Lowel
2a58f2480a fix issue where requestservice.getByUUID wouldn't work for requests that were never sent because there was already a copy in the cache 2020-04-06 16:40:45 +02:00
Giuseppe Digilio
5cb0570bc0 Added new date utils 2020-04-06 16:27:58 +02:00
Giuseppe Digilio
9339ae2d7c Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies
# Conflicts:
#	resources/i18n/en.json5
#	src/app/+item-page/edit-item-page/edit-item-page.module.ts
#	src/app/shared/shared.module.ts
2020-04-04 15:59:44 +02:00
Giuseppe Digilio
6314e17f27 Intermediate commit 2020-04-03 20:25:58 +02:00
lotte
de1b57d8d9 workflow delete/sendback 2020-04-03 18:13:22 +02:00
Art Lowel
f64eff42f4 fix a number of issues with name variants 2020-04-03 17:28:13 +02:00
lotte
2eb3d11cd2 debugging issue commit 2020-04-03 16:00:52 +02:00
Art Lowel
62002f94ef only use name variant after modal closes 2020-04-03 10:23:55 +02:00
Giuseppe Digilio
1ac52edbf7 Added create and delete method to resource policy service 2020-04-02 20:50:02 +02:00
Giuseppe Digilio
b9de6a7a7d Changed DataService's create method in the way to accept array of request params 2020-04-02 19:54:30 +02:00
Giuseppe Digilio
41d6255998 Renamed SearchParam class with a generic name RequestParam 2020-04-02 19:19:38 +02:00
Giuseppe Digilio
5a37891184 Merge remote-tracking branch 'remotes/origin/master' into #601-resource-policies
# Conflicts:
#	src/app/shared/shared.module.ts
2020-04-02 19:12:19 +02:00
Giuseppe Digilio
4f14e546a5 Added fallback strategy for DSONameService to get name for dspace object without a dc.tile metadata 2020-04-02 19:10:22 +02:00
Giuseppe Digilio
fab11e9055 Added component to edit and create a resource policy 2020-04-02 18:58:51 +02:00
Giuseppe Digilio
7f6c88164b Added create and edit resource policy link 2020-04-02 18:57:48 +02:00
Giuseppe Digilio
8913a45a6b Added a form field for selected resource policy target eperson/group 2020-04-02 18:54:34 +02:00
Giuseppe Digilio
b603c7fc05 Added a component that show a paginated list of eperson or group 2020-04-02 18:52:53 +02:00
lotte
258b1228f3 replaced wfi components by task components that render wfi's 2020-04-02 17:05:46 +02:00
lotte
f664cf4c90 made timeout longer for e2e 2020-04-02 17:02:14 +02:00
Art Lowel
924e623b6a fix issue where namvariants wouldn't work 2020-04-02 14:14:36 +02:00
lotte
97953912c5 added waiting until loading is done to e2e tests 2020-04-02 11:22:48 +02:00
lotte
b3ba67e31d Merge branch 'master' into angular-cli 2020-04-02 10:36:37 +02:00
lotte
5bb4065580 print html in e2e to debug 2020-04-02 10:27:08 +02:00
Art Lowel
f93df688e4 remove debug logs 2020-04-02 10:23:11 +02:00
Art Lowel
29e6f6f72f fix issue where the first relationship of a type wouldn't be added 2020-04-02 10:22:08 +02:00
lotte
45beb3f93f Added more thens to e2e tests 2020-04-02 09:44:05 +02:00
lotte
6e49ef6859 start of admin workflow ui 2020-04-01 17:04:54 +02:00
Art Lowel
6dbc2ef880 fix lint issue 2020-04-01 15:55:53 +02:00
Art Lowel
285fe2299a fix test after merge 2020-04-01 15:35:33 +02:00
Art Lowel
a2df95a679 fix lint issues 2020-04-01 14:20:00 +02:00
Art Lowel
987e2d98fd Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-04-01 14:06:06 +02:00
Art Lowel
2989ca4d96 fix issues with repeatable fields 2020-04-01 11:06:31 +02:00
lotte
5bcc700cc9 fixed e2e issue 2020-04-01 10:43:07 +02:00
lotte
4a52513a38 fixed test 2020-03-31 16:11:13 +02:00
lotte
27fcdab8ad fixed non-existing color in setenv script 2020-03-31 15:04:38 +02:00
lotte
894bee2583 added rimraf to dev deps 2020-03-31 13:52:39 +02:00
lotte
69ba0865a8 fixed test files + added clean for environment.ts + fixed set-env script bug 2020-03-31 13:50:12 +02:00
lotte
6b6068ffb8 Merge branch 'master' into angular-cli 2020-03-31 13:49:40 +02:00
lotte
3a73de90ba fixed alignment issue on new process page 2020-03-31 10:00:02 +02:00
lotte
c225c9015e Added messages and menu links + tests 2020-03-30 15:19:22 +02:00
lotte
b666e3f208 70090: Added trail for processes pages 2020-03-30 15:19:22 +02:00
Kristof De Langhe
d4609b87ea 69940: Fix tests 2020-03-30 15:19:22 +02:00
Kristof De Langhe
6b53c448c8 69940: Processes - date format, back button and hiding empty fields 2020-03-30 15:19:22 +02:00
Kristof De Langhe
5e890aca2c 69940: Process detail - Output Files 2020-03-30 15:19:22 +02:00
Kristof De Langhe
3bac6cc1b3 69940: Process files request 2020-03-30 15:19:22 +02:00
Kristof De Langhe
cf492a92c8 69940: Process detail and overview test cases 2020-03-30 15:19:22 +02:00
Kristof De Langhe
b4bb3acb63 69940: Process details intermediate commit #2 2020-03-30 15:19:22 +02:00
Kristof De Langhe
07a5dceed1 69940: Process detail page intermediate commit 2020-03-30 15:19:22 +02:00
Kristof De Langhe
eacc13a95c 69940: Process overview page 2020-03-30 15:19:22 +02:00
Art Lowel
428abc8282 fix file padding and help text color 2020-03-30 15:19:22 +02:00
lotte
e7a5daad18 fixed tests and feedback 2020-03-30 15:19:22 +02:00
lotte
ef3a235178 added tests and typedoc 2020-03-30 15:19:22 +02:00
lotte
e38aec831f fixed file upload, styling, boolean/date/output inputs 2020-03-30 15:19:22 +02:00
lotte
3e4704af0d working on upload functionality 2020-03-30 15:18:07 +02:00
lotte
ee649debfb moved process data services 2020-03-30 15:18:07 +02:00
lotte
68e2a08af2 added switch for parameter types 2020-03-30 15:17:01 +02:00
lotte
7c9c45b7cb added script parameters & route updates 2020-03-30 15:17:01 +02:00
lotte
1cb39cef41 created new process page 2020-03-30 15:17:01 +02:00
Giuseppe Digilio
1f26a7b634 Show the policies for each bundle and bitstream within the item 2020-03-30 12:57:33 +02:00
Giuseppe Digilio
18d38ca737 Implemented resource policies component 2020-03-30 12:36:36 +02:00
Giuseppe Digilio
be8923d572 Added primaryBitstream and bitstreams properties to Bundle model 2020-03-30 11:43:38 +02:00
Giuseppe Digilio
2e94b349f9 Added eperson and group property to ResourcePolicy model 2020-03-30 11:43:02 +02:00
Giuseppe Digilio
1af5958fa9 Added ngFor track by DSO's id directive 2020-03-30 11:40:58 +02:00
Art Lowel
f61f92e1ad add template file, update readme, remove logs 2020-03-27 15:51:54 +01:00
Giuseppe Digilio
e48b8ad147 Fixed issue with accessCondition in SubmissionSectionUploadAccessConditionsComponent 2020-03-27 12:21:53 +01:00
Giuseppe Digilio
e87c173e96 Fixed issue with getSearchEndpoint which make wrong request to endpointMap 2020-03-27 12:19:20 +01:00
Giuseppe Digilio
ac323f48cc Added item authorizations component 2020-03-27 12:17:59 +01:00
lotte
1caec64115 added npm-run-all 2020-03-27 11:02:07 +01:00
lotte
a3b97f7bd9 fixed notification type 2020-03-27 10:10:44 +01:00
lotte
0850c264b6 added nodemon to watch dev environment changes 2020-03-27 10:06:17 +01:00
lotte
1b7fdfc59c removed custom environment files and fixed config build 2020-03-27 09:10:32 +01:00
lotte
e53727248d environment.ts script 2020-03-26 15:30:41 +01:00
Giuseppe Digilio
e396fe054e Refactored Resource Policy service 2020-03-26 14:40:06 +01:00
lotte
1a318b6f7a Fixed path to coverage report 2020-03-19 12:36:36 +01:00
lotte
9043e1375c fixed e2e script that uses docker 2020-03-19 11:46:18 +01:00
lotte
02c67f4ec0 changed travis/docker setup 2020-03-19 10:48:53 +01:00
lotte
c870b3d02c Merge branch 'master' into angular-cli 2020-03-19 10:27:13 +01:00
Art Lowel
56318ad86b fix followLink tests 2020-03-18 18:32:12 +01:00
lotte
dd0396465e fixed tests except for iterator issue in data services 2020-03-18 17:03:19 +01:00
lotte
8bf241c182 angular cli 2020-03-18 16:03:40 +01:00
Art Lowel
a8d5ad9c37 fix adding of metadata only fields, and styling 2020-02-25 17:01:44 +01:00
Art Lowel
644dcf8ce6 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-02-24 16:43:18 +01:00
Art Lowel
212d626e36 Merge branch 'followlink-refactor' into metadata-and-relationships-combined-in-submission 2020-02-24 15:17:13 +01:00
Art Lowel
bc8bacab54 Merge branch 'followlink-refactor' into metadata-and-relationships-combined-in-submission 2020-02-24 14:59:28 +01:00
Art Lowel
9d059e190e Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-02-24 11:42:55 +01:00
lotte
c98a4a1c3f fixes for replacing/moving 2020-02-19 17:04:37 +01:00
lotte
1a6f67d12e reorderable update fix 2020-02-17 13:23:49 +01:00
lotte
1b8cb5b10c workspace item update after move 2020-02-14 16:50:28 +01:00
lotte
6053d0691f bug fix 2020-02-13 08:49:24 +01:00
Kristof De Langhe
46ab613481 65272: Filter autocomplete metadata fields + fix test 2020-02-11 15:48:56 +01:00
Kristof De Langhe
e3facbd8c8 65272: filter relationship metadata when displaying on item-metadata, keep them stored in the object-updates store 2020-02-11 14:55:08 +01:00
Kristof De Langhe
1885845fef 65272: Clear template-item cache on removal 2020-02-07 17:18:51 +01:00
lotte
0f539ea7d7 trying to fix query in submission entities 2020-02-06 16:28:39 +01:00
lotte
2fc1e6e827 disabled thumbnails in entities results 2020-02-06 14:26:15 +01:00
lotte
32f8842af8 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-02-06 08:55:04 +01:00
lotte
6cfcff5503 fixed tests in relaitonship service 2020-02-05 16:53:39 +01:00
lotte
405143388c Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-02-05 10:54:49 +01:00
lotte
fa0a0dd78c fixed relationship effects tests 2020-02-05 10:38:58 +01:00
lotte
34c5d93a98 fixed more tests 2020-02-04 12:36:17 +01:00
lotte
d1b7f07c68 final bug fixing 2020-02-03 14:49:06 +01:00
lotte
360abb78de intermediate commit 2020-02-03 12:58:24 +01:00
lotte
28747314e6 fixed bug with double selection 2020-01-28 11:29:25 +01:00
lotte
6792f75c38 bug fixing 2020-01-24 17:15:14 +01:00
Kristof De Langhe
53355d1fc4 65272: Test fixes 2020-01-23 17:49:41 +01:00
Kristof De Langhe
d98ce7c97e 65272: Logo spacing layout fix 2020-01-23 17:33:25 +01:00
Kristof De Langhe
98937bd240 65272: Missing JSDocs + id and uuid serializing fix for NormalizedTemplateItem 2020-01-23 17:24:46 +01:00
Kristof De Langhe
a714958c04 65272: Object update PUT to PATCH requests + option to add ignored metadata fields to update 2020-01-23 16:49:31 +01:00
Kristof De Langhe
4ae5ee21b1 65272: Edit template item - Empty metadata alert + alignment fixes 2020-01-23 15:59:47 +01:00
Kristof De Langhe
24fc3e6c76 65272: TemplateItem object and normalized version 2020-01-23 15:14:25 +01:00
Kristof De Langhe
4f048f59f7 Merge branch 'master' into w2p-65272_Edit-collection-item-template
Conflicts:
	resources/i18n/en.json5
	src/app/+collection-page/collection-page.module.ts
	src/app/+collection-page/edit-collection-page/collection-metadata/collection-metadata.component.html
	src/app/+collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts
	src/app/+collection-page/edit-collection-page/collection-metadata/collection-metadata.component.ts
	src/app/core/core.module.ts
	src/app/core/data/data.service.ts
	src/app/shared/shared.module.ts
2020-01-23 14:30:44 +01:00
lotte
8a6fe08c22 drag drop styling 2020-01-22 14:58:37 +01:00
lotte
002813e25e Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-01-22 09:37:37 +01:00
lotte
ee3de31d69 fixed remaining test issue 2020-01-20 15:15:01 +01:00
lotte
0854701550 fixed tests 2020-01-20 12:44:29 +01:00
lotte
a4d5e0d20e bug fixing 2020-01-17 16:51:05 +01:00
lotte
db96da55d8 Merge branch 'master' into metadata-and-relationships-combined-in-submission 2020-01-17 13:06:16 +01:00
lotte
a449b79746 Merge branch 'reorder-name-variants' into metadata-and-relationships-combined-in-submission 2020-01-16 13:24:19 +01:00
lotte
c92fb9262c fixes for multiple fields 2020-01-16 12:59:19 +01:00
lotte
ab966c08ac Merge branch 'reorder-name-variants' into metadata-and-relationships-combined-in-submission 2020-01-14 16:16:17 +01:00
lotte
e768169add UX improvements 2020-01-14 15:29:21 +01:00
lotte
23d4b16243 made sure added relationships are shown again, resolved issues with duplicate entries + other bug fixes 2020-01-09 16:23:32 +01:00
lotte
3e9eb9eedc fixed relationship specific labels in modal and cleaned up existing code 2020-01-02 13:48:24 +01:00
lotte
3dfba2ad12 fixed strange test issue 2020-01-02 13:22:10 +01:00
lotte
11d3f33276 added input value as query in modal 2019-12-23 15:36:39 +01:00
lotte
2a686a2fc4 fixed spec error 2019-12-23 13:13:57 +01:00
lotte
5778b3ec6d Merge branch 'reorder-name-variants' into metadata-and-relationships-combined-in-submission 2019-12-23 11:49:42 +01:00
lotte
747606b40f fixed linting errors 2019-12-23 09:27:57 +01:00
lotte
c002d8c640 fixed existing tests 2019-12-23 08:47:46 +01:00
lotte
5ef538a9e8 Merge branch 'reorder-name-variants' into metadata-and-relationships-combined-in-submission 2019-12-23 08:31:22 +01:00
lotte
692a4a4a3d cleanup 2019-12-20 15:08:26 +01:00
lotte
aa7b3b7bb4 fixed remove buttons for both relatinoships and metadata 2019-12-16 15:31:14 +01:00
lotte
e3355455af fixed patch move 2019-12-13 16:58:59 +01:00
lotte
b7f18a1275 fixed issues with concat fields and adding repeatable metadata values in submission 2019-12-11 15:28:24 +01:00
Art Lowel
4cdb1370e2 metadata updates are now sent to the server, but the format is still wrong 2019-12-10 18:30:19 +01:00
lotte
b705e4a0f6 updates styling 2019-12-10 16:52:00 +01:00
lotte
55f14b2885 Merge branch 'metadata-and-relationships-combined-in-submission' of https://git.atmire.com/contributions/dspace-angular into metadata-and-relationships-combined-in-submission 2019-12-10 16:16:52 +01:00
lotte
cce9832037 fixed to row fields 2019-12-10 16:16:07 +01:00
Art Lowel
453a2919d1 store reordered relationships to the server 2019-12-10 15:40:56 +01:00
Art Lowel
b728463e56 make reorderables work for empty values 2019-12-10 10:58:47 +01:00
lotte
84bb44ae62 show metadata values in input fields 2019-12-10 10:22:27 +01:00
Art Lowel
9804161ff1 intermediate commit 2019-12-09 18:32:58 +01:00
Art Lowel
a5047f2f76 hide hints for repeated models of the same field, fix typo 2019-12-09 17:10:49 +01:00
lotte
fa40cac7e7 draggable form groups 2019-12-09 16:33:52 +01:00
lotte
e9f002785a draggable form array controls 2019-12-09 13:51:14 +01:00
lotte
6bba88019e changed rendering of values 2019-12-06 17:02:57 +01:00
lotte
28a0654d20 commit with extra wrapper component 2019-12-06 09:17:08 +01:00
Kristof De Langhe
b3371c5c14 Merge branch 'master' into w2p-65272_Edit-collection-item-template
Conflicts:
	resources/i18n/en.json5
	src/app/+collection-page/collection-page-routing.module.ts
	src/app/+collection-page/collection-page.module.ts
	src/app/core/core.module.ts
	src/app/core/data/data.service.ts
	src/app/shared/shared.module.ts
2019-11-29 11:04:06 +01:00
Kristof De Langhe
b3b8ea1dee 65272: item template REST contract endpoint changes 2019-10-14 16:47:35 +02:00
Kristof De Langhe
7fd4b41460 65272: Added test cases 2019-10-04 17:50:53 +02:00
Kristof De Langhe
088304fce7 Merge branch 'w2p-63669_Edit-Col/Com-Tabs' into w2p-65272_Edit-collection-item-template 2019-10-04 15:48:18 +02:00
Kristof De Langhe
cfdc227563 65272: CollectionMetadataComponent test import fixes 2019-10-04 14:46:59 +02:00
Kristof De Langhe
2eae641703 Merge branch 'master' into w2p-65272_Edit-collection-item-template 2019-10-04 13:35:19 +02:00
Kristof De Langhe
90beee9a85 65272: Existing test fixes 2019-10-04 13:34:56 +02:00
Kristof De Langhe
644ab2cfab 65272: JSDocs 2019-10-04 13:05:15 +02:00
Kristof De Langhe
cf8bba7112 65272: Revert testing changes 2019-10-04 12:38:47 +02:00
Kristof De Langhe
ba436a6467 65272: Functional EditItemTemplatePageComponent 2019-10-04 11:46:14 +02:00
Kristof De Langhe
4cc1f55272 65272: EditItemTemplatePageComponent 2019-10-03 17:50:48 +02:00
Kristof De Langhe
cddaf539aa 65272: add, delete and edit button for collection item template 2019-10-03 16:36:07 +02:00
Kristof De Langhe
143604fa4d 65272: Intermediate commit 2019-10-03 15:07:05 +02:00
Kristof De Langhe
ef9976cf09 Merge branch 'w2p-63669_Edit-Col/Com-Tabs' into w2p-65272_Edit-collection-item-template 2019-10-03 14:41:15 +02:00
Kristof De Langhe
12be9101e5 65272: ItemTemplateDataService 2019-10-03 13:16:46 +02:00
2384 changed files with 118387 additions and 38668 deletions

11
.browserslistrc Normal file
View File

@@ -0,0 +1,11 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.

28
.codecov.yml Normal file
View File

@@ -0,0 +1,28 @@
# DSpace configuration for Codecov.io coverage reports
# These override the default YAML settings at
# https://docs.codecov.io/docs/codecov-yaml#section-default-yaml
# Can be validated via instructions at:
# https://docs.codecov.io/docs/codecov-yaml#validate-your-repository-yaml
# Settings related to code coverage analysis
coverage:
status:
# Configuration for project-level checks. This checks how the PR changes overall coverage.
project:
default:
# For each PR, auto compare coverage to previous commit.
# Require that overall (project) coverage does NOT drop more than 0.5%
target: auto
threshold: 0.5%
# Configuration for patch-level checks. This checks the relative coverage of the new PR code ONLY.
patch:
default:
# Enable informational mode, which just provides info to reviewers & always passes
# https://docs.codecov.io/docs/commit-status#section-informational
informational: true
# Turn PR comments "off". This feature adds the code coverage summary as a
# comment on each PR. See https://docs.codecov.io/docs/pull-request-comments
# However, this same info is available from the Codecov checks in the PR's
# "Checks" tab in GitHub. So, the comment is unnecessary.
comment: false

View File

@@ -1,5 +1,4 @@
# http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true
[*]
@@ -13,3 +12,6 @@ trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
[*.ts]
quote_type = single

22
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug, needs triage
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is. Include the version(s) of DSpace where you've seen this problem & what *web browser* you were using. Link to examples if they are public.
**To Reproduce**
Steps to reproduce the behavior:
1. Do this
2. Then this...
**Expected behavior**
A clear and concise description of what you expected to happen.
**Related work**
Link to any related tickets or PRs here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest a new feature for this project
title: ''
labels: new feature, needs triage
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives or workarounds you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,26 @@
# This workflow runs whenever a new pull request is created
# TEMPORARILY DISABLED. Unfortunately this doesn't work for PRs created from forked repositories (which is how we tend to create PRs).
# There is no known workaround yet. See https://github.community/t/how-to-use-github-token-for-prs-from-forks/16818
name: Pull Request opened
# Only run for newly opened PRs against the "main" branch
on:
pull_request:
types: [opened]
branches:
- main
jobs:
automation:
runs-on: ubuntu-latest
steps:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/marketplace/actions/pull-request-assigner
- name: Assign PR to creator
uses: thomaseizinger/assign-pr-creator-action@v1.0.0
# Note, this authentication token is created automatically
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Ignore errors. It is possible the PR was created by someone who cannot be assigned
continue-on-error: true

View File

@@ -1,7 +1,7 @@
## References
_Add references/links to any related tickets or PRs. These may include:_
* Link to [Angular issue or PR](https://github.com/DSpace/dspace-angular/issues) related to this PR, if any
* Link to [JIRA](https://jira.lyrasis.org/projects/DS/summary) ticket(s), if any
_Add references/links to any related issues or PRs. These may include:_
* Fixes #[issue-number]
* Requires DSpace/DSpace#[pr-number] (if a REST API PR is required to test this)
## Description
Short summary of changes (1-2 sentences).
@@ -20,9 +20,7 @@ _This checklist provides a reminder of what we are going to look for when review
- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
- [ ] My PR passes [TSLint](https://palantir.github.io/tslint/) validation using `yarn run lint`
- [ ] My PR doesn't introduce circular dependencies
- [ ] My PR includes [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods.
- [ ] My PR passes all specs/tests and includes new/updated specs for any bug fixes, improvements or new features. A few reminders about what constitutes good tests:
* Include tests for different user types (if behavior differs), including: (1) Anonymous user, (2) Logged in user (non-admin), and (3) Administrator.
* Include tests for error scenarios, e.g. when errors/warnings should appear (or buttons should be disabled).
* For bug fixes, include a test that reproduces the bug and proves it is fixed. For clarity, it may be useful to provide the test in a separate commit from the bug fix.
- [ ] If my PR includes new, third-party dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/master/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.
- [ ] My PR passes all specs/tests and includes new/updated specs or tests based on the [Code Testing Guide](https://wiki.lyrasis.org/display/DSPACE/Code+Testing+Guide).
- [ ] If my PR includes new, third-party dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/main/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation.

105
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
# DSpace Continuous Integration/Build via GitHub Actions
# Concepts borrowed from
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-nodejs
name: Build
# Run this Build for all pushes / PRs to current branch
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
env:
# The ci step will test the dspace-angular code against DSpace REST.
# Direct that step to utilize a DSpace REST service that has been started in docker.
DSPACE_REST_HOST: localhost
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: '/server'
DSPACE_REST_SSL: false
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
node-version: [12.x, 14.x]
# Do NOT exit immediately if one matrix job fails
fail-fast: false
# These are the actual CI steps to perform per job
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v1
# https://github.com/actions/setup-node
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install latest Chrome (for e2e tests)
run: |
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable -y
google-chrome --version
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v2
with:
# Cache entire Yarn cache directory (see previous step)
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# Cache key is hash of yarn.lock. Therefore changes to yarn.lock will invalidate cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install the latest chromedriver compatible with the installed chrome version
run: yarn global add chromedriver --detect_chromedriver_version
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Run lint
run: yarn run lint
- name: Run build
run: yarn run build:prod
- name: Run specs (unit tests)
run: yarn run test:headless
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
# Upload coverage reports to Codecov (for Node v12 only)
# https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v1
if: matrix.node-version == '12.x'
# Using docker-compose start backend using CI configuration
# and load assetstore from a cached copy
- name: Start DSpace REST Backend via Docker (for e2e tests)
run: |
docker-compose -f ./docker/docker-compose-ci.yml up -d
docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
docker container ls
# Wait until the REST API returns a 200 response (or for a max of 30 seconds)
# https://github.com/nev7n/wait_for_response
- name: Wait for DSpace REST Backend to be ready (for e2e tests)
uses: nev7n/wait_for_response@v1
with:
# We use the 'sites' endpoint to also ensure the database is ready
url: 'http://localhost:8080/server/api/core/sites'
responseCode: 200
timeout: 30000
- name: Get DSpace REST Backend info/properties
run: curl http://localhost:8080/server/api
- name: Run e2e tests (integration tests)
run: |
chromedriver --url-base='/wd/hub' --port=4444 &
yarn run e2e:ci
- name: Shutdown Docker containers
run: docker-compose -f ./docker/docker-compose-ci.yml down

29
.github/workflows/issue_opened.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
# This workflow runs whenever a new issue is created
name: Issue opened
on:
issues:
types: [opened]
jobs:
automation:
runs-on: ubuntu-latest
steps:
# Add the new issue to a project board, if it needs triage
# See https://github.com/marketplace/actions/create-project-card-action
- name: Add issue to project board
# Only add to project board if issue is flagged as "needs triage" or has no labels
# NOTE: By default we flag new issues as "needs triage" in our issue template
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
uses: technote-space/create-project-card-action@v1
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with "public_repo" and "admin:org" permissions
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token
# This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific)
with:
GITHUB_TOKEN: ${{ secrets.ORG_PROJECT_TOKEN }}
PROJECT: DSpace Backlog
COLUMN: Triage
CHECK_ORG_PROJECT: true
# Ignore errors
continue-on-error: true

View File

@@ -0,0 +1,25 @@
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
name: Check for merge conflicts
# Run whenever the "main" branch is updated
# NOTE: This means merge conflicts are only checked for when a PR is merged to main.
on:
push:
branches:
- main
jobs:
triage:
runs-on: ubuntu-latest
steps:
# See: https://github.com/mschilde/auto-label-merge-conflicts/
- name: Auto-label PRs with merge conflicts
uses: mschilde/auto-label-merge-conflicts@v2.0
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
# Note, the authentication token is created automatically
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
with:
CONFLICT_LABEL_NAME: 'merge conflict'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Ignore errors
continue-on-error: true

8
.gitignore vendored
View File

@@ -7,8 +7,9 @@ npm-debug.log
/build/
/config/environment.dev.js
/config/environment.prod.js
/src/environments/environment.ts
/src/environments/environment.dev.ts
/src/environments/environment.prod.ts
/coverage
@@ -36,3 +37,6 @@ yarn-error.log
package-lock.json
.java-version
.env
/nbproject/

View File

@@ -1,58 +0,0 @@
sudo: required
dist: bionic
env:
# Install the latest docker-compose version for ci testing.
# The default installation in travis is not compatible with the latest docker-compose file version.
COMPOSE_VERSION: 1.24.1
# The ci step will test the dspace-angular code against DSpace REST.
# Direct that step to utilize a DSpace REST service that has been started in docker.
DSPACE_REST_HOST: localhost
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: '/server/api'
DSPACE_REST_SSL: false
services:
- xvfb
before_install:
# Docker Compose Install
- curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
# update chrome
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
- sudo apt-get update
- sudo apt-get install google-chrome-stable
# Start up DSpace 7 using the entities database dump
- docker-compose -f ./docker/docker-compose-travis.yml up -d
# Use the dspace-cli image to populate the assetstore. Trigger a discovery and oai update
- docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
- travis_retry yarn install
before_script:
# The following line could be enabled to verify that the rest server is responding.
# Currently, "yarn run build" takes enough time to run to allow the service to be available
#- curl http://localhost:8080/
after_script:
- docker-compose -f ./docker/docker-compose-travis.yml down
language: node_js
node_js:
- "10"
- "12"
cache:
yarn: true
bundler_args: --retry 5
script:
- yarn run build
- yarn run ci
- cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

View File

@@ -1,3 +1,7 @@
{
"typescript.check.workspaceVersion": false
"typescript.check.workspaceVersion": false,
"i18n-ally.localesPaths": [
"src/assets/i18n",
"src/app/core/locale"
]
}

View File

@@ -4,9 +4,9 @@
FROM node:12-alpine
WORKDIR /app
ADD . /app/
EXPOSE 3000
EXPOSE 4000
# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
# See, for example https://github.com/yarnpkg/yarn/issues/5540
RUN yarn install --network-timeout 300000
CMD yarn run watch
CMD yarn run start:dev

View File

@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/DSpace/dspace-angular.svg?branch=master)](https://travis-ci.org/DSpace/dspace-angular) [![Coverage Status](https://coveralls.io/repos/github/DSpace/dspace-angular/badge.svg?branch=master)](https://coveralls.io/github/DSpace/dspace-angular?branch=master) [![Universal Angular](https://img.shields.io/badge/universal-angular2-brightgreen.svg?style=flat)](https://github.com/angular/universal)
[![Build Status](https://github.com/DSpace/dspace-angular/workflows/Build/badge.svg?branch=main)](https://github.com/DSpace/dspace-angular/actions?query=workflow%3ABuild) [![Coverage Status](https://codecov.io/gh/DSpace/dspace-angular/branch/main/graph/badge.svg)](https://codecov.io/gh/DSpace/dspace-angular) [![Universal Angular](https://img.shields.io/badge/universal-angular2-brightgreen.svg?style=flat)](https://github.com/angular/universal)
dspace-angular
==============
@@ -13,7 +13,7 @@ You can find additional information on the DSpace 7 Angular UI on the [wiki](htt
Quick start
-----------
**Ensure you're running [Node](https://nodejs.org) `v10.x` or `v12.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
**Ensure you're running [Node](https://nodejs.org) `v12.x` or `v14.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`**
```bash
# clone the repo
@@ -29,7 +29,7 @@ yarn install
yarn start
```
Then go to [http://localhost:3000](http://localhost:3000) in your browser
Then go to [http://localhost:4000](http://localhost:4000) in your browser
Not sure where to start? watch the training videos linked in the [Introduction to the technology](#introduction-to-the-technology) section below.
@@ -59,13 +59,13 @@ Table of Contents
Introduction to the technology
------------------------------
You can find more information on the technologies used in this project (Angular.io, Typescript, Angular Universal, RxJS, etc) on the [LYRASIS wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+UI+Technology+Stack)
You can find more information on the technologies used in this project (Angular.io, Angular CLI, Typescript, Angular Universal, RxJS, etc) on the [LYRASIS wiki](https://wiki.lyrasis.org/display/DSPACE/DSpace+7+UI+Technology+Stack)
Requirements
------------
- [Node.js](https://nodejs.org), [npm](https://www.npmjs.com/), and [yarn](https://yarnpkg.com)
- Ensure you're running node `v10.x` or `v12.x`, npm >= `v5.x` and yarn >= `v1.x`
- [Node.js](https://nodejs.org) and [yarn](https://yarnpkg.com)
- Ensure you're running node `v12.x` or `v14.x` and yarn >= `v1.x`
If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS.
@@ -77,25 +77,54 @@ Installing
### Configuring
Default configuration file is located in `config/` folder.
Default configuration file is located in `src/environments/` folder.
To change the default configuration values, create local files that override the parameters you need to change:
To change the default configuration values, create local files that override the parameters you need to change. You can use `environment.template.ts` as a starting point.
- Create a new `environment.dev.js` file in `config/` for `devel` environment;
- Create a new `environment.prod.js` file in `config/` for `production` environment;
- Create a new `environment.dev.ts` file in `src/environments/` for a `development` environment;
- Create a new `environment.prod.ts` file in `src/environments/` for a `production` environment;
To use the configuration parameters in your component:
The server settings can also be overwritten using an environment file.
This file should be called `.env` and be placed in the project root.
The following settings can be overwritten in this file:
```bash
import { GLOBAL_CONFIG, GlobalConfig } from '../config';
DSPACE_HOST # The host name of the angular application
DSPACE_PORT # The port number of the angular application
DSPACE_NAMESPACE # The namespace of the angular application
DSPACE_SSL # Whether the angular application uses SSL [true/false]
constructor(@Inject(GLOBAL_CONFIG) public config: GlobalConfig) {}
DSPACE_REST_HOST # The host name of the REST application
DSPACE_REST_PORT # The port number of the REST application
DSPACE_REST_NAMESPACE # The namespace of the REST application
DSPACE_REST_SSL # Whether the angular REST uses SSL [true/false]
```
The same settings can also be overwritten by setting system environment variables instead, E.g.:
```bash
export DSPACE_HOST=api7.dspace.org
```
The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides **`environment.(prod, dev or test).ts`** overrides **`environment.common.ts`**
These configuration sources are collected **at build time**, and written to `src/environments/environment.ts`. At runtime the configuration is fixed, and neither `.env` nor the process' environment will be consulted.
#### Using environment variables in code
To use environment variables in a UI component, use:
```typescript
import { environment } from '../environment.ts';
```
This file is generated by the script located in `scripts/set-env.ts`. This script will run automatically before every build, or can be manually triggered using the appropriate `config` script in `package.json`
Running the app
---------------
After you have installed all dependencies you can now run the app. Run `yarn run watch` to start a local server which will watch for changes, rebuild the code, and reload the server for you. You can visit it at `http://localhost:3000`.
After you have installed all dependencies you can now run the app. Run `yarn run start:dev` to start a local server which will watch for changes, rebuild the code, and reload the server for you. You can visit it at `http://localhost:4000`.
### Running in production mode
@@ -106,23 +135,15 @@ To build the app for production and start the server run:
```bash
yarn start
```
This will run the application in an instance of the Express server, which is included.
If you only want to build for production, without starting, run:
```bash
yarn run build:prod
```
This will build the application and put the result in the `dist` folder. You can copy this folder to wherever you need it for your application server. If you will be using the built-in Express server, you'll also need a copy of the `node_modules` folder tucked inside your copy of `dist`.
This will build the application and put the result in the `dist` folder
### Deploy
```bash
# deploy production in standalone pm2 container
yarn run deploy
# remove production from standalone pm2 container
yarn run undeploy
```
### Running the application with Docker
See [Docker Runtime Options](docker/README.md)
@@ -155,17 +176,15 @@ If you would like to contribute by testing a Pull Request (PR), here's how to do
* Click it, and follow "Step 1" of those instructions to checkout the pull down the PR branch.
2. `yarn run clean` (This resets your local dependencies to ensure you are up-to-date with this PR)
3. `yarn install` (Updates your local dependencies to those in the PR)
4. `yarn start` (Rebuilds the project, and deploys to localhost:3000, by default)
5. At this point, the code from the PR will be deployed to http://localhost:3000. Test it out, and ensure that it does what is described in the PR (or fixes the bug described in the ticket linked to the PR).
4. `yarn start` (Rebuilds the project, and deploys to localhost:4000, by default)
5. At this point, the code from the PR will be deployed to http://localhost:4000. Test it out, and ensure that it does what is described in the PR (or fixes the bug described in the ticket linked to the PR).
Once you have tested the Pull Request, please add a comment and/or approval to the PR to let us know whether you found it to be successful (or not). Thanks!
### Unit Tests
Unit tests use Karma. You can find the configuration file at the same level of this README file:`./karma.conf.js` If you are going to use a remote test enviroment you need to edit the `./karma.conf.js`. Follow the instructions you will find inside it. To executing tests whenever any file changes you can modify the 'autoWatch' option to 'true' and 'singleRun' option to 'false'. A coverage report is also available at: http://localhost:9876/ after you run: `yarn run coverage`.
To correctly run the tests you need to run the build once with: `yarn run build`.
Unit tests use Karma. You can find the configuration file at the same level of this README file:`./karma.conf.js` If you are going to use a remote test environment you need to edit the `./karma.conf.js`. Follow the instructions you will find inside it. To executing tests whenever any file changes you can modify the 'autoWatch' option to 'true' and 'singleRun' option to 'false'. A coverage report is also available at: http://localhost:9876/ after you run: `yarn run coverage`.
The default browser is Google Chrome.
@@ -177,17 +196,13 @@ and run: `yarn run test`
E2E tests use Protractor + Selenium server + browsers. You can find the configuration file at the same level of this README file:`./protractor.conf.js` Protractor is installed as 'local' as a dev dependency.
If you are going to use a remote test enviroment you need to edit the './protractor.conf.js'. Follow the instructions you will find inside it.
If you are going to use a remote test enviroment you need to edit the './e2e//protractor.conf.js'. Follow the instructions you will find inside it.
The default browser is Google Chrome.
Protractor needs a functional instance of the DSpace interface to run the E2E tests, so you need to run:`yarn run watch`
or any command that bring up the DSpace interface.
Place your tests at the following path: `./e2e`
and run: `yarn run e2e`
and run: `ng e2e`
### Continuous Integration (CI) Test
@@ -200,7 +215,7 @@ See [`./docs`](docs) for further documentation.
### Building code documentation
To build the code documentation we use [TYPEDOC](http://typedoc.org). TYPEDOC is a documentation generator for TypeScript projects. It extracts informations from properly formatted comments that can be written within the code files. Follow the instructions [here](http://typedoc.org/guides/doccomments/) to know how to make those comments.
To build the code documentation we use [TYPEDOC](http://typedoc.org). TYPEDOC is a documentation generator for TypeScript projects. It extracts information from properly formatted comments that can be written within the code files. Follow the instructions [here](http://typedoc.org/guides/doccomments/) to know how to make those comments.
Run:`yarn run docs` to produce the documentation that will be available in the 'doc' folder.
@@ -324,7 +339,6 @@ dspace-angular
├── tslint.json * TSLint (https://palantir.github.io/tslint/) configuration
├── typedoc.json * TYPEDOC configuration
├── webpack * Webpack (https://webpack.github.io/) config directory
│   ├── helpers.js *
│   ├── webpack.aot.js * Webpack (https://webpack.github.io/) config for AoT build
│   ├── webpack.client.js * Webpack (https://webpack.github.io/) config for client build
│   ├── webpack.common.js *
@@ -388,7 +402,7 @@ Frequently asked questions
- Where do I write my tests?
- You can write your tests next to your component files. e.g. for `src/app/home/home.component.ts` call it `src/app/home/home.component.spec.ts`
- How do I start the app when I get `EACCES` and `EADDRINUSE` errors?
- The `EADDRINUSE` error means the port `3000` is currently being used and `EACCES` is lack of permission to build files to `./dist/`
- The `EADDRINUSE` error means the port `4000` is currently being used and `EACCES` is lack of permission to build files to `./dist/`
- What are the naming conventions for Angular 2?
- See [the official angular 2 style guide](https://angular.io/styleguide)
- Why is the size of my app larger in development?

View File

@@ -1,13 +1,222 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"defaultCollection": "@ngrx/schematics"
},
"newProjectRoot": "projects",
"projects": {
"core": {
"dspace-angular": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"projectType": "application"
"sourceRoot": "src",
"prefix": "ds",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"extractCss": true,
"preserveSymlinks": true,
"customWebpackConfig": {
"path": "./webpack/webpack.browser.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"allowedCommonJsDependencies": [
"angular2-text-mask",
"cerialize",
"core-js",
"lodash",
"jwt-decode",
"url-parse",
"uuid",
"webfontloader",
"zone.js"
],
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.browser.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/assets",
"src/robots.txt"
],
"styles": [
{
"input": "src/styles/base-theme.scss",
"inject": false,
"bundleName": "base-theme"
},
{
"input": "src/themes/custom/styles/theme.scss",
"inject": false,
"bundleName": "custom-theme"
},
{
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
}
],
"scripts": []
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "200kb",
"maximumError": "300kb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "dspace-angular:build",
"port": 4000
},
"configurations": {
"production": {
"browserTarget": "dspace-angular:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dspace-angular:build"
}
},
"test": {
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.test.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"sourceMap": {
"scripts": false,
"styles": false,
"hidden": false,
"vendor": false
},
"assets": [
"src/assets"
],
"styles": [
{
"input": "src/styles/base-theme.scss",
"inject": false,
"bundleName": "base-theme"
}
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "dspace-angular:serve"
},
"configurations": {
"production": {
"devServerTarget": "dspace-angular:serve:production"
}
}
},
"server": {
"builder": "@angular-builders/custom-webpack:server",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.prod.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"outputPath": "dist/server",
"main": "src/main.server.ts",
"tsConfig": "tsconfig.server.json"
},
"configurations": {
"production": {
"sourceMap": false,
"optimization": {
"scripts": false,
"styles": true
}
}
}
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "dspace-angular:build",
"serverTarget": "dspace-angular:server",
"port": 4000
},
"configurations": {
"production": {
"browserTarget": "dspace-angular:build:production",
"serverTarget": "dspace-angular:server:production"
}
}
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "dspace-angular:build:production",
"serverTarget": "dspace-angular:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
}
}
}
}
}
},
"defaultProject": "dspace-angular"
}

View File

@@ -1,17 +0,0 @@
# Copyright 2015-2016, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START app_yaml]
runtime: nodejs
env: flex
# [END app_yaml]

View File

@@ -1,4 +0,0 @@
// This configuration is currently only being used for unit tests, end-to-end tests use environment.dev.ts
module.exports = {
};

View File

@@ -5,13 +5,13 @@
- Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker.
- docker-compose-rest.yml
- Runs a published instance of the DSpace 7 REST API - persists data in Docker volumes
- docker-compose-travis.yml
- docker-compose-ci.yml
- Runs a published instance of the DSpace 7 REST API for CI testing. The database is re-populated from a SQL dump on each startup.
- cli.yml
- Docker compose file that provides a DSpace CLI container to work with a running DSpace REST container.
- cli.assetstore.yml
- Docker compose file that will download and install data into a DSpace REST assetstore. This script points to a default dataset that will be utilized for CI testing.
- environment.dev.js
- environment.dev.ts
- Environment file for running DSpace Angular in Docker
- local.cfg
- Environment file for running the DSpace 7 REST API in Docker.

View File

@@ -1,3 +1,17 @@
#
# The contents of this file are subject to the license and copyright
# detailed in the LICENSE and NOTICE files at the root of the source
# tree and available online at
#
# http://www.dspace.org/license/
#
#
# This is a copy of the cli.ingest.yml that is available in the DSpace/DSpace
# (Backend) at:
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.assetstore.yml
#
# Therefore, it should be kept in sync with that file
version: "3.7"
networks:
@@ -8,7 +22,8 @@ services:
networks:
dspacenet: {}
environment:
- LOADASSETS=https://www.dropbox.com/s/zv7lj8j2lp3egjs/assetstore.tar.gz?dl=1
# This assetstore zip is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
- LOADASSETS=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/assetstore.tar.gz
entrypoint:
- /bin/bash
- '-c'
@@ -21,3 +36,5 @@ services:
fi
/dspace/bin/dspace index-discovery
/dspace/bin/dspace oai import
/dspace/bin/dspace oai clean-cache

View File

@@ -6,12 +6,18 @@
# http://www.dspace.org/license/
#
#
# This is a copy of the cli.ingest.yml that is available in the DSpace/DSpace
# (Backend) at:
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/cli.ingest.yml
#
# Therefore, it should be kept in sync with that file
version: "3.7"
services:
dspace-cli:
environment:
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/master/dogAndReport.zip
- AIPZIP=https://github.com/DSpace-Labs/AIP-Files/raw/main/dogAndReport.zip
- ADMIN_EMAIL=test@test.edu
- AIPDIR=/tmp/aip-dir
entrypoint:

View File

@@ -1,3 +1,17 @@
#
# The contents of this file are subject to the license and copyright
# detailed in the LICENSE and NOTICE files at the root of the source
# tree and available online at
#
# http://www.dspace.org/license/
#
#
# This is a copy of the docker-compose-cli.yml that is available in the DSpace/DSpace
# (Backend) at:
# https://github.com/DSpace/DSpace/blob/main/docker-compose-cli.yml
#
# Therefore, it should be kept in sync with that file
version: "3.7"
services:

View File

@@ -6,11 +6,46 @@
# http://www.dspace.org/license/
#
#
# This is a copy of the db.entities.yml that is available in the DSpace/DSpace
# (Backend) at:
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml
#
# # Therefore, it should be kept in sync with that file
version: "3.7"
services:
dspacedb:
image: dspace/dspace-postgres-pgcrypto:loadsql
environment:
# Double underbars in env names will be replaced with periods for apache commons
- LOADSQL=https://www.dropbox.com/s/xh3ack0vg0922p2/configurable-entities-2019-05-08.sql?dl=1
# This LOADSQL should be kept in sync with the URL in DSpace/DSpace
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
- LOADSQL=https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-2021-04-14.sql
dspace:
### OVERRIDE default 'entrypoint' in 'docker-compose-rest.yml' ####
# Ensure that the database is ready BEFORE starting tomcat
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
# 2. Then, run database migration to init database tables
# 3. (Custom for Entities) enable Entity-specific collection submission mappings in item-submission.xml
# This 'sed' command inserts the sample configurations specific to the Entities data set, see:
# https://github.com/DSpace/DSpace/blob/main/dspace/config/item-submission.xml#L36-L49
# 4. Finally, start Tomcat
entrypoint:
- /bin/bash
- '-c'
- |
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate
sed -i '/name-map collection-handle="default".*/a \\n <name-map collection-handle="123456789/3" submission-name="Publication"/> \
<name-map collection-handle="123456789/4" submission-name="Publication"/> \
<name-map collection-handle="123456789/281" submission-name="Publication"/> \
<name-map collection-handle="123456789/5" submission-name="Publication"/> \
<name-map collection-handle="123456789/8" submission-name="OrgUnit"/> \
<name-map collection-handle="123456789/6" submission-name="Person"/> \
<name-map collection-handle="123456789/279" submission-name="Person"/> \
<name-map collection-handle="123456789/7" submission-name="Project"/> \
<name-map collection-handle="123456789/280" submission-name="Project"/> \
<name-map collection-handle="123456789/28" submission-name="Journal"/> \
<name-map collection-handle="123456789/29" submission-name="JournalVolume"/> \
<name-map collection-handle="123456789/30" submission-name="JournalIssue"/>' /dspace/config/item-submission.xml
catalina.sh run

View File

@@ -0,0 +1,101 @@
#
# The contents of this file are subject to the license and copyright
# detailed in the LICENSE and NOTICE files at the root of the source
# tree and available online at
#
# http://www.dspace.org/license/
#
# Docker Compose for running the DSpace backend for e2e testing in a CI environment
# This is used by our GitHub CI at .github/workflows/build.yml
# It is based heavily on the Backend's Docker Compose:
# https://github.com/DSpace/DSpace/blob/main/docker-compose.yml
version: '3.7'
networks:
dspacenet:
services:
# DSpace (backend) webapp container
dspace:
container_name: dspace
depends_on:
- dspacedb
image: dspace/dspace:dspace-7_x-test
networks:
dspacenet:
ports:
- published: 8080
target: 8080
stdin_open: true
tty: true
volumes:
- assetstore:/dspace/assetstore
- "./local.cfg:/dspace/config/local.cfg"
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
- solr_configs:/dspace/solr
# Ensure that the database is ready BEFORE starting tomcat
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
# 2. Then, run database migration to init database tables
# 3. Finally, start Tomcat
entrypoint:
- /bin/bash
- '-c'
- |
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate
catalina.sh run
# DSpace database container
# NOTE: This is customized to use our loadsql image, so that we are using a database with existing test data
dspacedb:
container_name: dspacedb
environment:
# This LOADSQL should be kept in sync with the LOADSQL in
# https://github.com/DSpace/DSpace/blob/main/dspace/src/main/docker-compose/db.entities.yml
# This SQL is available from https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
LOADSQL: https://github.com/DSpace-Labs/AIP-Files/releases/download/demo-entities-data/dspace7-entities-2021-04-14.sql
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto:loadsql
networks:
dspacenet:
stdin_open: true
tty: true
volumes:
- pgdata:/pgdata
# DSpace Solr container
dspacesolr:
container_name: dspacesolr
# Uses official Solr image at https://hub.docker.com/_/solr/
image: solr:8.8
# Needs main 'dspace' container to start first to guarantee access to solr_configs
depends_on:
- dspace
networks:
dspacenet:
ports:
- published: 8983
target: 8983
stdin_open: true
tty: true
working_dir: /var/solr/data
volumes:
# Mount our "solr_configs" volume available under the Solr's configsets folder (in a 'dspace' subfolder)
# This copies the Solr configs from main 'dspace' container into 'dspacesolr' via that volume
- solr_configs:/opt/solr/server/solr/configsets/dspace
# Keep Solr data directory between reboots
- solr_data:/var/solr/data
# Initialize all DSpace Solr cores using the mounted configsets (see above), then start Solr
entrypoint:
- /bin/bash
- '-c'
- |
init-var-solr
precreate-core authority /opt/solr/server/solr/configsets/dspace/authority
precreate-core oai /opt/solr/server/solr/configsets/dspace/oai
precreate-core search /opt/solr/server/solr/configsets/dspace/search
precreate-core statistics /opt/solr/server/solr/configsets/dspace/statistics
exec solr -f
volumes:
assetstore:
pgdata:
solr_data:
# Special volume used to share Solr configs from 'dspace' to 'dspacesolr' container (see above)
solr_configs:

View File

@@ -1,11 +1,25 @@
#
# The contents of this file are subject to the license and copyright
# detailed in the LICENSE and NOTICE files at the root of the source
# tree and available online at
#
# http://www.dspace.org/license/
#
# Docker Compose for running the DSpace backend for testing/development
# This is based heavily on the docker-compose.yml that is available in the DSpace/DSpace
# (Backend) at:
# https://github.com/DSpace/DSpace/blob/main/docker-compose.yml
version: '3.7'
networks:
dspacenet:
services:
# DSpace (backend) webapp container
dspace:
container_name: dspace
image: dspace/dspace:dspace-7_x-test
depends_on:
- dspacedb
image: dspace/dspace:dspace-7_x-test
networks:
dspacenet:
ports:
@@ -16,27 +30,42 @@ services:
volumes:
- assetstore:/dspace/assetstore
- "./local.cfg:/dspace/config/local.cfg"
# Ensure that the database is ready before starting tomcat
# Mount DSpace's solr configs to a volume, so that we can share to 'dspacesolr' container (see below)
- solr_configs:/dspace/solr
# Ensure that the database is ready BEFORE starting tomcat
# 1. While a TCP connection to dspacedb port 5432 is not available, continue to sleep
# 2. Then, run database migration to init database tables
# 3. Finally, start Tomcat
entrypoint:
- /bin/bash
- '-c'
- |
while (!</dev/tcp/dspacedb/5432) > /dev/null 2>&1; do sleep 1; done;
/dspace/bin/dspace database migrate
catalina.sh run
# DSpace database container
dspacedb:
container_name: dspacedb
image: dspace/dspace-postgres-pgcrypto
environment:
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto
networks:
dspacenet:
ports:
- published: 5432
target: 5432
stdin_open: true
tty: true
volumes:
- pgdata:/pgdata
# DSpace Solr container
dspacesolr:
container_name: dspacesolr
image: dspace/dspace-solr
# Uses official Solr image at https://hub.docker.com/_/solr/
image: solr:8.8
# Needs main 'dspace' container to start first to guarantee access to solr_configs
depends_on:
- dspace
networks:
dspacenet:
ports:
@@ -44,16 +73,27 @@ services:
target: 8983
stdin_open: true
tty: true
working_dir: /var/solr/data
volumes:
- solr_authority:/opt/solr/server/solr/authority/data
- solr_oai:/opt/solr/server/solr/oai/data
- solr_search:/opt/solr/server/solr/search/data
- solr_statistics:/opt/solr/server/solr/statistics/data
version: '3.7'
# Mount our "solr_configs" volume available under the Solr's configsets folder (in a 'dspace' subfolder)
# This copies the Solr configs from main 'dspace' container into 'dspacesolr' via that volume
- solr_configs:/opt/solr/server/solr/configsets/dspace
# Keep Solr data directory between reboots
- solr_data:/var/solr/data
# Initialize all DSpace Solr cores using the mounted local configsets (see above), then start Solr
entrypoint:
- /bin/bash
- '-c'
- |
init-var-solr
precreate-core authority /opt/solr/server/solr/configsets/dspace/authority
precreate-core oai /opt/solr/server/solr/configsets/dspace/oai
precreate-core search /opt/solr/server/solr/configsets/dspace/search
precreate-core statistics /opt/solr/server/solr/configsets/dspace/statistics
exec solr -f
volumes:
assetstore:
pgdata:
solr_authority:
solr_oai:
solr_search:
solr_statistics:
solr_data:
# Special volume used to share Solr configs from 'dspace' to 'dspacesolr' container (see above)
solr_configs:

View File

@@ -1,53 +0,0 @@
networks:
dspacenet:
services:
dspace:
container_name: dspace
depends_on:
- dspacedb
image: dspace/dspace:dspace-7_x-test
networks:
dspacenet:
ports:
- published: 8080
target: 8080
stdin_open: true
tty: true
volumes:
- assetstore:/dspace/assetstore
- "./local.cfg:/dspace/config/local.cfg"
dspacedb:
container_name: dspacedb
environment:
LOADSQL: https://www.dropbox.com/s/xh3ack0vg0922p2/configurable-entities-2019-05-08.sql?dl=1
PGDATA: /pgdata
image: dspace/dspace-postgres-pgcrypto:loadsql
networks:
dspacenet:
stdin_open: true
tty: true
volumes:
- pgdata:/pgdata
dspacesolr:
container_name: dspacesolr
image: dspace/dspace-solr
networks:
dspacenet:
ports:
- published: 8983
target: 8983
stdin_open: true
tty: true
volumes:
- solr_authority:/opt/solr/server/solr/authority/data
- solr_oai:/opt/solr/server/solr/oai/data
- solr_search:/opt/solr/server/solr/search/data
- solr_statistics:/opt/solr/server/solr/statistics/data
version: '3.7'
volumes:
assetstore:
pgdata:
solr_authority:
solr_oai:
solr_search:
solr_statistics:

View File

@@ -1,3 +1,14 @@
#
# The contents of this file are subject to the license and copyright
# detailed in the LICENSE and NOTICE files at the root of the source
# tree and available online at
#
# http://www.dspace.org/license/
#
# Docker Compose for running the DSpace Angular UI for testing/development
# Requires also running a REST API backend (either locally or remotely),
# for example via 'docker-compose-rest.yml'
version: '3.7'
networks:
dspacenet:
@@ -7,7 +18,7 @@ services:
environment:
DSPACE_HOST: dspace-angular
DSPACE_NAMESPACE: /
DSPACE_PORT: '3000'
DSPACE_PORT: '4000'
DSPACE_SSL: "false"
image: dspace/dspace-angular:latest
build:
@@ -16,11 +27,11 @@ services:
networks:
dspacenet:
ports:
- published: 3000
target: 3000
- published: 4000
target: 4000
- published: 9876
target: 9876
stdin_open: true
tty: true
volumes:
- ./environment.dev.js:/app/config/environment.dev.js
- ./environment.dev.ts:/app/src/environments/environment.dev.ts

View File

@@ -1,16 +1,18 @@
/*
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
module.exports = {
// This file is based on environment.template.ts provided by Angular UI
export const environment = {
// Default to using the local REST API (running in Docker)
rest: {
ssl: false,
host: 'localhost',
port: 8080,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/server/api'
nameSpace: '/server'
}
};

View File

@@ -1,5 +1,6 @@
dspace.dir=/dspace
db.url=jdbc:postgresql://dspacedb:5432/dspace
dspace.server.url=http://localhost:8080/server
dspace.ui.url=http://localhost:4000
dspace.name=DSpace Started with Docker Compose
solr.server=http://dspacesolr:8983/solr

View File

@@ -1,23 +1,23 @@
# Configuration
Default configuration file is located in `config/` folder. All configuration options should be listed in the default configuration file `config/environment.default.js`. Please do not change this file directly! To change the default configuration values, create local files that override the parameters you need to change:
Default configuration file is located in `src/environments/` folder. All configuration options should be listed in the default configuration file `src/environments/environment.common.ts`. Please do not change this file directly! To change the default configuration values, create local files that override the parameters you need to change. You can use `environment.template.ts` as a starting point.
- Create a new `environment.dev.js` file in `config/` for `devel` environment;
- Create a new `environment.prod.js` file in `config/` for `production` environment;
- Create a new `environment.dev.ts` file in `src/environments/` for `development` environment;
- Create a new `environment.prod.ts` file in `src/environments/` for `production` environment;
Some few configuration options can be overridden by setting environment variables. These and the variable names are listed below.
## Nodejs server
When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itsself to, and if ssl should be enabled not. By default it listens on `localhost:3000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`.
When you start dspace-angular on node, it spins up an http server on which it listens for incoming connections. You can define the ip address and port the server should bind itsself to, and if ssl should be enabled not. By default it listens on `localhost:4000`. If you want it to listen on all your network connections, configure it to bind itself to `0.0.0.0`.
To change this configuration, change the options `ui.host`, `ui.port` and `ui.ssl` in the appropriate configuration file (see above):
```
module.exports = {
// Angular Universal server settings.
export const environment = {
// Angular UI settings.
ui: {
ssl: false,
host: 'localhost',
port: 3000,
port: 4000,
nameSpace: '/'
}
};
@@ -27,7 +27,7 @@ Alternately you can set the following environment variables. If any of these are
```
DSPACE_SSL=true
DSPACE_HOST=localhost
DSPACE_PORT=3000
DSPACE_PORT=4000
DSPACE_NAMESPACE=/
```
@@ -35,14 +35,14 @@ Alternately you can set the following environment variables. If any of these are
dspace-angular connects to your DSpace installation by using its REST endpoint. To do so, you have to define the ip address, port and if ssl should be enabled. You can do this in a configuration file (see above) by adding the following options:
```
module.exports = {
export const environment = {
// The REST API server settings.
rest: {
ssl: true,
host: 'dspace7.4science.it',
host: 'api7.dspace.org',
port: 443,
// NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: '/dspace-spring-rest/api'
nameSpace: '/server'
}
};
```
@@ -50,9 +50,9 @@ module.exports = {
Alternately you can set the following environment variables. If any of these are set, it will override all configuration files:
```
DSPACE_REST_SSL=true
DSPACE_REST_HOST=localhost
DSPACE_REST_PORT=3000
DSPACE_REST_NAMESPACE=/
DSPACE_REST_HOST=api7.dspace.org
DSPACE_REST_PORT=443
DSPACE_REST_NAMESPACE=/server
```
## Supporting analytics services other than Google Analytics
@@ -62,4 +62,5 @@ Angulartics can be configured to work with a number of other services besides Go
In order to start using one of these services, select it from the [Angulartics Providers page](https://angulartics.github.io/angulartics2/#providers), and follow the instructions on how to configure it.
The Google Analytics script was added in [`main.browser.ts`](https://github.com/DSpace/dspace-angular/blob/ff04760f4af91ac3e7add5e7424a46cb2439e874/src/main.browser.ts#L33) instead of the `<head>` tag in `index.html` to ensure events get sent when the page is shown in a client's browser, and not when it's rendered on the universal server. Likely you'll want to do the same when adding a new service.
The Google Analytics script was added in [`main.browser.ts`](https://github.com/DSpace/dspace-angular/blob/ff04760f4af91ac3e7add5e7424a46cb2439e874/src/main.browser.ts#L33) instead of the `<head>` tag in `index.html` to ensure events get sent when the page is shown in a client's browser, and not when it's rendered on the universal server. Likely you'll want to do the same when adding a new service.

View File

@@ -1,16 +0,0 @@
import { browser, element, by } from 'protractor';
export class ProtractorPage {
navigateTo() {
return browser.get('/')
.then(() => browser.waitForAngular());
}
getPageTitleText() {
return browser.getTitle();
}
getHomePageNewsText() {
return element(by.css('ds-home-news')).getText();
}
}

14
e2e/protractor-ci.conf.js Normal file
View File

@@ -0,0 +1,14 @@
const config = require('./protractor.conf').config;
config.capabilities = {
browserName: 'chrome',
chromeOptions: {
args: ['--headless', '--no-sandbox', '--disable-gpu']
}
};
// don't use protractor's webdriver, as it may be incompatible with the installed chrome version
config.directConnect = false;
config.seleniumAddress = 'http://localhost:4444/wd/hub';
exports.config = config;

View File

@@ -12,10 +12,10 @@ exports.config = {
// Change to 'false' to run tests using a remote Selenium server
directConnect: true,
// Change if the website to test is not on the localhost
baseUrl: 'http://localhost:3000/',
baseUrl: 'http://localhost:4000/',
// -----------------------------------------------------------------
specs: [
'./e2e/**/*.e2e-spec.ts'
'./src/**/*.e2e-spec.ts'
],
// -----------------------------------------------------------------
// Browser and Capabilities: PhantomJS
@@ -67,7 +67,7 @@ exports.config = {
//],
plugins: [{
path: 'node_modules/protractor-istanbul-plugin'
path: '../node_modules/protractor-istanbul-plugin'
}],
framework: 'jasmine',
@@ -79,7 +79,7 @@ exports.config = {
useAllAngular2AppRoots: true,
beforeLaunch: function () {
require('ts-node').register({
project: 'e2e'
project: './e2e/tsconfig.json'
});
},
onPrepare: function () {

View File

@@ -1,35 +0,0 @@
import { browser, by, element, protractor } from 'protractor';
import { promise } from 'selenium-webdriver';
export class ProtractorPage {
HOME = '/home';
SEARCH = '/search';
navigateToHome() {
return browser.get(this.HOME);
}
navigateToSearch() {
return browser.get(this.SEARCH);
}
getCurrentQuery(): promise.Promise<string> {
return element(by.css('#search-navbar-container form input')).getAttribute('value');
}
expandAndFocusSearchBox() {
element(by.css('#search-navbar-container form a')).click();
}
setCurrentQuery(query: string) {
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(query);
}
submitNavbarSearchForm() {
element(by.css('#search-navbar-container form .submit-icon')).click();
}
submitByPressingEnter() {
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
}
}

View File

@@ -9,11 +9,14 @@ describe('protractor App', () => {
it('should display translated title "DSpace Angular :: Home"', () => {
page.navigateTo();
page.waitUntilNotLoading();
expect<any>(page.getPageTitleText()).toEqual('DSpace Angular :: Home');
});
it('should contain a news section', () => {
page.navigateTo()
.then(() => expect<any>(page.getHomePageNewsText()).toBeDefined());
page.navigateTo();
page.waitUntilNotLoading();
const text = page.getHomePageNewsText();
expect<any>(text).toBeDefined();
});
});

23
e2e/src/app.po.ts Normal file
View File

@@ -0,0 +1,23 @@
import { browser, element, by, protractor, promise } from 'protractor';
export class ProtractorPage {
navigateTo() {
return browser.get('/')
.then(() => browser.waitForAngular());
}
getPageTitleText() {
return browser.getTitle();
}
getHomePageNewsText() {
return element(by.css('ds-home-news')).getText();
}
waitUntilNotLoading(): promise.Promise<unknown> {
const loading = element(by.css('.loader'));
const EC = protractor.ExpectedConditions;
const notLoading = EC.not(EC.presenceOf(loading));
return browser.wait(notLoading, 10000);
}
}

View File

@@ -0,0 +1,35 @@
import { browser, by, element, protractor } from 'protractor';
import { promise } from 'selenium-webdriver';
export class ProtractorPage {
HOME = '/home';
SEARCH = '/search';
navigateToHome() {
return browser.get(this.HOME);
}
navigateToSearch() {
return browser.get(this.SEARCH);
}
getCurrentQuery(): promise.Promise<string> {
return element(by.css('.navbar-container #search-navbar-container form input')).getAttribute('value');
}
expandAndFocusSearchBox() {
element(by.css('.navbar-container #search-navbar-container form a')).click();
}
setCurrentQuery(query: string) {
element(by.css('.navbar-container #search-navbar-container form input[name="query"]')).sendKeys(query);
}
submitNavbarSearchForm() {
element(by.css('.navbar-container #search-navbar-container form .submit-icon')).click();
}
submitByPressingEnter() {
element(by.css('.navbar-container #search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
}
}

View File

@@ -1,6 +1,5 @@
import { ProtractorPage } from './search-page.po';
import { browser } from 'protractor';
import { promise } from 'selenium-webdriver';
describe('protractor SearchPage', () => {
let page: ProtractorPage;
@@ -23,9 +22,11 @@ describe('protractor SearchPage', () => {
.then(() => page.getRandomScopeOption())
.then((scopeString: string) => {
page.navigateToSearchWithScopeParameter(scopeString);
page.getCurrentScope().then((s: string) => {
expect<string>(s).toEqual(scopeString);
});
page.waitUntilNotLoading();
page.getCurrentScope()
.then((s: string) => {
expect<string>(s).toEqual(scopeString);
});
});
});
@@ -33,13 +34,16 @@ describe('protractor SearchPage', () => {
page.navigateToSearch()
.then(() => page.getRandomScopeOption())
.then((scopeString: string) => {
page.setCurrentScope(scopeString);
page.submitSearchForm();
browser.wait(() => {
return browser.getCurrentUrl().then((url: string) => {
return url.indexOf('scope=' + encodeURI(scopeString)) !== -1;
page.setCurrentScope(scopeString)
.then(() => page.submitSearchForm())
.then(() => page.waitUntilNotLoading())
.then(() => () => {
browser.wait(() => {
return browser.getCurrentUrl().then((url: string) => {
return url.indexOf('scope=' + encodeURI(scopeString)) !== -1;
});
});
});
});
});
});

View File

@@ -27,7 +27,7 @@ export class ProtractorPage {
}
setCurrentScope(scope: string) {
element(by.css('#search-form option[value="' + scope + '"]')).click();
return element(by.css('#search-form option[value="' + scope + '"]')).click();
}
setCurrentQuery(query: string) {
@@ -35,7 +35,7 @@ export class ProtractorPage {
}
submitSearchForm() {
element(by.css('#search-form button.search-button')).click();
return element(by.css('#search-form button.search-button')).click();
}
getRandomScopeOption(): promise.Promise<string> {
@@ -46,4 +46,10 @@ export class ProtractorPage {
});
}
waitUntilNotLoading(): promise.Promise<unknown> {
const loading = element(by.css('.loader'));
const EC = protractor.ExpectedConditions;
const notLoading = EC.not(EC.presenceOf(loading));
return browser.wait(notLoading, 10000);
}
}

View File

@@ -8,7 +8,7 @@
"moduleResolution": "node",
"outDir": "../dist/out-tsc-e2e",
"sourceMap": true,
"target": "es5",
"target": "es2018",
"typeRoots": [
"../node_modules/@types"
]

View File

@@ -1,176 +1,38 @@
/**
* @author: @AngularClass
*/
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
var testWebpackConfig = require('./webpack/webpack.test.js')({
env: 'test'
});
// Uncomment and change to run tests on a remote Selenium server
var webdriverConfig = {
hostname: 'localhost',
port: 4444
};
var configuration = {
client: {
jasmine: {
random: false
}
},
// base path that will be used to resolve all patterns (e.g. files, exclude)
config.set({
basePath: '',
/*
* Frameworks to use
*
* available frameworks: https://npmjs.org/browse/keyword/karma-adapter
*/
frameworks: ['jasmine'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require("istanbul-instrumenter-loader"),
require('karma-chrome-launcher'),
require('karma-coverage'),
require("karma-istanbul-preprocessor"),
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-mocha-reporter'),
require('karma-phantomjs-launcher'),
require('karma-remap-coverage'),
require('karma-remap-istanbul'),
require('karma-sourcemap-loader'),
require('karma-webdriver-launcher'),
require('karma-webpack')
],
// list of files to exclude
exclude: [],
/*
* list of files / patterns to load in the browser
*
* we are building the test environment in ./spec-bundle.js
*/
files: [{
pattern: './spec-bundle.js',
watched: false,
}],
/*
* preprocess matching files before serving them to the browser
* available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
*/
preprocessors: {
'./spec-bundle.js': [
'istanbul',
'webpack',
'sourcemap'
]
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
captureConsole: false
},
// Webpack Config at ./webpack.test.js
webpack: testWebpackConfig,
// save interim raw coverage report in memory
coverageReporter: {
type: 'in-memory'
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/dspace-angular'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
remapCoverageReporter: {
'text-summary': null, // to show summary in console
html: './coverage/html',
cobertura: './coverage/cobertura.xml'
},
remapIstanbulReporter: {
remapOptions: {}, //additional remap options
reports: {
json: './coverage/coverage.json',
lcovonly: './coverage/lcov.info',
html: './coverage/html/',
}
},
/**
* Webpack please don't spam the console when running in karma!
*/
webpackMiddleware: {
/**
* webpack-dev-middleware configuration
* i.e.
*/
noInfo: true,
/**
* and use stats to turn off verbose output
*/
stats: {
/**
* options i.e.
*/
chunks: false
}
},
/*
* test results reporter to use
*
* possible values: 'dots', 'progress'
* available reporters: https://npmjs.org/browse/keyword/karma-reporter
*/
reporters: [
'mocha',
'coverage',
'remap-coverage',
'karma-remap-istanbul'
],
// Karma web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
/*
* level of logging
* possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
*/
logLevel: config.LOG_WARN,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
/*
* start these browsers
* available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
*/
browsers: [
'Chrome'
],
customLaunchers: {
// Remote Selenium Server with Chrome - launcher
'SeleniumChrome': {
base: 'WebDriver',
config: webdriverConfig,
browserName: 'chrome'
},
// Remote Selenium Server with Firefox - launcher
'SeleniumFirefox': {
base: 'WebDriver',
config: webdriverConfig,
browserName: 'firefox'
}
},
reporters: ['mocha', 'kjhtml'],
mochaReporter: {
ignoreSkipped: true
ignoreSkipped: true,
output: 'autowatch'
},
browserNoActivityTimeout: 30000
};
config.set(configuration);
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

5
mock-nodemon.json Normal file
View File

@@ -0,0 +1,5 @@
{
"watch": ["src/environments/mock-environment.ts"],
"ext": "ts",
"exec": "ts-node --project ./tsconfig.ts-node.json scripts/set-mock-env.ts"
}

View File

@@ -1,9 +1,6 @@
{
"watch": [
"dist",
"config",
"src/index.html"
],
"ext": "js ts json html",
"delay": "50"
"watch": ["src/environments"],
"ext": "ts",
"ignore": ["src/environments/environment.ts", "src/environments/mock-environment.ts"],
"exec": "ts-node --project ./tsconfig.ts-node.json scripts/set-env.ts --dev"
}

View File

@@ -1,21 +1,40 @@
{
"name": "dspace-angular",
"version": "0.0.1",
"description": "Angular Universal UI for DSpace",
"repository": {
"type": "git",
"url": "https://github.com/dspace/dspace-angular.git"
},
"license": "BSD-2-Clause",
"engines": {
"node": "10.* || >= 12.*"
},
"resolutions": {
"serialize-javascript": ">= 2.1.2",
"set-value": ">= 2.0.1"
},
"version": "0.0.0",
"scripts": {
"global": "npm install -g @angular/cli marked node-gyp nodemon node-nightly npm-check-updates npm-run-all rimraf typescript ts-node typedoc webpack webpack-bundle-analyzer pm2 rollup",
"ng": "ng",
"config:dev": "ts-node --project ./tsconfig.ts-node.json scripts/set-env.ts --dev",
"config:prod": "ts-node --project ./tsconfig.ts-node.json scripts/set-env.ts --prod",
"config:test": "ts-node --project ./tsconfig.ts-node.json scripts/set-mock-env.ts",
"config:test:watch": "nodemon --config mock-nodemon.json",
"config:dev:watch": "nodemon",
"prestart:dev": "yarn run config:dev",
"prebuild": "yarn run config:dev",
"pretest": "yarn run config:test",
"pretest:watch": "yarn run config:test",
"pretest:headless": "yarn run config:test",
"prebuild:prod": "yarn run config:prod",
"pree2e": "yarn run config:prod",
"pree2e:ci": "yarn run config:prod",
"start": "yarn run start:prod",
"serve": "ts-node --project ./tsconfig.ts-node.json scripts/serve.ts",
"start:dev": "npm-run-all --parallel config:dev:watch serve",
"start:prod": "yarn run build:prod && yarn run serve:ssr",
"analyze": "webpack-bundle-analyzer dist/browser/stats.json",
"build": "ng build",
"build:stats": "ng build --stats-json",
"build:prod": "yarn run build:ssr",
"build:ssr": "yarn run build:client-and-server-bundles && yarn run compile:server",
"build:client-and-server-bundles": "ng build --prod && ng run dspace-angular:server:production --bundleDependencies true",
"test:watch": "npm-run-all --parallel config:test:watch test",
"test": "ng test --sourceMap=true --watch=true",
"test:headless": "ng test --watch=false --sourceMap=true --browsers=ChromeHeadless --code-coverage",
"lint": "ng lint",
"lint-fix": "ng lint --fix=true",
"e2e": "ng e2e",
"e2e:ci": "ng e2e --webdriver-update=false --protractor-config=./e2e/protractor-ci.conf.js",
"compile:server": "webpack --config webpack.server.config.js --progress --color",
"serve:ssr": "node dist/server",
"clean:coverage": "rimraf coverage",
"clean:dist": "rimraf dist",
"clean:doc": "rimraf doc",
@@ -24,234 +43,147 @@
"clean:bld": "rimraf build",
"clean:node": "rimraf node_modules",
"clean:prod": "yarn run clean:coverage && yarn run clean:doc && yarn run clean:dist && yarn run clean:log && yarn run clean:json && yarn run clean:bld",
"clean": "yarn run clean:prod && yarn run clean:node",
"prebuild": "yarn run clean:bld && yarn run clean:dist",
"prebuild:ci": "yarn run prebuild",
"prebuild:prod": "yarn run prebuild",
"build": "node ./scripts/webpack.js --progress --mode development",
"build:ci": "yarn run syncbuilddir && node ./scripts/webpack.js --env.aot --env.server --mode development && node ./scripts/webpack.js --env.aot --env.client --mode development",
"build:prod": "yarn run syncbuilddir && node ./scripts/webpack.js --env.aot --env.server --mode production && node ./scripts/webpack.js --env.aot --env.client --mode production",
"postbuild:prod": "yarn run rollup",
"rollup": "rollup -c rollup.config.js",
"prestart": "yarn run build:prod",
"prestart:dev": "yarn run build",
"start": "yarn run server",
"start:dev": "yarn run server",
"deploy": "pm2 start dist/server.js",
"predeploy": "npm run build:prod",
"preundeploy": "pm2 stop dist/server.js",
"undeploy": "pm2 delete dist/server.js",
"postundeploy": "npm run clean:dist",
"server": "node dist/server.js",
"server:watch": "nodemon dist/server.js",
"server:watch:debug": "nodemon --debug dist/server.js",
"syncbuilddir": "node ./scripts/sync-build-dir.js",
"webpack:watch": "node ./scripts/webpack.js -w --mode development",
"watch": "yarn run build && npm-run-all -p webpack:watch server:watch",
"watch:debug": "yarn run build && npm-run-all -p webpack:watch server:watch:debug",
"predebug": "yarn run build",
"predebug:server": "yarn run build",
"debug": "node --debug-brk dist/server.js",
"debug:server": "node-nightly --inspect --debug-brk dist/server.js",
"debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --mode development",
"debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --env.aot --env.client --env.server --mode production",
"ci": "yarn run lint && yarn run build:ci && yarn run test:headless && npm-run-all -p -r server e2e",
"protractor": "node node_modules/protractor/bin/protractor",
"pree2e": "yarn run webdriver:update",
"e2e": "yarn run protractor",
"pretest": "yarn run clean:bld",
"pretest:headless": "yarn run pretest",
"pretest:watch": "yarn run pretest",
"test": "karma start --single-run",
"test:headless": "karma start --single-run --browsers ChromeHeadless",
"test:watch": "karma start --no-single-run --auto-watch",
"webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444",
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone --gecko false",
"lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
"docs": "typedoc --options typedoc.json ./src/",
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
"postinstall": "yarn run patch-protractor",
"patch-protractor": "ncp node_modules/webdriver-manager node_modules/protractor/node_modules/webdriver-manager",
"sync-i18n": "node ./scripts/sync-i18n-files.js"
"clean": "yarn run clean:prod && yarn run clean:env && yarn run clean:node",
"clean:env": "rimraf src/environments/environment.ts",
"sync-i18n": "yarn run config:dev && ts-node --project ./tsconfig.ts-node.json scripts/sync-i18n-files.ts",
"postinstall": "ngcc"
},
"browser": {
"fs": false,
"path": false,
"http": false,
"https": false
},
"private": true,
"resolutions": {
"minimist": "^1.2.5"
},
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/cdk": "8.2.3",
"@angular/cli": "^8.3.25",
"@angular/common": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/platform-server": "^8.2.14",
"@angular/router": "^8.2.14",
"@angular/animations": "~10.2.3",
"@angular/cdk": "^10.2.6",
"@angular/common": "~10.2.3",
"@angular/compiler": "~10.2.3",
"@angular/core": "~10.2.3",
"@angular/forms": "~10.2.3",
"@angular/localize": "10.2.3",
"@angular/platform-browser": "~10.2.3",
"@angular/platform-browser-dynamic": "~10.2.3",
"@angular/platform-server": "~10.2.3",
"@angular/router": "~10.2.3",
"@angularclass/bootloader": "1.0.1",
"@ng-bootstrap/ng-bootstrap": "^5.2.1",
"@ng-dynamic-forms/core": "8.1.1",
"@ng-dynamic-forms/ui-ng-bootstrap": "8.1.1",
"@ngrx/effects": "^8.6.0",
"@ngrx/router-store": "^8.6.0",
"@ngrx/store": "^8.6.0",
"@nguniversal/express-engine": "^8.2.6",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"@nicky-lenaers/ngx-scroll-to": "^3.0.1",
"@ng-bootstrap/ng-bootstrap": "7.0.0",
"@ng-dynamic-forms/core": "^12.0.0",
"@ng-dynamic-forms/ui-ng-bootstrap": "^12.0.0",
"@ngrx/effects": "^10.0.1",
"@ngrx/router-store": "^10.0.1",
"@ngrx/store": "^10.0.1",
"@nguniversal/express-engine": "10.1.0",
"@ngx-translate/core": "^13.0.0",
"@nicky-lenaers/ngx-scroll-to": "^9.0.0",
"angular-idle-preload": "3.0.0",
"angular2-text-mask": "9.0.0",
"angulartics2": "7.5.2",
"body-parser": "1.18.2",
"angulartics2": "^10.0.0",
"bootstrap": "4.3.1",
"caniuse-lite": "^1.0.30001165",
"cerialize": "0.1.18",
"compression": "1.7.1",
"cookie-parser": "1.4.3",
"core-js": "^3.6.4",
"cli-progress": "^3.8.0",
"cookie-parser": "1.4.5",
"core-js": "^3.7.0",
"debug-loader": "^0.0.1",
"express": "4.16.2",
"express-session": "1.15.6",
"fast-json-patch": "^2.0.7",
"file-saver": "^1.3.8",
"deepmerge": "^4.2.2",
"express": "^4.17.1",
"express-rate-limit": "^5.1.3",
"fast-json-patch": "^3.0.0-1",
"file-saver": "^2.0.5",
"filesize": "^6.1.0",
"font-awesome": "4.7.0",
"fork-ts-checker-webpack-plugin": "^0.4.10",
"hammerjs": "^2.0.8",
"http-server": "0.11.1",
"https": "1.0.0",
"js-cookie": "2.2.0",
"js.clone": "0.0.3",
"json5": "^2.1.0",
"jsonschema": "1.2.2",
"jwt-decode": "^2.2.0",
"methods": "1.1.2",
"moment": "^2.22.1",
"moment-range": "^4.0.2",
"morgan": "^1.9.1",
"ng-mocks": "^8.1.0",
"ng2-file-upload": "1.2.1",
"js-cookie": "2.2.1",
"json5": "^2.1.3",
"jsonschema": "1.4.0",
"jwt-decode": "^3.1.2",
"klaro": "^0.7.10",
"moment": "^2.29.1",
"morgan": "^1.10.0",
"ng-mocks": "10.5.4",
"ng2-file-upload": "1.4.0",
"ng2-nouislider": "^1.8.2",
"ngx-bootstrap": "^5.3.2",
"ngx-infinite-scroll": "6.0.1",
"ngx-moment": "^3.4.0",
"ngx-pagination": "3.0.3",
"ngx-sortablejs": "^3.1.4",
"nouislider": "^11.0.0",
"pem": "1.13.2",
"ngx-infinite-scroll": "^10.0.1",
"ngx-moment": "^5.0.0",
"ngx-pagination": "5.0.0",
"ngx-sortablejs": "^10.0.0",
"nouislider": "^14.6.3",
"pem": "1.14.4",
"postcss-cli": "^8.3.0",
"reflect-metadata": "^0.1.13",
"rxjs": "6.5.4",
"rxjs-spy": "^7.5.1",
"sass-resources-loader": "^2.0.0",
"sortablejs": "1.7.0",
"text-mask-core": "5.0.1",
"ts-loader": "^5.2.1",
"ts-md5": "^1.2.4",
"url-parse": "^1.4.7",
"uuid": "^3.2.1",
"rxjs": "^6.6.3",
"rxjs-spy": "^7.5.3",
"sass-resources-loader": "^2.1.1",
"sortablejs": "1.13.0",
"tslib": "^2.0.0",
"webfontloader": "1.6.28",
"webpack-cli": "^3.2.0",
"zone.js": "^0.9.1"
"zone.js": "^0.10.3",
"@kolkov/ngx-gallery": "^1.2.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.25",
"@angular/compiler": "^8.2.14",
"@angular/compiler-cli": "^8.2.14",
"@angular-builders/custom-webpack": "10.0.1",
"@angular-devkit/build-angular": "~0.1002.0",
"@angular/cli": "~10.2.0",
"@angular/compiler-cli": "~10.2.3",
"@angular/language-service": "~10.2.3",
"@fortawesome/fontawesome-free": "^5.5.0",
"@ngrx/entity": "^8.6.0",
"@ngrx/schematics": "^8.6.0",
"@ngrx/store-devtools": "^8.6.0",
"@ngtools/webpack": "^8.3.25",
"@schematics/angular": "^0.7.5",
"@types/acorn": "^4.0.3",
"@types/cookie-parser": "1.4.1",
"@types/deep-freeze": "0.1.1",
"@types/express": "^4.11.1",
"@types/express-serve-static-core": "4.16.0",
"@types/file-saver": "^1.3.0",
"@types/hammerjs": "2.0.35",
"@types/jasmine": "^3.3.9",
"@types/js-cookie": "2.1.0",
"@types/json5": "^0.0.30",
"@types/lodash": "^4.14.110",
"@types/memory-cache": "0.2.0",
"@types/mime": "2.0.0",
"@types/node": "^11.11.2",
"@types/serve-static": "1.13.2",
"@types/uuid": "^3.4.3",
"@types/webfontloader": "1.6.29",
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"ajv": "^6.1.1",
"ajv-keywords": "^3.1.0",
"angular2-template-loader": "0.6.2",
"autoprefixer": "^9.1.3",
"caniuse-lite": "^1.0.30000697",
"cli-progress": "^3.3.1",
"codelyzer": "^5.1.0",
"commander": "^3.0.2",
"@ngrx/store-devtools": "^10.0.1",
"@ngtools/webpack": "10.2.0",
"@nguniversal/builders": "~10.1.0",
"@types/deep-freeze": "0.1.2",
"@types/express": "^4.17.9",
"@types/file-saver": "^2.0.1",
"@types/jasmine": "^3.6.2",
"@types/jasminewd2": "~2.0.8",
"@types/js-cookie": "2.2.6",
"@types/lodash": "^4.14.165",
"@types/node": "^14.14.9",
"codelyzer": "^6.0.1",
"compression-webpack-plugin": "^3.0.1",
"copy-webpack-plugin": "^5.1.1",
"copyfiles": "^2.1.1",
"coveralls": "3.0.0",
"copy-webpack-plugin": "^6.4.1",
"css-loader": "3.4.0",
"cssnano": "^4.1.10",
"deep-freeze": "0.0.1",
"eslint": "^6.7.2",
"exports-loader": "^0.7.0",
"html-webpack-plugin": "3.2.0",
"imports-loader": "0.8.0",
"istanbul-instrumenter-loader": "3.0.1",
"jasmine-core": "^3.3.0",
"jasmine-marbles": "0.3.1",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.0.1",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "2.0.0",
"karma-coverage": "1.1.2",
"karma-istanbul-preprocessor": "0.0.2",
"karma-jasmine": "2.0.1",
"dotenv": "^8.2.0",
"fork-ts-checker-webpack-plugin": "^6.0.3",
"html-webpack-plugin": "^4.5.0",
"http-proxy-middleware": "^1.0.5",
"jasmine-core": "^3.6.0",
"jasmine-marbles": "0.6.0",
"jasmine-spec-reporter": "^6.0.0",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-mocha-reporter": "2.2.5",
"karma-phantomjs-launcher": "1.0.4",
"karma-remap-coverage": "^0.1.5",
"karma-remap-istanbul": "0.6.0",
"karma-sourcemap-loader": "0.3.7",
"karma-webdriver-launcher": "^1.0.7",
"karma-webpack": "3.0.0",
"ncp": "^2.0.0",
"nodemon": "^1.15.0",
"npm-run-all": "4.1.3",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss": "^7.0.2",
"nodemon": "^2.0.2",
"npm-run-all": "^4.1.5",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"postcss-apply": "0.11.0",
"postcss-cli": "^6.0.0",
"postcss-cssnext": "3.1.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "6.7.0",
"postcss-responsive-type": "1.0.0",
"postcss-smart-import": "0.7.6",
"protractor": "^5.4.2",
"protractor": "^7.0.0",
"protractor-istanbul-plugin": "2.0.0",
"raw-loader": "0.5.1",
"rimraf": "2.6.2",
"rollup": "^0.65.0",
"rollup-plugin-commonjs": "^9.1.6",
"rollup-plugin-node-globals": "1.2.1",
"rollup-plugin-node-resolve": "^3.0.3",
"rollup-plugin-terser": "^2.0.2",
"sass-loader": "7.3.1",
"script-ext-html-webpack-plugin": "2.1.4",
"source-map": "0.7.3",
"source-map-loader": "0.2.4",
"string-replace-loader": "^2.1.1",
"rimraf": "^3.0.2",
"script-ext-html-webpack-plugin": "2.1.5",
"string-replace-loader": "^2.3.0",
"terser-webpack-plugin": "^2.3.1",
"to-string-loader": "1.1.5",
"ts-helpers": "1.1.2",
"ts-node": "4.1.0",
"tslint": "5.11.0",
"typedoc": "^0.9.0",
"typescript": "3.5.3",
"webdriver-manager": "^12.1.7",
"webpack": "^4.29.6",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-middleware": "3.2.0",
"webpack-dev-server": "^3.1.11",
"webpack-import-glob-loader": "^1.6.3",
"webpack-merge": "4.1.4",
"ts-loader": "^5.2.0",
"ts-node": "^8.8.1",
"tslint": "^6.1.3",
"typescript": "~4.0.5",
"webpack": "^4.44.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.2.0",
"webpack-node-externals": "1.7.2"
}
}

View File

@@ -1,7 +1,7 @@
module.exports = {
plugins: [
require('postcss-smart-import')(),
require('postcss-cssnext')(),
require('postcss-import')(),
require('postcss-preset-env')(),
require('postcss-apply')(),
require('postcss-responsive-type')()
]

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="231.893px" height="167.458px" viewBox="0 0 231.893 167.458" enable-background="new 0 0 231.893 167.458"
xml:space="preserve">
<path fill="#43515F" d="M51.733,143.32c0-1.94,1.65-3.202,4.562-3.202c3.303,0,6.798,1.115,9.419,3.543l3.835-5.146
c-3.202-2.963-7.476-4.516-12.621-4.516c-7.622,0-12.284,4.467-12.284,9.855c0,12.188,18.644,8.254,18.644,13.887
c0,1.893-1.797,3.592-5.632,3.592c-4.466,0-8.011-2.039-10.292-4.418l-3.787,5.39c3.058,3.059,7.525,5.153,13.788,5.153
c8.691,0,12.964-4.474,12.964-10.396C70.329,144.971,51.733,148.418,51.733,143.32z M100.682,134.484H85.534v32.386h6.895v-11.557
h8.254c6.99,0,10.875-4.759,10.875-10.391C111.558,139.243,107.722,134.484,100.682,134.484z M99.71,149.245h-7.283v-8.69h7.283
c2.72,0,4.808,1.651,4.808,4.368C104.518,147.592,102.43,149.245,99.71,149.245z M180.759,140.067c3.302,0,6.215,2.09,7.573,4.71
l5.923-2.913c-2.28-4.078-6.407-7.914-13.496-7.914c-9.759,0-17.283,6.75-17.283,16.75c0,9.954,7.524,16.76,17.283,16.76
c7.089,0,11.216-3.94,13.496-7.971l-5.923-2.865c-1.358,2.623-4.271,4.711-7.573,4.711c-5.924,0-10.194-4.517-10.194-10.635
C170.564,144.583,174.835,140.067,180.759,140.067z M131.958,134.484l-12.485,32.386h7.823l2.04-5.486h13.887l2.038,5.486h7.816
l-12.479-32.386H131.958z M131.228,155.313l5.05-13.936l5.05,13.936H131.228z M231.892,140.553v-6.069h-22.916v32.386h22.916v-6.07
H215.87v-7.379h15.684v-6.069H215.87v-6.797L231.892,140.553L231.892,140.553z"/>
<path fill="#43515F" d="M29.956,150.652c0-9.71-7.04-16.168-17.187-16.168H0v32.386h12.817
C22.916,166.87,29.956,160.458,29.956,150.652z M12.769,160.799H6.894v-20.246h5.924c6.603,0,10.098,4.418,10.098,10.099
C22.916,156.187,19.177,160.799,12.769,160.799z"/>
<path fill="#43515F" d="M120.726,58.569l0.109-0.006l0.116-0.01l0.106-0.013l0.11-0.01l0.11-0.023l0.109-0.019l0.106-0.023
l0.106-0.029l0.105-0.023l0.106-0.033l0.103-0.034l0.097-0.035l0.104-0.04l0.101-0.042l0.1-0.042v-0.001l0.096-0.045l0,0
l0.095-0.044l0.097-0.049l0.091-0.056v-0.001l0.094-0.05v-0.002l0.09-0.056v-0.001l0.093-0.06l0.083-0.056v-0.001l0.085-0.063
l0.088-0.065v-0.002l0.087-0.062v-0.001c0.816-0.683,1.393-1.646,1.561-2.738l0.013-0.104V54.72l0.014-0.101v-0.011l0.009-0.098
v-0.012l0.009-0.101V54.38l0.005-0.095v-0.016l0.002-0.105v-16.46l-0.002-0.105v-0.016l-0.005-0.095v-0.013l-0.009-0.101v-0.012
l-0.009-0.098v-0.011l-0.014-0.1v-0.01l-0.013-0.104c-0.167-1.092-0.744-2.057-1.561-2.738V34.3l-0.087-0.063v-0.002l-0.088-0.065
l-0.085-0.063v-0.001l-0.083-0.056l-0.093-0.061l0,0l-0.09-0.056V33.93l-0.094-0.05v-0.001l-0.091-0.056l-0.097-0.049l-0.095-0.043
V33.73l-0.096-0.045v-0.001l-0.1-0.043l-0.101-0.042l-0.104-0.04l-0.097-0.035l-0.103-0.031l-0.106-0.036l-0.105-0.023l-0.106-0.028
l-0.106-0.024l-0.109-0.019l-0.11-0.023l-0.11-0.009l-0.106-0.014l-0.116-0.01l-0.109-0.006l-0.114-0.005h-7.89
c-9.716,0-15.858-7.838-15.858-17.15V6.92c0-3.812-3.102-6.915-6.914-6.915H74.085c-3.813,0-6.92,3.106-6.92,6.915v16.682
c0,3.806,3.104,6.909,6.92,6.909h8.414c9.169,0,16.906,5.95,17.146,15.403v0.04c-0.24,9.453-7.978,15.402-17.146,15.402h-8.414
c-3.815,0-6.92,3.103-6.92,6.909v16.682c0,3.81,3.106,6.915,6.92,6.915H89.95c3.812,0,6.914-3.104,6.914-6.915v-9.223
c0-9.312,6.144-17.149,15.858-17.149h7.89L120.726,58.569z M154.772,9.956C148.631,3.814,140.15,0,130.816,0h-15.024v17.424h15.024
c4.526,0,8.647,1.858,11.64,4.849c2.99,2.99,4.849,7.112,4.849,11.639v24.042c0,4.538-1.853,8.665-4.832,11.655l-0.017-0.016
c-2.991,2.991-7.113,4.849-11.64,4.849h-15.024v17.424h15.024c9.333,0,17.814-3.814,23.956-9.956v-0.033
c6.142-6.143,9.955-14.614,9.955-23.923V33.912C164.727,24.578,160.914,16.097,154.772,9.956z"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -1,21 +0,0 @@
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs';
import terser from 'rollup-plugin-terser'
export default {
input: 'dist/client.js',
output: {
file: 'dist/client.js',
format: 'iife',
},
plugins: [
nodeResolve({
jsnext: true,
module: true
}),
commonjs({
include: 'node_modules/rxjs/**'
}),
terser.terser()
]
}

11
scripts/serve.ts Normal file
View File

@@ -0,0 +1,11 @@
import { environment } from '../src/environments/environment';
import * as child from 'child_process';
/**
* Calls `ng serve` with the following arguments configured for the UI in the environment file: host, port, nameSpace, ssl
*/
child.spawn(
`ng serve --host ${environment.ui.host} --port ${environment.ui.port} --servePath ${environment.ui.nameSpace} --ssl ${environment.ui.ssl}`,
{ stdio:'inherit', shell: true }
);

116
scripts/set-env.ts Normal file
View File

@@ -0,0 +1,116 @@
import { writeFile } from 'fs';
import { environment as commonEnv } from '../src/environments/environment.common';
import { GlobalConfig } from '../src/config/global-config.interface';
import { ServerConfig } from '../src/config/server-config.interface';
import { hasValue } from '../src/app/shared/empty.util';
// Configure Angular `environment.ts` file path
const targetPath = './src/environments/environment.ts';
// Load node modules
const colors = require('colors');
require('dotenv').config();
const merge = require('deepmerge');
const mergeOptions = { arrayMerge: (destinationArray, sourceArray, options) => sourceArray };
const environment = process.argv[2];
let environmentFilePath;
let production = false;
switch (environment) {
case '--prod':
case '--production':
production = true;
console.log(`Building ${colors.red.bold(`production`)} environment`);
environmentFilePath = '../src/environments/environment.prod.ts';
break;
case '--test':
console.log(`Building ${colors.blue.bold(`test`)} environment`);
environmentFilePath = '../src/environments/environment.test.ts';
break;
default:
console.log(`Building ${colors.green.bold(`development`)} environment`);
environmentFilePath = '../src/environments/environment.dev.ts';
}
const processEnv = {
ui: createServerConfig(
process.env.DSPACE_HOST,
process.env.DSPACE_PORT,
process.env.DSPACE_NAMESPACE,
process.env.DSPACE_SSL),
rest: createServerConfig(
process.env.DSPACE_REST_HOST,
process.env.DSPACE_REST_PORT,
process.env.DSPACE_REST_NAMESPACE,
process.env.DSPACE_REST_SSL)
} as GlobalConfig;
import(environmentFilePath)
.then((file) => generateEnvironmentFile(merge.all([commonEnv, file.environment, processEnv], mergeOptions)))
.catch(() => {
console.log(colors.yellow.bold(`No specific environment file found for ` + environment));
generateEnvironmentFile(merge(commonEnv, processEnv, mergeOptions))
});
function generateEnvironmentFile(file: GlobalConfig): void {
file.production = production;
buildBaseUrls(file);
const contents = `export const environment = ` + JSON.stringify(file);
writeFile(targetPath, contents, (err) => {
if (err) {
throw console.error(err);
} else {
console.log(`Angular ${colors.bold('environment.ts')} file generated correctly at ${colors.bold(targetPath)} \n`);
}
});
}
// allow to override a few important options by environment variables
function createServerConfig(host?: string, port?: string, nameSpace?: string, ssl?: string): ServerConfig {
const result = {} as any;
if (hasValue(host)) {
result.host = host;
}
if (hasValue(nameSpace)) {
result.nameSpace = nameSpace;
}
if (hasValue(port)) {
result.port = Number(port);
}
if (hasValue(ssl)) {
result.ssl = ssl.trim().match(/^(true|1|yes)$/i) ? true : false;
}
return result;
}
function buildBaseUrls(config: GlobalConfig): void {
for (const key in config) {
if (config.hasOwnProperty(key) && config[key].host) {
config[key].baseUrl = [
getProtocol(config[key].ssl),
getHost(config[key].host),
getPort(config[key].port),
getNameSpace(config[key].nameSpace)
].join('');
}
}
}
function getProtocol(ssl: boolean): string {
return ssl ? 'https://' : 'http://';
}
function getHost(host: string): string {
return host;
}
function getPort(port: number): string {
return port ? (port !== 80 && port !== 443) ? ':' + port : '' : '';
}
function getNameSpace(nameSpace: string): string {
return nameSpace ? nameSpace.charAt(0) === '/' ? nameSpace : '/' + nameSpace : '';
}

11
scripts/set-mock-env.ts Normal file
View File

@@ -0,0 +1,11 @@
import { copyFile } from 'fs';
// Configure Angular `environment.ts` file path
const sourcePath = './src/environments/mock-environment.ts';
const targetPath = './src/environments/environment.ts';
// destination.txt will be created or overwritten by default.
copyFile(sourcePath, targetPath, (err) => {
if (err) throw err;
console.log(sourcePath + ' was copied to ' + targetPath);
});

View File

@@ -1,22 +0,0 @@
const syncBuildDir = require('copyfiles');
const path = require('path');
const {
projectRoot,
theme,
themePath,
} = require('../webpack/helpers');
const projectDepth = projectRoot('./').split(path.sep).length;
let callback;
if (theme !== null && theme !== undefined) {
callback = () => {
syncBuildDir([path.join(themePath, '**/*'), 'build'], { up: projectDepth + 2 }, () => {})
}
}
else {
callback = () => {};
}
syncBuildDir([projectRoot('src/**/*'), 'build'], { up: projectDepth + 1 }, callback);

View File

@@ -1,10 +1,9 @@
#!/usr/bin/env node
import { projectRoot} from '../webpack/helpers';
const commander = require('commander');
const fs = require('fs');
const JSON5 = require('json5');
const _cliProgress = require('cli-progress');
const _ = require('lodash');
const {projectRoot} = require('../webpack/helpers');
const program = new commander.Command();
program.version('1.0.0', '-v, --version');
@@ -13,8 +12,8 @@ const NEW_MESSAGE_TODO = '// TODO New key - Add a translation';
const MESSAGE_CHANGED_TODO = '// TODO Source message changed - Revise the translation';
const COMMENTS_CHANGED_TODO = '// TODO Source comments changed - Revise the translation';
const DEFAULT_SOURCE_FILE_LOCATION = 'resources/i18n/en.json5';
const LANGUAGE_FILES_LOCATION = 'resources/i18n';
const DEFAULT_SOURCE_FILE_LOCATION = 'src/assets/i18n/en.json5';
const LANGUAGE_FILES_LOCATION = 'src/assets/i18n';
parseCliInput();

267
server.ts Normal file
View File

@@ -0,0 +1,267 @@
/**
* *** NOTE ON IMPORTING FROM ANGULAR AND NGUNIVERSAL IN THIS FILE ***
*
* If your application uses third-party dependencies, you'll need to
* either use Webpack or the Angular CLI's `bundleDependencies` feature
* in order to adequately package them for use on the server without a
* node_modules directory.
*
* However, due to the nature of the CLI's `bundleDependencies`, importing
* Angular in this file will create a different instance of Angular than
* the version in the compiled application code. This leads to unavoidable
* conflicts. Therefore, please do not explicitly import from @angular or
* @nguniversal in this file. You can export any needed resources
* from your application's main.server.ts file, as seen below with the
* import for `ngExpressEngine`.
*/
import 'zone.js/dist/zone-node';
import 'reflect-metadata';
import 'rxjs';
import * as fs from 'fs';
import * as pem from 'pem';
import * as https from 'https';
import * as morgan from 'morgan';
import * as express from 'express';
import * as bodyParser from 'body-parser';
import * as compression from 'compression';
import { join } from 'path';
import { enableProdMode } from '@angular/core';
import { existsSync } from 'fs';
import { REQUEST, RESPONSE } from '@nguniversal/express-engine/tokens';
import { environment } from './src/environments/environment';
import { createProxyMiddleware } from 'http-proxy-middleware';
import { hasValue, hasNoValue } from './src/app/shared/empty.util';
import { APP_BASE_HREF } from '@angular/common';
import { UIServerConfig } from './src/config/ui-server-config.interface';
/*
* Set path for the browser application's dist folder
*/
const DIST_FOLDER = join(process.cwd(), 'dist/browser');
const indexHtml = existsSync(join(DIST_FOLDER, 'index.html')) ? 'index.html' : 'index';
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const { ServerAppModule, ngExpressEngine } = require('./dist/server/main');
const cookieParser = require('cookie-parser');
// The Express app is exported so that it can be used by serverless Functions.
export function app() {
/*
* Create a new express application
*/
const server = express();
/*
* If production mode is enabled in the environment file:
* - Enable Angular's production mode
* - Enable compression for response bodies. See [compression](https://github.com/expressjs/compression)
*/
if (environment.production) {
enableProdMode();
server.use(compression());
}
/*
* Enable request logging
* See [morgan](https://github.com/expressjs/morgan)
*/
server.use(morgan('dev'));
/*
* Add cookie parser middleware
* See [morgan](https://github.com/expressjs/cookie-parser)
*/
server.use(cookieParser());
/*
* Add parser for request bodies
* See [morgan](https://github.com/expressjs/body-parser)
*/
server.use(bodyParser.json());
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', (_, options, callback) =>
ngExpressEngine({
bootstrap: ServerAppModule,
providers: [
{
provide: REQUEST,
useValue: (options as any).req,
},
{
provide: RESPONSE,
useValue: (options as any).req.res,
},
],
})(_, (options as any), callback)
);
/*
* Register the view engines for html and ejs
*/
server.set('view engine', 'html');
/*
* Set views folder path to directory where template files are stored
*/
server.set('views', DIST_FOLDER);
/**
* Proxy the sitemaps
*/
server.use('/sitemap**', createProxyMiddleware({ target: `${environment.rest.baseUrl}/sitemaps`, changeOrigin: true }));
/**
* Checks if the rateLimiter property is present
* When it is present, the rateLimiter will be enabled. When it is undefined, the rateLimiter will be disabled.
*/
if (hasValue((environment.ui as UIServerConfig).rateLimiter)) {
const RateLimit = require('express-rate-limit');
const limiter = new RateLimit({
windowMs: (environment.ui as UIServerConfig).rateLimiter.windowMs,
max: (environment.ui as UIServerConfig).rateLimiter.max
});
server.use(limiter);
}
/*
* Serve static resources (images, i18n messages, …)
*/
server.get('*.*', cacheControl, express.static(DIST_FOLDER, { index: false }));
// Register the ngApp callback function to handle incoming requests
server.get('*', ngApp);
return server;
}
/*
* The callback function to serve server side angular
*/
function ngApp(req, res) {
if (environment.universal.preboot) {
res.render(indexHtml, {
req,
res,
preboot: environment.universal.preboot,
async: environment.universal.async,
time: environment.universal.time,
baseUrl: environment.ui.nameSpace,
originUrl: environment.ui.baseUrl,
requestUrl: req.originalUrl,
providers: [{ provide: APP_BASE_HREF, useValue: req.baseUrl }]
}, (err, data) => {
if (hasNoValue(err) && hasValue(data)) {
res.send(data);
} else if (hasValue(err) && err.code === 'ERR_HTTP_HEADERS_SENT') {
// When this error occurs we can't fall back to CSR because the response has already been
// sent. These errors occur for various reasons in universal, not all of which are in our
// control to solve.
console.warn('Warning [ERR_HTTP_HEADERS_SENT]: Tried to set headers after they were sent to the client');
} else {
console.warn('Error in SSR, serving for direct CSR.');
if (hasValue(err)) {
console.warn('Error details : ', err);
}
res.sendFile(DIST_FOLDER + '/index.html');
}
});
} else {
// If preboot is disabled, just serve the client
console.log('Universal off, serving for direct CSR');
res.sendFile(DIST_FOLDER + '/index.html');
}
}
/*
* Adds a cache control header to the response
* The cache control value can be configured in the environments file and defaults to max-age=60
*/
function cacheControl(req, res, next) {
// instruct browser to revalidate
res.header('Cache-Control', environment.cache.control || 'max-age=60');
next();
}
/*
* Callback function for when the server has started
*/
function serverStarted() {
console.log(`[${new Date().toTimeString()}] Listening at ${environment.ui.baseUrl}`);
}
/*
* Create an HTTPS server with the configured port and host
* @param keys SSL credentials
*/
function createHttpsServer(keys) {
https.createServer({
key: keys.serviceKey,
cert: keys.certificate
}, app).listen(environment.ui.port, environment.ui.host, () => {
serverStarted();
});
}
function run() {
const port = environment.ui.port || 4000;
const host = environment.ui.host || '/';
// Start up the Node server
const server = app();
server.listen(port, host, () => {
serverStarted();
});
}
/*
* If SSL is enabled
* - Read credentials from configuration files
* - Call script to start an HTTPS server with these credentials
* When SSL is disabled
* - Start an HTTP server on the configured port and host
*/
if (environment.ui.ssl) {
let serviceKey;
try {
serviceKey = fs.readFileSync('./config/ssl/key.pem');
} catch (e) {
console.warn('Service key not found at ./config/ssl/key.pem');
}
let certificate;
try {
certificate = fs.readFileSync('./config/ssl/cert.pem');
} catch (e) {
console.warn('Certificate not found at ./config/ssl/key.pem');
}
if (serviceKey && certificate) {
createHttpsServer({
serviceKey: serviceKey,
certificate: certificate
});
} else {
console.warn('Disabling certificate validation and proceeding with a self-signed certificate. If this is a production server, it is recommended that you configure a valid certificate instead.');
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; // lgtm[js/disabling-certificate-validation]
pem.createCertificate({
days: 1,
selfSigned: true
}, (error, keys) => {
createHttpsServer(keys);
});
}
} else {
run();
}
export * from './src/main.server';

View File

@@ -1,48 +0,0 @@
/**
* @author: @AngularClass
*/
/*
* When testing with webpack and ES6, we have to do some extra
* things to get testing to work right. Because we are gonna write tests
* in ES6 too, we have to compile those as well. That's handled in
* karma.conf.js with the karma-webpack plugin. This is the entry
* file for webpack test. Just like webpack will create a bundle.js
* file for our client, when we run test, it will compile and bundle them
* all here! Crazy huh. So we need to do some setup
*/
Error.stackTraceLimit = Infinity;
require('core-js/es');
require('core-js/features/reflect');
// Typescript emit helpers polyfill
require('ts-helpers');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy'); // since zone.js 0.6.15
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');
// RxJS
require('rxjs');
var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');
testing.TestBed.initTestEnvironment(
browser.BrowserDynamicTestingModule,
browser.platformBrowserDynamicTesting()
);
var tests = require.context('./src', true, /\.spec\.ts$/);
tests.keys().forEach(tests);
// includes all modules into test coverage
const modules = require.context('./src/app', true, /\.module\.ts$/);
modules.keys().forEach(modules);

View File

@@ -1,38 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { EPeopleRegistryComponent } from './epeople-registry/epeople-registry.component';
import { GroupFormComponent } from './group-registry/group-form/group-form.component';
import { GroupsRegistryComponent } from './group-registry/groups-registry.component';
import { URLCombiner } from '../../core/url-combiner/url-combiner';
import { getAccessControlModulePath } from '../admin-routing.module';
const GROUP_EDIT_PATH = 'groups';
export function getGroupEditPath(id: string) {
return new URLCombiner(getAccessControlModulePath(), GROUP_EDIT_PATH, id).toString();
}
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'epeople', component: EPeopleRegistryComponent, data: { title: 'admin.access-control.epeople.title' } },
{ path: GROUP_EDIT_PATH, component: GroupsRegistryComponent, data: { title: 'admin.access-control.groups.title' } },
{
path: `${GROUP_EDIT_PATH}/:groupId`,
component: GroupFormComponent,
data: {title: 'admin.registries.schema.title'}
},
{
path: `${GROUP_EDIT_PATH}/newGroup`,
component: GroupFormComponent,
data: {title: 'admin.registries.schema.title'}
},
])
]
})
/**
* Routing module for the AccessControl section of the admin sidebar
*/
export class AdminAccessControlRoutingModule {
}

View File

@@ -1,93 +0,0 @@
<div class="container">
<div class="epeople-registry row">
<div class="col-12">
<h2 id="header" class="border-bottom pb-2">{{labelPrefix + 'head' | translate}}</h2>
<ds-eperson-form *ngIf="isEPersonFormShown" (submitForm)="forceUpdateEPeople()"
(cancelForm)="isEPersonFormShown = false"></ds-eperson-form>
<div *ngIf="!isEPersonFormShown" class="button-row top d-flex pb-2">
<button class="mr-auto btn btn-success addEPerson-button"
(click)="isEPersonFormShown = true">
<i class="fas fa-plus"></i>
<span class="d-none d-sm-inline">{{labelPrefix + 'button.add' | translate}}</span>
</button>
</div>
<h3 id="search" class="border-bottom pb-2">{{labelPrefix + 'search.head' | translate}}
<button (click)="clearFormAndResetResult();"
class="btn btn-primary float-right">{{labelPrefix + 'button.see-all' | translate}}</button>
</h3>
<form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)" class="row">
<div class="col-12 col-sm-3">
<select name="scope" id="scope" formControlName="scope" class="form-control" aria-label="Search scope">
<option value="metadata">{{labelPrefix + 'search.scope.metadata' | translate}}</option>
<option value="email">{{labelPrefix + 'search.scope.email' | translate}}</option>
</select>
</div>
<div class="col-sm-9 col-12">
<div class="form-group input-group">
<input type="text" name="query" id="query" formControlName="query"
class="form-control" aria-label="Search input">
<span class="input-group-append">
<button type="submit"
class="search-button btn btn-secondary">{{ labelPrefix + 'search.button' | translate }}</button>
</span>
</div>
</div>
</form>
<ds-pagination
*ngIf="(ePeople | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(ePeople | async)?.payload"
[collectionSize]="(ePeople | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
<div class="table-responsive">
<table id="epeople" class="table table-striped table-hover table-bordered">
<thead>
<tr>
<th scope="col">{{labelPrefix + 'table.id' | translate}}</th>
<th scope="col">{{labelPrefix + 'table.name' | translate}}</th>
<th scope="col">{{labelPrefix + 'table.email' | translate}}</th>
<th>{{labelPrefix + 'table.edit' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let eperson of (ePeople | async)?.payload?.page"
[ngClass]="{'table-primary' : isActive(eperson) | async}">
<td>{{eperson.id}}</td>
<td>{{eperson.name}}</td>
<td>{{eperson.email}}</td>
<td>
<div class="btn-group edit-field">
<button (click)="toggleEditEPerson(eperson)"
class="btn btn-outline-primary btn-sm access-control-editEPersonButton"
title="{{labelPrefix + 'table.edit.buttons.edit' | translate: {name: eperson.name} }}">
<i class="fas fa-edit fa-fw"></i>
</button>
<button (click)="deleteEPerson(eperson)"
class="btn btn-outline-danger btn-sm access-control-deleteEPersonButton"
title="{{labelPrefix + 'table.edit.buttons.remove' | translate: {name: eperson.name} }}">
<i class="fas fa-trash-alt fa-fw"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</ds-pagination>
<div *ngIf="(ePeople | async)?.payload?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
{{labelPrefix + 'no-items' | translate}}
</div>
</div>
</div>
</div>

View File

@@ -1,202 +0,0 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { Subscription } from 'rxjs/internal/Subscription';
import { map, take } from 'rxjs/operators';
import { PaginatedList } from '../../../core/data/paginated-list';
import { RemoteData } from '../../../core/data/remote-data';
import { EPersonDataService } from '../../../core/eperson/eperson-data.service';
import { EPerson } from '../../../core/eperson/models/eperson.model';
import { hasValue } from '../../../shared/empty.util';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
@Component({
selector: 'ds-epeople-registry',
templateUrl: './epeople-registry.component.html',
})
/**
* A component used for managing all existing epeople within the repository.
* The admin can create, edit or delete epeople here.
*/
export class EPeopleRegistryComponent implements OnInit, OnDestroy {
labelPrefix = 'admin.access-control.epeople.';
/**
* A list of all the current EPeople within the repository or the result of the search
*/
ePeople: Observable<RemoteData<PaginatedList<EPerson>>>;
/**
* Pagination config used to display the list of epeople
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'epeople-list-pagination',
pageSize: 5,
currentPage: 1
});
/**
* Whether or not to show the EPerson form
*/
isEPersonFormShown: boolean;
// The search form
searchForm;
// Current search in epersons registry
currentSearchQuery: string;
currentSearchScope: string;
/**
* List of subscriptions
*/
subs: Subscription[] = [];
constructor(private epersonService: EPersonDataService,
private translateService: TranslateService,
private notificationsService: NotificationsService,
private formBuilder: FormBuilder,
private router: Router) {
this.currentSearchQuery = '';
this.currentSearchScope = 'metadata';
this.searchForm = this.formBuilder.group(({
scope: 'metadata',
query: '',
}));
}
ngOnInit() {
this.isEPersonFormShown = false;
this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery });
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
if (eperson != null && eperson.id) {
this.isEPersonFormShown = true;
}
}));
}
/**
* Event triggered when the user changes page
* @param event
*/
onPageChange(event) {
this.config.currentPage = event;
this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery })
}
/**
* Force-update the list of EPeople by first clearing the cache related to EPeople, then performing
* a new REST call
*/
public forceUpdateEPeople() {
this.epersonService.clearEPersonRequests();
this.isEPersonFormShown = false;
this.search({ query: '', scope: 'metadata' })
}
/**
* Search in the EPeople by metadata (default) or email
* @param data Contains scope and query param
*/
search(data: any) {
const query: string = data.query;
const scope: string = data.scope;
if (query != null && this.currentSearchQuery !== query) {
this.router.navigateByUrl(this.epersonService.getEPeoplePageRouterLink());
this.currentSearchQuery = query;
this.config.currentPage = 1;
}
if (scope != null && this.currentSearchScope !== scope) {
this.router.navigateByUrl(this.epersonService.getEPeoplePageRouterLink());
this.currentSearchScope = scope;
this.config.currentPage = 1;
}
this.ePeople = this.epersonService.searchByScope(this.currentSearchScope, this.currentSearchQuery, {
currentPage: this.config.currentPage,
elementsPerPage: this.config.pageSize
});
}
/**
* Checks whether the given EPerson is active (being edited)
* @param eperson
*/
isActive(eperson: EPerson): Observable<boolean> {
return this.getActiveEPerson().pipe(
map((activeEPerson) => eperson === activeEPerson)
);
}
/**
* Gets the active eperson (being edited)
*/
getActiveEPerson(): Observable<EPerson> {
return this.epersonService.getActiveEPerson();
}
/**
* Start editing the selected EPerson
* @param ePerson
*/
toggleEditEPerson(ePerson: EPerson) {
this.getActiveEPerson().pipe(take(1)).subscribe((activeEPerson: EPerson) => {
if (ePerson === activeEPerson) {
this.epersonService.cancelEditEPerson();
this.isEPersonFormShown = false;
} else {
this.epersonService.editEPerson(ePerson);
this.isEPersonFormShown = true;
}
});
this.scrollToTop()
}
/**
* Deletes EPerson, show notification on success/failure & updates EPeople list
*/
deleteEPerson(ePerson: EPerson) {
if (hasValue(ePerson.id)) {
this.epersonService.deleteEPerson(ePerson).pipe(take(1)).subscribe((success: boolean) => {
if (success) {
this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', { name: ePerson.name }));
this.forceUpdateEPeople();
} else {
this.notificationsService.error(this.translateService.get(this.labelPrefix + 'notification.deleted.failure', { name: ePerson.name }));
}
this.epersonService.cancelEditEPerson();
this.isEPersonFormShown = false;
})
}
}
/**
* Unsub all subscriptions
*/
ngOnDestroy(): void {
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
}
scrollToTop() {
(function smoothscroll() {
const currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
if (currentScroll > 0) {
window.requestAnimationFrame(smoothscroll);
window.scrollTo(0, currentScroll - (currentScroll / 8));
}
})();
}
/**
* Reset all input-fields to be empty and search all search
*/
clearFormAndResetResult() {
this.searchForm.patchValue({
query: '',
});
this.search({ query: '' });
}
}

View File

@@ -1,231 +0,0 @@
import { HttpClient } from '@angular/common/http';
import { Store } from '@ngrx/store';
import { of as observableOf } from 'rxjs';
import { CommonModule } from '@angular/common';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs/internal/Observable';
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
import { ObjectCacheService } from '../../../../core/cache/object-cache.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { DSOChangeAnalyzer } from '../../../../core/data/dso-change-analyzer.service';
import { PaginatedList } from '../../../../core/data/paginated-list';
import { RemoteData } from '../../../../core/data/remote-data';
import { FindListOptions } from '../../../../core/data/request.models';
import { EPersonDataService } from '../../../../core/eperson/eperson-data.service';
import { EPerson } from '../../../../core/eperson/models/eperson.model';
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
import { PageInfo } from '../../../../core/shared/page-info.model';
import { UUIDService } from '../../../../core/shared/uuid.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { getMockFormBuilderService } from '../../../../shared/mocks/mock-form-builder-service';
import { getMockTranslateService } from '../../../../shared/mocks/mock-translate.service';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { EPersonMock, EPersonMock2 } from '../../../../shared/testing/eperson-mock';
import { MockTranslateLoader } from '../../../../shared/testing/mock-translate-loader';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
import { EPeopleRegistryComponent } from '../epeople-registry.component';
import { EPersonFormComponent } from './eperson-form.component';
describe('EPersonFormComponent', () => {
let component: EPersonFormComponent;
let fixture: ComponentFixture<EPersonFormComponent>;
let translateService: TranslateService;
let builderService: FormBuilderService;
let mockEPeople;
let ePersonDataServiceStub: any;
beforeEach(async(() => {
mockEPeople = [EPersonMock, EPersonMock2];
ePersonDataServiceStub = {
activeEPerson: null,
allEpeople: mockEPeople,
getEPeople(): Observable<RemoteData<PaginatedList<EPerson>>> {
return createSuccessfulRemoteDataObject$(new PaginatedList(null, this.allEpeople));
},
getActiveEPerson(): Observable<EPerson> {
return observableOf(this.activeEPerson);
},
searchByScope(scope: string, query: string, options: FindListOptions = {}): Observable<RemoteData<PaginatedList<EPerson>>> {
if (scope === 'email') {
const result = this.allEpeople.find((ePerson: EPerson) => {
return ePerson.email === query
});
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [result]));
}
if (scope === 'metadata') {
if (query === '') {
return createSuccessfulRemoteDataObject$(new PaginatedList(null, this.allEpeople));
}
const result = this.allEpeople.find((ePerson: EPerson) => {
return (ePerson.name.includes(query) || ePerson.email.includes(query))
});
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [result]));
}
return createSuccessfulRemoteDataObject$(new PaginatedList(null, this.allEpeople));
},
deleteEPerson(ePerson: EPerson): Observable<boolean> {
this.allEpeople = this.allEpeople.filter((ePerson2: EPerson) => {
return (ePerson2.uuid !== ePerson.uuid);
});
return observableOf(true);
},
create(ePerson: EPerson) {
this.allEpeople = [...this.allEpeople, ePerson]
},
editEPerson(ePerson: EPerson) {
this.activeEPerson = ePerson;
},
cancelEditEPerson() {
this.activeEPerson = null;
},
clearEPersonRequests(): void {
// empty
},
tryToCreate(ePerson: EPerson): Observable<RestResponse> {
this.allEpeople = [...this.allEpeople, ePerson]
return observableOf(new RestResponse(true, 200, 'Success'));
},
updateEPerson(ePerson: EPerson): Observable<RestResponse> {
this.allEpeople.forEach((ePersonInList: EPerson, i: number) => {
if (ePersonInList.id === ePerson.id) {
this.allEpeople[i] = ePerson;
}
});
return observableOf(new RestResponse(true, 200, 'Success'));
}
};
builderService = getMockFormBuilderService();
translateService = getMockTranslateService();
TestBed.configureTestingModule({
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: MockTranslateLoader
}
}),
],
declarations: [EPeopleRegistryComponent, EPersonFormComponent],
providers: [EPersonFormComponent,
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: FormBuilderService, useValue: builderService },
{ provide: DSOChangeAnalyzer, useValue: {} },
{ provide: HttpClient, useValue: {} },
{ provide: ObjectCacheService, useValue: {} },
{ provide: UUIDService, useValue: {} },
{ provide: Store, useValue: {} },
{ provide: RemoteDataBuildService, useValue: {} },
{ provide: HALEndpointService, useValue: {} },
EPeopleRegistryComponent
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EPersonFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create EPersonFormComponent', inject([EPersonFormComponent], (comp: EPersonFormComponent) => {
expect(comp).toBeDefined();
}));
describe('when submitting the form', () => {
let firstName;
let lastName;
let email;
let canLogIn;
let requireCertificate;
let expected;
beforeEach(() => {
firstName = 'testName';
lastName = 'testLastName';
email = 'testEmail@test.com';
canLogIn = false;
requireCertificate = false;
expected = Object.assign(new EPerson(), {
metadata: {
'eperson.firstname': [
{
value: firstName
}
],
'eperson.lastname': [
{
value: lastName
},
],
},
email: email,
canLogIn: canLogIn,
requireCertificate: requireCertificate,
});
spyOn(component.submitForm, 'emit');
component.firstName.value = firstName;
component.lastName.value = lastName;
component.email.value = email;
component.canLogIn.value = canLogIn;
component.requireCertificate.value = requireCertificate;
});
describe('without active EPerson', () => {
beforeEach(() => {
spyOn(ePersonDataServiceStub, 'getActiveEPerson').and.returnValue(observableOf(undefined));
component.onSubmit();
fixture.detectChanges();
});
it('should emit a new eperson using the correct values', async(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expected);
});
}));
});
describe('with an active eperson', () => {
let expectedWithId;
beforeEach(() => {
expectedWithId = Object.assign(new EPerson(), {
metadata: {
'eperson.firstname': [
{
value: firstName
}
],
'eperson.lastname': [
{
value: lastName
},
],
},
email: email,
canLogIn: canLogIn,
requireCertificate: requireCertificate,
});
spyOn(ePersonDataServiceStub, 'getActiveEPerson').and.returnValue(observableOf(expectedWithId));
component.onSubmit();
fixture.detectChanges();
});
it('should emit the existing eperson using the correct values', async(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expectedWithId);
});
}));
});
});
});

View File

@@ -1,33 +0,0 @@
<div class="container">
<div class="group-form row">
<div class="col-12">
<div *ngIf="groupDataService.getActiveGroup() | async; then editheader; else createHeader"></div>
<ng-template #createHeader>
<h2 class="border-bottom pb-2">{{messagePrefix + '.head.create' | translate}}</h2>
</ng-template>
<ng-template #editheader>
<h2 class="border-bottom pb-2">{{messagePrefix + '.head.edit' | translate}}</h2>
</ng-template>
<ds-form [formId]="formId"
[formModel]="formModel"
[formGroup]="formGroup"
[formLayout]="formLayout"
(cancel)="onCancel()"
(submitForm)="onSubmit()">
</ds-form>
<ds-members-list *ngIf="groupBeingEdited != null" [messagePrefix]="messagePrefix + '.members-list'"></ds-members-list>
<ds-subgroups-list *ngIf="groupBeingEdited != null" [messagePrefix]="messagePrefix + '.subgroups-list'"></ds-subgroups-list>
<div>
<button [routerLink]="[this.groupDataService.getGroupRegistryRouterLink()]"
class="btn btn-primary">{{messagePrefix + '.return' | translate}}</button>
</div>
</div>
</div>
</div>

View File

@@ -1,153 +0,0 @@
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { ActivatedRoute, Router } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { Store } from '@ngrx/store';
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { Observable } from 'rxjs/internal/Observable';
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
import { ObjectCacheService } from '../../../../core/cache/object-cache.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { DSOChangeAnalyzer } from '../../../../core/data/dso-change-analyzer.service';
import { PaginatedList } from '../../../../core/data/paginated-list';
import { RemoteData } from '../../../../core/data/remote-data';
import { EPersonDataService } from '../../../../core/eperson/eperson-data.service';
import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { Group } from '../../../../core/eperson/models/group.model';
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
import { PageInfo } from '../../../../core/shared/page-info.model';
import { UUIDService } from '../../../../core/shared/uuid.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { getMockFormBuilderService } from '../../../../shared/mocks/mock-form-builder-service';
import { MockRouter } from '../../../../shared/mocks/mock-router';
import { getMockTranslateService } from '../../../../shared/mocks/mock-translate.service';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { GroupMock, GroupMock2 } from '../../../../shared/testing/group-mock';
import { MockTranslateLoader } from '../../../../shared/testing/mock-translate-loader';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils';
import { GroupFormComponent } from './group-form.component';
describe('GroupFormComponent', () => {
let component: GroupFormComponent;
let fixture: ComponentFixture<GroupFormComponent>;
let translateService: TranslateService;
let builderService: FormBuilderService;
let ePersonDataServiceStub: any;
let groupsDataServiceStub: any;
let router;
let groups;
let groupName;
let groupDescription;
let expected;
beforeEach(async(() => {
groups = [GroupMock, GroupMock2]
groupName = 'testGroupName';
groupDescription = 'testDescription';
expected = Object.assign(new Group(), {
name: groupName,
metadata: {
'dc.description': [
{
value: groupDescription
}
],
},
});
ePersonDataServiceStub = {};
groupsDataServiceStub = {
allGroups: groups,
activeGroup: null,
getActiveGroup(): Observable<Group> {
return observableOf(this.activeGroup);
},
getGroupRegistryRouterLink(): string {
return '/admin/access-control/groups';
},
editGroup(group: Group) {
this.activeGroup = group
},
cancelEditGroup(): void {
this.activeGroup = null;
},
findById(id: string) {
return observableOf({ payload: null, hasSucceeded: true });
},
tryToCreate(group: Group): Observable<RestResponse> {
this.allGroups = [...this.allGroups, group]
return observableOf(new RestResponse(true, 200, 'Success'));
},
searchGroups(query: string): Observable<RemoteData<PaginatedList<Group>>> {
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), []))
}
};
builderService = getMockFormBuilderService();
translateService = getMockTranslateService();
router = new MockRouter();
TestBed.configureTestingModule({
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: MockTranslateLoader
}
}),
],
declarations: [GroupFormComponent],
providers: [GroupFormComponent,
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
{ provide: GroupDataService, useValue: groupsDataServiceStub },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: FormBuilderService, useValue: builderService },
{ provide: DSOChangeAnalyzer, useValue: {} },
{ provide: HttpClient, useValue: {} },
{ provide: ObjectCacheService, useValue: {} },
{ provide: UUIDService, useValue: {} },
{ provide: Store, useValue: {} },
{ provide: RemoteDataBuildService, useValue: {} },
{ provide: HALEndpointService, useValue: {} },
{ provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }), params: observableOf({}) } },
{ provide: Router, useValue: router },
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GroupFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create GroupFormComponent', inject([GroupFormComponent], (comp: GroupFormComponent) => {
expect(comp).toBeDefined();
}));
describe('when submitting the form', () => {
beforeEach(() => {
spyOn(component.submitForm, 'emit');
component.groupName.value = groupName;
component.groupDescription.value = groupDescription;
});
describe('without active Group', () => {
beforeEach(() => {
component.onSubmit();
fixture.detectChanges();
});
it('should emit a new group using the correct values', async(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expected);
});
}));
});
});
});

View File

@@ -1,280 +0,0 @@
import { Component, EventEmitter, HostListener, OnDestroy, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import {
DynamicFormControlModel,
DynamicFormLayout,
DynamicInputModel,
DynamicTextAreaModel
} from '@ng-dynamic-forms/core';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
import { Subscription } from 'rxjs/internal/Subscription';
import { take } from 'rxjs/operators';
import { RestResponse } from '../../../../core/cache/response.models';
import { PaginatedList } from '../../../../core/data/paginated-list';
import { EPersonDataService } from '../../../../core/eperson/eperson-data.service';
import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { Group } from '../../../../core/eperson/models/group.model';
import { getRemoteDataPayload, getSucceededRemoteData } from '../../../../core/shared/operators';
import { hasValue, isNotEmpty } from '../../../../shared/empty.util';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
@Component({
selector: 'ds-group-form',
templateUrl: './group-form.component.html'
})
/**
* A form used for creating and editing groups
*/
export class GroupFormComponent implements OnInit, OnDestroy {
messagePrefix = 'admin.access-control.groups.form';
/**
* A unique id used for ds-form
*/
formId = 'group-form';
/**
* Dynamic models for the inputs of form
*/
groupName: DynamicInputModel;
groupDescription: DynamicTextAreaModel;
/**
* A list of all dynamic input models
*/
formModel: DynamicFormControlModel[];
/**
* Layout used for structuring the form inputs
*/
formLayout: DynamicFormLayout = {
groupName: {
grid: {
host: 'row'
}
},
groupDescription: {
grid: {
host: 'row'
}
},
};
/**
* A FormGroup that combines all inputs
*/
formGroup: FormGroup;
/**
* An EventEmitter that's fired whenever the form is being submitted
*/
@Output() submitForm: EventEmitter<any> = new EventEmitter();
/**
* An EventEmitter that's fired whenever the form is cancelled
*/
@Output() cancelForm: EventEmitter<any> = new EventEmitter();
/**
* List of subscriptions
*/
subs: Subscription[] = [];
/**
* Group currently being edited
*/
groupBeingEdited: Group;
constructor(public groupDataService: GroupDataService,
private ePersonDataService: EPersonDataService,
private formBuilderService: FormBuilderService,
private translateService: TranslateService,
private notificationsService: NotificationsService,
private route: ActivatedRoute,
protected router: Router) {
}
ngOnInit() {
this.subs.push(this.route.params.subscribe((params) => {
this.setActiveGroup(params.groupId)
}));
combineLatest(
this.translateService.get(`${this.messagePrefix}.groupName`),
this.translateService.get(`${this.messagePrefix}.groupDescription`),
).subscribe(([groupName, groupDescription]) => {
this.groupName = new DynamicInputModel({
id: 'groupName',
label: groupName,
name: 'groupName',
validators: {
required: null,
},
required: true,
});
this.groupDescription = new DynamicTextAreaModel({
id: 'groupDescription',
label: groupDescription,
name: 'groupDescription',
required: false,
});
this.formModel = [
this.groupName,
this.groupDescription
];
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
this.subs.push(this.groupDataService.getActiveGroup().subscribe((activeGroup: Group) => {
if (activeGroup != null) {
this.groupBeingEdited = activeGroup;
this.formGroup.patchValue({
groupName: activeGroup != null ? activeGroup.name : '',
groupDescription: activeGroup != null ? activeGroup.firstMetadataValue('dc.description') : '',
});
if (activeGroup.permanent) {
this.formGroup.get('groupName').disable();
}
}
}));
});
}
/**
* Stop editing the currently selected group
*/
onCancel() {
this.groupDataService.cancelEditGroup();
this.cancelForm.emit();
this.router.navigate([this.groupDataService.getGroupRegistryRouterLink()]);
}
/**
* Submit the form
* When the eperson has an id attached -> Edit the eperson
* When the eperson has no id attached -> Create new eperson
* Emit the updated/created eperson using the EventEmitter submitForm
*/
onSubmit() {
this.groupDataService.getActiveGroup().pipe(take(1)).subscribe(
(group: Group) => {
const values = {
name: this.groupName.value,
metadata: {
'dc.description': [
{
value: this.groupDescription.value
}
],
},
};
if (group === null) {
this.createNewGroup(values);
} else {
this.editGroup(group, values);
}
}
);
}
/**
* Creates new Group based on given values from form
* @param values
*/
createNewGroup(values) {
const groupToCreate = Object.assign(new Group(), values);
const response = this.groupDataService.tryToCreate(groupToCreate);
response.pipe(take(1)).subscribe((restResponse: RestResponse) => {
if (restResponse.isSuccessful) {
this.notificationsService.success(this.translateService.get(this.messagePrefix + '.notification.created.success', { name: groupToCreate.name }));
this.submitForm.emit(groupToCreate);
const resp: any = restResponse;
if (isNotEmpty(resp.resourceSelfLinks)) {
const groupSelfLink = resp.resourceSelfLinks[0];
this.setActiveGroupWithLink(groupSelfLink);
this.router.navigateByUrl(this.groupDataService.getGroupEditPageRouterLinkWithID(this.groupDataService.getUUIDFromString(groupSelfLink)));
}
} else {
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.created.failure', { name: groupToCreate.name }));
this.showNotificationIfNameInUse(groupToCreate, 'created');
this.cancelForm.emit();
}
});
}
/**
* Checks for the given group if there is already a group in the system with that group name and shows error if that
* is the case
* @param group group to check
* @param notificationSection whether in create or edit
*/
private showNotificationIfNameInUse(group: Group, notificationSection: string) {
// Relevant message for group name in use
this.subs.push(this.groupDataService.searchGroups(group.name, {
currentPage: 1,
elementsPerPage: 0
}).pipe(getSucceededRemoteData(), getRemoteDataPayload())
.subscribe((list: PaginatedList<Group>) => {
if (list.totalElements > 0) {
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.' + notificationSection + '.failure.groupNameInUse', {
name: group.name
}));
}
}));
}
/**
* // TODO
* @param group
* @param values
*/
editGroup(group: Group, values) {
// TODO (backend)
console.log('TODO implement editGroup', values);
this.notificationsService.error('TODO implement editGroup (not yet implemented in backend) ');
}
/**
* Start editing the selected group
* @param groupId ID of group to set as active
*/
setActiveGroup(groupId: string) {
this.groupDataService.cancelEditGroup();
this.groupDataService.findById(groupId)
.pipe(
getSucceededRemoteData(),
getRemoteDataPayload())
.subscribe((group: Group) => {
this.groupDataService.editGroup(group);
});
}
/**
* Start editing the selected group
* @param groupSelfLink SelfLink of group to set as active
*/
setActiveGroupWithLink(groupSelfLink: string) {
this.groupDataService.getActiveGroup().pipe(take(1)).subscribe((activeGroup: Group) => {
if (activeGroup === null) {
this.groupDataService.cancelEditGroup();
this.groupDataService.findByHref(groupSelfLink)
.pipe(
getSucceededRemoteData(),
getRemoteDataPayload())
.subscribe((group: Group) => {
this.groupDataService.editGroup(group);
})
}
});
}
/**
* Cancel the current edit when component is destroyed & unsub all subscriptions
*/
@HostListener('window:beforeunload')
ngOnDestroy(): void {
this.onCancel();
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
}
}

View File

@@ -1,247 +0,0 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { Observable, of as observableOf, Subscription } from 'rxjs';
import { map, mergeMap, take } from 'rxjs/operators';
import { RestResponse } from '../../../../../core/cache/response.models';
import { PaginatedList } from '../../../../../core/data/paginated-list';
import { RemoteData } from '../../../../../core/data/remote-data';
import { EPersonDataService } from '../../../../../core/eperson/eperson-data.service';
import { GroupDataService } from '../../../../../core/eperson/group-data.service';
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
import { Group } from '../../../../../core/eperson/models/group.model';
import { getRemoteDataPayload, getSucceededRemoteData } from '../../../../../core/shared/operators';
import { hasValue } from '../../../../../shared/empty.util';
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
import { PaginationComponentOptions } from '../../../../../shared/pagination/pagination-component-options.model';
@Component({
selector: 'ds-members-list',
templateUrl: './members-list.component.html'
})
/**
* The list of members in the edit group page
*/
export class MembersListComponent implements OnInit, OnDestroy {
@Input()
messagePrefix: string;
/**
* EPeople being displayed in search result, initially all members, after search result of search
*/
ePeopleSearch: Observable<RemoteData<PaginatedList<EPerson>>>;
/**
* List of EPeople members of currently active group being edited
*/
ePeopleMembersOfGroup: Observable<RemoteData<PaginatedList<EPerson>>>;
/**
* Pagination config used to display the list of EPeople that are result of EPeople search
*/
configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'search-members-list-pagination',
pageSize: 5,
currentPage: 1
});
/**
* Pagination config used to display the list of EPerson Membes of active group being edited
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'members-list-pagination',
pageSize: 5,
currentPage: 1
});
/**
* List of subscriptions
*/
subs: Subscription[] = [];
// The search form
searchForm;
// Current search in edit group - epeople search form
currentSearchQuery: string;
currentSearchScope: string;
// Whether or not user has done a EPeople search yet
searchDone: boolean;
// current active group being edited
groupBeingEdited: Group;
constructor(private groupDataService: GroupDataService,
public ePersonDataService: EPersonDataService,
private translateService: TranslateService,
private notificationsService: NotificationsService,
private formBuilder: FormBuilder,
private router: Router) {
this.currentSearchQuery = '';
this.currentSearchScope = 'metadata';
}
ngOnInit() {
this.searchForm = this.formBuilder.group(({
scope: 'metadata',
query: '',
}));
this.subs.push(this.groupDataService.getActiveGroup().subscribe((activeGroup: Group) => {
if (activeGroup != null) {
this.groupBeingEdited = activeGroup;
this.forceUpdateEPeople(activeGroup);
}
}));
}
/**
* Event triggered when the user changes page on search result
* @param event
*/
onPageChangeSearch(event) {
this.configSearch.currentPage = event;
this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery });
}
/**
* Event triggered when the user changes page on EPerson embers of active group
* @param event
*/
onPageChange(event) {
this.ePeopleMembersOfGroup = this.ePersonDataService.findAllByHref(this.groupBeingEdited._links.epersons.href, {
currentPage: event,
elementsPerPage: this.config.pageSize
})
}
/**
* Deletes a given EPerson from the members list of the group currently being edited
* @param ePerson EPerson we want to delete as member from group that is currently being edited
*/
deleteMemberFromGroup(ePerson: EPerson) {
this.groupDataService.getActiveGroup().pipe(take(1)).subscribe((activeGroup: Group) => {
if (activeGroup != null) {
const response = this.groupDataService.deleteMemberFromGroup(activeGroup, ePerson);
this.showNotifications('deleteMember', response, ePerson.name, activeGroup);
this.forceUpdateEPeople(activeGroup);
} else {
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.noActiveGroup'));
}
});
}
/**
* Adds a given EPerson to the members list of the group currently being edited
* @param ePerson EPerson we want to add as member to group that is currently being edited
*/
addMemberToGroup(ePerson: EPerson) {
this.groupDataService.getActiveGroup().pipe(take(1)).subscribe((activeGroup: Group) => {
if (activeGroup != null) {
const response = this.groupDataService.addMemberToGroup(activeGroup, ePerson);
this.showNotifications('addMember', response, ePerson.name, activeGroup);
} else {
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.noActiveGroup'));
}
});
this.forceUpdateEPeople(this.groupBeingEdited, ePerson);
}
/**
* Whether or not the given ePerson is a member of the group currently being edited
* @param possibleMember EPerson that is a possible member (being tested) of the group currently being edited
*/
isMemberOfGroup(possibleMember: EPerson): Observable<boolean> {
return this.groupDataService.getActiveGroup().pipe(take(1),
mergeMap((group: Group) => {
if (group != null) {
return this.ePersonDataService.findAllByHref(group._links.epersons.href, {
currentPage: 0,
elementsPerPage: Number.MAX_SAFE_INTEGER
})
.pipe(
getSucceededRemoteData(),
getRemoteDataPayload(),
map((listEPeopleInGroup: PaginatedList<EPerson>) => listEPeopleInGroup.page.filter((ePersonInList: EPerson) => ePersonInList.id === possibleMember.id)),
map((epeople: EPerson[]) => epeople.length > 0))
} else {
return observableOf(false);
}
}))
}
/**
* Search in the EPeople by name, email or metadata
* @param data Contains scope and query param
*/
search(data: any) {
const query: string = data.query;
const scope: string = data.scope;
if (query != null && this.currentSearchQuery !== query && this.groupBeingEdited) {
this.router.navigateByUrl(this.groupDataService.getGroupEditPageRouterLink(this.groupBeingEdited));
this.currentSearchQuery = query;
this.configSearch.currentPage = 1;
}
if (scope != null && this.currentSearchScope !== scope && this.groupBeingEdited) {
this.router.navigateByUrl(this.groupDataService.getGroupEditPageRouterLink(this.groupBeingEdited));
this.currentSearchScope = scope;
this.configSearch.currentPage = 1;
}
this.searchDone = true;
this.ePeopleSearch = this.ePersonDataService.searchByScope(this.currentSearchScope, this.currentSearchQuery, {
currentPage: this.configSearch.currentPage,
elementsPerPage: this.configSearch.pageSize
});
}
/**
* Force-update the list of EPeople by first clearing the cache related to EPeople, then performing
* a new REST call
* @param activeGroup Group currently being edited
*/
public forceUpdateEPeople(activeGroup: Group, ePersonToUpdate?: EPerson) {
if (ePersonToUpdate != null) {
this.ePersonDataService.clearLinkRequests(ePersonToUpdate._links.groups.href);
}
this.ePersonDataService.clearLinkRequests(activeGroup._links.epersons.href);
this.router.navigateByUrl(this.groupDataService.getGroupEditPageRouterLink(activeGroup));
this.ePeopleMembersOfGroup = this.ePersonDataService.findAllByHref(activeGroup._links.epersons.href, {
currentPage: this.configSearch.currentPage,
elementsPerPage: this.configSearch.pageSize
})
}
/**
* unsub all subscriptions
*/
ngOnDestroy(): void {
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
}
/**
* Shows a notification based on the success/failure of the request
* @param messageSuffix Suffix for message
* @param response RestResponse observable containing success/failure request
* @param nameObject Object request was about
* @param activeGroup Group currently being edited
*/
showNotifications(messageSuffix: string, response: Observable<RestResponse>, nameObject: string, activeGroup: Group) {
response.pipe(take(1)).subscribe((restResponse: RestResponse) => {
if (restResponse.isSuccessful) {
this.notificationsService.success(this.translateService.get(this.messagePrefix + '.notification.success.' + messageSuffix, { name: nameObject }));
} else {
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.' + messageSuffix, { name: nameObject }));
}
})
}
/**
* Reset all input-fields to be empty and search all search
*/
clearFormAndResetResult() {
this.searchForm.patchValue({
query: '',
});
this.search({ query: '' });
}
}

View File

@@ -1,84 +0,0 @@
<div class="container">
<div class="groups-registry row">
<div class="col-12">
<h2 id="header" class="border-bottom pb-2">{{messagePrefix + 'head' | translate}}</h2>
<div class="button-row top d-flex pb-2">
<button class="mr-auto btn btn-success"
[routerLink]="['newGroup']">
<i class="fas fa-plus"></i>
<span class="d-none d-sm-inline">&nbsp;{{messagePrefix + 'button.add' | translate}}</span>
</button>
</div>
<h3 id="search" class="border-bottom pb-2">{{messagePrefix + 'search.head' | translate}}
<button (click)="clearFormAndResetResult();"
class="btn btn-primary float-right">{{messagePrefix + 'button.see-all' | translate}}</button>
</h3>
<form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)" class="row">
<div class="col-12">
<div class="form-group input-group">
<input type="text" name="query" id="query" formControlName="query"
class="form-control" aria-label="Search input">
<span class="input-group-append">
<button type="submit"
class="search-button btn btn-secondary">{{ messagePrefix + 'search.button' | translate }}</button>
</span>
</div>
</div>
</form>
<ds-pagination
*ngIf="(groups | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(groups | async)?.payload"
[collectionSize]="(groups | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
<div class="table-responsive">
<table id="groups" class="table table-striped table-hover table-bordered">
<thead>
<tr>
<th scope="col">{{messagePrefix + 'table.id' | translate}}</th>
<th scope="col">{{messagePrefix + 'table.name' | translate}}</th>
<th scope="col">{{messagePrefix + 'table.members' | translate}}</th>
<!-- <th scope="col">{{messagePrefix + 'table.comcol' | translate}}</th>-->
<th>{{messagePrefix + 'table.edit' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let group of (groups | async)?.payload?.page">
<td>{{group.id}}</td>
<td>{{group.name}}</td>
<td>{{(getMembers(group) | async)?.payload?.totalElements + (getSubgroups(group) | async)?.payload?.totalElements}}</td>
<!-- <td>{{getOptionalComColFromName(group.name)}}</td>-->
<td>
<div class="btn-group edit-field">
<button [routerLink]="groupService.getGroupEditPageRouterLink(group)"
class="btn btn-outline-primary btn-sm"
title="{{messagePrefix + 'table.edit.buttons.edit' | translate: {name: group.name} }}">
<i class="fas fa-edit fa-fw"></i>
</button>
<button *ngIf="!group?.permanent" (click)="deleteGroup(group)"
class="btn btn-outline-danger btn-sm"
title="{{messagePrefix + 'table.edit.buttons.remove' | translate: {name: group.name} }}">
<i class="fas fa-trash-alt fa-fw"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</ds-pagination>
<div *ngIf="(groups | async)?.payload?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
{{messagePrefix + 'no-items' | translate}}
</div>
</div>
</div>
</div>

View File

@@ -1,139 +0,0 @@
import { CommonModule } from '@angular/common';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, fakeAsync, inject, TestBed, tick } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule, By } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs/internal/Observable';
import { PaginatedList } from '../../../core/data/paginated-list';
import { RemoteData } from '../../../core/data/remote-data';
import { EPersonDataService } from '../../../core/eperson/eperson-data.service';
import { GroupDataService } from '../../../core/eperson/group-data.service';
import { EPerson } from '../../../core/eperson/models/eperson.model';
import { Group } from '../../../core/eperson/models/group.model';
import { RouteService } from '../../../core/services/route.service';
import { PageInfo } from '../../../core/shared/page-info.model';
import { MockRouter } from '../../../shared/mocks/mock-router';
import { MockTranslateLoader } from '../../../shared/mocks/mock-translate-loader';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { EPersonMock, EPersonMock2 } from '../../../shared/testing/eperson-mock';
import { GroupMock, GroupMock2 } from '../../../shared/testing/group-mock';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { routeServiceStub } from '../../../shared/testing/route-service-stub';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
import { GroupsRegistryComponent } from './groups-registry.component';
describe('GroupRegistryComponent', () => {
let component: GroupsRegistryComponent;
let fixture: ComponentFixture<GroupsRegistryComponent>;
let ePersonDataServiceStub: any;
let groupsDataServiceStub: any;
let mockGroups;
let mockEPeople;
beforeEach(async(() => {
mockGroups = [GroupMock, GroupMock2];
mockEPeople = [EPersonMock, EPersonMock2];
ePersonDataServiceStub = {
findAllByHref(href: string): Observable<RemoteData<PaginatedList<EPerson>>> {
switch (href) {
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid2/epersons':
return createSuccessfulRemoteDataObject$(new PaginatedList(null, []));
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid/epersons':
return createSuccessfulRemoteDataObject$(new PaginatedList(null, [EPersonMock]));
default:
return createSuccessfulRemoteDataObject$(new PaginatedList(null, []));
}
}
};
groupsDataServiceStub = {
allGroups: mockGroups,
findAllByHref(href: string): Observable<RemoteData<PaginatedList<Group>>> {
switch (href) {
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid2/groups':
return createSuccessfulRemoteDataObject$(new PaginatedList(null, []));
case 'https://dspace.4science.it/dspace-spring-rest/api/eperson/groups/testgroupid/groups':
return createSuccessfulRemoteDataObject$(new PaginatedList(null, [GroupMock2]));
default:
return createSuccessfulRemoteDataObject$(new PaginatedList(null, []));
}
},
getGroupEditPageRouterLink(group: Group): string {
return '/admin/access-control/groups/' + group.id;
},
getGroupRegistryRouterLink(): string {
return '/admin/access-control/groups';
},
searchGroups(query: string): Observable<RemoteData<PaginatedList<Group>>> {
if (query === '') {
return createSuccessfulRemoteDataObject$(new PaginatedList(null, this.allGroups));
}
const result = this.allGroups.find((group: Group) => {
return (group.id.includes(query))
});
return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [result]));
}
};
TestBed.configureTestingModule({
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: MockTranslateLoader
}
}),
],
declarations: [GroupsRegistryComponent],
providers: [GroupsRegistryComponent,
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
{ provide: GroupDataService, useValue: groupsDataServiceStub },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: RouteService, useValue: routeServiceStub },
{ provide: Router, useValue: new MockRouter() },
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GroupsRegistryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create GroupRegistryComponent', inject([GroupsRegistryComponent], (comp: GroupsRegistryComponent) => {
expect(comp).toBeDefined();
}));
it('should display list of groups', () => {
const groupIdsFound = fixture.debugElement.queryAll(By.css('#groups tr td:first-child'));
expect(groupIdsFound.length).toEqual(2);
mockGroups.map((group: Group) => {
expect(groupIdsFound.find((foundEl) => {
return (foundEl.nativeElement.textContent.trim() === group.uuid);
})).toBeTruthy();
})
});
describe('search', () => {
describe('when searching with query', () => {
let groupIdsFound;
beforeEach(fakeAsync(() => {
component.search({ query: GroupMock2.id });
tick();
fixture.detectChanges();
groupIdsFound = fixture.debugElement.queryAll(By.css('#groups tr td:first-child'));
}));
it('should display search result', () => {
expect(groupIdsFound.length).toEqual(1);
expect(groupIdsFound.find((foundEl) => {
return (foundEl.nativeElement.textContent.trim() === GroupMock2.uuid);
})).toBeTruthy();
});
});
});
});

View File

@@ -1,154 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { take } from 'rxjs/operators';
import { PaginatedList } from '../../../core/data/paginated-list';
import { RemoteData } from '../../../core/data/remote-data';
import { EPersonDataService } from '../../../core/eperson/eperson-data.service';
import { GroupDataService } from '../../../core/eperson/group-data.service';
import { EPerson } from '../../../core/eperson/models/eperson.model';
import { Group } from '../../../core/eperson/models/group.model';
import { RouteService } from '../../../core/services/route.service';
import { hasValue } from '../../../shared/empty.util';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
@Component({
selector: 'ds-groups-registry',
templateUrl: './groups-registry.component.html',
})
/**
* A component used for managing all existing groups within the repository.
* The admin can create, edit or delete groups here.
*/
export class GroupsRegistryComponent implements OnInit {
messagePrefix = 'admin.access-control.groups.';
/**
* Pagination config used to display the list of groups
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'groups-list-pagination',
pageSize: 5,
currentPage: 1
});
/**
* A list of all the current groups within the repository or the result of the search
*/
groups: Observable<RemoteData<PaginatedList<Group>>>;
// The search form
searchForm;
// Current search in groups registry
currentSearchQuery: string;
constructor(private groupService: GroupDataService,
private ePersonDataService: EPersonDataService,
private translateService: TranslateService,
private notificationsService: NotificationsService,
private formBuilder: FormBuilder,
protected routeService: RouteService,
private router: Router) {
this.currentSearchQuery = '';
this.searchForm = this.formBuilder.group(({
query: this.currentSearchQuery,
}));
}
ngOnInit() {
this.search({ query: this.currentSearchQuery });
}
/**
* Event triggered when the user changes page
* @param event
*/
onPageChange(event) {
this.config.currentPage = event;
this.search({ query: this.currentSearchQuery })
}
/**
* Search in the groups (searches by group name and by uuid exact match)
* @param data Contains query param
*/
search(data: any) {
const query: string = data.query;
if (query != null && this.currentSearchQuery !== query) {
this.router.navigateByUrl(this.groupService.getGroupRegistryRouterLink());
this.currentSearchQuery = query;
this.config.currentPage = 1;
}
this.groups = this.groupService.searchGroups(this.currentSearchQuery.trim(), {
currentPage: this.config.currentPage,
elementsPerPage: this.config.pageSize
});
}
/**
* Delete Group
*/
deleteGroup(group: Group) {
// TODO (backend)
console.log('TODO implement editGroup', group);
this.notificationsService.error('TODO implement deleteGroup (not yet implemented in backend)');
if (hasValue(group.id)) {
this.groupService.deleteGroup(group).pipe(take(1)).subscribe((success: boolean) => {
if (success) {
this.notificationsService.success(this.translateService.get(this.messagePrefix + 'notification.deleted.success', { name: group.name }));
this.forceUpdateGroup();
} else {
this.notificationsService.error(this.translateService.get(this.messagePrefix + 'notification.deleted.failure', { name: group.name }));
}
})
}
}
/**
* Force-update the list of groups by first clearing the cache related to groups, then performing a new REST call
*/
public forceUpdateGroup() {
this.groupService.clearGroupsRequests();
this.search({ query: this.currentSearchQuery })
}
/**
* Get the members (epersons embedded value of a group)
* @param group
*/
getMembers(group: Group): Observable<RemoteData<PaginatedList<EPerson>>> {
return this.ePersonDataService.findAllByHref(group._links.epersons.href);
}
/**
* Get the subgroups (groups embedded value of a group)
* @param group
*/
getSubgroups(group: Group): Observable<RemoteData<PaginatedList<Group>>> {
return this.groupService.findAllByHref(group._links.subgroups.href);
}
/**
* Reset all input-fields to be empty and search all search
*/
clearFormAndResetResult() {
this.searchForm.patchValue({
query: '',
});
this.search({ query: '' });
}
/**
* Extract optional UUID from a group name => To be resolved to community or collection with link
* (Or will be resolved in backend and added to group object, tbd) //TODO
* @param groupName
*/
getOptionalComColFromName(groupName: string): string {
return this.groupService.getUUIDFromString(groupName);
}
}

View File

@@ -0,0 +1,4 @@
<div class="container">
<h2>{{'admin.curation-tasks.header' |translate }}</h2>
<ds-curation-form></ds-curation-form>
</div>

View File

@@ -0,0 +1,28 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AdminCurationTasksComponent } from './admin-curation-tasks.component';
import { TranslateModule } from '@ngx-translate/core';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('AdminCurationTasksComponent', () => {
let comp: AdminCurationTasksComponent;
let fixture: ComponentFixture<AdminCurationTasksComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [AdminCurationTasksComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdminCurationTasksComponent);
comp = fixture.componentInstance;
});
describe('init', () => {
it('should initialise the comp', () => {
expect(comp).toBeDefined();
expect(fixture.debugElement.nativeElement.innerHTML).toContain('ds-curation-form');
});
});
});

View File

@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
/**
* Component responsible for rendering the system wide Curation Task UI
*/
@Component({
selector: 'ds-admin-curation-task',
templateUrl: './admin-curation-tasks.component.html',
})
export class AdminCurationTasksComponent {
}

View File

@@ -0,0 +1,15 @@
<div class="container">
<h2 id="header">{{'admin.metadata-import.page.header' | translate}}</h2>
<p>{{'admin.metadata-import.page.help' | translate}}</p>
<ds-file-dropzone-no-uploader
(onFileAdded)="setFile($event)"
[dropMessageLabel]="'admin.metadata-import.page.dropMsg'"
[dropMessageLabelReplacement]="'admin.metadata-import.page.dropMsgReplace'">
</ds-file-dropzone-no-uploader>
<button class="btn btn-secondary" id="backButton"
(click)="this.onReturn();">{{'admin.metadata-import.page.button.return' | translate}}</button>
<button class="btn btn-primary" id="proceedButton"
(click)="this.importMetadata();">{{'admin.metadata-import.page.button.proceed' | translate}}</button>
</div>

View File

@@ -0,0 +1,138 @@
import { Location } from '@angular/common';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { AuthService } from '../../core/auth/auth.service';
import { METADATA_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service';
import { EPerson } from '../../core/eperson/models/eperson.model';
import { ProcessParameter } from '../../process-page/processes/process-parameter.model';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub';
import { FileValueAccessorDirective } from '../../shared/utils/file-value-accessor.directive';
import { FileValidator } from '../../shared/utils/require-file.validator';
import { MetadataImportPageComponent } from './metadata-import-page.component';
import { createFailedRemoteDataObject$, createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
describe('MetadataImportPageComponent', () => {
let comp: MetadataImportPageComponent;
let fixture: ComponentFixture<MetadataImportPageComponent>;
let user;
let notificationService: NotificationsServiceStub;
let scriptService: any;
let router;
let authService;
let locationStub;
function init() {
notificationService = new NotificationsServiceStub();
scriptService = jasmine.createSpyObj('scriptService',
{
invoke: createSuccessfulRemoteDataObject$({ processId: '45' })
}
);
user = Object.assign(new EPerson(), {
id: 'userId',
email: 'user@test.com'
});
authService = jasmine.createSpyObj('authService', {
getAuthenticatedUserFromStore: observableOf(user)
});
router = jasmine.createSpyObj('router', {
navigateByUrl: jasmine.createSpy('navigateByUrl')
});
locationStub = jasmine.createSpyObj('location', {
back: jasmine.createSpy('back')
});
}
beforeEach(waitForAsync(() => {
init();
TestBed.configureTestingModule({
imports: [
FormsModule,
TranslateModule.forRoot(),
RouterTestingModule.withRoutes([])
],
declarations: [MetadataImportPageComponent, FileValueAccessorDirective, FileValidator],
providers: [
{ provide: NotificationsService, useValue: notificationService },
{ provide: ScriptDataService, useValue: scriptService },
{ provide: Router, useValue: router },
{ provide: AuthService, useValue: authService },
{ provide: Location, useValue: locationStub },
],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MetadataImportPageComponent);
comp = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(comp).toBeTruthy();
});
describe('if back button is pressed', () => {
beforeEach(fakeAsync(() => {
const proceed = fixture.debugElement.query(By.css('#backButton')).nativeElement;
proceed.click();
fixture.detectChanges();
}));
it('should do location.back', () => {
expect(locationStub.back).toHaveBeenCalled();
});
});
describe('if file is set', () => {
let fileMock: File;
beforeEach(() => {
fileMock = new File([''], 'filename.txt', { type: 'text/plain' });
comp.setFile(fileMock);
});
describe('if proceed button is pressed', () => {
beforeEach(fakeAsync(() => {
const proceed = fixture.debugElement.query(By.css('#proceedButton')).nativeElement;
proceed.click();
fixture.detectChanges();
}));
it('metadata-import script is invoked with its -e currentUserEmail, -f fileName and the mockFile', () => {
const parameterValues: ProcessParameter[] = [
Object.assign(new ProcessParameter(), { name: '-e', value: user.email }),
Object.assign(new ProcessParameter(), { name: '-f', value: 'filename.txt' }),
];
expect(scriptService.invoke).toHaveBeenCalledWith(METADATA_IMPORT_SCRIPT_NAME, parameterValues, [fileMock]);
});
it('success notification is shown', () => {
expect(notificationService.success).toHaveBeenCalled();
});
it('redirected to process page', () => {
expect(router.navigateByUrl).toHaveBeenCalledWith('/processes/45');
});
});
describe('if proceed is pressed; but script invoke fails', () => {
beforeEach(fakeAsync(() => {
jasmine.getEnv().allowRespy(true);
spyOn(scriptService, 'invoke').and.returnValue(createFailedRemoteDataObject$('Error', 500));
const proceed = fixture.debugElement.query(By.css('#proceedButton')).nativeElement;
proceed.click();
fixture.detectChanges();
}));
it('error notification is shown', () => {
expect(notificationService.error).toHaveBeenCalled();
});
});
});
});

View File

@@ -0,0 +1,104 @@
import { Location } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { AuthService } from '../../core/auth/auth.service';
import { METADATA_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service';
import { EPerson } from '../../core/eperson/models/eperson.model';
import { ProcessParameter } from '../../process-page/processes/process-parameter.model';
import { isNotEmpty } from '../../shared/empty.util';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { RemoteData } from '../../core/data/remote-data';
import { Process } from '../../process-page/processes/process.model';
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
import { getProcessDetailRoute } from '../../process-page/process-page-routing.paths';
@Component({
selector: 'ds-metadata-import-page',
templateUrl: './metadata-import-page.component.html'
})
/**
* Component that represents a metadata import page for administrators
*/
export class MetadataImportPageComponent implements OnInit {
/**
* The current value of the file
*/
fileObject: File;
/**
* The authenticated user's email
*/
private currentUserEmail$: Observable<string>;
public constructor(protected authService: AuthService,
private location: Location,
protected translate: TranslateService,
protected notificationsService: NotificationsService,
private scriptDataService: ScriptDataService,
private router: Router) {
}
/**
* Set file
* @param file
*/
setFile(file) {
this.fileObject = file;
}
/**
* Method provided by Angular. Invoked after the constructor.
*/
ngOnInit() {
this.currentUserEmail$ = this.authService.getAuthenticatedUserFromStore().pipe(
map((user: EPerson) => user.email)
);
}
/**
* When return button is pressed go to previous location
*/
public onReturn() {
this.location.back();
}
/**
* Starts import-metadata script with -e currentUserEmail -f fileName (and the selected file)
*/
public importMetadata() {
if (this.fileObject == null) {
this.notificationsService.error(this.translate.get('admin.metadata-import.page.error.addFile'));
} else {
this.currentUserEmail$.pipe(
switchMap((email: string) => {
if (isNotEmpty(email)) {
const parameterValues: ProcessParameter[] = [
Object.assign(new ProcessParameter(), { name: '-e', value: email }),
Object.assign(new ProcessParameter(), { name: '-f', value: this.fileObject.name }),
];
return this.scriptDataService.invoke(METADATA_IMPORT_SCRIPT_NAME, parameterValues, [this.fileObject]);
}
}),
getFirstCompletedRemoteData(),
).subscribe((rd: RemoteData<Process>) => {
if (rd.hasSucceeded) {
const title = this.translate.get('process.new.notification.success.title');
const content = this.translate.get('process.new.notification.success.content');
this.notificationsService.success(title, content);
if (isNotEmpty(rd.payload)) {
this.router.navigateByUrl(getProcessDetailRoute(rd.payload.processId));
}
} else {
const title = this.translate.get('process.new.notification.error.title');
const content = this.translate.get('process.new.notification.error.content');
this.notificationsService.error(title, content);
}
});
}
}
}

View File

@@ -0,0 +1,8 @@
import { URLCombiner } from '../../core/url-combiner/url-combiner';
import { getRegistriesModuleRoute } from '../admin-routing-paths';
export const BITSTREAMFORMATS_MODULE_PATH = 'bitstream-formats';
export function getBitstreamFormatsModuleRoute() {
return new URLCombiner(getRegistriesModuleRoute(), BITSTREAMFORMATS_MODULE_PATH).toString();
}

View File

@@ -2,28 +2,35 @@ import { MetadataRegistryComponent } from './metadata-registry/metadata-registry
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.component';
import { URLCombiner } from '../../core/url-combiner/url-combiner';
import { getRegistriesModulePath } from '../admin-routing.module';
const BITSTREAMFORMATS_MODULE_PATH = 'bitstream-formats';
export function getBitstreamFormatsModulePath() {
return new URLCombiner(getRegistriesModulePath(), BITSTREAMFORMATS_MODULE_PATH).toString();
}
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { BITSTREAMFORMATS_MODULE_PATH } from './admin-registries-routing-paths';
@NgModule({
imports: [
RouterModule.forChild([
{path: 'metadata', component: MetadataRegistryComponent, data: {title: 'admin.registries.metadata.title'}},
{
path: 'metadata/:schemaName',
component: MetadataSchemaComponent,
data: {title: 'admin.registries.schema.title'}
path: 'metadata',
resolve: { breadcrumb: I18nBreadcrumbResolver },
data: {title: 'admin.registries.metadata.title', breadcrumbKey: 'admin.registries.metadata'},
children: [
{
path: '',
component: MetadataRegistryComponent
},
{
path: ':schemaName',
resolve: { breadcrumb: I18nBreadcrumbResolver },
component: MetadataSchemaComponent,
data: {title: 'admin.registries.schema.title', breadcrumbKey: 'admin.registries.schema'}
}
]
},
{
path: BITSTREAMFORMATS_MODULE_PATH,
loadChildren: './bitstream-formats/bitstream-formats.module#BitstreamFormatsModule',
data: {title: 'admin.registries.bitstream-formats.title'}
resolve: { breadcrumb: I18nBreadcrumbResolver },
loadChildren: () => import('./bitstream-formats/bitstream-formats.module')
.then((m) => m.BitstreamFormatsModule),
data: {title: 'admin.registries.bitstream-formats.title', breadcrumbKey: 'admin.registries.bitstream-formats'}
},
])
]

View File

@@ -4,7 +4,6 @@ import { AdminRegistriesRoutingModule } from './admin-registries-routing.module'
import { CommonModule } from '@angular/common';
import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.component';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { SharedModule } from '../../shared/shared.module';
import { MetadataSchemaFormComponent } from './metadata-registry/metadata-schema-form/metadata-schema-form.component';
import { MetadataFieldFormComponent } from './metadata-schema/metadata-field-form/metadata-field-form.component';
@@ -15,7 +14,6 @@ import { BitstreamFormatsModule } from './bitstream-formats/bitstream-formats.mo
CommonModule,
SharedModule,
RouterModule,
TranslateModule,
BitstreamFormatsModule,
AdminRegistriesRoutingModule
],
@@ -24,9 +22,6 @@ import { BitstreamFormatsModule } from './bitstream-formats/bitstream-formats.mo
MetadataSchemaComponent,
MetadataSchemaFormComponent,
MetadataFieldFormComponent
],
entryComponents: [
]
})
export class AdminRegistriesModule {

View File

@@ -1,19 +1,19 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { RestResponse } from '../../../../core/cache/response.models';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service.stub';
import { RouterStub } from '../../../../shared/testing/router.stub';
import { AddBitstreamFormatComponent } from './add-bitstream-format.component';
import { createFailedRemoteDataObject$, createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
describe('AddBitstreamFormatComponent', () => {
let comp: AddBitstreamFormatComponent;
@@ -37,7 +37,7 @@ describe('AddBitstreamFormatComponent', () => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
createBitstreamFormat: observableOf(new RestResponse(true, 200, 'Success')),
createBitstreamFormat: createSuccessfulRemoteDataObject$({}),
clearBitStreamFormatRequests: observableOf(null)
});
@@ -45,9 +45,9 @@ describe('AddBitstreamFormatComponent', () => {
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [AddBitstreamFormatComponent],
providers: [
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
{ provide: Router, useValue: router },
{ provide: NotificationsService, useValue: notificationService },
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
@@ -61,7 +61,7 @@ describe('AddBitstreamFormatComponent', () => {
};
describe('createBitstreamFormat success', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.createBitstreamFormat(bitstreamFormat);
@@ -73,11 +73,11 @@ describe('AddBitstreamFormatComponent', () => {
});
});
describe('createBitstreamFormat error', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
createBitstreamFormat: observableOf(new RestResponse(false, 400, 'Bad Request')),
createBitstreamFormat: createFailedRemoteDataObject$('Error', 500),
clearBitStreamFormatRequests: observableOf(null)
});
@@ -85,9 +85,9 @@ describe('AddBitstreamFormatComponent', () => {
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [AddBitstreamFormatComponent],
providers: [
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
{ provide: Router, useValue: router },
{ provide: NotificationsService, useValue: notificationService },
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();

View File

@@ -1,12 +1,12 @@
import { take } from 'rxjs/operators';
import { Router } from '@angular/router';
import { Component } from '@angular/core';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
import { RemoteData } from '../../../../core/data/remote-data';
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
/**
* This component renders the page to create a new bitstream format.
@@ -32,12 +32,13 @@ export class AddBitstreamFormatComponent {
* @param bitstreamFormat
*/
createBitstreamFormat(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormatDataService.createBitstreamFormat(bitstreamFormat).pipe(take(1)
).subscribe((response: RestResponse) => {
if (response.isSuccessful) {
this.bitstreamFormatDataService.createBitstreamFormat(bitstreamFormat).pipe(
getFirstCompletedRemoteData(),
).subscribe((response: RemoteData<BitstreamFormat>) => {
if (response.hasSucceeded) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.create.success.head'),
this.translateService.get('admin.registries.bitstream-formats.create.success.content'));
this.router.navigate([getBitstreamFormatsModulePath()]);
this.router.navigate([getBitstreamFormatsModuleRoute()]);
this.bitstreamFormatDataService.clearBitStreamFormatRequests().subscribe();
} else {
this.notificationService.error(this.translateService.get('admin.registries.bitstream-formats.create.failure.head'),

View File

@@ -61,4 +61,4 @@ export class BitstreamFormatsRegistryDeselectAllAction implements Action {
export type BitstreamFormatsRegistryAction
= BitstreamFormatsRegistrySelectAction
| BitstreamFormatsRegistryDeselectAction
| BitstreamFormatsRegistryDeselectAllAction
| BitstreamFormatsRegistryDeselectAllAction;

View File

@@ -4,6 +4,7 @@ import { BitstreamFormatsResolver } from './bitstream-formats.resolver';
import { EditBitstreamFormatComponent } from './edit-bitstream-format/edit-bitstream-format.component';
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstream-format.component';
import { I18nBreadcrumbResolver } from '../../../core/breadcrumbs/i18n-breadcrumb.resolver';
const BITSTREAMFORMAT_EDIT_PATH = ':id/edit';
const BITSTREAMFORMAT_ADD_PATH = 'add';
@@ -17,14 +18,18 @@ const BITSTREAMFORMAT_ADD_PATH = 'add';
},
{
path: BITSTREAMFORMAT_ADD_PATH,
resolve: { breadcrumb: I18nBreadcrumbResolver },
component: AddBitstreamFormatComponent,
data: {breadcrumbKey: 'admin.registries.bitstream-formats.create'}
},
{
path: BITSTREAMFORMAT_EDIT_PATH,
component: EditBitstreamFormatComponent,
resolve: {
bitstreamFormat: BitstreamFormatsResolver
}
bitstreamFormat: BitstreamFormatsResolver,
breadcrumb: I18nBreadcrumbResolver
},
data: {breadcrumbKey: 'admin.registries.bitstream-formats.edit'}
},
])
],

View File

@@ -14,8 +14,7 @@
[pageInfoState]="(bitstreamFormats | async)?.payload"
[collectionSize]="(bitstreamFormats | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
[hidePagerWhenSinglePage]="true">
<div class="table-responsive">
<table id="formats" class="table table-striped table-hover">
<thead>

View File

@@ -1,8 +1,6 @@
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
@@ -11,14 +9,25 @@ import { PaginationComponent } from '../../../shared/pagination/pagination.compo
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe';
import { HostWindowService } from '../../../shared/host-window.service';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service.stub';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../core/shared/bitstream-format-support-level';
import { cold, getTestScheduler, hot } from 'jasmine-marbles';
import { TestScheduler } from 'rxjs/testing';
import {
createNoContentRemoteDataObject$,
createSuccessfulRemoteDataObject,
createSuccessfulRemoteDataObject$
} from '../../../shared/remote-data.utils';
import { createPaginatedList } from '../../../shared/testing/utils.test';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
import { FindListOptions } from '../../../core/data/request.models';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
describe('BitstreamFormatsComponent', () => {
let comp: BitstreamFormatsComponent;
@@ -26,6 +35,7 @@ describe('BitstreamFormatsComponent', () => {
let bitstreamFormatService;
let scheduler: TestScheduler;
let notificationsServiceStub;
let paginationService;
const bitstreamFormat1 = new BitstreamFormat();
bitstreamFormat1.uuid = 'test-uuid-1';
@@ -73,7 +83,11 @@ describe('BitstreamFormatsComponent', () => {
bitstreamFormat3,
bitstreamFormat4
];
const mockFormatsRD = new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFormatsList));
const mockFormatsRD = createSuccessfulRemoteDataObject(createPaginatedList(mockFormatsList));
const pagination = Object.assign(new PaginationComponentOptions(), { currentPage: 1, pageSize: 20 });
const sort = new SortOptions('score', SortDirection.DESC);
const findlistOptions = Object.assign(new FindListOptions(), { currentPage: 1, elementsPerPage: 20 });
const initAsync = () => {
notificationsServiceStub = new NotificationsServiceStub();
@@ -82,22 +96,25 @@ describe('BitstreamFormatsComponent', () => {
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
getSelectedBitstreamFormats: hot('a', {a: mockFormatsList}),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),
getSelectedBitstreamFormats: hot('a', { a: mockFormatsList }),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
deselectAllBitstreamFormats: {},
delete: observableOf(true),
delete: createSuccessfulRemoteDataObject$({}),
clearBitStreamFormatRequests: observableOf('cleared')
});
paginationService = new PaginationServiceStub();
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
]
}).compileComponents();
};
@@ -109,7 +126,7 @@ describe('BitstreamFormatsComponent', () => {
};
describe('Bitstream format page content', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should contain four formats', () => {
@@ -133,17 +150,17 @@ describe('BitstreamFormatsComponent', () => {
});
describe('selectBitStreamFormat', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should select a bitstreamFormat if it was selected in the event', () => {
const event = {target: {checked: true}};
const event = { target: { checked: true } };
comp.selectBitStreamFormat(bitstreamFormat1, event);
expect(bitstreamFormatService.selectBitstreamFormat).toHaveBeenCalledWith(bitstreamFormat1);
});
it('should deselect a bitstreamFormat if it is deselected in the event', () => {
const event = {target: {checked: false}};
const event = { target: { checked: false } };
comp.selectBitStreamFormat(bitstreamFormat1, event);
@@ -153,7 +170,7 @@ describe('BitstreamFormatsComponent', () => {
spyOn(comp, 'selectBitStreamFormat');
const unknownFormat = fixture.debugElement.query(By.css('#formats tr:nth-child(1) input'));
const event = {target: {checked: true}};
const event = { target: { checked: true } };
unknownFormat.triggerEventHandler('change', event);
expect(comp.selectBitStreamFormat).toHaveBeenCalledWith(bitstreamFormat1, event);
@@ -161,12 +178,12 @@ describe('BitstreamFormatsComponent', () => {
});
describe('isSelected', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should return an observable of true if the provided bistream is in the list returned by the service', () => {
const result = comp.isSelected(bitstreamFormat1);
expect(result).toBeObservable(cold('b', {b: true}));
expect(result).toBeObservable(cold('b', { b: true }));
});
it('should return an observable of false if the provided bistream is not in the list returned by the service', () => {
const format = new BitstreamFormat();
@@ -174,12 +191,12 @@ describe('BitstreamFormatsComponent', () => {
const result = comp.isSelected(format);
expect(result).toBeObservable(cold('b', {b: false}));
expect(result).toBeObservable(cold('b', { b: false }));
});
});
describe('deselectAll', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should deselect all bitstreamFormats', () => {
comp.deselectAll();
@@ -197,29 +214,32 @@ describe('BitstreamFormatsComponent', () => {
});
describe('deleteFormats success', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),
getSelectedBitstreamFormats: observableOf(mockFormatsList),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
deselectAllBitstreamFormats: {},
delete: observableOf(true),
delete: createNoContentRemoteDataObject$(),
clearBitStreamFormatRequests: observableOf('cleared')
});
TestBed.configureTestingModule({
paginationService = new PaginationServiceStub();
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
]
}).compileComponents();
}
@@ -243,14 +263,14 @@ describe('BitstreamFormatsComponent', () => {
});
describe('deleteFormats error', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: observableOf(new RemoteData(false, false, true, undefined, mockFormatsList[0])),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),
getSelectedBitstreamFormats: observableOf(mockFormatsList),
selectBitstreamFormat: {},
deselectBitstreamFormat: {},
@@ -259,13 +279,16 @@ describe('BitstreamFormatsComponent', () => {
clearBitStreamFormatRequests: observableOf('cleared')
});
TestBed.configureTestingModule({
paginationService = new PaginationServiceStub();
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
providers: [
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
{provide: HostWindowService, useValue: new HostWindowServiceStub(0)},
{provide: NotificationsService, useValue: notificationsServiceStub}
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: NotificationsService, useValue: notificationsServiceStub },
{ provide: PaginationService, useValue: paginationService }
]
}).compileComponents();
}

View File

@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, zip } from 'rxjs';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { combineLatest as observableCombineLatest, Observable, zip } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { PaginatedList } from '../../../core/data/paginated-list.model';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
@@ -11,6 +11,8 @@ import { hasValue } from '../../../shared/empty.util';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { NoContent } from '../../../core/shared/NoContent.model';
import { PaginationService } from '../../../core/pagination/pagination.service';
/**
* This component renders a list of bitstream formats
@@ -19,18 +21,13 @@ import { TranslateService } from '@ngx-translate/core';
selector: 'ds-bitstream-formats',
templateUrl: './bitstream-formats.component.html'
})
export class BitstreamFormatsComponent implements OnInit {
export class BitstreamFormatsComponent implements OnInit, OnDestroy {
/**
* A paginated list of bitstream formats to be shown on the page
*/
bitstreamFormats: Observable<RemoteData<PaginatedList<BitstreamFormat>>>;
/**
* A BehaviourSubject that keeps track of the pageState used to update the currently displayed bitstreamFormats
*/
pageState: BehaviorSubject<string>;
/**
* The current pagination configuration for the page used by the FindAll method
* Currently simply renders all bitstream formats
@@ -44,16 +41,19 @@ export class BitstreamFormatsComponent implements OnInit {
* Currently simply renders all bitstream formats
*/
pageConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'registry-bitstreamformats-pagination',
id: 'rbp',
pageSize: 20
});
constructor(private notificationsService: NotificationsService,
private router: Router,
private translateService: TranslateService,
private bitstreamFormatService: BitstreamFormatDataService) {
private bitstreamFormatService: BitstreamFormatDataService,
private paginationService: PaginationService,
) {
}
/**
* Deletes the currently selected formats from the registry and updates the presented list
*/
@@ -64,7 +64,7 @@ export class BitstreamFormatsComponent implements OnInit {
const tasks$ = [];
for (const format of formats) {
if (hasValue(format.id)) {
tasks$.push(this.bitstreamFormatService.delete(format.id));
tasks$.push(this.bitstreamFormatService.delete(format.id).pipe(map((response: RemoteData<NoContent>) => response.hasSucceeded)));
}
}
zip(...tasks$).subscribe((results: boolean[]) => {
@@ -79,10 +79,8 @@ export class BitstreamFormatsComponent implements OnInit {
this.deselectAll();
this.router.navigate([], {
queryParams: Object.assign({}, { page: 1 }),
queryParamsHandling: 'merge'
}); });
this.paginationService.resetPage(this.pageConfig.id);
});
}
);
}
@@ -140,31 +138,17 @@ export class BitstreamFormatsComponent implements OnInit {
});
}
/**
* When the page is changed, make sure to update the list of bitstreams to match the new page
* @param event The page change event
*/
onPageChange(event) {
this.config = Object.assign(new FindListOptions(), this.config, {
currentPage: event,
});
this.pageConfig.currentPage = event;
this.pageState.next('pageChange');
}
ngOnInit(): void {
this.pageState = new BehaviorSubject('init');
this.bitstreamFormats = this.pageState.pipe(
switchMap(() => {
return this.updateFormats()
;
}));
this.bitstreamFormats = this.paginationService.getFindListOptions(this.pageConfig.id, this.config).pipe(
switchMap((findListOptions: FindListOptions) => {
return this.bitstreamFormatService.findAll(findListOptions);
})
);
}
/**
* Finds all formats based on the current config
*/
private updateFormats() {
return this.bitstreamFormatService.findAll(this.config);
ngOnDestroy(): void {
this.paginationService.clearPagination(this.pageConfig.id);
}
}

View File

@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import { BitstreamFormatsComponent } from './bitstream-formats.component';
import { SharedModule } from '../../../shared/shared.module';
import { FormatFormComponent } from './format-form/format-form.component';
@@ -14,7 +13,6 @@ import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstrea
CommonModule,
SharedModule,
RouterModule,
TranslateModule,
BitstreamFormatsRoutingModule
],
declarations: [
@@ -22,8 +20,7 @@ import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstrea
EditBitstreamFormatComponent,
AddBitstreamFormatComponent,
FormatFormComponent
],
entryComponents: []
]
})
export class BitstreamFormatsModule {

View File

@@ -1,11 +1,10 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { find } from 'rxjs/operators';
import { RemoteData } from '../../../core/data/remote-data';
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service';
import { hasValue } from '../../../shared/empty.util';
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
/**
* This class represents a resolver that requests a specific bitstreamFormat before the route is activated
@@ -25,7 +24,7 @@ export class BitstreamFormatsResolver implements Resolve<RemoteData<BitstreamFor
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<RemoteData<BitstreamFormat>> {
return this.bitstreamFormatDataService.findById(route.params.id)
.pipe(
find((RD) => hasValue(RD.error) || RD.hasSucceeded),
getFirstCompletedRemoteData()
);
}
}

View File

@@ -1,20 +1,24 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { RestResponse } from '../../../../core/cache/response.models';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RemoteData } from '../../../../core/data/remote-data';
import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-format-support-level';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service-stub';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service.stub';
import { RouterStub } from '../../../../shared/testing/router.stub';
import { EditBitstreamFormatComponent } from './edit-bitstream-format.component';
import {
createFailedRemoteDataObject$,
createSuccessfulRemoteDataObject,
createSuccessfulRemoteDataObject$
} from '../../../../shared/remote-data.utils';
describe('EditBitstreamFormatComponent', () => {
let comp: EditBitstreamFormatComponent;
@@ -32,7 +36,7 @@ describe('EditBitstreamFormatComponent', () => {
const routeStub = {
data: observableOf({
bitstreamFormat: new RemoteData(false, false, true, null, bitstreamFormat)
bitstreamFormat: createSuccessfulRemoteDataObject(bitstreamFormat)
})
};
@@ -41,20 +45,20 @@ describe('EditBitstreamFormatComponent', () => {
let bitstreamFormatDataService: BitstreamFormatDataService;
const initAsync = () => {
router = new RouterStub();
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
updateBitstreamFormat: observableOf(new RestResponse(true, 200, 'Success'))
updateBitstreamFormat: createSuccessfulRemoteDataObject$({})
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [EditBitstreamFormatComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
{ provide: ActivatedRoute, useValue: routeStub },
{ provide: Router, useValue: router },
{ provide: NotificationsService, useValue: notificationService },
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
@@ -68,17 +72,18 @@ describe('EditBitstreamFormatComponent', () => {
};
describe('init', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should initialise the bitstreamFormat based on the route', () => {
comp.bitstreamFormatRD$.subscribe((format: RemoteData<BitstreamFormat>) => {
expect(format).toEqual(new RemoteData(false, false, true, null, bitstreamFormat));
const expected = createSuccessfulRemoteDataObject(bitstreamFormat);
expect(format.payload).toEqual(expected.payload);
});
});
});
describe('updateFormat success', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should send the updated form to the service, show a notification and navigate to ', () => {
comp.updateFormat(bitstreamFormat);
@@ -90,21 +95,21 @@ describe('EditBitstreamFormatComponent', () => {
});
});
describe('updateFormat error', () => {
beforeEach(async( () => {
router = new RouterStub();
beforeEach(waitForAsync(() => {
router = new RouterStub();
notificationService = new NotificationsServiceStub();
bitstreamFormatDataService = jasmine.createSpyObj('bitstreamFormatDataService', {
updateBitstreamFormat: observableOf(new RestResponse(false, 400, 'Bad Request'))
updateBitstreamFormat: createFailedRemoteDataObject$('Error', 500)
});
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [EditBitstreamFormatComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: router},
{provide: NotificationsService, useValue: notificationService},
{provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService},
{ provide: ActivatedRoute, useValue: routeStub },
{ provide: Router, useValue: router },
{ provide: NotificationsService, useValue: notificationService },
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();

View File

@@ -1,14 +1,14 @@
import { map, take } from 'rxjs/operators';
import { map } from 'rxjs/operators';
import { ActivatedRoute, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { Component, OnInit } from '@angular/core';
import { RemoteData } from '../../../../core/data/remote-data';
import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model';
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
/**
* This component renders the edit page of a bitstream format.
@@ -46,12 +46,13 @@ export class EditBitstreamFormatComponent implements OnInit {
* When failed, an error notification will be shown.
*/
updateFormat(bitstreamFormat: BitstreamFormat) {
this.bitstreamFormatDataService.updateBitstreamFormat(bitstreamFormat).pipe(take(1)
).subscribe((response: RestResponse) => {
if (response.isSuccessful) {
this.bitstreamFormatDataService.updateBitstreamFormat(bitstreamFormat).pipe(
getFirstCompletedRemoteData(),
).subscribe((response: RemoteData<BitstreamFormat>) => {
if (response.hasSucceeded) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.edit.success.head'),
this.translateService.get('admin.registries.bitstream-formats.edit.success.content'));
this.router.navigate([getBitstreamFormatsModulePath()]);
this.router.navigate([getBitstreamFormatsModuleRoute()]);
} else {
this.notificationService.error('admin.registries.bitstream-formats.edit.failure.head',
'admin.registries.bitstream-formats.create.edit.content');

View File

@@ -1,9 +1,9 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { RouterStub } from '../../../../shared/testing/router-stub';
import { RouterStub } from '../../../../shared/testing/router.stub';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { FormatFormComponent } from './format-form.component';
@@ -43,7 +43,7 @@ describe('FormatFormComponent', () => {
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule],
declarations: [FormatFormComponent],
providers: [
{provide: Router, useValue: router},
{ provide: Router, useValue: router },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents();
@@ -58,7 +58,7 @@ describe('FormatFormComponent', () => {
};
describe('initialise', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should initialises the values in the form', () => {
@@ -82,7 +82,7 @@ describe('FormatFormComponent', () => {
});
});
describe('onSubmit', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should emit the bitstreamFormat currently present in the form', () => {
@@ -93,7 +93,7 @@ describe('FormatFormComponent', () => {
});
});
describe('onCancel', () => {
beforeEach(async(initAsync));
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should navigate back to the bitstream overview', () => {

View File

@@ -4,7 +4,7 @@ import { BitstreamFormatSupportLevel } from '../../../../core/shared/bitstream-f
import {
DynamicCheckboxModel,
DynamicFormArrayModel,
DynamicFormControlLayout, DynamicFormControlLayoutConfig,
DynamicFormControlLayout,
DynamicFormControlModel,
DynamicFormService,
DynamicInputModel,
@@ -12,9 +12,9 @@ import {
DynamicTextAreaModel
} from '@ng-dynamic-forms/core';
import { Router } from '@angular/router';
import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { hasValue, isEmpty } from '../../../../shared/empty.util';
import { TranslateService } from '@ngx-translate/core';
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
/**
* The component responsible for rendering the form to create/edit a bitstream format
@@ -189,6 +189,6 @@ export class FormatFormComponent implements OnInit {
* Cancels the edit/create action of the bitstream format and navigates back to the bitstream format registry
*/
onCancel() {
this.router.navigate([getBitstreamFormatsModulePath()]);
this.router.navigate([getBitstreamFormatsModuleRoute()]);
}
}

View File

@@ -11,11 +11,9 @@
<ds-pagination
*ngIf="(metadataSchemas | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(metadataSchemas | async)?.payload"
[collectionSize]="(metadataSchemas | async)?.payload?.totalElements"
[hideGear]="true"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
[hidePagerWhenSinglePage]="true">
<div class="table-responsive">
<table id="metadata-schemas" class="table table-striped table-hover">

View File

@@ -1,7 +1,7 @@
import { MetadataRegistryComponent } from './metadata-registry.component';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { of as observableOf } from 'rxjs';
import { PaginatedList } from '../../../core/data/paginated-list';
import { buildPaginatedList } from '../../../core/data/paginated-list.model';
import { TranslateModule } from '@ngx-translate/core';
import { By } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
@@ -10,19 +10,25 @@ import { RegistryService } from '../../../core/registry/registry.service';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe';
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service.stub';
import { HostWindowService } from '../../../shared/host-window.service';
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
import { RestResponse } from '../../../core/cache/response.models';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
import { FindListOptions } from '../../../core/data/request.models';
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
describe('MetadataRegistryComponent', () => {
let comp: MetadataRegistryComponent;
let fixture: ComponentFixture<MetadataRegistryComponent>;
let registryService: RegistryService;
let paginationService;
const mockSchemasList = [
{
id: 1,
@@ -45,27 +51,33 @@ describe('MetadataRegistryComponent', () => {
namespace: 'http://dspace.org/mockschema'
}
];
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
const mockSchemas = createSuccessfulRemoteDataObject$(buildPaginatedList(null, mockSchemasList));
/* tslint:disable:no-empty */
const registryServiceStub = {
getMetadataSchemas: () => mockSchemas,
getActiveMetadataSchema: () => observableOf(undefined),
getSelectedMetadataSchemas: () => observableOf([]),
editMetadataSchema: (schema) => {},
cancelEditMetadataSchema: () => {},
editMetadataSchema: (schema) => {
},
cancelEditMetadataSchema: () => {
},
deleteMetadataSchema: () => observableOf(new RestResponse(true, 200, 'OK')),
deselectAllMetadataSchema: () => {},
deselectAllMetadataSchema: () => {
},
clearMetadataSchemaRequests: () => observableOf(undefined)
};
/* tslint:enable:no-empty */
beforeEach(async(() => {
paginationService = new PaginationServiceStub();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [MetadataRegistryComponent, PaginationComponent, EnumKeysPipe],
providers: [
{ provide: RegistryService, useValue: registryServiceStub },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: PaginationService, useValue: paginationService },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() }
],
schemas: [NO_ERRORS_SCHEMA]
@@ -107,13 +119,13 @@ describe('MetadataRegistryComponent', () => {
fixture.detectChanges();
});
it('should start editing the selected schema', async(() => {
it('should start editing the selected schema', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(registryService.editMetadataSchema).toHaveBeenCalledWith(mockSchemasList[0] as MetadataSchema);
});
}));
it('should cancel editing the selected schema when clicked again', async(() => {
it('should cancel editing the selected schema when clicked again', waitForAsync(() => {
spyOn(registryService, 'getActiveMetadataSchema').and.returnValue(observableOf(mockSchemasList[0] as MetadataSchema));
spyOn(registryService, 'cancelEditMetadataSchema');
row.click();
@@ -134,7 +146,7 @@ describe('MetadataRegistryComponent', () => {
fixture.detectChanges();
});
it('should call deleteMetadataSchema with the selected id', async(() => {
it('should call deleteMetadataSchema with the selected id', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(registryService.deleteMetadataSchema).toHaveBeenCalledWith(selectedSchemas[0].id);
});

View File

@@ -1,17 +1,19 @@
import { Component } from '@angular/core';
import { RegistryService } from '../../../core/registry/registry.service';
import { Observable, combineLatest as observableCombineLatest } from 'rxjs';
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, zip } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { PaginatedList } from '../../../core/data/paginated-list.model';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { map, take } from 'rxjs/operators';
import { filter, map, switchMap, take } from 'rxjs/operators';
import { hasValue } from '../../../shared/empty.util';
import { RestResponse } from '../../../core/cache/response.models';
import { zip } from 'rxjs/internal/observable/zip';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { Route, Router } from '@angular/router';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { toFindListOptions } from '../../../shared/pagination/pagination.utils';
import { NoContent } from '../../../core/shared/NoContent.model';
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
import { PaginationService } from '../../../core/pagination/pagination.service';
@Component({
selector: 'ds-metadata-registry',
@@ -33,31 +35,33 @@ export class MetadataRegistryComponent {
* Pagination config used to display the list of metadata schemas
*/
config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
id: 'registry-metadataschemas-pagination',
id: 'rm',
pageSize: 25
});
/**
* Whether or not the list of MetadataSchemas needs an update
*/
needsUpdate$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
constructor(private registryService: RegistryService,
private notificationsService: NotificationsService,
private router: Router,
private paginationService: PaginationService,
private translateService: TranslateService) {
this.updateSchemas();
}
/**
* Event triggered when the user changes page
* @param event
*/
onPageChange(event) {
this.config.currentPage = event;
this.updateSchemas();
}
/**
* Update the list of schemas by fetching it from the rest api or cache
*/
private updateSchemas() {
this.metadataSchemas = this.registryService.getMetadataSchemas(this.config);
this.metadataSchemas = this.needsUpdate$.pipe(
filter((update) => update === true),
switchMap(() => this.paginationService.getCurrentPagination(this.config.id, this.config)),
switchMap((currentPagination) => this.registryService.getMetadataSchemas(toFindListOptions(currentPagination)))
);
}
/**
@@ -65,8 +69,7 @@ export class MetadataRegistryComponent {
* a new REST call
*/
public forceUpdateSchemas() {
this.registryService.clearMetadataSchemaRequests().subscribe();
this.updateSchemas();
this.needsUpdate$.next(true);
}
/**
@@ -125,17 +128,18 @@ export class MetadataRegistryComponent {
* Delete all the selected metadata schemas
*/
deleteSchemas() {
this.registryService.clearMetadataSchemaRequests().subscribe();
this.registryService.getSelectedMetadataSchemas().pipe(take(1)).subscribe(
(schemas) => {
const tasks$ = [];
for (const schema of schemas) {
if (hasValue(schema.id)) {
tasks$.push(this.registryService.deleteMetadataSchema(schema.id));
tasks$.push(this.registryService.deleteMetadataSchema(schema.id).pipe(getFirstCompletedRemoteData()));
}
}
zip(...tasks$).subscribe((responses: RestResponse[]) => {
const successResponses = responses.filter((response: RestResponse) => response.isSuccessful);
const failedResponses = responses.filter((response: RestResponse) => !response.isSuccessful);
zip(...tasks$).subscribe((responses: RemoteData<NoContent>[]) => {
const successResponses = responses.filter((response: RemoteData<NoContent>) => response.hasSucceeded);
const failedResponses = responses.filter((response: RemoteData<NoContent>) => response.hasFailed);
if (successResponses.length > 0) {
this.showNotification(true, successResponses.length);
}
@@ -147,7 +151,7 @@ export class MetadataRegistryComponent {
this.forceUpdateSchemas();
});
}
)
);
}
/**
@@ -160,14 +164,18 @@ export class MetadataRegistryComponent {
const suffix = success ? 'success' : 'failure';
const messages = observableCombineLatest(
this.translateService.get(success ? `${prefix}.${suffix}` : `${prefix}.${suffix}`),
this.translateService.get(`${prefix}.deleted.${suffix}`, { amount: amount })
this.translateService.get(`${prefix}.deleted.${suffix}`, {amount: amount})
);
messages.subscribe(([head, content]) => {
if (success) {
this.notificationsService.success(head, content)
this.notificationsService.success(head, content);
} else {
this.notificationsService.error(head, content)
this.notificationsService.error(head, content);
}
});
}
ngOnDestroy(): void {
this.paginationService.clearPagination(this.config.id);
}
}

View File

@@ -1,9 +1,13 @@
import {
MetadataRegistryCancelFieldAction,
MetadataRegistryCancelSchemaAction, MetadataRegistryDeselectAllFieldAction,
MetadataRegistryDeselectAllSchemaAction, MetadataRegistryDeselectFieldAction,
MetadataRegistryDeselectSchemaAction, MetadataRegistryEditFieldAction,
MetadataRegistryEditSchemaAction, MetadataRegistrySelectFieldAction,
MetadataRegistryCancelSchemaAction,
MetadataRegistryDeselectAllFieldAction,
MetadataRegistryDeselectAllSchemaAction,
MetadataRegistryDeselectFieldAction,
MetadataRegistryDeselectSchemaAction,
MetadataRegistryEditFieldAction,
MetadataRegistryEditSchemaAction,
MetadataRegistrySelectFieldAction,
MetadataRegistrySelectSchemaAction
} from './metadata-registry.actions';
import { metadataRegistryReducer, MetadataRegistryState } from './metadata-registry.reducers';
@@ -12,6 +16,7 @@ import { MetadataField } from '../../../core/metadata/metadata-field.model';
class NullAction extends MetadataRegistryEditSchemaAction {
type = null;
constructor() {
super(undefined);
}

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { MetadataSchemaFormComponent } from './metadata-schema-form.component';
import { NO_ERRORS_SCHEMA } from '@angular/core';
@@ -9,7 +9,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe';
import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { of as observableOf } from 'rxjs';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
describe('MetadataSchemaFormComponent', () => {
@@ -21,21 +21,24 @@ describe('MetadataSchemaFormComponent', () => {
const registryServiceStub = {
getActiveMetadataSchema: () => observableOf(undefined),
createOrUpdateMetadataSchema: (schema: MetadataSchema) => observableOf(schema),
cancelEditMetadataSchema: () => {}
cancelEditMetadataSchema: () => {
},
clearMetadataSchemaRequests: () => observableOf(undefined)
};
const formBuilderServiceStub = {
createFormGroup: () => {
return {
patchValue: () => {}
patchValue: () => {
}
};
}
};
/* tslint:enable:no-empty */
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [ MetadataSchemaFormComponent, EnumKeysPipe ],
declarations: [MetadataSchemaFormComponent, EnumKeysPipe],
providers: [
{ provide: RegistryService, useValue: registryServiceStub },
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
@@ -76,7 +79,7 @@ describe('MetadataSchemaFormComponent', () => {
fixture.detectChanges();
});
it('should emit a new schema using the correct values', async(() => {
it('should emit a new schema using the correct values', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expected);
});
@@ -96,7 +99,7 @@ describe('MetadataSchemaFormComponent', () => {
fixture.detectChanges();
});
it('should edit the existing schema using the correct values', async(() => {
it('should edit the existing schema using the correct values', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expectedWithId);
});

View File

@@ -10,7 +10,7 @@ import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { take } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
import { combineLatest } from 'rxjs';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
@Component({
@@ -101,14 +101,19 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy {
required: true,
});
this.formModel = [
this.namespace,
this.name
new DynamicFormGroupModel(
{
id: 'metadatadataschemagroup',
group:[this.namespace, this.name]
})
];
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
this.registryService.getActiveMetadataSchema().subscribe((schema) => {
this.formGroup.patchValue({
name: schema != null ? schema.prefix : '',
namespace: schema != null ? schema.namespace : ''
metadatadataschemagroup:{
name: schema != null ? schema.prefix : '',
namespace: schema != null ? schema.namespace : ''
}
});
});
});
@@ -128,6 +133,7 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy {
* Emit the updated/created schema using the EventEmitter submitForm
*/
onSubmit() {
this.registryService.clearMetadataSchemaRequests().subscribe();
this.registryService.getActiveMetadataSchema().pipe(take(1)).subscribe(
(schema) => {
const values = {
@@ -139,7 +145,7 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy {
this.submitForm.emit(newSchema);
});
} else {
this.registryService.createOrUpdateMetadataSchema(Object.assign(new MetadataSchema(), {
this.registryService.createOrUpdateMetadataSchema(Object.assign(new MetadataSchema(), schema, {
id: schema.id,
prefix: (values.prefix ? values.prefix : schema.prefix),
namespace: (values.namespace ? values.namespace : schema.namespace)
@@ -148,6 +154,7 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy {
});
}
this.clearFields();
this.registryService.cancelEditMetadataSchema();
}
);
}
@@ -157,8 +164,10 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy {
*/
clearFields() {
this.formGroup.patchValue({
prefix: '',
namespace: ''
metadatadataschemagroup:{
prefix: '',
namespace: ''
}
});
}

View File

@@ -1,8 +1,8 @@
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { MetadataFieldFormComponent } from './metadata-field-form.component';
import { RegistryService } from '../../../../core/registry/registry.service';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { of as observableOf } from 'rxjs';
import { CommonModule } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
@@ -27,23 +27,28 @@ describe('MetadataFieldFormComponent', () => {
/* tslint:disable:no-empty */
const registryServiceStub = {
getActiveMetadataField: () => observableOf(undefined),
createOrUpdateMetadataField: (field: MetadataField) => observableOf(field),
cancelEditMetadataField: () => {},
cancelEditMetadataSchema: () => {},
createMetadataField: (field: MetadataField) => observableOf(field),
updateMetadataField: (field: MetadataField) => observableOf(field),
cancelEditMetadataField: () => {
},
cancelEditMetadataSchema: () => {
},
clearMetadataFieldRequests: () => observableOf(undefined)
};
const formBuilderServiceStub = {
createFormGroup: () => {
return {
patchValue: () => {}
patchValue: () => {
}
};
}
};
/* tslint:enable:no-empty */
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [ MetadataFieldFormComponent, EnumKeysPipe ],
declarations: [MetadataFieldFormComponent, EnumKeysPipe],
providers: [
{ provide: RegistryService, useValue: registryServiceStub },
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
@@ -65,8 +70,8 @@ describe('MetadataFieldFormComponent', () => {
afterEach(() => {
component = null;
registryService = null
})
registryService = null;
});
describe('when submitting the form', () => {
const element = 'fakeElement';
@@ -74,7 +79,6 @@ describe('MetadataFieldFormComponent', () => {
const scopeNote = 'fakeScopeNote';
const expected = Object.assign(new MetadataField(), {
schema: metadataSchema,
element: element,
qualifier: qualifier,
scopeNote: scopeNote
@@ -94,7 +98,7 @@ describe('MetadataFieldFormComponent', () => {
fixture.detectChanges();
});
it('should emit a new field using the correct values', async(() => {
it('should emit a new field using the correct values', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expected);
});
@@ -116,7 +120,7 @@ describe('MetadataFieldFormComponent', () => {
fixture.detectChanges();
});
it('should edit the existing field using the correct values', async(() => {
it('should edit the existing field using the correct values', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(component.submitForm.emit).toHaveBeenCalledWith(expectedWithId);
});

View File

@@ -1,6 +1,7 @@
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import {
DynamicFormControlModel,
DynamicFormGroupModel,
DynamicFormLayout,
DynamicInputModel
} from '@ng-dynamic-forms/core';
@@ -9,7 +10,7 @@ import { RegistryService } from '../../../../core/registry/registry.service';
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
import { take } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest } from 'rxjs/internal/observable/combineLatest';
import { combineLatest } from 'rxjs';
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
@@ -124,16 +125,20 @@ export class MetadataFieldFormComponent implements OnInit, OnDestroy {
required: false,
});
this.formModel = [
this.element,
this.qualifier,
this.scopeNote
new DynamicFormGroupModel(
{
id: 'metadatadatafieldgroup',
group:[this.element, this.qualifier, this.scopeNote]
})
];
this.formGroup = this.formBuilderService.createFormGroup(this.formModel);
this.registryService.getActiveMetadataField().subscribe((field) => {
this.formGroup.patchValue({
element: field != null ? field.element : '',
qualifier: field != null ? field.qualifier : '',
scopeNote: field != null ? field.scopeNote : ''
metadatadatafieldgroup: {
element: field != null ? field.element : '',
qualifier: field != null ? field.qualifier : '',
scopeNote: field != null ? field.scopeNote : ''
}
});
});
});
@@ -156,19 +161,17 @@ export class MetadataFieldFormComponent implements OnInit, OnDestroy {
this.registryService.getActiveMetadataField().pipe(take(1)).subscribe(
(field) => {
const values = {
schema: this.metadataSchema,
element: this.element.value,
qualifier: this.qualifier.value,
scopeNote: this.scopeNote.value
};
if (field == null) {
this.registryService.createOrUpdateMetadataField(Object.assign(new MetadataField(), values)).subscribe((newField) => {
this.registryService.createMetadataField(Object.assign(new MetadataField(), values), this.metadataSchema).subscribe((newField) => {
this.submitForm.emit(newField);
});
} else {
this.registryService.createOrUpdateMetadataField(Object.assign(new MetadataField(), {
this.registryService.updateMetadataField(Object.assign(new MetadataField(), field, {
id: field.id,
schema: this.metadataSchema,
element: (values.element ? values.element : field.element),
qualifier: (values.qualifier ? values.qualifier : field.qualifier),
scopeNote: (values.scopeNote ? values.scopeNote : field.scopeNote)
@@ -177,6 +180,7 @@ export class MetadataFieldFormComponent implements OnInit, OnDestroy {
});
}
this.clearFields();
this.registryService.cancelEditMetadataField();
}
);
}
@@ -186,9 +190,11 @@ export class MetadataFieldFormComponent implements OnInit, OnDestroy {
*/
clearFields() {
this.formGroup.patchValue({
element: '',
qualifier: '',
scopeNote: ''
metadatadatafieldgroup: {
element: '',
qualifier: '',
scopeNote: ''
}
});
}

View File

@@ -1,36 +1,36 @@
<div class="container">
<div class="metadata-schema row">
<div class="col-12">
<div class="col-12" *ngVar="(metadataSchema$ | async) as schema">
<h2 id="header" class="border-bottom pb-2">{{'admin.registries.schema.head' | translate}}: "{{(metadataSchema | async)?.payload?.prefix}}"</h2>
<h2 id="header" class="border-bottom pb-2">{{'admin.registries.schema.head' | translate}}: "{{schema?.prefix}}"</h2>
<p id="description" class="pb-2">{{'admin.registries.schema.description' | translate:namespace }}</p>
<p id="description" class="pb-2">{{'admin.registries.schema.description' | translate:{ namespace: schema?.namespace } }}</p>
<ds-metadata-field-form
[metadataSchema]="(metadataSchema | async)?.payload"
[metadataSchema]="schema"
(submitForm)="forceUpdateFields()"></ds-metadata-field-form>
<h3>{{'admin.registries.schema.fields.head' | translate}}</h3>
<ds-pagination
*ngIf="(metadataFields | async)?.payload?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="(metadataFields | async)?.payload"
[collectionSize]="(metadataFields | async)?.payload?.totalElements"
[hideGear]="false"
[hidePagerWhenSinglePage]="true"
(pageChange)="onPageChange($event)">
<div class="table-responsive">
<table id="metadata-fields" class="table table-striped table-hover">
<thead>
<ng-container *ngVar="(metadataFields$ | async)?.payload as fields">
<ds-pagination
*ngIf="fields?.totalElements > 0"
[paginationOptions]="config"
[pageInfoState]="fields"
[collectionSize]="fields?.totalElements"
[hideGear]="false"
[hidePagerWhenSinglePage]="true">
<div class="table-responsive">
<table id="metadata-fields" class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th scope="col">{{'admin.registries.schema.fields.table.field' | translate}}</th>
<th scope="col">{{'admin.registries.schema.fields.table.scopenote' | translate}}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let field of (metadataFields | async)?.payload?.page"
</thead>
<tbody>
<tr *ngFor="let field of fields?.page"
[ngClass]="{'table-primary' : isActive(field) | async}">
<td>
<label>
@@ -39,22 +39,23 @@
(change)="selectMetadataField(field, $event)">
</label>
</td>
<td class="selectable-row" (click)="editField(field)">{{(metadataSchema | async)?.payload?.prefix}}.{{field.element}}<label *ngIf="field.qualifier">.</label>{{field.qualifier}}</td>
<td class="selectable-row" (click)="editField(field)">{{schema?.prefix}}.{{field.element}}<label *ngIf="field.qualifier">.</label>{{field.qualifier}}</td>
<td class="selectable-row" (click)="editField(field)">{{field.scopeNote}}</td>
</tr>
</tbody>
</table>
</tbody>
</table>
</div>
</ds-pagination>
<div *ngIf="fields?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
{{'admin.registries.schema.fields.no-items' | translate}}
</div>
</ds-pagination>
<div *ngIf="(metadataFields | async)?.payload?.totalElements == 0" class="alert alert-info w-100 mb-2" role="alert">
{{'admin.registries.schema.fields.no-items' | translate}}
</div>
<div>
<button [routerLink]="['/admin/registries/metadata']" class="btn btn-primary">{{'admin.registries.schema.return' | translate}}</button>
<button *ngIf="(metadataFields | async)?.payload?.page?.length > 0" type="submit" class="btn btn-danger float-right" (click)="deleteFields()">{{'admin.registries.schema.fields.table.delete' | translate}}</button>
</div>
<div>
<button [routerLink]="['/admin/registries/metadata']" class="btn btn-primary">{{'admin.registries.schema.return' | translate}}</button>
<button *ngIf="fields?.page?.length > 0" type="submit" class="btn btn-danger float-right" (click)="deleteFields()">{{'admin.registries.schema.fields.table.delete' | translate}}</button>
</div>
</ng-container>
</div>
</div>

View File

@@ -1,7 +1,7 @@
import { MetadataSchemaComponent } from './metadata-schema.component';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { of as observableOf } from 'rxjs';
import { PaginatedList } from '../../../core/data/paginated-list';
import { buildPaginatedList } from '../../../core/data/paginated-list.model';
import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { ActivatedRoute, Router } from '@angular/router';
@@ -10,18 +10,24 @@ import { RegistryService } from '../../../core/registry/registry.service';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe';
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub';
import { HostWindowServiceStub } from '../../../shared/testing/host-window-service.stub';
import { HostWindowService } from '../../../shared/host-window.service';
import { RouterStub } from '../../../shared/testing/router-stub';
import { RouterStub } from '../../../shared/testing/router.stub';
import { RouterTestingModule } from '@angular/router/testing';
import { ActivatedRouteStub } from '../../../shared/testing/active-router-stub';
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
import { RestResponse } from '../../../core/cache/response.models';
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils';
import { MetadataField } from '../../../core/metadata/metadata-field.model';
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
import { VarDirective } from '../../../shared/utils/var.directive';
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model';
import { FindListOptions } from '../../../core/data/request.models';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
describe('MetadataSchemaComponent', () => {
let comp: MetadataSchemaComponent;
@@ -60,7 +66,7 @@ describe('MetadataSchemaComponent', () => {
element: 'contributor',
qualifier: 'advisor',
scopeNote: null,
schema: mockSchemasList[0]
schema: createSuccessfulRemoteDataObject$(mockSchemasList[0])
},
{
id: 2,
@@ -72,7 +78,7 @@ describe('MetadataSchemaComponent', () => {
element: 'contributor',
qualifier: 'author',
scopeNote: null,
schema: mockSchemasList[0]
schema: createSuccessfulRemoteDataObject$(mockSchemasList[0])
},
{
id: 3,
@@ -84,7 +90,7 @@ describe('MetadataSchemaComponent', () => {
element: 'contributor',
qualifier: 'editor',
scopeNote: 'test scope note',
schema: mockSchemasList[1]
schema: createSuccessfulRemoteDataObject$(mockSchemasList[1])
},
{
id: 4,
@@ -96,21 +102,24 @@ describe('MetadataSchemaComponent', () => {
element: 'contributor',
qualifier: 'illustrator',
scopeNote: null,
schema: mockSchemasList[1]
schema: createSuccessfulRemoteDataObject$(mockSchemasList[1])
}
];
const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList));
const mockSchemas = createSuccessfulRemoteDataObject$(buildPaginatedList(null, mockSchemasList));
/* tslint:disable:no-empty */
const registryServiceStub = {
getMetadataSchemas: () => mockSchemas,
getMetadataFieldsBySchema: (schema: MetadataSchema) => createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema))),
getMetadataSchemaByName: (schemaName: string) => createSuccessfulRemoteDataObject$(mockSchemasList.filter((value) => value.prefix === schemaName)[0]),
getMetadataFieldsBySchema: (schema: MetadataSchema) => createSuccessfulRemoteDataObject$(buildPaginatedList(null, mockFieldsList.filter((value) => value.id === 3 || value.id === 4))),
getMetadataSchemaByPrefix: (schemaName: string) => createSuccessfulRemoteDataObject$(mockSchemasList.filter((value) => value.prefix === schemaName)[0]),
getActiveMetadataField: () => observableOf(undefined),
getSelectedMetadataFields: () => observableOf([]),
editMetadataField: (schema) => {},
cancelEditMetadataField: () => {},
editMetadataField: (schema) => {
},
cancelEditMetadataField: () => {
},
deleteMetadataField: () => observableOf(new RestResponse(true, 200, 'OK')),
deselectAllMetadataField: () => {},
deselectAllMetadataField: () => {
},
clearMetadataFieldRequests: () => observableOf(undefined)
};
/* tslint:enable:no-empty */
@@ -121,15 +130,18 @@ describe('MetadataSchemaComponent', () => {
})
});
beforeEach(async(() => {
const paginationService = new PaginationServiceStub();
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe],
declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe, VarDirective],
providers: [
{ provide: RegistryService, useValue: registryServiceStub },
{ provide: ActivatedRoute, useValue: activatedRouteStub },
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
{ provide: Router, useValue: new RouterStub() },
{ provide: PaginationService, useValue: paginationService },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() }
],
schemas: [NO_ERRORS_SCHEMA]
@@ -174,13 +186,13 @@ describe('MetadataSchemaComponent', () => {
fixture.detectChanges();
});
it('should start editing the selected field', async(() => {
it('should start editing the selected field', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(registryService.editMetadataField).toHaveBeenCalledWith(mockFieldsList[2] as MetadataField);
});
}));
it('should cancel editing the selected field when clicked again', async(() => {
it('should cancel editing the selected field when clicked again', waitForAsync(() => {
spyOn(registryService, 'getActiveMetadataField').and.returnValue(observableOf(mockFieldsList[2] as MetadataField));
spyOn(registryService, 'cancelEditMetadataField');
row.click();
@@ -201,7 +213,7 @@ describe('MetadataSchemaComponent', () => {
fixture.detectChanges();
});
it('should call deleteMetadataField with the selected id', async(() => {
it('should call deleteMetadataField with the selected id', waitForAsync(() => {
fixture.whenStable().then(() => {
expect(registryService.deleteMetadataField).toHaveBeenCalledWith(selectedFields[0].id);
});

Some files were not shown because too many files have changed in this diff Show More