[Loris-dev] Customize page

Ling Ma lingyun.ma at mcin.ca
Mon Mar 16 11:11:42 EDT 2020


Hi Sotirios,

This kind of issue has nothing to do with Loris because you are trying to
modify something in Loris. You can use the following suggestion or use
other method according to case requirements.

Explanation:
https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

Solution:
"It’s likely because you have the ONLY_FULL_GROUP_BY function enabled. To
fix this, you have to disable it.

Run this command:

mysql > SET GLOBAL sql_mode=(SELECT
REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Another way to turn it off is that to find and modify the config file
my.cnf. Usually it’s in /etc/my.cnf or /etc/mysql/my.cnf.

First, check the sql_mode by running this query:

SELECT @@sql_mode;

The result should be something similar to this:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Copy the sql_mode values, remove ONLY_FULL_GROUP_BY, edit my.cnf and put
the rest together in a line under [mysqld] section:

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Then restart the mysql server."
Source:
https://tableplus.com/blog/2018/08/mysql-how-to-turn-off-only-full-group-by.html

Hope this helps.

Ling Ma

On Mon, Mar 16, 2020 at 10:42 AM Sotirios Nikoloutsopoulos <
sotirisnik at gmail.com> wrote:

> Accordng to the error, since it's not an aggregated column i can't have
> access to it.
>
> Στις Δευ, 16 Μαρ 2020 στις 4:28 μ.μ., ο/η Sotirios Nikoloutsopoulos <
> sotirisnik at gmail.com> έγραψε:
>
>> Hi,
>>
>> I would like to get some columns from the files tables at the
>> imaging_browser module. According to this sql query
>>
>>
>> https://github.com/aueb-wim/LORIS-for-MIP/blob/master/loris/modules/imaging_browser/php/imaging_browser.class.inc#L157
>>
>> I see that it uses the files table on inner join and is named as f but i
>> can't refer to the table for some reason here
>>
>> https://github.com/aueb-wim/LORIS-for-MIP/blob/master/loris/modules/imaging_browser/php/imaging_browser.class.inc#L226
>>
>> Thanks
>>
>> Sotirios
>>
>> Στις Τετ, 4 Μαρ 2020 στις 4:28 μ.μ., ο/η Sotirios Nikoloutsopoulos <
>> sotirisnik at gmail.com> έγραψε:
>>
>>> Hi,
>>>
>>> I found out how to make the button and its functionality.
>>>
>>> Thanks,
>>>
>>> Sotirios
>>>
>>> Στις Τετ, 4 Μαρ 2020 στις 2:26 μ.μ., ο/η Sotirios Nikoloutsopoulos <
>>> sotirisnik at gmail.com> έγραψε:
>>>
>>>> Hi Ling,
>>>>
>>>> I found the sql query
>>>> https://github.com/aueb-wim/LORIS-for-MIP/blob/master/dicom_archive/php/dicomarchiverowprovisioner.class.inc#L40
>>>> and modified to get our Batch column and the dropdown box works too ( I
>>>> made it based on Site ).
>>>>
>>>> [image: image.png]
>>>>
>>>> Now I would like to place the Button
>>>>
>>>> Is this how I should proceed for it?
>>>>
>>>> [image: image.png]
>>>>
>>>> Thanks
>>>>
>>>> Sotirios
>>>>
>>>>
>>>> Στις Τρί, 3 Μαρ 2020 στις 9:55 μ.μ., ο/η Ling Ma <lingyun.ma at mcin.ca>
>>>> έγραψε:
>>>>
>>>>> Hi Sotirios,
>>>>>
>>>>> As a further precision, "dicom_archive/jsx/dicom_archive.js" could be
>>>>> js file you need to modify, "fields" of the line 120 could be the filter
>>>>> definition ...
>>>>>
>>>>> The implemented behavior will depend on what you need to do
>>>>>
>>>>>
>>>>> On Tue, Mar 3, 2020 at 11:40 AM Ling Ma <lingyun.ma at mcin.ca> wrote:
>>>>>
>>>>>> Hi Sotirios,
>>>>>>
>>>>>> To make the new module work, I suggest  you put it in
>>>>>> project/modules, but it is up to you to choose where to put.
>>>>>>
>>>>>> Last time I asked "You will need to customize the dicom_archive
>>>>>> modules which resides under <web root>/modules/dicom_archive", I don't
>>>>>> believe FilterableDataTable.js is the right place to do. You will need to
>>>>>> read the dicom_archive module files, I believe it is straightforward to see
>>>>>> what to modify there. The data is passed via JSON function of
>>>>>> php/dicom_archive.class.inc or others.
>>>>>>
>>>>>> Best regards,
>>>>>> Ling Ma
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Mar 3, 2020 at 11:30 AM Sotirios Nikoloutsopoulos <
>>>>>> sotirisnik at gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I just runned make and it auto runned composer install --no-dev on
>>>>>>> its own. To make it run i needed to delete the vendor directory. Also when
>>>>>>> placing the dicom_archive under project/ directory i see it has no effect
>>>>>>> at the web interface but it worked when i replaced the original module. At
>>>>>>> the moment I will work at the path of the original module, no harm since we
>>>>>>> using docker to replace the original path at the building process.
>>>>>>>
>>>>>>> To display the values of my new column, which files should I edit? I
>>>>>>> believe it's the FilterableDataTable.js but how does it get its data for
>>>>>>> the table? ( I am new to React )
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Στις Τρί, 3 Μαρ 2020 στις 5:11 μ.μ., ο/η Ling Ma <lingyun.ma at mcin.ca>
>>>>>>> έγραψε:
>>>>>>>
>>>>>>>> Hi Sotirios,
>>>>>>>>
>>>>>>>> You must have run with "composer install" early, so why do you run
>>>>>>>> "composer install  --no-dev" now? You can delete the vendor/facebook, then
>>>>>>>> re-run the "composer install --no-dev". The cause could be something to do
>>>>>>>> with facebook package, which is out of the consideration of Loris.
>>>>>>>>
>>>>>>>> Hope this helps. Thanks.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Ling Ma
>>>>>>>>
>>>>>>>> On Tue, Mar 3, 2020 at 8:00 AM Sotirios Nikoloutsopoulos <
>>>>>>>> sotirisnik at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I am getting this error when i am running make
>>>>>>>>>
>>>>>>>>> composer install --no-dev
>>>>>>>>> > mkdir -p project/libraries
>>>>>>>>> Loading composer repositories with package information
>>>>>>>>> Installing dependencies from lock file
>>>>>>>>> Package operations: 0 installs, 0 updates, 4 removals
>>>>>>>>>   - Removing facebook/webdriver (dev-master)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>   [RuntimeException]
>>>>>>>>>
>>>>>>>>>   Source directory /var/www/loris/vendor/facebook/webdriver has
>>>>>>>>> unpushed chan
>>>>>>>>>   ges on the current branch:
>>>>>>>>>
>>>>>>>>>   M lib/WebDriverTargetLocator.php
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> install [--prefer-source] [--prefer-dist]
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Στις Πέμ, 27 Φεβ 2020 στις 6:27 μ.μ., ο/η Ling Ma <
>>>>>>>>> lingyun.ma at mcin.ca> έγραψε:
>>>>>>>>>
>>>>>>>>>> Hi Sotirios,
>>>>>>>>>>
>>>>>>>>>> You will need to customize the dicom_archive modules which
>>>>>>>>>> resides under <web root>/modules/dicom_archive, we recommend against
>>>>>>>>>> modifying directly the module, instead you copy that module into
>>>>>>>>>> project/modules to do any customization there, then run "composer install"
>>>>>>>>>> to let the Loris know that you want to use your customized version. Then
>>>>>>>>>> you need to run "make" under the <web root> to compile jsx to js.
>>>>>>>>>>
>>>>>>>>>> The table and the filter are written in ReactJS, as long as you
>>>>>>>>>> have some knowledge of ReactJS and PHP, you could go ahead to do it.
>>>>>>>>>>
>>>>>>>>>> Best regards,
>>>>>>>>>> Ling Ma
>>>>>>>>>>
>>>>>>>>>> On Thu, Feb 27, 2020 at 11:09 AM Sotirios Nikoloutsopoulos <
>>>>>>>>>> sotirisnik at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> We would like to customize the Selection Filter given in
>>>>>>>>>>> https://demo.loris.ca/dicom_archive/ page. Also we would like
>>>>>>>>>>> to add a new column on the existing table shown ( that batch column will be
>>>>>>>>>>> contained in the files table ). Could you give some info on how to proceed?
>>>>>>>>>>>
>>>>>>>>>>> The desired result is as shown in that image
>>>>>>>>>>>
>>>>>>>>>>> [image: image.png]
>>>>>>>>>>>
>>>>>>>>>>> Thank you
>>>>>>>>>>>
>>>>>>>>>>> Sotirios
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Loris-dev mailing list
>>>>>>>>>>> Loris-dev at bic.mni.mcgill.ca
>>>>>>>>>>> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>>>>>>>>>>>
>>>>>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200316/25bbf186/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 221775 bytes
Desc: not available
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200316/25bbf186/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 770441 bytes
Desc: not available
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200316/25bbf186/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 42968 bytes
Desc: not available
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200316/25bbf186/attachment-0005.png>


More information about the Loris-dev mailing list