Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 729 of 796  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  67097   Wed Jul 27 04:36:40 2011 Cool Andreas Luedekeandreas.luedeke@psi.chInfoAll2.9.0Re: Elog client usage

Alan Grant wrote:

Andreas Luedeke wrote:

Alan Grant wrote:

What I intend to do is load a raw text file into an active logbook directly, either one line at at time or batched from a text file ("m" option). [...]

[...] The usage of the "elog" command is descibed in the ELOG User's Guide: https://midas.psi.ch/elog/userguide.html#misc

[...] I typed the following, observing case sensitivity, then press enter and at this point it just hangs:
elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -a Ticket+date="Jul26/11"
You wrote you want to upload a text file, then you need to add at the end "-m <file>". E.g. if the text-file is named "C:text.txt", then write:

elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -a Ticket+date="Jul26/11" -n 1 -m C:text.txt
The "-n 1" is just to tell elog to upload plain text. If you do not specify "-m <file>" then it expects input from a pipe and therefore hangs. If you don't know what "input from a pipe" means then ALWAYS use the "-m <file>" option.
 
PS: if "Ticket date" is of the format "date" then it is sensitive to the formatting of the date string. "Jul26/11" is likely not a legal date format. Better do not specify it for the first test. Write instead:
elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -n 1 -m C:text.txt
PPS: do you really use a sub-directory "elog" instead of the default location "logbooks" for your ELOG logbook files? If not, then leave out this option, too.
elog -h localhost -p 8080 -l Tartan+Tow+Log -n 1 -m C:text.txt
  67105   Wed Aug 31 15:00:11 2011 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll2.9.0-2411Re: Attachments (again)
> In my case the original .pdf file is elsewhere, I've no need to have duplicates scatted in various logbooks, and
> while ideally that would also be true of the thumbnail, it is fair enough for this to be stored in each logbook
> where it is required. This removes the issue of how to have an attachment in a different logbook (other than by
> links, which would get rather tiresome to have to keep making).
>
> Anyone any ideas?

If you just want to show a thumbnail of an attachment in a public logbook, then just add a link to it. like

<img src="https://abk.web.psi.ch/tmp/t.png" alt="" />

or in your example you show the thumbnail in the hidden logbook by adding in the text body:

<img src="<your-host-url>/public/110705_235520_whatthis-0.png" alt="" />

Of course the attachment has to be in the public logbook and the link in the hidden one.

  67115   Tue Sep 6 12:00:13 2011 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll2.9.0-2411Re: Attachments (again)
> I wondered if there had been some flag for the config file whereby the original file for attachment was
> processed by ImageMagick, but not stored, only the .png file(s) stored - or rather, some other way that achieved
> the same end. as there is no such flag at present.
> 
> For now, anyway, I can attach the documents/pics I want, then go in and delete the 'originals' as saved in the
> logbook, leaving just the .png files. But maybe something for the wishlist?

At least I now understood your problem :-)

You can have a script in your hidden logbook, that processes your attachments with "execute new", create thumbnails
of them (using ImageMagicks "convert") and submit those thumbnails as one additional entry to your public logbook.

But then you would get thumbnails of all attachments of the hidden logbook in the public one, maybe you don't want
that either? If you want them all, this method is more automated. If you just want some, do it as you suggested it.

In my opinion this is a rather exotic feature request :-)
I wonder if there is a second person in the world who could use it?
  67116   Tue Sep 6 12:15:54 2011 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindowsV2.9.0-241Re: Password may not contain blanks

Stefan Ritt wrote:

Terry Shuck wrote:

After setting up email addresses for notifications I noticed that the "Full Name" has part of an email address in it. I've tried several ways to correct this however it keeps sending me to a page that says "Password may not contain blanks" and I've not done anything with the password.

Can you tell me how to correct this issue?

I certainly appreciate your help!!

Terry

 Have you tried deleting and re-creating the account? Otherwise you could stop elogd, edit the password file with a text editor, and restart elogd.

You will not loose your logbook data if you have access rights to the file system where the "elogd" program writes it's data.

The easiest way is to edit there password file directly and then restart "elogd".

But even if you do not dare to edit the files directly, you still can solve the issue from the web interface:

  • Create a new account, e.g. user "admin2"
  • While logged in as "admin", make this user an administrator: go to "Change config file", add "Admin user = admin, admin2"
  • Now log off and then login as "admin2"
  • Check that you can do administration, then remove user "admin"
  • Create a new user "admin" with proper "Full name" and "Email"
  • Now log off and then login as "admin"
  • Check that you can do administration, then remove user "admin2"

That should work. Good luck!

  67122   Tue Sep 13 11:54:16 2011 Warning Andreas Luedekeandreas.luedeke@psi.chBug reportLinux2.9.0-2414Elog crashes with URL find npp=0
Some user wanted to modify the URL by hand and succeeded to crash the elogd process with npp=now
It appears that npp=0 crashes elogd with the following error message:

Program received signal SIGFPE, Arithmetic exception.
0x0808eba2 in show_elog_list (lbs=0xab3c770, past_n=0, last_n=0, page_n=1,
    default_page=1, info=0x0) at src/elogd.c:20214
20214            sprintf(str + strlen(str), loc("Page %d of %d"), page_n, (n_msg - 1) / n_page + 1);

I guess this bug is not OS dependent: you can crash every logbook that you can search ;-)
  67123   Tue Sep 13 13:38:19 2011 Idea Andreas Luedekeandreas.luedeke@psi.chBug fixLinux2.9.0-2414Re: Elog crashes with URL find npp=0
> [...] It appears that npp=0 crashes elogd [...]

Here's a patch: search for "npp" in src/elogd.c and add the following line:
  if (n_page<=0) n_page = 20;

Here's the diff output for version 2.9.0-2414
*** 20092,20096 ****
     if (isparam("npp"))
        n_page = atoi(getparam("npp"));
+    if (n_page<=0) n_page = 20;

     if (page_mid) {
  67138   Thu Oct 27 11:29:08 2011 Question Andreas Luedekeandreas.luedeke@psi.chBug reportLinux2.9.0-2414elogd crash for special query
A query to a logbook can crash the demon.

Query:
https://pc8059.psi.ch:444/SwissFEL+Injector/?jcmd=Find&m0a=10&d0a=27&y0a=2011&npp=1&reverse=0

gdb dump:
SSLServer listening on port 444 ...

Program received signal SIGSEGV, Segmentation fault.
show_elog_list (lbs=0xae72618, past_n=0, last_n=0, page_n=0, default_page=1, info=0x0) at src/elogd.c:20797
20797         message_id = msg_list[index].lbs->el_index[msg_list[index].index].message_id;
Attachment 1: elogd.cfg
[global]
SMTP host = mail.psi.ch
Language = german_UTF8
charset = UTF-8
SSL = 1
Port = 444
Authentication = Kerberos, File
Password file = passwd.txt

Admin user = luedeke
Allow password change = 0
Self register = 0
Allowed encoding = 5
Allow HTML = 1
Suppress execute default = 0
Tab cellpadding = 2
Logfile = elog.log

Date format = %a %d-%b-%Y 
Time format = %a %d-%b-%y %H:%M


[SwissFEL Injector]
Default encoding = 2
Comment = SwissFEL Injector Beam Development
Guest Menu commands = New, Find, List, Login, Help
Guest List Menu commands = New, Find, Login, Help
Restrict edit time = 48
Admin user = luedeke, robot
Login expiration = 8
Reverse sort = 1
Thumbnail size = 792>
Attributes      = When, Author, Entry, Status, System, Downtime, Beamtime, Coordinator, Shiftleader, Operators, Participants, Title
List display    = ID, When, Author, Entry, Status, System, Title
Thread display  = $entry time, $Author, $Entry, $Status, $System, "$Title"
Quick filter    = When, Entry, Status
Start page = ?rsort=When
Use Email Subject = ELOG $logbook: $Entry: $Title

# When
Type When = datetime
Preset When = $date
# Author
#Preset Author = $long_name
#Preset on reply Author = $long_name
Preset on first reply Titel = Re: $Titel
#Locked Attributes = Author
Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo \"$long_name, $Author\";fi)
Preset on reply Author = $long_name
# Entry
Options Entry = Problem{1}, Measurement{2}, Shift-Summary{3}, Info{4}, Alarms{5}

# depending on Entry, but not specific to one attribute
{1,5} Show Attributes Edit = When, Author, Entry, Status, System, Title
{1,5} Show Attributes      = When, Author, Entry, Status, System, Title
{2,4} Show Attributes Edit = When, Author, Entry, System, Title
{2,4} Show Attributes      = When, Author, Entry, System, Title
{3}   Show Attributes Edit = When, Author, Entry, Coordinator, Shiftleader, Operators, Participants, Downtime, Beamtime, Title
{3} Required attributes = Coordinator, Shiftleader, Operators, Downtime, Beamtime, Title
{3} Preset Title = Shift on $date
{1,2,4,5} Preset Title = 
{1,5} Required attributes = When, Author, Entry, Status

# Status
{1} Options Status = open, work-in-progress, closed
{1} Preset Status = open
{5} Options Status = canceled, disabled, enabled
{5} Preset Status = disabled
# System
{1,4,5} Options System = Beamdynamics, Controls, Diagnostics, Mains

#{2} System  = free text for measurement software, incl. version
Show Attributes Edit = When, Author, Entry, Title
# Downtime (only for Shift-Summary{3})
Type Downtime = numeric
Comment Downtime = hours of shift not usable (waiting for repair, etc.)
Format Downtime = 0, attribname, attribvalue, 8, 3
# Beamtime (only for Shift-Summary{3})
Type Beamtime = numeric
Comment Beamtime = hours of shift useable for measurements
Format Beamtime = 1, attribname, attribvalue, 8, 3
# Text
{1,2,4,5} Preset Text = /usr/local/elog/logbooks/inc/clear.html
{3} Preset Text = /usr/local/elog/logbooks/inc/FIN-summary.html
  67139   Thu Oct 27 14:05:35 2011 Warning Andreas Luedekeandreas.luedeke@psi.chBug reportAll2.9.0undesired side effect of using an attribute "Entry"
If you use an attribute "Entry" then the internal variable "entry time" will expand to the last value of
"$Entry"+" time", e.g. if you use it in "Thread display = $entry time, ..."

One side effect is, that the logbook selection page defaults to use
Last submission = $entry time by $author
Which then expands to an undesired result.

This is not really a bug, rather something you'll need to keep in the back of your mind.
ELOG V3.1.5-2eba886