Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 601 of 808  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  67031   Mon Mar 21 17:42:15 2011 Reply Louis de Leseleuclouis.deleseleuc@nrc-cnrc.gc.caBug reportLinux2.9.0Re: Cleaning up attachments

Stefan Ritt wrote:

Louis de Leseleuc wrote:

I noticed a behavior that might be irritating. 

After attaching/uploading files to an entry and before submitting it, one might press 'Back' or close the browser window.

This in effect cancels the entry and sends into oblivion. HOWEVER the attachments and their thumbnail files remain on the server forever.

Would there be a way to either delete attachments after some time if they don't show up in an entry? Or some other magic trick with the browser? My logbook directories are already full of orphan files that I need to seek and destroy.

Also, any thoughts on automatically cleaning up a logbook directory when the damage is done?

Louis

Well, this is not so easy. When you leave the browser (via 'Back' or just by closing), it has no way to communicate with the elog server. I could put in some JavaScript, but if people switch off JavaScript there is no way. On the other hand it might be simple to write just a little shell script, which goes through all files on the server and checks if the file name occurs in some elog entry. This can probably be done with some combination of "find" and  "grep", but I'm not a shell script expert.

How about this:

Whenever a new file is uploaded, it would first be stored in a temporary directory. When the entry gets submitted, the files would be moved to the logbook directory and the entry edited accordingly.

Any wrongfully stored file would remain in that temp dir. Starting/restarting the daemon would cleanup that directory. Seems like a simpler approach and does not involve scripting the browser.

  66429   Thu Jul 2 08:36:57 2009 Reply Stefan Rittstefan.ritt@psi.chBug reportWindows2.7.6-2227Re: Checks on datetime seconds field generate warning in IE7

Richard Stamper wrote:

When adding a log entry containing a datetime field using the IE7 browser a Javascript warning is displayed - see the attachment.  This is due to a change in the naming of the "seconds" field of a datetime entry (made in version 2143) not being propagated to the code that generates the Javascript that checks the supplied values.

Suggested patch follows.

Change "s%d" to "c%d" in lines 9675 and 9678.

Showing lines 9675-9680 below, change from:

               rsprintf("  if (document.form1.s%d.value == \"\") {\n", i);
               sprintf(str, loc("Please enter second for attribute '%s'"), attr_list[i]);
               rsprintf("    alert(\"%s\");\n", str);
               rsprintf("    document.form1.s%d.focus();\n", i);
               rsprintf("    return false;\n");
               rsprintf("  }\n");

to:

               rsprintf("  if (document.form1.c%d.value == \"\") {\n", i);
               sprintf(str, loc("Please enter second for attribute '%s'"), attr_list[i]);
               rsprintf("    alert(\"%s\");\n", str);
               rsprintf("    document.form1.c%d.focus();\n", i);
               rsprintf("    return false;\n");
               rsprintf("  }\n");

Regards,

Richard Stamper

This is absolutely correct, even the right fix. I put that into the distribution. Thanks a lot. 

  67476   Fri Apr 5 10:07:57 2013 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux2.9.2Re: Checking logging before posting

Daniel Campora wrote:

Hi there,

 

Here's a bit of a special scenario. There's no server-side check the user is logged in upon posting, but it rather seems the server relies on the post data sent from the form.

An example of this can be triggered on a write restricted elog, by hitting on New and logging out in another tab. Then posting, from the first tab, will post as if the user was logged on. Hitting back and posting again also works.

 

Cheers

Yes the credentials are stored in the form where you enter your text. This has following reason: In a shared environment (several people sitting around a computer) we want to identify who submits an elog entry, but not bother the person to enter his/her password every few minutes. So in our experiment I set the time-out to 15 min, meaning after 15 minutes of inactivity a user gets logged out. If the user accesses ELOG every ten minutes or so, he/she stays logged in for a whole shift, which is what you want. Now the problem is that one starts an elog entry, waits twenty minutes, then wants to submit it, but you are bought back to the login screen and your entry is gone. Therefore I store the credentials (encrypted) in the form, so that the form can even be submitted after 20 minutes. Users at our lab are pretty happy with this solution.

In fact there is no way you can 100% ensure that the logged in user submits an entry without asking for his/her password during the submit. Even if the time span above is only very short, it still can happen that someone starts an entry, leaves the room, and someone else submits it. So people got used to the good practice not to leave any unfinished elog entry open when they go or leave the browser (to another tab for example). If I would implement to password request during the submit, there would be two problems: 1) Users will heavily complain and 2) I have to store the form data temporary (together with some optional attachments) on the server side, start a password query, and only if that succeeds submit the entry. This is somehow complicated to implement since I cannot use the normal elog database. Then I have to care about dangling entries (like if the password was wrong I should delete the temporary data???) and so on.

I plan for the future a kind of "draft" mode, where entries can be stored as "drafts" (like in most email systems). You get an auto-save every few minutes, and can work on the draft before actually submitting it. In that case your password query could be implemented more easily. But implementing the draft mode needs a change of the database system, so I have to find time to do that.

Best regards,

Stefan 

  1519   Fri Nov 18 21:30:44 2005 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.6.0beta5Re: Changing width in entry mode

Ulrich Trüssel wrote:
Problem: see pic "Eingabe.jpg", if thre are more MOptions to select in entry mode, I have to scroll from right to left all the time. Ti s isn't really comfortable.
I had a nowrap statement in the MOptions check boxes, which should not be there. I removed that and now the options are wrapped nicely:The problem is that in HTML, the check boxes and the associated text are sometimes ripped apart, i.e. the box appears at the right corner and the text at the next line. That's why I had the nowrap statement there.This fix will be contained in the next release of elog.
  1521   Sat Nov 19 11:57:49 2005 Smile Ulrich Trüsselulrich.truessel@familienhund.chQuestionWindows2.6.0beta5Re: Changing width in entry mode

Stefan Ritt wrote:

Ulrich Trüssel wrote:
Problem: see pic "Eingabe.jpg", if thre are more MOptions to select in entry mode, I have to scroll from right to left all the time. Ti s isn't really comfortable.


I had a nowrap statement in the MOptions check boxes, which should not be there. I removed that and now the options are wrapped nicely:



The problem is that in HTML, the check boxes and the associated text are sometimes ripped apart, i.e. the box appears at the right corner and the text at the next line. That's why I had the nowrap statement there.

This fix will be contained in the next release of elog.


Thank you Stefan!!! Smile

Just as an idea: Some People may find it usefull to have the norap statement in the code. If it's possible for a future release it may be nice to have a flag for this feature!
  1521   Sat Nov 19 11:57:49 2005 Smile Ulrich Trüsselulrich.truessel@familienhund.chQuestionWindows2.6.0beta5Re: Changing width in entry mode

Stefan Ritt wrote:

Ulrich Trüssel wrote:
Problem: see pic "Eingabe.jpg", if thre are more MOptions to select in entry mode, I have to scroll from right to left all the time. Ti s isn't really comfortable.


I had a nowrap statement in the MOptions check boxes, which should not be there. I removed that and now the options are wrapped nicely:



The problem is that in HTML, the check boxes and the associated text are sometimes ripped apart, i.e. the box appears at the right corner and the text at the next line. That's why I had the nowrap statement there.

This fix will be contained in the next release of elog.


Thank you Stefan!!! Smile

Just as an idea: Some People may find it usefull to have the norap statement in the code. If it's possible for a future release it may be nice to have a flag for this feature!
  66462   Mon Jul 27 08:40:50 2009 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.7.6Re: Changing Entry Time

Jay Johnstone wrote:

Hi,

I am new to eLog, trying to make a logbook tool.  This is probably a question with a simple answer, but here it is...  I need to be able to edit the entry time for an entry as it is being made and also in Edit mode later.  We have field staff who use a paper log in the field and then come back to the computer later and create the log entries, and they need to be time stamped to reflect when an event happened, not when the entry is put into the log.

I'm guessing I'm missing something easy in my Config file, I've looked through the config examples and searched the forum but I couldn't come up with an example of how to make this work.

Thanks in advance!

Jay

Hi Jay,

the entry time cannot be changed, because it should reflect the real time when the entry was made. What you can do in your case is to define a "datetime" attribute, which contains then the time stamp. You need something like this:

Attributes = Author, Field time, Subject

Type Field time = datetime

... 

  66463   Mon Jul 27 09:25:06 2009 Reply Jay Johnstonejay.johnstone@gmail.comQuestionWindows2.7.6Re: Changing Entry Time

Stefan Ritt wrote:

Jay Johnstone wrote:

Hi,

I am new to eLog, trying to make a logbook tool.  This is probably a question with a simple answer, but here it is...  I need to be able to edit the entry time for an entry as it is being made and also in Edit mode later.  We have field staff who use a paper log in the field and then come back to the computer later and create the log entries, and they need to be time stamped to reflect when an event happened, not when the entry is put into the log.

I'm guessing I'm missing something easy in my Config file, I've looked through the config examples and searched the forum but I couldn't come up with an example of how to make this work.

Thanks in advance!

Jay

Hi Jay,

the entry time cannot be changed, because it should reflect the real time when the entry was made. What you can do in your case is to define a "datetime" attribute, which contains then the time stamp. You need something like this:

Attributes = Author, Field time, Subject

Type Field time = datetime

... 

 Hi, Stefan,

Thanks for the quick reply, I've added that to my config and it does what we need.

Cheers, Jay

ELOG V3.1.5-3fb85fa6