-
Notifications
You must be signed in to change notification settings - Fork 199
[configuration] Move config sections into categories #10556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Montekkundan
wants to merge
5
commits into
aces:main
Choose a base branch
from
Montekkundan:montek/10457-config-categories-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+421
−305
Open
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2da44a6
Move config sections into categories
Montekkundan c306983
Clarify config category lookup
Montekkundan 1accbdf
Fix config category CI failures
Montekkundan 66ef5f4
Fix config category static check
Montekkundan 21fd447
check fixes
Montekkundan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| CREATE TABLE `ConfigCategories` ( | ||
| `ID` int(11) NOT NULL AUTO_INCREMENT, | ||
| `Name` varchar(255) NOT NULL, | ||
| `Description` varchar(255) DEFAULT NULL, | ||
| `Visible` tinyint(1) DEFAULT '0', | ||
| `Label` varchar(255) DEFAULT NULL, | ||
| `OrderNumber` int(11) DEFAULT NULL, | ||
| PRIMARY KEY (`ID`), | ||
| UNIQUE KEY `Name` (`Name`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
|
||
| INSERT INTO ConfigCategories (Name, Description, Visible, Label, OrderNumber) | ||
| SELECT Name, Description, Visible, Label, OrderNumber | ||
| FROM ConfigSettings | ||
| WHERE Parent IS NULL AND DataType IS NULL; | ||
|
|
||
| ALTER TABLE ConfigSettings | ||
| ADD COLUMN CategoryID int(11) DEFAULT NULL AFTER Parent; | ||
|
|
||
| UPDATE ConfigSettings child | ||
| JOIN ConfigSettings category_setting ON child.Parent=category_setting.ID | ||
| JOIN ConfigCategories category ON category.Name=category_setting.Name | ||
| SET child.CategoryID=category.ID, | ||
| child.Parent=NULL | ||
| WHERE category_setting.Parent IS NULL AND category_setting.DataType IS NULL; | ||
|
|
||
| DELETE FROM ConfigSettings | ||
| WHERE Parent IS NULL AND DataType IS NULL; | ||
|
|
||
| ALTER TABLE ConfigSettings | ||
| ADD KEY `fk_ConfigSettings_CategoryID_idx` (`CategoryID`), | ||
| ADD CONSTRAINT `fk_ConfigSettings_CategoryID` | ||
| FOREIGN KEY (`CategoryID`) | ||
| REFERENCES `ConfigCategories` (`ID`) | ||
| ON DELETE SET NULL | ||
| ON UPDATE CASCADE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /*M!999999\- enable the sandbox mode */ | ||
| SET FOREIGN_KEY_CHECKS=0; | ||
| TRUNCATE TABLE `ConfigCategories`; | ||
| LOCK TABLES `ConfigCategories` WRITE; | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (1,'study','Settings related to details of the study',1,'Study',1); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (26,'paths','Specify directories where LORIS-related files are stored or created. Take care when editing these fields as changing them incorrectly can cause certain modules to lose functionality.',1,'Paths',2); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (39,'gui','Settings related to the overall display of LORIS',1,'GUI',3); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (43,'www','Web address settings',1,'WWW',4); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (45,'eeg_pipeline','EEG Pipeline settings',1,'EEG Pipeline',15); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (47,'dashboard','Settings that affect the appearance of the dashboard and its charts',1,'Dashboard',5); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (50,'imaging_modules','DICOM Archive and Imaging Browser settings',1,'Imaging Modules',6); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (57,'statistics','Statistics module settings',1,'Statistics',7); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (59,'mail','LORIS email settings for notifications sent to users',1,'Email',8); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (63,'uploads','Settings related to file uploading',1,'Uploads',9); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (65,'APIKeys','Specify any API keys required for LORIS',1,'API Keys',10); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (69,'imaging_pipeline','Imaging Pipeline settings',1,'Imaging Pipeline',14); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (111,'logs','Settings related to logging',1,'Log Settings',12); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (115,'minc2bids','Settings related to converting MINC to BIDS LORIS-MRI tool script',1,'MINC to BIDS Converter Tool Options',13); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (121,'aws','Settings related to AWS services',1,'AWS Settings',13); | ||
| INSERT INTO `ConfigCategories` (`ID`, `Name`, `Description`, `Visible`, `Label`, `OrderNumber`) VALUES (135,'biobank','Settings related to the biobank module',1,'Biobank',14); | ||
| UNLOCK TABLES; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.