Skip to content

Commit e100df3

Browse files
authored
Merge branch 'main' into react_panel_multiple_views
2 parents a75c366 + a2d1922 commit e100df3

File tree

337 files changed

+39776
-39889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+39776
-39889
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"no-case-declarations": "off",
6464
"no-fallthrough": "off",
6565
"react/jsx-no-undef": "off",
66-
"react/prop-types": "off",
66+
"react/prop-types": "error",
6767
"no-undef": "error",
6868
"react/jsx-key": "off",
6969
"no-extra-semi": "off",

.github/workflows/loristest.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,25 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
testsuite:
16-
- static
17-
- unit
18-
- integration
16+
testsuite: ['integration']
1917
php: ['8.1','8.2']
18+
ci_node_index: [0,1,2,3]
2019

20+
include:
21+
# add a variable but do not display it in the job's name
22+
- ci_node_total: 4
23+
24+
- testsuite: 'static'
25+
php: '8.1'
26+
- testsuite: 'static'
27+
php: '8.2'
28+
- testsuite: 'unit'
29+
php: '8.1'
30+
- testsuite: 'unit'
31+
php: '8.2'
32+
2133
steps:
2234
- uses: actions/checkout@v2
2335

@@ -33,6 +45,7 @@ jobs:
3345
- name: Cache Composer packages
3446
id: composer-cache
3547
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
48+
3649
- name: Composer cache
3750
uses: actions/cache@v2
3851
with:
@@ -44,9 +57,15 @@ jobs:
4457
run: sed -i "s/8.0/${{ matrix.php }}/g" Dockerfile.test.php8
4558

4659
- name: Install package dependencies
47-
run: sudo apt-get install -y protobuf-compiler
48-
&& cd modules/electrophysiology_browser/jsx/react-series-data-viewer/
49-
&& protoc protocol-buffers/chunk.proto --js_out=import_style=commonjs,binary:./src/
60+
# We only need to install protobuf-compiler
61+
# Other deps were added to fix an apt dependency issue introduced by a new github Ubuntu image
62+
# (see https://github.com/actions/runner-images/blob/releases/ubuntu22/20230305/images/linux/Ubuntu2204-Readme.md)
63+
# that updated the list of installed apt packages/apt repositories. That issue may disappear in future Ubuntu images.
64+
run: |
65+
sudo apt install -y imagemagick-6-common libmagickcore-6.q16-6 libmagickwand-6.q16-6 \
66+
libprotobuf-dev libprotobuf23 libprotoc23 protobuf-compiler
67+
cd modules/electrophysiology_browser/jsx/react-series-data-viewer/
68+
protoc protocol-buffers/chunk.proto --js_out=import_style=commonjs,binary:./src/
5069
5170
- name: Install composer dependencies
5271
if: steps.composer-cache.outputs.cache-hit != 'true'
@@ -57,3 +76,8 @@ jobs:
5776

5877
- name: Run Test Suite
5978
run: npm run tests:${{ matrix.testsuite }}
79+
env:
80+
# Specifies how many jobs you would like to run in parallel,
81+
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
82+
# Use the index from matrix as an environment variable
83+
CI_NODE_INDEX: ${{ matrix.ci_node_index }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ changes in the following format: PR #1234***
1212
### Core
1313
#### Features
1414
- Added new interface intended to be used for querying module data from PHP (PR #8215)
15+
- Added the NOT NULL constraint on Project Name (PR #8295)
16+
- Migrated instrument permissions from config.xml to database and added the ability
17+
to manage instrument permissions in the frontend from the `instrument_manager`
18+
module. (PR #8302)
1519

1620
#### Updates and Improvements
1721
- Rename subproject to Cohort (PR #7817)
1822
- Create new CohortData and CohortController classes to use as data access model
1923
and transfer object (PR #7817)
2024
- BVL Feedback widget only shows notifications for the users sites / projects (PR #7848)
25+
- Add Date status change value in session table (PR #8350)
2126

2227
#### Bug Fixes
2328
- placeholder

Makefile

100644100755
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
.PHONY: clean dev all check checkstatic unittests test phpdev javascript testdata
1+
.PHONY: clean dev all check checkstatic unittests phpdev jslatest testdata
22

3-
all: VERSION jsdev
3+
all: VERSION
44
composer install --no-dev
5+
npm ci
6+
npm run build
57

68
# If anything changes, re-generate the VERSION file
79
VERSION: .
@@ -10,7 +12,7 @@ VERSION: .
1012
phpdev:
1113
composer install
1214

13-
jsdev:
15+
dev: VERSION phpdev
1416
npm ci
1517
npm run compile
1618

@@ -20,8 +22,6 @@ jslatest: clean
2022
npm install
2123
npm run compile
2224

23-
dev: VERSION phpdev jsdev
24-
2525
clean:
2626
rm -f smarty/templates_c/*
2727
rm -f VERSION
@@ -52,6 +52,12 @@ check: checkstatic unittests
5252
testdata:
5353
php tools/raisinbread_refresh.php
5454

55+
instrument_manager:
56+
target=instrument_manager npm run compile
57+
5558
login:
5659
target=login npm run compile
5760

61+
mri_violations:
62+
target=mri_violations npm run compile
63+

SQL/0000-00-00-schema.sql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
CREATE TABLE `Project` (
66
`ProjectID` INT(10) unsigned NOT NULL AUTO_INCREMENT,
7-
`Name` VARCHAR(255) NULL,
7+
`Name` VARCHAR(255) NOT NULL,
88
`Alias` char(4) NOT NULL,
99
`recruitmentTarget` INT(6) Default NULL,
1010
PRIMARY KEY (`ProjectID`),
@@ -195,6 +195,7 @@ CREATE TABLE `session` (
195195
`Date_screening` date DEFAULT NULL,
196196
`Visit` enum('Pass','Failure','Withdrawal','In Progress') DEFAULT NULL,
197197
`Date_visit` date DEFAULT NULL,
198+
`Date_status_change` date DEFAULT NULL,
198199
`Approval` enum('In Progress','Pass','Failure') DEFAULT NULL,
199200
`Date_approval` date DEFAULT NULL,
200201
`Active` enum('Y','N') NOT NULL DEFAULT 'Y',
@@ -281,12 +282,10 @@ CREATE TABLE `flag` (
281282
`Administration` enum('None','Partial','All') default NULL,
282283
`Validity` enum('Questionable','Invalid','Valid') default NULL,
283284
`Exclusion` enum('Fail','Pass') default NULL,
284-
`Flag_status` enum('P','Y','N','F') default NULL,
285285
`UserID` varchar(255) default NULL,
286286
`Testdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
287287
`Data` TEXT default NULL,
288288
PRIMARY KEY (`CommentID`),
289-
KEY `Status` (`Flag_status`),
290289
KEY `flag_ID` (`ID`),
291290
KEY `flag_SessionID` (`SessionID`),
292291
KEY `flag_Test_name` (`Test_name`),
@@ -980,7 +979,8 @@ CREATE TABLE `violations_resolved` (
980979
`User` varchar(255) DEFAULT NULL,
981980
`ChangeDate` datetime DEFAULT NULL,
982981
`Resolved` enum('unresolved', 'reran', 'emailed', 'inserted', 'rejected', 'inserted_flag', 'other') DEFAULT 'unresolved',
983-
PRIMARY KEY (`ID`)
982+
PRIMARY KEY (`ID`),
983+
KEY `i_violations_resolved_extid_type` (`ExtID`,`TypeTable`)
984984
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
985985

986986
CREATE TABLE `mri_protocol_violated_scans` (
@@ -1283,7 +1283,6 @@ CREATE TABLE `participant_accounts` (
12831283
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
12841284
`SessionID` int(6) DEFAULT NULL,
12851285
`Test_name` varchar(255) DEFAULT NULL,
1286-
`Email` varchar(255) DEFAULT NULL,
12871286
`Status` enum('Created','Sent','In Progress','Complete') DEFAULT NULL,
12881287
`OneTimePassword` varchar(16) DEFAULT NULL,
12891288
`CommentID` varchar(255) DEFAULT NULL,

SQL/0000-00-02-Permission.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,11 @@ CREATE TABLE `notification_modules_perm_rel` (
152152
INSERT INTO notification_modules_perm_rel SELECT nm.id, p.permID FROM notification_modules nm JOIN permissions p WHERE nm.module_name='media' AND (p.code='media_write' OR p.code='media_read');
153153
INSERT INTO notification_modules_perm_rel SELECT nm.id, p.permID FROM notification_modules nm JOIN permissions p WHERE nm.module_name='document_repository' AND (p.code='document_repository_view' OR p.code='document_repository_delete');
154154
INSERT INTO notification_modules_perm_rel SELECT nm.id, p.permID FROM notification_modules nm JOIN permissions p WHERE nm.module_name='publication' AND (p.code='publication_view' OR p.code='publication_propose' OR p.code='publication_approve');
155+
156+
CREATE TABLE `testnames_permissions_rel` (
157+
`TestID` int(10) unsigned NOT NULL,
158+
`permID` int(10) unsigned NOT NULL,
159+
PRIMARY KEY (`TestID`,`permID`),
160+
CONSTRAINT `FK_testnames_permissions_rel_test` FOREIGN KEY (`TestID`) REFERENCES `test_names` (`ID`),
161+
CONSTRAINT `FK_testnames_permissions_rel_perm` FOREIGN KEY (`permID`) REFERENCES `permissions` (`permID`)
162+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 commit comments

Comments
 (0)