Skip to content
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

Automate NCCAT reports #6839

Open
leginonbot opened this issue Mar 18, 2024 · 14 comments
Open

Automate NCCAT reports #6839

leginonbot opened this issue Mar 18, 2024 · 14 comments

Comments

@leginonbot
Copy link
Collaborator


Author Name: Sargis Dallakyan (@dallakyan)
Original Redmine Issue: 6839, https://emg.nysbc.org/redmine/issues/6839
Original Date: 2019-03-14


None

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-05T23:15:25Z


Searched for an editor to add to this page with an option to upload images. Found https://ckeditor.com which comes with CKFinder but it costs $$. Looked at https://alternativeto.net/software/ckfinder/ and decided to go with https://responsivefilemanager.com and tinymce. I have not committed their code to our git repo since it's not clear what their redistribution policy is. Instead, I'm writing install notes below so we can redo it if needed.

Install Notes

Download tinymce and filemanager copy them to myamiweb root. Login to emgweb and do:

mkdir thumbs
chown apache thumbs
ln -s /gpfs/uploads

File manager doesn't come with security option, meaning everyone can upload and view images. To secure it, edit filemanager/config/config.php and add the following code at the beginning:

require_once "inc/dbemauth.inc";
require_once "inc/admin.inc";
require_once "inc/user.inc.php";

$login_check = $dbemauth->is_logged();
$is_admin = (privilege('users')>3);
if (!$is_admin)
        redirect(BASE_URL.'accessdeny.php?text=You do not have administrator privilege');

This way only admin users can upload images. I suggest we make /gpfs/uploads/$user/$session to store images similar to /gpfs/leginon.

This will be live on emgweb tomorrow.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-05T23:34:57Z


Also deny directory listing with htaccess for thumbs and uploads using https://stackoverflow.com/questions/5932641/deny-directory-listing-with-htaccess

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-08T23:10:35Z


Added "Download PDF" at the bottom thanks to https://github.com/MrRio/jsPDF

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Bridget Carragher (@bcarr-czi)
Original Date: 2019-04-17T02:59:53Z


I really like these:
Can I suggest a few changes:

  • Please change the link tho test from "Poster" to "Report"
  • Can we make the blue splash banned extend across te whole report at the top; looks a little strangled otherwise.
  • Can we include the usual blurb that described in text the data collection parameters in the version required by a journal.
    I think this is in the other reports (I would look it up but google chrome has eaten all y bookmarks!)
    Thanks,
    Bridget

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-17T21:51:01Z


  • Changed the link from [poster] to [report].
  • The blue splash banner now extends across the whole report at the top.
    This will be available tomorrow after nightly updates.

Please email me a report with a blurb that describes in text the data collection parameters in the version required by a journal. I'll implement it as well. Thank you.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Bridget Carragher (@bcarr-czi)
Original Date: 2019-04-18T00:05:20Z


Thanks Sargis _ I will check these out tomorrow.
The section I want added to the Report is the "Experimental Method" section that is already part of the User Results page - you can click on any of these and you will find it near the end.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-18T00:15:20Z


Ok, got it. I'll copy "Experimental Method" section from User Results page. Some of it is in "Experimental setup" table. I'll remove them from there to avoid repetition.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Bridget Carragher (@bcarr-czi)
Original Date: 2019-04-18T00:38:10Z


Hmmm... I think I like both though - they serve different purposes.. Ed, can you weigh on on this please.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-04-18T22:52:44Z


Copied over Experimental Methods section. Left the rest unchanged. This will be available tomorrow after nightly updates.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Bridget Carragher (@bcarr-czi)
Original Date: 2019-04-18T23:43:00Z


Excellent, thank you.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Ed Eng (Ed Eng)
Original Date: 2019-04-19T01:44:09Z


In terms of the previous query the context is slightly different and the user would glean different information.

An issue I have is that there may have several grid Atlases or parameters within a session.

Questions:

  1. Is there a way to specify which grid Atlas to show in the report if there are multiple ones in the session?
  2. Is there a way to designate the table to show the information from the last entries of each preset? Meaning during setup a particular dose or setting may have been initialized, but the preset was changed for data collection. Therefore, we would want the table display the latest values for each preset.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Bridget Carragher (@bcarr-czi)
Original Date: 2019-04-19T01:54:23Z


Hmmm.. good point about the atlases. Can we show all atlases from a session? Or should we just show the last one? I am not sure if we shouldn't always start a new session if there is a new atlas?
Also can we show an exemplary high mag image? If there is one - it would be up to the operator to choose one.
I love this automated report and think we can grow it further.
I like the idea of having a picked particles etc. also as Ed does in his manual reports.
Can we caht about the editable text box - it would be good to edit that out into plain text for the pdf. And maybe it should be moved to the end? But let's chat before doing any of this.

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Ed Eng (Ed Eng)
Original Date: 2019-05-23T23:56:39Z


Have not fully shifted over to the report.

Currently testing the reports with recent sessions have encountered formatting issues.

  1. Would like preset formatting to match the rest of the report
  2. Uploaded figures to the file manager, but where are those images and how do we manage the files? Where are they located once uploaded?
  3. When trying to create a pdf the added section shows up as grey. See uploaded attachment for 19may22f report.

For an example see: http://emgweb.nysbc.org/betamyamiweb/poster.php?expId=9084
or http://emgweb.nysbc.org/betamyamiweb/poster.php?expId=9038

@leginonbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Sargis Dallakyan (@dallakyan)
Original Date: 2019-05-28T22:38:36Z


Updated @Download PDF@ link to point to the same page with added @&inline=1@ to URL. This will render things inside the editor inline and print the PDF. Added section doesn't show up as grey anymore. This also allowed me to get rid of @save@ button and @Download PDF@ in the PDF. I can look on how to split this into multiple pages, if needed.

The uploaded files are stored under /gpfs/uploads and thumbnail images are stored on emgweb under /srv/www/html/betamyamiweb/thumbs. emgweb has around 200GB space available. Wasn't sure if this would be enough moving forward, that's why I created /gpfs/uploads.

Files can be managed using http://emgweb.nysbc.org/betamyamiweb/filemanager/dialog.php
This is the same UI as you click on image icon in the editor (https://www.responsivefilemanager.com/). Only logged in users with admin privileges can access this for security reasons.

Can't figure out what's different in preset formatting. It shows blue rectangle with title (Imaging Summary) as in the rest of the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant