Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 16:20:37 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook. |
Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 16:25:36 2021
|
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic |
Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Wed Mar 24 17:36:15 2021
|
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and
parses them. |
Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 19:30:50 2021
|
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values |
Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 19:45:41 2021
|
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.
Stefan
Dominic |
Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Thu Mar 25 07:48:24 2021
|
Thank you very much.
So far I testet all functionalities and scripts to reach my goal. I will post a dummy of the solution later on for future purposes.
Best wishes |
Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Thu Mar 25 12:50:08 2021
|
I am glad, we could help.
I can see a caveat in the recommendation.
By having "Execute New = echo $attrib > /path/last_attrib" and "Preset attrib = $shell(cat /path/last_attrib)" as the most |
Re: Pre-fill Attribute with last entry, posted by Richard Stamper on Tue Mar 30 13:43:46 2021
|
Just noting that, depending on what you want to achieve, you may be able to use the threading functionality so that a "new" entry is actually
a "reply" to a previous entry. This will allow you to populate attributes with values from that previous entry without having to rely on
storing information outside the system, with all the attendant concurrency risks already identified. |
automatically obtain entry ID from search, posted by Chris Körner on Tue Mar 23 23:05:20 2021
|
Hi,
in our application I want to have, let's say in the simplest case, two logbooks. One as a database of samples we fabricated and one as a
logbook for measurements. When a measurement on a sample is done and an entry is submitted to the 2nd logbook, I want to automatically edit or reply to |
Re: automatically obtain entry ID from search, posted by Stefan Ritt on Wed Mar 24 10:01:34 2021
|
You would have to do that on the scrip level. Use "curl" to search a logbook. Like following URL would search for all entries in this forum
where you are the authoer, then return the entries in CSV format:
https://elog.psi.ch/elogs/Forum/?mode=CSV1&Author=k%F6rner |
Re: automatically obtain entry ID from search, posted by Sebastian Schenk on Wed Mar 24 18:02:07 2021
|
Hi Chris,
Additional the the HTTP request sugested by Stefan you could also use the search functionality of the elog python module.
For the HTTP request you may also need a way to provide credentials or transmit cookies, if the elog needs authentification. |
Pre-fill , posted by Dominic Schneider on Wed Mar 24 16:11:04 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook. |
Date conversion, posted by Martin Neumann on Tue Feb 23 12:12:14 2021
|
Hi,
I am trying to figure out how ELOG works and I have a problem.
I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons. |
Re: Date conversion, posted by Andreas Luedeke on Tue Feb 23 17:20:39 2021
|
If you define a field as "datetime" then you'll get the standard ELOG input field for datetime. It will be stored as seconds of the epoch
(seconds since 1.1.1970).
You can define a field as a default string input, then it is stored as a string. But you can convert that string by a shell scripts into seconds |
Re: Date conversion, posted by Martin Neumann on Wed Feb 24 08:44:42 2021
|
I don't feel comfortable allowing the elog daemon to execute random shell scripts. Is there no other way?
Andreas
Luedeke wrote:
If you define a field as "datetime" then you'll get |
Re: Date conversion, posted by Sebastian Schenk on Tue Mar 2 15:17:56 2021
|
One other way would be to do the conversion on the client-side using javascript.
Overwrite the complete datetime input cell and add an event listener to either onChange of this input or the submit event, to trigger the conversion
before submitting, so elog would get the converted time. |
Re: Date conversion, posted by Stefan Ritt on Wed Mar 10 17:30:23 2021
|
Do you actually need to convert the date into the internal format? Why not keeping simply the full string YYYY-MM-DD HH:MM. If the use is disciplined
enough to always use the correct format, there should be no issue. I invented the datetime format to "force" all date/time inputs to have the
correct format. If you have a proper YYYY-MM-DD HH:MM format, even sorting (now by string) should work correctly. |
Last default time bug, posted by Sebastian Schenk on Mon Mar 1 16:02:02 2021
|
Hello all,
I have the issue, that we can't list entries older than 1 year, if "Last default = 31" (or any other number, but
they are restricted to 1, 3, 7, 31, 92, 182, 364) is active. |
Path disclosure on unfound file, posted by Bruce Bush on Wed May 6 17:35:14 2015
|
Greetings,
Running elog 3.1.0 on CentOS 6.6. When I try to access a nonexistent file, elog reveals a path in the 404 page. For example:
Not Found
The requested file /usr/local/elog/themes/default/blortblortblort7854.htm |
Re: Path disclosure on unfound file, posted by Stefan Ritt on Wed Jun 10 09:12:06 2015
|
What URL did you use? If I try here on this forum I get:
which looks fine to me. |
Re: Path disclosure on unfound file, posted by Travis Unkel on Fri Aug 18 01:02:41 2017
|
I am having the same issue. If you go to midas.psi.ch/elogs/12345.htm you get the path disclosure issue.
Stefan |
Re: Path disclosure on unfound file, posted by prinnydood on Thu Dec 31 18:35:19 2020   
|
I can confirm this issue exists on version 3.1.3, which I have installed elog on Debian 10.
The issue also exists on version 3.14 (1.20190113git283534d97d5a.el7), which I tested on an AmazonLinux EC2 instance.
This is what I found: |
Re: Path disclosure on unfound file, posted by Stefan Ritt on Fri Jan 8 13:47:14 2021
|
Ok, I fixed the code in the current commit (395e101add19f0fe8a11a25d0822e511f34d94d1). The path gets stripped, and we see a
prinnydood |
Re: Path disclosure on unfound file, posted by Gabriel Lopez on Wed Feb 3 17:28:16 2021
|
Hello, This is coming up as a high vulnerability in our scans. Are there plans to update the rpm for this fix? If so is there an ETA? Any update would
be much appreciated. Currently running elog-3.1.4-2
Stefan |
Re: Path disclosure on unfound file, posted by Stefan Ritt on Fri Feb 19 09:59:04 2021
|
I made a new RPM: https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-3.el7.x86_64.rpm
Gabriel
Lopez wrote:
Hello, This is coming up as a high vulnerability in our scans. Are |
Re: Path disclosure on unfound file, posted by Gabriel Lopez on Fri Feb 19 19:48:11 2021
|
Thank you for your work. Works like a charm!
Stefan
Ritt wrote:
I made a new RPM: https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-3.el7.x86_64.rpm |
export/archive a logbook, posted by Jacky Li on Thu Feb 18 19:21:57 2021
|
Hi,
I have an elogd server serves many logbooks. May I know what is a good way to export or achive one its logbooks? Thank you.
Jacky |
Re: export/archive a logbook, posted by Stefan Ritt on Fri Feb 19 08:35:53 2021
|
Find -> Export to: CSV (or any other format) -> Search
Jacky
Li wrote:
Hi, |
elog server go to high CPU and hangs, posted by Stefano Lacaprara on Thu Feb 18 09:14:28 2021
|
Dear expert,
I'm running the latest git version of elog ELOG V3.1.4-395e101a on ubuntu 20.04.2.
I'm experiencing frequent hangs of the elog server: the status is always reported as running, but the web server is not responding.
|
Re: elog server go to high CPU and hangs, posted by David Pilgram on Thu Feb 18 12:05:52 2021
|
Dear Stefano,
Try the entry I wrote some time ago elog:68655
|
Re: elog server go to high CPU and hangs, posted by Stefan Ritt on Thu Feb 18 12:06:12 2021
|
Usually a restart of the elogd server helps. If the problem persists, one of the logbooks might be corrupt. Try to disable one logbook at a time to figure
out which one it is. Then
remove that one and set it up freshly.
|