Re: Using the command line tool to edit, posted by T. Ribbrock on Mon Aug 11 15:14:40 2008
|
Stefan Ritt wrote: |
I fixed two things:
- The logbook can now contain a space. Enclose it in double quotes such as elog -l "LOG BOOK" ...
- The error you report comes from the fact that you are the first person using elog submissions together with "use lock=1" in the configuration file. This has never been tested and therefore does not work
. So I fixed this by adding a new hidden parameter. If you update to SVN revision 2122, things should work
|
Tehe, leave it to us "stupid users" to break your nice little program in new and exiting ways... ;-) But: THANK YOU! Both things are indeed working now - that brings me one step closes to my automated logbook, which is great!
Stefan Ritt wrote: |
Concerning your request of editing existing entries by their idea, I agree with Yoshi that you could grab the ID upon the first submission. An alternative is to make a direct search on a logbook. Since this is not implemented in the elog command line tool, you have to use wget for it:
wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something" -O elog.txt
A problem here is that the username and password are normally transmitted in an encrypted form as cookies by your browser after you logged in. Now you have to convince wget first to log in like
wget "http://localhost:8080/LOGBOOK/?unamee=USER&upassword=PASSWD"--save-cookies cookies.txt
followed by a second call to wget with --load-cookies cookies.txt. I tried that but was not successful since the login procedure above redirects to the elog listing page, and only the cookies set after the redirection were saved in cookies.txt. Maybe you can figure out how to do that. The only way I could get it to work is to supply the encoded password, which I manually obtained from the password file. The URL was then
wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something&unm=USER&upwd=ENC_PWD" -O elog.txt
|
I thought about grabbing the ID on first creation. The problem with that is that I really would have to run parallel "databases" - one in elog to keep the information I want plus a second one which maps the elog-IDs to the "real" IDs - and the second one would also have to deal with things like "ID exists", "ID doesn't exist", "ID gets deleted" and so on - just the kind of hassle I want to avoid. But what you suggest with wget will most likely be sufficient. The logbook in question is readable for everyone (only editing/writing requires authentication), so I can search without password hassle. In fact, this will work:
wget -q "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something" -O -| grep '\$@MID'|awk '{print $2}'
Et voila, I have an ID. This will generate a bit more traffic than a parallel "DB", but I think it will be less susceptible to errors, as all information is kept within the elog logbook at all times. Thanks again for your help - time to do some scripting! :-) |
Default list option, posted by George Chisholm on Wed Sep 17 19:14:45 2008
|
How do I set a default list option?
I have an attribute called Active with options yes, no
When I do a list I want to see just the records having yes.
When required, the quick filter allows me to see records with option = no or all the records.
Thanks
|
Re: Default list option, posted by Stefan Ritt on Wed Sep 17 22:41:18 2008
|
George Chisholm wrote: |
How do I set a default list option?
I have an attribute called Active with options yes, no
When I do a list I want to see just the records having yes.
When required, the quick filter allows me to see records with option = no or all the records.
Thanks
|
There is a trick. Use
Start page = ?Active=yes
and use a quick filter on "Active". This will always start with a list where Active=yes. |
Maximum number of mail recipients, posted by Steve Nahn on Sun Oct 12 20:40:32 2008
|
Just wondering if there is still a maximum number of mail recipients? I saw a number of 112 floating around in old forum entries, and I need more, like currently 300. When I try it, the elogd hangs, not much output to speak of, but won't reply to Apache on its port. Any quick fix (like changing a def'd variable somewhere?) |
Error Message During Uploads, posted by Kevin O'Sullivan on Mon Oct 13 17:02:17 2008
|
We've been having toruble with uploads not working and I notice that every time someone uploads to our elog the same error message appears in /var/log/syslog:
Cannot restore original GID/UID.
How can I fix thsi error? Or, perhaps more importantly, could it cause elog to "lock up" (note, it doesn't crash)?
I'm runing elog on Ubuntu kernel version 2.6.24-server. |
Re: Maximum number of mail recipients, posted by Stefan Ritt on Wed Oct 29 05:25:12 2008
|
Steve Nahn wrote: |
Just wondering if there is still a maximum number of mail recipients? I saw a number of 112 floating around in old forum entries, and I need more, like currently 300. When I try it, the elogd hangs, not much output to speak of, but won't reply to Apache on its port. Any quick fix (like changing a def'd variable somewhere?)
|
No quick fix, sorry. It is also limited by a fixed number of characters per line in the configuration file and many more. I will try to increase it, but it will take time. Can you maybe set-up a mailing list at your email server? This way you send only email to one destination and it gets distributed to many people. |
Re: Error Message During Uploads, posted by Stefan Ritt on Thu Oct 30 04:33:43 2008
|
Kevin O'Sullivan wrote: |
We've been having toruble with uploads not working and I notice that every time someone uploads to our elog the same error message appears in /var/log/syslog:
Cannot restore original GID/UID.
How can I fix thsi error? Or, perhaps more importantly, could it cause elog to "lock up" (note, it doesn't crash)?
I'm runing elog on Ubuntu kernel version 2.6.24-server.
|
Probably something is wrong with the account under which you run elog. Normally (at least if you install elog from the RPM) you have an account "elog" and group "elog" under which you run elogd. You compile and install elogd under root (so that it can bind to port 80 for example), and then you put
usr = elog
grp = elog
into the configuration file. So when you start elogd, it binds to the server port, then falls down to user "elog" and gives up root privileges. If the elog account for example does not exist, you get the above error message. The only problem I see there is if elog stays as root, it can do more harmful things in case it misbehaves. |
browse for hyperlink target?, posted by George Chisholm on Thu Jun 26 22:53:59 2008
|
Just upgraded to v2.7.4 and really like the new editor but I need to be able to browse for the correct file when inserting a hyperlink. I looked into CKfinder but can't see how to use this with ELOG. Can anyone help? We have been using ELOG in our control center for about a year and it is working out great! |