Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
3de3fef
prepared dields for OneDep export
sofyalaski Oct 31, 2024
94bdd29
connect to OneDep backend when going to onedep
sofyalaski Nov 1, 2024
f3a2ed4
adding restrictions to deposition types
sofyalaski Nov 4, 2024
78f1fae
refactoring
sofyalaski Nov 5, 2024
a766839
refactoring wip: experiments not passed correctly
sofyalaski Nov 5, 2024
66acf38
pass all forms to backend, need input for orcid
sofyalaski Nov 6, 2024
212fea6
wip: send data to onedep api
sofyalaski Nov 11, 2024
d1baed8
add contour level propagates
sofyalaski Nov 21, 2024
8bb84d8
add list of ORCID IDs, token not passed yet
sofyalaski Nov 25, 2024
0692b18
wip: token and orcid entries working; need to refactor files
sofyalaski Nov 26, 2024
e4c96a9
wip: make calls to oneDepAPI from frontend
sofyalaski Nov 28, 2024
81dff2e
functions well
sofyalaski Dec 3, 2024
2986ab1
specify many add maps
sofyalaski Dec 3, 2024
6b8f2e6
restruct sending requests
sofyalaski Dec 4, 2024
2b9750c
communication with OneDep works
sofyalaski Dec 5, 2024
18f5cf0
ORCID field of same size no matter window size
sofyalaski Dec 9, 2024
d2ed381
added comments to input file on hover
sofyalaski Dec 9, 2024
272765a
working version
sofyalaski Dec 11, 2024
e8fd4c8
uploads all file categories
sofyalaski Dec 13, 2024
985db56
add field for password
sofyalaski Dec 16, 2024
8a8f5e3
onedep component can be turned off
sofyalaski Dec 16, 2024
8a93987
option to download files
sofyalaski Dec 17, 2024
2ce4ad1
add some improvements and reduce number of requests for proposal deta…
martin-trajanovski Nov 15, 2024
151892a
fix: optimize condition editing logic in DatasetsFilterSettingsCompon…
Junjiequan Nov 29, 2024
c2548b8
BREAKING CHANGE: new sdk release (#1658)
nitrosx Dec 4, 2024
2889aad
OneDep from dataset
sofyalaski Oct 16, 2024
a0682c0
OneDep component recieves dataset - turned off cleaning in dataset-de…
sofyalaski Oct 17, 2024
deb7666
prepared dields for OneDep export
sofyalaski Oct 31, 2024
3e78908
connect to OneDep backend when going to onedep
sofyalaski Nov 1, 2024
5010076
adding restrictions to deposition types
sofyalaski Nov 4, 2024
32ab70d
add list of ORCID IDs, token not passed yet
sofyalaski Nov 25, 2024
3260b87
onedep component can be turned off
sofyalaski Dec 16, 2024
c3d30af
Frontend updates to match the backend release-jobs branch
sbliven Dec 17, 2024
5f372b0
just to be safe
sofyalaski Dec 17, 2024
19b59bd
solving conflicts
despadam Dec 18, 2024
5900467
cleanup messes after rebase
sofyalaski Dec 18, 2024
b94ba2e
create JobsServiceV4
despadam Dec 18, 2024
0f989cd
Remove createdBy from POST /job
sbliven Dec 18, 2024
bd72c4d
frontend functional for alpha
sofyalaski Dec 18, 2024
96609a5
new psi-deployment with openem changes rebased on master
sofyalaski Dec 18, 2024
babf265
Merge remote-tracking branch 'upstream/add-depositor-onedep' into psi…
sofyalaski Dec 18, 2024
8c40aac
remove email
sofyalaski Dec 19, 2024
ec05d89
Merge branch 'remote-ingestor-2' into remote-ingestor-openem
Dec 19, 2024
ad4ec20
Update the “Remote-Ingestor-OpenEM” in the PSI Deployment OpenEM bran…
dwiessner-unibe Dec 19, 2024
3a9f1b0
wip:adding effects
sofyalaski Dec 19, 2024
665fb1e
add @jsonforms/angular and @jsonforms/angular-material dependencies
Dec 19, 2024
753ccd6
Added @jsonforms/angular and @jsonforms/angular-material in package-l…
Dec 19, 2024
ef50ac9
fix eslint complains
Dec 19, 2024
994851f
messages added on onedep deposition creation
sofyalaski Jan 6, 2025
a86748e
Further development of metadata editor
Jan 7, 2025
7189d05
deposition submission effects, improve to include more info
sofyalaski Jan 7, 2025
f4815a1
Update Changes and Bugfixes in psi-deployment-openem
Jan 9, 2025
52a45e6
reloading page works as intended
sofyalaski Jan 9, 2025
6a220b1
alpha-release: quick fix for minimal scicat metadata
Jan 13, 2025
56d874a
alpha-release: quick fix for minimal scicat metadata
Jan 13, 2025
082910a
format html
sofyalaski Jan 14, 2025
65219b2
orcid entry shows messages and can be corrected
sofyalaski Jan 14, 2025
60644c2
refactor finished
sofyalaski Jan 15, 2025
065bfa6
adding more add-maps fixed
sofyalaski Jan 21, 2025
e862637
add auth to the first dialog box for ingestion
consolethinks Jan 21, 2025
a368988
add withCredentials to all backend calls
consolethinks Jan 21, 2025
16a3dc6
optional number of fsc and add-maps
sofyalaski Jan 21, 2025
8a16885
add many files and clean entered file
sofyalaski Jan 22, 2025
1ce871f
Merge pull request #1711 from consolethinks/feature/backend_auth
dwiessner-unibe Jan 23, 2025
63fb9dc
Prepare optical improvements and adding control mechanisms
Jan 23, 2025
6fc8a31
wip: error messages on questionnaire
sofyalaski Jan 23, 2025
5f51a5b
update function descriptions
sofyalaski Jan 23, 2025
6d5182b
validators on required files working
sofyalaski Jan 23, 2025
3496fec
wip add validators on contour level
sofyalaski Jan 24, 2025
ecfecda
wip: add validators to contour
sofyalaski Jan 24, 2025
b94d98f
validator on contour level works
sofyalaski Jan 27, 2025
4f6cf4c
validation works
sofyalaski Jan 27, 2025
4e2c0e4
add tick for 'have read the policy of wwPDB'
sofyalaski Jan 27, 2025
d8f2825
(still dev stage): support sse for metadata extraction
dwiessner-unibe Jan 28, 2025
e7a4403
minor change in effects
sofyalaski Jan 29, 2025
86d0cf2
(still dev stage): fixed templates
dwiessner-unibe Jan 31, 2025
f0394c5
(still dev stage): implemented field checks
dwiessner-unibe Jan 31, 2025
8f15eb4
(still dev stage): bugfixes
dwiessner-unibe Jan 31, 2025
f483aae
(still dev stage): improved error handling
dwiessner-unibe Jan 31, 2025
84208da
Bug Fixes, auto generated models and support of user info
dwiessner-unibe Jan 31, 2025
1c0a953
Support no_auth mode
dwiessner-unibe Jan 31, 2025
8821fb0
Fix: payload not passed correctly in POST /dataset request
phwissmann Feb 3, 2025
c485a7b
Merge pull request #3 from SwissOpenEM/fix-post-dataset
dwiessner-unibe Feb 4, 2025
d6a3653
(dev-stage): Use scicat token for dataset request; started using pagi…
dwiessner-unibe Feb 6, 2025
2ddf628
(dev-stage): support pagination
dwiessner-unibe Feb 6, 2025
d5f9a00
(dev-stage) force login to scicat
dwiessner-unibe Feb 6, 2025
24209ce
(dev-stage) frontend displays metadata error
dwiessner-unibe Feb 6, 2025
8baecfb
workshop version: show error message when trying to ingest
dwiessner-unibe Feb 10, 2025
5d6a261
Prefill information from user info
dwiessner-unibe Feb 10, 2025
1589d31
Show Progress in percent
dwiessner-unibe Feb 10, 2025
39975b8
Fix (temp): loading the frontend config from local files
despadam Feb 11, 2025
6a668b9
Merge remote-tracking branch 'openem/fix-config-fetching' into deposi…
sofyalaski Feb 11, 2025
c154bb5
workshop: enable discovery, next button, utf8
dwiessner-unibe Feb 12, 2025
5668b44
Add UNIBA ingestor URL
sbliven Feb 12, 2025
cdf3dee
workaround for demo
dwiessner-unibe Feb 12, 2025
99e79ed
fix delete transfer
dwiessner-unibe Feb 13, 2025
f4d9998
revert workshop workarounds
dwiessner-unibe Feb 20, 2025
d037ce0
detail view for transfer task
dwiessner-unibe Feb 20, 2025
768e911
added documentation to generate api models
dwiessner-unibe Feb 20, 2025
483c58f
bug fixes in renderer and prepare autodiscovery
dwiessner-unibe Feb 20, 2025
fc8af20
bug fix - only initialize one time
dwiessner-unibe Feb 25, 2025
2ef48c1
check for valid base64
dwiessner-unibe Feb 25, 2025
d19bedd
Improved behvaiour
dwiessner-unibe Feb 27, 2025
9924731
Fix Angstrom-Unit and remove old components
dwiessner-unibe Feb 27, 2025
110786e
Improved error handling, bug fix when unchecking any-of
dwiessner-unibe Feb 27, 2025
6649093
fix creation time
dwiessner-unibe Feb 27, 2025
7bdd3f7
wip: add routes for many possible deposition options
sofyalaski Feb 28, 2025
498f705
file-browser: alpha version with list view
dwiessner-unibe Mar 6, 2025
acf229e
file-browser: improvements
dwiessner-unibe Mar 6, 2025
1c44a45
file-browser: typo
dwiessner-unibe Mar 6, 2025
92ad717
file-browser: add pagination
dwiessner-unibe Mar 6, 2025
89bd181
depositor frontend improements:
sofyalaski Mar 6, 2025
e02316c
renderer: support user choosing owner group
dwiessner-unibe Mar 6, 2025
d18a3a0
schema converter: use updated atob for conversion
dwiessner-unibe Mar 6, 2025
92d751f
wip jsonForms
sofyalaski Mar 10, 2025
635e980
template is ready but needs proper renderring
sofyalaski Mar 11, 2025
75d52cb
add schema for citation
sofyalaski Mar 24, 2025
21c7a98
wip renderring
sofyalaski Mar 25, 2025
a8e6fca
introduced custom renderers
sofyalaski Mar 26, 2025
294e7c1
enum renderers finished
sofyalaski Mar 27, 2025
5b7ec00
merge master
sofyalaski Mar 27, 2025
f896ed9
wip better renderring
sofyalaski Mar 28, 2025
82dd24f
custom renderer author
sofyalaski Mar 31, 2025
ad5631c
renderring finshed
sofyalaski Apr 1, 2025
7ca79b9
improved quantity value renderer
dwiessner-unibe Apr 4, 2025
48212f6
rm log
dwiessner-unibe Apr 4, 2025
cc915fb
Implemented check for schema error
dwiessner-unibe Apr 8, 2025
2acd8f0
Create JSON Mode
dwiessner-unibe Apr 8, 2025
c113a7c
bug fix - validate not working when selecting path
dwiessner-unibe Apr 10, 2025
24dcc3c
redirect to deposition
sofyalaski Apr 10, 2025
0dd64a6
Save latest store version
dwiessner-unibe Apr 17, 2025
12b34f7
update to rxjs-store
dwiessner-unibe Apr 23, 2025
e732a35
further updates to ngrx-store
dwiessner-unibe Apr 24, 2025
c5c143b
further updates to ngrx-store
dwiessner-unibe Apr 25, 2025
ec035ec
start ingestion process using store
dwiessner-unibe Apr 30, 2025
8b7512c
Move cancel transfer to store
dwiessner-unibe Apr 30, 2025
a878ead
fix subscription handling
dwiessner-unibe May 5, 2025
8b571f7
improve transfer information
dwiessner-unibe May 6, 2025
c8aed17
bugfixes
dwiessner-unibe May 6, 2025
d67bd67
remove ingestor url
dwiessner-unibe May 6, 2025
ab1ba51
implemented reduced view (require only)
dwiessner-unibe May 6, 2025
c2c4c4b
fix ingestor #115 - application of templates does not work
dwiessner-unibe May 6, 2025
c501d87
spelling
dwiessner-unibe May 6, 2025
9a56bb0
add scicat header schema by dto
dwiessner-unibe May 9, 2025
9e8b20d
Update visual data when changing renderView
dwiessner-unibe May 13, 2025
09b2999
bugfix
dwiessner-unibe May 13, 2025
827e16a
unify rerender strategy
dwiessner-unibe May 13, 2025
27593ab
bug fix #110 - keep values in object renderer
dwiessner-unibe May 13, 2025
ba6e0b0
show error location (instance path)
dwiessner-unibe May 13, 2025
7fbd8ad
Improve error notification
dwiessner-unibe May 13, 2025
528c98a
update models, cancel request and add autoarchive option
dwiessner-unibe May 13, 2025
40625cd
fix quantity value
dwiessner-unibe May 13, 2025
7c8d8d4
merge object group and quantity value renderer
dwiessner-unibe May 13, 2025
0713727
Merge branch 'remote-ingestor-openem-beta-release' into remote-ingest…
dwiessner-unibe May 13, 2025
cece001
Merge pull request #9 from SwissOpenEM/remote-ingestor-openem-beta-merge
dwiessner-unibe May 13, 2025
0704b98
upgrade imports
dwiessner-unibe May 13, 2025
d1b9f38
make frontend starting again
dwiessner-unibe May 13, 2025
6e5419d
jsonforms-fixes
dwiessner-unibe May 13, 2025
0ddb667
Remove principialInvestigators from Schema
dwiessner-unibe May 13, 2025
fb0178a
Remove principalInvestigators from schema
dwiessner-unibe May 13, 2025
fa8ad24
merged master
sofyalaski May 15, 2025
3e409b0
for testing in user menu bar
dwiessner-unibe May 15, 2025
3b266e6
merged with master and ingestor
sofyalaski May 15, 2025
4bb0359
Finalize autodiscovery feature
dwiessner-unibe May 15, 2025
f9c6125
add depositor support
sofyalaski May 15, 2025
897f250
update disconnect
dwiessner-unibe May 16, 2025
3d5347a
show onedep and empiar cards as part of the depositor view
sofyalaski May 16, 2025
5995219
fix initaial state before connecting to backend
sofyalaski May 19, 2025
59a8cea
refactor
sofyalaski May 19, 2025
0cb33f0
remote invetigator
dwiessner-unibe May 20, 2025
395ef35
bugfix establish connection
dwiessner-unibe May 21, 2025
c9d09bd
improved timing when reset facility backend
dwiessner-unibe May 21, 2025
ff9b929
store last used backends in local storage
dwiessner-unibe May 21, 2025
aea0d6b
improve styling
dwiessner-unibe May 21, 2025
7168962
commit config with ingestor settings
dwiessner-unibe May 21, 2025
bcf749f
Improve detail view of transfers
dwiessner-unibe May 21, 2025
4fc08bd
always show source folder
dwiessner-unibe May 21, 2025
b054aac
Improve error handling when loosing auth
dwiessner-unibe May 23, 2025
8fdb073
add latest changes from ingestor
sofyalaski May 25, 2025
54081f8
wip: add ingestor interface to depositor
sofyalaski May 25, 2025
9ee0d1e
user can change metadata prior to deposing
sofyalaski May 26, 2025
c8b5265
change access to depositor to ownerUsedrs only
sofyalaski May 26, 2025
8ac21ce
update comment
sofyalaski Jun 9, 2025
689d975
merged with latest master
sofyalaski Jun 10, 2025
3995d53
Merge branch 'psi-deployment-beta-release' into empiar-support
sofyalaski Jun 10, 2025
d4a6b52
use v3 dataset dto
dwiessner-unibe Jun 10, 2025
f3fa03d
Bugfix: Extractor loading page was not updated
dwiessner-unibe Jun 11, 2025
75c1418
remove console log
dwiessner-unibe Jun 11, 2025
31bfc35
Fix error action when connecting
dwiessner-unibe Jun 12, 2025
087476d
bugfix when changing backend
dwiessner-unibe Jun 14, 2025
515df19
added components for creation mode (without external ingestor)
dwiessner-unibe Jun 18, 2025
05426a5
many network requests (self) - fix
dwiessner-unibe Jul 2, 2025
02cbcd7
avoid object object as error
dwiessner-unibe Jul 2, 2025
dfabdcd
Separated api information
dwiessner-unibe Jul 2, 2025
dd90f3d
Remove free mode, since its not ready
dwiessner-unibe Jul 2, 2025
ec39818
properly reset ingestion object when creating new transfer
dwiessner-unibe Jul 3, 2025
ff2d523
Merge remote-tracking branch 'openem/remote-ingestor-openem-ag19' int…
sofyalaski Jul 17, 2025
3af33bf
Merge remote-tracking branch 'openem/empiar-support' into psi-deploym…
sofyalaski Jul 17, 2025
71578c7
Merge branch 'master' into psi-deployment-beta-release
sofyalaski Jul 17, 2025
c30be79
fix config after merge
sofyalaski Jul 22, 2025
c3592b9
in creation mode, dataset info is added prior to choosing schema
sofyalaski Aug 21, 2025
99f9885
minor changes, continue at step 2 for creation mode
sofyalaski Aug 22, 2025
06dd5d9
minor ux changes
sofyalaski Aug 28, 2025
c7d03b0
add some style changes
sofyalaski Aug 28, 2025
422a258
add updates to match onedep api field for coordinates
sofyalaski Sep 3, 2025
50d34b8
Merge remote-tracking branch 'origin/master' into rewireCreationMode
sofyalaski Sep 4, 2025
07c5dc0
Merge remote-tracking branch 'origin/master' into rewireCreationMode
sofyalaski Sep 4, 2025
7d918fc
Merge branch 'master' into psi-deployment-beta-release
sbliven Sep 4, 2025
7035f04
include latest master, ingestor and depositor
sofyalaski Sep 4, 2025
6f28715
Merge pull request #12 from SwissOpenEM/includeDepositor
sofyalaski Sep 4, 2025
13cd875
Merge pull request #13 from SwissOpenEM/rewireCreationMode
sofyalaski Sep 4, 2025
5c7e3fc
Fix minor error during job-details initialization
sbliven Aug 12, 2025
ecb5fef
Fix job DTO in the frontend
sbliven Sep 8, 2025
d339353
Fix some error in tests
sbliven Sep 8, 2025
7ec0627
Merge pull request #14 from sbliven/fix1948
sbliven Sep 8, 2025
e0d3e44
merge master
sofyalaski Sep 9, 2025
8bb3b6f
Ingestor: fix logout button
phwissmann Sep 17, 2025
2ae1371
Merge pull request #15 from SwissOpenEM/fix-ingestor-logout
phwissmann Sep 18, 2025
5731f77
Merge remote-tracking branch 'origin/master' into psi-deployment-beta…
sofyalaski Sep 19, 2025
ee18ca8
another try
sofyalaski Sep 19, 2025
61371f6
try fix the branch
sofyalaski Sep 19, 2025
c5e71d8
starts up, but menu is missing
sofyalaski Sep 19, 2025
c09188c
fix config to return hamburger menu
sofyalaski Sep 19, 2025
b24f655
renamed components
sofyalaski Sep 23, 2025
3b5c45c
fix failing tests
sofyalaski Sep 23, 2025
8e55c8e
Merge remote-tracking branch 'origin/master' into another-attempt
sofyalaski Sep 25, 2025
be174f0
fix: #ingestor-142 validation error in reqOnly mode
sofyalaski Sep 25, 2025
d31fef6
fix: ingestor #193, hide SI fields from the user
sofyalaski Sep 25, 2025
e139e8d
Revert "fix: ingestor #193, hide SI fields from the user"
sofyalaski Sep 25, 2025
27fcbdd
fix: ingestor 193
sofyalaski Sep 25, 2025
75026c2
improve autodiscovery to match university domain
sofyalaski Sep 29, 2025
24e2ed8
Merge remote-tracking branch 'origin/master' into another-attempt; ad…
sofyalaski Sep 29, 2025
30c63c6
tests for effects and trying to fix an issue with no schema passed in…
sofyalaski Sep 30, 2025
6cb7f3e
fix the stepper with no schema in create mode
sofyalaski Oct 2, 2025
7abafaf
run prettier
sofyalaski Oct 2, 2025
7c79fcd
Merge remote-tracking branch 'origin/master' into another-attempt
sofyalaski Oct 2, 2025
f2dbd20
disable ingestor
sofyalaski Oct 2, 2025
f79d8d6
remove redundant config variable
sofyalaski Oct 3, 2025
36316e8
add creationLocaltion based on facility description from autodiscover…
sofyalaski Oct 3, 2025
ab68ba9
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski Oct 3, 2025
0dadf63
dependencies
sofyalaski Oct 3, 2025
4e7517c
fix tests
sofyalaski Oct 3, 2025
59ffd34
minimal changes
sofyalaski Oct 6, 2025
0095921
ingestor component is turned off per default
sofyalaski Oct 7, 2025
2547559
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski Oct 7, 2025
a8c6efa
dependencies
sofyalaski Oct 7, 2025
05f462d
fix lint
sofyalaski Oct 7, 2025
e694280
remove old file; after merge is redundant
sofyalaski Oct 9, 2025
cd522d9
Merge branch 'master' into psi-deployment-gamma-release
sofyalaski Oct 10, 2025
5444879
fix packages
sofyalaski Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"ignorePatterns": [
"projects/**/*",
"src/app/shared/sdk/models/ingestor/**"], // Ignore autogenerated files
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
Expand Down
7,817 changes: 5,032 additions & 2,785 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@jsonforms/angular": "^3.5.1",
"@jsonforms/angular-material": "^3.5.1",
"@jsonforms/core": "^3.5.1",
"@jsonforms/react": "^3.5.1",
"@ngbracket/ngx-layout": "^16.0.0",
"@ngrx/effects": "^19.1.0",
"@ngrx/operators": "^19.1.0",
Expand Down
12 changes: 9 additions & 3 deletions src/app/_layout/app-header/_app-header-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@

.header {
mat-toolbar {
background-color: mat.m2-get-color-from-palette($primary, "default-contrast");
border-bottom: 2px solid mat.m2-get-color-from-palette($primary, "default");
background-color: mat.m2-get-color-from-palette(
$primary,
"default-contrast"
);
border-bottom: 2px solid
mat.m2-get-color-from-palette($primary, "default");
}
a, h3, div {
a,
h3,
div {
color: mat.m2-get-color-from-palette($primary, "default");
}
}
Expand Down
28 changes: 23 additions & 5 deletions src/app/_layout/app-header/app-header.component.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<div class="header">
<mat-menu #mainMenu="matMenu">
<ng-container *ngIf="mainMenuConfig$ | async as mainMenuConfig; else noMenuItems">
<ng-container
*ngIf="mainMenuConfig$ | async as mainMenuConfig; else noMenuItems"
>
<ng-container *ngIf="mainMenuConfig?.datasets ?? false">
<button mat-menu-item routerLink="/datasets/">
<mat-icon> folder</mat-icon>
<span>Datasets</span>
</button>
</ng-container>

<ng-container *ngIf="ingestorEnabled">
<button
mat-menu-item
[routerLink]="['/ingestor']"
[queryParams]="{ discovery: true }"
>
<mat-icon> cloud_upload</mat-icon>
<span>Ingestor</span>
</button>
</ng-container>
<ng-container *ngIf="mainMenuConfig?.files ?? false">
<button mat-menu-item routerLink="/files/">
<mat-icon> text_snippet</mat-icon>
Expand Down Expand Up @@ -86,7 +98,12 @@
<a [routerLink]="[defaultMainPage$ | async]">
<img class="logo" src="../../../assets/images/{{ siteSciCatLogo }}" />
</a>
<ng-container *ngIf="isSiteHeaderLogoUrlExternal$ | async; else siteHeaderLogoUrlInternal">
<ng-container
*ngIf="
isSiteHeaderLogoUrlExternal$ | async;
else siteHeaderLogoUrlInternal
"
>
<a [href]="siteHeaderLogoUrl$ | async">
<img class="logo" src="../../../assets/images/{{ siteHeaderLogo }}" />
</a>
Expand All @@ -99,7 +116,6 @@
<span class="title">
<h3>{{ siteTitle }}</h3>
</span>

<span>
<h6>
<a class="toplink" [routerLink]="['/help']">
Expand All @@ -121,7 +137,7 @@ <h6>
<span *ngIf="config.shoppingCartOnHeader" [matMenuTriggerFor]="cartMenu">
<button id="cartOnHeaderButton" mat-icon-button>
<mat-icon
color = "primary"
color="primary"
matBadge="{{ inBatchIndicator$ | async }}"
matBadgeColor="accent"
matBadgeSize="medium"
Expand All @@ -137,7 +153,9 @@ <h6>
<span>
<button mat-button class="user-button" [matMenuTriggerFor]="userMenu">
<img class="user-image" src="{{ profileImage$ | async }}" />
<div color="primary" class="large-screen-text">{{ username$ | async }}</div>
<div color="primary" class="large-screen-text">
{{ username$ | async }}
</div>
</button>
</span>
</span>
Expand Down
6 changes: 4 additions & 2 deletions src/app/_layout/app-header/app-header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
mat-toolbar {
height: 3.5rem;

a, .main-menu {
a,
.main-menu {
height: 2.5rem;
padding: 0.5rem;

Expand All @@ -22,7 +23,8 @@
cursor: pointer;
}

.spacer, .title {
.spacer,
.title {
flex: 1 1 auto;
}

Expand Down
1 change: 1 addition & 0 deletions src/app/_layout/app-header/app-header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
selector: "app-app-header",
templateUrl: "./app-header.component.html",
styleUrls: ["./app-header.component.scss"],
standalone: false,

Check warning on line 28 in src/app/_layout/app-header/app-header.component.ts

View workflow job for this annotation

GitHub Actions / eslint

Components, Directives and Pipes should not opt out of standalone
})
export class AppHeaderComponent implements OnInit {
private sub: Subscription;
Expand All @@ -38,6 +38,7 @@
? "scicat-header-logo-icon.png"
: "scicat-header-logo-full.png";
siteHeaderLogo = this.config.siteHeaderLogo ?? "site-header-logo.png";
ingestorEnabled = this.config.ingestorComponent?.ingestorEnabled ?? false;

oAuth2Endpoints: OAuth2Endpoint[] = [];
username$ = this.store.select(selectCurrentUserName);
Expand Down
3 changes: 3 additions & 0 deletions src/app/app-config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@
],
conditions: [],
},
ingestorComponent: {
ingestorEnabled: true,
},
};

describe("AppConfigService", () => {
Expand Down Expand Up @@ -307,7 +310,7 @@

const mockHttpGet = (backendError = false) => {
spyOn(service["http"], "get").and.callFake(
(url: string): Observable<any> => {

Check warning on line 313 in src/app/app-config.service.spec.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
if (url === "/api/v3/admin/config") {
if (backendError) {
return new Observable((sub) =>
Expand Down
2 changes: 2 additions & 0 deletions src/app/app-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { catchError, timeout } from "rxjs/operators";
import {
DatasetDetailComponentConfig,
IngestorComponentConfig,
LabelsLocalization,
ListSettings,
TableColumn,
Expand Down Expand Up @@ -73,7 +74,7 @@
datasetReduceEnabled: boolean;
datasetDetailsShowMissingProposalId: boolean;
datafilesActionsEnabled: boolean;
datafilesActions: any[];

Check warning on line 77 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
editDatasetEnabled: boolean;
editDatasetSampleEnabled: boolean;
editMetadataEnabled: boolean;
Expand Down Expand Up @@ -143,9 +144,10 @@
mainMenu?: MainMenuConfiguration;
supportEmail?: string;
checkBoxFilterClickTrigger?: boolean;
ingestorComponent?: IngestorComponentConfig;
}

function isMainPageConfiguration(obj: any): obj is MainPageConfiguration {

Check warning on line 150 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
const validKeys = Object.keys(MainPageOptions);
return (
obj &&
Expand Down Expand Up @@ -196,12 +198,12 @@
.pipe(timeout(2000))
.toPromise();
this.appConfig = Object.assign({}, this.appConfig, config);
} catch (err) {

Check warning on line 201 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

'err' is defined but never used
console.log("No config available in backend, trying with local config.");
try {
const config = await this.mergeConfig();
this.appConfig = Object.assign({}, this.appConfig, config);
} catch (err) {

Check warning on line 206 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

'err' is defined but never used
console.error("No config provided.");
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/app/app-routing/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ErrorPageComponent } from "shared/modules/error-page/error-page.compone
import { AppLayoutComponent } from "_layout/app-layout/app-layout.component";
import { AppMainLayoutComponent } from "_layout/app-main-layout/app-main-layout.component";
import { ServiceGuard } from "./service.guard";
import { IngestorGuard } from "./ingestor.guard";
import { MainPageGuard } from "./main-page";
import { RedirectingComponent } from "./redirecting.component";

Expand Down Expand Up @@ -108,6 +109,14 @@ export const routes: Routes = [
(m) => m.HelpFeatureModule,
),
},
{
path: "ingestor",
loadChildren: () =>
import("./lazy/ingestor-routing/ingestor.feature.module").then(
(m) => m.IngestorFeatureModule,
),
canActivate: [IngestorGuard],
},
{
path: "logbooks",
loadChildren: () =>
Expand Down
37 changes: 37 additions & 0 deletions src/app/app-routing/ingestor.guard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Injectable } from "@angular/core";
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot,
} from "@angular/router";
import { AppConfigService } from "app-config.service";

@Injectable({
providedIn: "root",
})
export class IngestorGuard implements CanActivate {
appConfig = this.appConfigService.getConfig();

constructor(
private appConfigService: AppConfigService,
private router: Router,
) {}

canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot,
): boolean {
if (this.appConfig.ingestorComponent?.ingestorEnabled) {
return true;
} else {
this.router.navigate(["/404"], {
skipLocationChange: true,
queryParams: {
url: state.url,
},
});
return false;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { NgModule } from "@angular/core";
import { IngestorRoutingModule } from "./ingestor.routing.module";
import { IngestorModule } from "ingestor/ingestor.module";

@NgModule({
imports: [IngestorModule, IngestorRoutingModule],
})
export class IngestorFeatureModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { IngestorWrapperComponent } from "ingestor/ingestor-page/ingestor-wrapper.component";

const routes: Routes = [
{
path: "",
component: IngestorWrapperComponent,
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class IngestorRoutingModule {}
4 changes: 4 additions & 0 deletions src/app/datasets/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<div class="action-column" fxFlex="14" fxFlex.lt-xl="20">
<datasets-filter></datasets-filter>
<ng-template [ngIf]="this.loggedIn$ | async">
<ingestor-creation
#ingestor
style="display: none"
></ingestor-creation>
<mat-card
*ngIf="appConfig.addDatasetEnabled"
class="add-card"
Expand Down
2 changes: 0 additions & 2 deletions src/app/datasets/dashboard/dashboard.component.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


mat-sidenav-container {
mat-sidenav-content {
padding: 0.5rem;
Expand Down
57 changes: 9 additions & 48 deletions src/app/datasets/dashboard/dashboard.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from "state-management/actions/datasets.actions";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { provideMockStore } from "@ngrx/store/testing";
import { resetIngestionObject } from "state-management/actions/ingestor.actions";
import { selectSelectedDatasets } from "state-management/selectors/datasets.selectors";
import {
selectColumns,
Expand All @@ -33,6 +34,7 @@ import { MatCardModule } from "@angular/material/card";
import { MatIconModule } from "@angular/material/icon";
import { AppConfigService } from "app-config.service";
import { PageChangeEvent } from "shared/modules/table/table.component";
import { IngestionRequestInformation } from "ingestor/ingestor-page/helper/ingestor.component-helper";
import {
DatasetsControllerCreateV3Request,
ReturnedUserDto,
Expand Down Expand Up @@ -135,61 +137,20 @@ describe("DashboardComponent", () => {
});

describe("#openDialog()", () => {
it("should dispatch an addDatasetAction when dialog returns a value", () => {
jasmine.clock().install();
jasmine.clock().mockDate(new Date(2019, 12, 17, 12, 0, 0));

dispatchSpy = spyOn(store, "dispatch");

const currentUser = createMock<ReturnedUserDto>({
id: "testId",
username: "ldap.Test User",
email: "[email protected]",
realm: "test",
emailVerified: true,
authStrategy: "local",
});

const dataset: DatasetsControllerCreateV3Request = {
accessGroups: [],
contactEmail: currentUser.email,
creationTime: new Date().toISOString(),
datasetName: "Test Name",
description: "Test description",
isPublished: false,
keywords: [],
owner: currentUser.username.replace("ldap.", ""),
ownerEmail: currentUser.email,
ownerGroup: "test",
packedSize: 0,
size: 0,
sourceFolder: "/nfs/test",
type: "derived",
inputDatasets: [],
investigator: currentUser.email,
scientificMetadata: {},
usedSoftware: ["test software"],
numberOfFilesArchived: 0,
creationLocation: undefined,
principalInvestigator: undefined,
};

component.currentUser = currentUser;
component.userGroups = ["test"];
it("should call Ingestor method", () => {
const mockIngestor = jasmine.createSpyObj("IngestorCreationComponent", [
"onClickAddIngestion",
]);

component.ingestor = mockIngestor;
component.openDialog();

expect(dispatchSpy).toHaveBeenCalledTimes(1);
expect(dispatchSpy).toHaveBeenCalledWith(
addDatasetAction({
dataset: dataset,
}),
);
expect(mockIngestor.onClickAddIngestion).toHaveBeenCalledTimes(1);
});
});

describe("#onPageChange()", () => {
it("should dispatch a changePangeAction", () => {
it("should dispatch a changePageAction", () => {
dispatchSpy = spyOn(store, "dispatch");

const event: PageChangeEvent = {
Expand Down
Loading
Loading