Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 48 of 238  Not logged in ELOG logo
icon5.gif   Elog not see image magick, posted by Daniel Sajdyk on Wed Nov 30 14:32:00 2016 

Hello.

I finally try add ImageMagick to ELOG.

I downloaded latest version (ImageMagick-7.0.3-Q16) and installed it. Everything looks ok, but when I start Elog service it says that "ImageMagick not detected". 

When I look at the "path" variable i have "C:\Program Files\ImageMagick-7.0.3-Q16;C:\ProgramData\Oracle\Java\javapath;[...]".

What else can I check?

 

Regards

Daniel.

 

Ps. My system is Windows 7 Pro. 

    icon2.gif   Re: Elog not see image magick, posted by Stefan Ritt on Wed Nov 30 14:53:41 2016 

The detection in elogd works by executing the command "convert" and check if the program executes. If you start elogd as a service, the program might see another path variable. Maybe reboot Windows or start the service in the environment of a real user instead of system, where it might miss your modified "path".

Stefan

Daniel Sajdyk wrote:

Hello.

I finally try add ImageMagick to ELOG.

I downloaded latest version (ImageMagick-7.0.3-Q16) and installed it. Everything looks ok, but when I start Elog service it says that "ImageMagick not detected". 

When I look at the "path" variable i have "C:\Program Files\ImageMagick-7.0.3-Q16;C:\ProgramData\Oracle\Java\javapath;[...]".

What else can I check?

 

Regards

Daniel.

 

Ps. My system is Windows 7 Pro. 

 

       icon2.gif   Re: Elog not see image magick, posted by Daniel Sajdyk on Tue Dec 6 13:48:48 2016 

Ok. It take me a while, but I reinstalled ImageMagick with marked option "convert". Now, when I start elog, it can see ImageMagick, but screenshots attached to elog entries are still in original sizes. And, I don't see buttons for rotating, resizing images. 

I look into elog cfg options, but only what I found is Thumbnail size which, it looks, don't work.

Don't know what more I should check. 

Daniel.

Stefan Ritt wrote:

The detection in elogd works by executing the command "convert" and check if the program executes. If you start elogd as a service, the program might see another path variable. Maybe reboot Windows or start the service in the environment of a real user instead of system, where it might miss your modified "path".

Stefan

Daniel Sajdyk wrote:

Hello.

I finally try add ImageMagick to ELOG.

I downloaded latest version (ImageMagick-7.0.3-Q16) and installed it. Everything looks ok, but when I start Elog service it says that "ImageMagick not detected". 

When I look at the "path" variable i have "C:\Program Files\ImageMagick-7.0.3-Q16;C:\ProgramData\Oracle\Java\javapath;[...]".

What else can I check?

 

Regards

Daniel.

 

Ps. My system is Windows 7 Pro. 

 

 

          icon2.gif   Re: Elog not see image magick, posted by christian on Mon Mar 27 11:11:31 2017 

Hi,

Maybe the post is outdated already, but I want to share my experience anyway. I faced the same problem as Daniel: The most recent ImageMagick package was not detected by elogd even though it was installed. I could trace back the problem to the following issue:

Stefan mentioned that the ImageMagick software is detected via the 'convert' command. Since ImageMagick V7, however, the 'convert' command is no longer supported. So, when installing ImageMagick V6 the detection works.

@Stefan: Maybe you could adapt the software detection at some point? Thanks.

Christian

Daniel Sajdyk wrote:

Ok. It take me a while, but I reinstalled ImageMagick with marked option "convert". Now, when I start elog, it can see ImageMagick, but screenshots attached to elog entries are still in original sizes. And, I don't see buttons for rotating, resizing images. 

I look into elog cfg options, but only what I found is Thumbnail size which, it looks, don't work.

Don't know what more I should check. 

Daniel.

Stefan Ritt wrote:

The detection in elogd works by executing the command "convert" and check if the program executes. If you start elogd as a service, the program might see another path variable. Maybe reboot Windows or start the service in the environment of a real user instead of system, where it might miss your modified "path".

Stefan

Daniel Sajdyk wrote:

Hello.

I finally try add ImageMagick to ELOG.

I downloaded latest version (ImageMagick-7.0.3-Q16) and installed it. Everything looks ok, but when I start Elog service it says that "ImageMagick not detected". 

When I look at the "path" variable i have "C:\Program Files\ImageMagick-7.0.3-Q16;C:\ProgramData\Oracle\Java\javapath;[...]".

What else can I check?

 

Regards

Daniel.

 

Ps. My system is Windows 7 Pro. 

 

 

 

             icon2.gif   Re: Elog not see image magick, posted by christian on Mon Mar 27 12:42:07 2017 

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

christian wrote:

Hi,

Maybe the post is outdated already, but I want to share my experience anyway. I faced the same problem as Daniel: The most recent ImageMagick package was not detected by elogd even though it was installed. I could trace back the problem to the following issue:

Stefan mentioned that the ImageMagick software is detected via the 'convert' command. Since ImageMagick V7, however, the 'convert' command is no longer supported. So, when installing ImageMagick V6 the detection works.

@Stefan: Maybe you could adapt the software detection at some point? Thanks.

Christian

Daniel Sajdyk wrote:

Ok. It take me a while, but I reinstalled ImageMagick with marked option "convert". Now, when I start elog, it can see ImageMagick, but screenshots attached to elog entries are still in original sizes. And, I don't see buttons for rotating, resizing images. 

I look into elog cfg options, but only what I found is Thumbnail size which, it looks, don't work.

Don't know what more I should check. 

Daniel.

Stefan Ritt wrote:

The detection in elogd works by executing the command "convert" and check if the program executes. If you start elogd as a service, the program might see another path variable. Maybe reboot Windows or start the service in the environment of a real user instead of system, where it might miss your modified "path".

Stefan

Daniel Sajdyk wrote:

Hello.

I finally try add ImageMagick to ELOG.

I downloaded latest version (ImageMagick-7.0.3-Q16) and installed it. Everything looks ok, but when I start Elog service it says that "ImageMagick not detected". 

When I look at the "path" variable i have "C:\Program Files\ImageMagick-7.0.3-Q16;C:\ProgramData\Oracle\Java\javapath;[...]".

What else can I check?

 

Regards

Daniel.

 

Ps. My system is Windows 7 Pro. 

 

 

 

 

                icon2.gif   Re: Elog not see image magick, posted by Stefan Ritt on Wed Apr 5 13:16:34 2017 

Must be your PATH environment variable. You have usually different paths when running interactively or as a service. Try to change the path seen by services, or put the ImageMagick executable in the same directory as elogd.

Stefan

christian wrote:

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

                   icon2.gif   Re: Elog not see image magick, posted by christian on Fri Apr 7 09:58:33 2017 

This I do not fully understand: To my understanding the PATH environment variable (includes the ImageMagick path) is a system variable and should be accessable from any account and should be valid under any conditions. Am I wrong? Additionally, I tried adding the system Path variable to the user specific variables for that user that runs the service (Path = %Path%) in the system settings. Finally, I tried copying the imdisplay.exe (ImageMagick executable) and convert.exe (used for the software detection) from the ImageMagick installation directory to the same directory as elogd. Neither of these approaches was successfull.

Christian

Stefan Ritt wrote:

Must be your PATH environment variable. You have usually different paths when running interactively or as a service. Try to change the path seen by services, or put the ImageMagick executable in the same directory as elogd.

Stefan

christian wrote:

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

 

                      icon2.gif   Re: Elog not see image magick, posted by Stefan Ritt on Fri Apr 7 10:22:03 2017 

I don't undersand myself fully how services see the environment. Like if they see the PATH at all. In some occations it helped to run the service not under the SYSTEM account, but under the (admin) account of a real user.

Stefan

christian wrote:

This I do not fully understand: To my understanding the PATH environment variable (includes the ImageMagick path) is a system variable and should be accessable from any account and should be valid under any conditions. Am I wrong? Additionally, I tried adding the system Path variable to the user specific variables for that user that runs the service (Path = %Path%) in the system settings. Finally, I tried copying the imdisplay.exe (ImageMagick executable) and convert.exe (used for the software detection) from the ImageMagick installation directory to the same directory as elogd. Neither of these approaches was successfull.

Christian

Stefan Ritt wrote:

Must be your PATH environment variable. You have usually different paths when running interactively or as a service. Try to change the path seen by services, or put the ImageMagick executable in the same directory as elogd.

Stefan

christian wrote:

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

 

 

                         icon2.gif   Re: Elog not see image magick, posted by Stefan Ritt on Fri Apr 7 10:24:31 2017 

Ah sorry. I recall now: Under Windows, calling subprocesses from a service does not work at all. After a couple of days of work I was not able to get this running. If somebody has some idea, I'm happy to try it. So most people use the elogd daemon in the background only under Linux.

Stefan

Stefan Ritt wrote:

I don't undersand myself fully how services see the environment. Like if they see the PATH at all. In some occations it helped to run the service not under the SYSTEM account, but under the (admin) account of a real user.

Stefan

christian wrote:

This I do not fully understand: To my understanding the PATH environment variable (includes the ImageMagick path) is a system variable and should be accessable from any account and should be valid under any conditions. Am I wrong? Additionally, I tried adding the system Path variable to the user specific variables for that user that runs the service (Path = %Path%) in the system settings. Finally, I tried copying the imdisplay.exe (ImageMagick executable) and convert.exe (used for the software detection) from the ImageMagick installation directory to the same directory as elogd. Neither of these approaches was successfull.

Christian

Stefan Ritt wrote:

Must be your PATH environment variable. You have usually different paths when running interactively or as a service. Try to change the path seen by services, or put the ImageMagick executable in the same directory as elogd.

Stefan

christian wrote:

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

 

 

 

                            icon2.gif   Re: Elog not see image magick, posted by christian on Fri Apr 7 11:46:09 2017 

Ok, this explains why it doesn't work.

Thank you for the support anyway. ELOG is a great piece of software.

Christian

Stefan Ritt wrote:

Ah sorry. I recall now: Under Windows, calling subprocesses from a service does not work at all. After a couple of days of work I was not able to get this running. If somebody has some idea, I'm happy to try it. So most people use the elogd daemon in the background only under Linux.

Stefan

Stefan Ritt wrote:

I don't undersand myself fully how services see the environment. Like if they see the PATH at all. In some occations it helped to run the service not under the SYSTEM account, but under the (admin) account of a real user.

Stefan

christian wrote:

This I do not fully understand: To my understanding the PATH environment variable (includes the ImageMagick path) is a system variable and should be accessable from any account and should be valid under any conditions. Am I wrong? Additionally, I tried adding the system Path variable to the user specific variables for that user that runs the service (Path = %Path%) in the system settings. Finally, I tried copying the imdisplay.exe (ImageMagick executable) and convert.exe (used for the software detection) from the ImageMagick installation directory to the same directory as elogd. Neither of these approaches was successfull.

Christian

Stefan Ritt wrote:

Must be your PATH environment variable. You have usually different paths when running interactively or as a service. Try to change the path seen by services, or put the ImageMagick executable in the same directory as elogd.

Stefan

christian wrote:

Update:

While the image scaling via ImageMagick works when running elog manually it doesn't when running elog as a service. The service is hosted in the same user environment that allows image scaling with elog started manually. What else could go wrong?

Christian

 

 

 

 

icon5.gif   pre defined Find as Home page, posted by Paraic Fahey on Fri Mar 24 15:36:55 2017 

This command makes the Homepage a FIND page: Start page = ?cmd=Find

My question is: can we pre-populate some of the search fields and execute the search so that the homepage becomes the SEARCH RESULTS

    icon2.gif   Re: pre defined Find as Home page, posted by Andreas Luedeke on Thu Apr 6 11:01:30 2017 

It's very simple, no need for the find command. E.g.: Start page = ?Author=luedeke&Category=Question&mode=summary

in this forum would do https://midas.psi.ch/elogs/Forum/?Author=luedeke&Category=Question&mode=summary

Paraic Fahey wrote:

This command makes the Homepage a FIND page: Start page = ?cmd=Find

My question is: can we pre-populate some of the search fields and execute the search so that the homepage becomes the SEARCH RESULTS

 

icon5.gif   Elog stopped working, posted by John Becker on Wed Mar 29 14:48:40 2017 

Dear all,

 

I have elog version 3.12-bd75964 installed on an Ubuntu OS. We started working with it yesterday and today I was informed that the users could not connect to the elog. When I tried it was also not possible to get to the elog website. After restarting the Ubuntu machine everything was back to normal.

Is there a log I can check to find out why the elog stopped working?

 

Regards,

 

John

    icon2.gif   Re: Elog stopped working, posted by David Pilgram on Wed Mar 29 15:11:22 2017 

I don't know if you can get elog to generate a log file - check the documentation, I don't bother.  But I do have some experience with this matter.

There are two related circumstances I know of that can arise which will cause elog to crash.

As you are probably aware, the entries are threaded.  I find the main problem is if you move a long thread - I forget the number but over 30 entries - from one log book to another, it will copy across fine, but the deletion of the thread from the source logbook will crash elog *before* the entire thread has been deleted: cause 1.

If you then restart elog, and happen to access the partially deleted thread, elog will run into a loop.  You won't be able to access elog, and you will see it is burning up CPU time, and it probably will eventually crash, but normally I find what the process number is and kill it (with "kill -9 [process no]").  This is cause 2.  The reason is that elog is looking for an entry number in the thread that no longer exists (because elog has already deleted it).

There is a moderately convoluted way I have devised to completely delete the partially deleted thread, needing access to the yymmdda.log files.  Cause 2 can also occur if someone manually edits yymmdda.log files with insufficient care (that includes me on occasion).  

John Becker wrote:

Dear all,

 

I have elog version 3.12-bd75964 installed on an Ubuntu OS. We started working with it yesterday and today I was informed that the users could not connect to the elog. When I tried it was also not possible to get to the elog website. After restarting the Ubuntu machine everything was back to normal.

Is there a log I can check to find out why the elog stopped working?

 

Regards,

 

John

 

    icon2.gif   Re: Elog stopped working, posted by Andreas Luedeke on Thu Mar 30 09:14:13 2017 

I have a crontab set-up for root:

crontab -e

* * * * *       if ! ps -C elogd >/dev/null;then /sbin/service elogd restart;fi


The script just checks if elogd is still running and if not, it'll restart it. We run Centos, but I'm sure it'll be easy to adapt for Ubuntu (I don't know much about Debian).

This will only help if elogd really crashed; in case it is still running at 100% cpu load this won't help.

In our case (~30 logbooks, > 100 entries per day, ~ hundred users) elogd is crashing about once a week. With the help of this script it means 1 minute downtime a week: that's acceptable.

See https://midas.psi.ch/elog/config.html on how to use a logfile with elogd. Here's the relevant excerpt:

  • Logfile = <file>
    This option specifies a filename which logs all login/logout activities and successful user connections for logbooks with user level access. The the logging level (see below) is larger than 1, also read and write accesses can be logged.
  • Logging level = 1 | 2 | 3
    Specifies the logging level. The higher this value, the more information is logged. Default is 2:
    • 1: Log only logins and logouts
    • 2: Log also write accesses
    • 3: Log also read accesses
John Becker wrote:

Dear all,

 

I have elog version 3.12-bd75964 installed on an Ubuntu OS. We started working with it yesterday and today I was informed that the users could not connect to the elog. When I tried it was also not possible to get to the elog website. After restarting the Ubuntu machine everything was back to normal.

Is there a log I can check to find out why the elog stopped working?

 

Regards,

 

John

 

icon5.gif   Issue with zero-length mail attachments, posted by Andrew Daviel on Sat Mar 18 02:10:33 2017 

We have elog-2.7.5-1.i386 on SL 5

If I create an elog entry using the web interface, and include an inline image,  email is sent with a zero-length named attachment - the MIME header is present, but no content.

In the config file, Email Format = 47, though I also tried with format = 63.

Is this a bug that was fixed in a later version, or a configuration error (or a new bug) ?

    icon2.gif   Re: Issue with zero-length mail attachments, posted by Andrew Daviel on Mon Mar 20 22:44:27 2017 

 

Andrew Daviel wrote:

We have elog-2.7.5-1.i386 on SL 5

If I create an elog entry using the web interface, and include an inline image,  email is sent with a zero-length named attachment - the MIME header is present, but no content.

In the config file, Email Format = 47, though I also tried with format = 63.

Is this a bug that was fixed in a later version, or a configuration error (or a new bug) ?

Probably us not having ImageMagick installed. elog was able to attach pdf's, xpm's and xbm's to email, but not jpeg's or png's, though they inlined OK in HTML on the server.

It seems OK, I think, after installing ImageMagick and restarting.

icon7.gif   Possible misuse of email headers Message-Id and In-Reply-To, posted by fbretel on Wed Feb 8 16:38:15 2017 

Hi,

As mentionned before, we happen to fail to receive email messages related to updates on elog entries at our site. My understanding is that the SMTP header Message-Id MUST be unique for each email message. Whereas all elogd email messages get something like <logbook>-<entryId>@<domain>. See source code. For this header to become unique, there should be a random part in it.

Having the same Message-Id in multiple email messages results in only the first one being delivered on some email systems.

Moreover, elogd sets the In-Reply-To: header in the same manner (<logbook>-<entryId>@<domain>). Which is incorrect because this header relates to email messages, not elog entries, and should contain the email Message-Id of the email message to which it replies, itself handled by the email messaing system. But elogd hasn't received any email messsage in the first place. So I believe this header should simply be dropped.

I think I can provide a pull request on bitbucket for the Message-Id issue, and probably also for the In-Reply-To: if you decide it can be removed.

Cheers

    icon2.gif   Re: Possible misuse of email headers Message-Id and In-Reply-To, posted by Stefan Ritt on Wed Feb 8 18:16:30 2017 

A pull request would be highy appreciated, because you can then test it thoroughly on your side. Adding a random number to the message id is simple. "Reply-to" indeed does not make sense since elog cannot receive emails. Most sites use a generic "noreply@<domain>" to indicate to the user that a reply does not make sense. I guess the "Reply-to" does not have to be unique, right?

fbretel wrote:

Hi,

As mentionned before, we happen to fail to receive email messages related to updates on elog entries at our site. My understanding is that the SMTP header Message-Id MUST be unique for each email message. Whereas all elogd email messages get something like <logbook>-<entryId>@<domain>. See source code. For this header to become unique, there should be a random part in it.

Having the same Message-Id in multiple email messages results in only the first one being delivered on some email systems.

Moreover, elogd sets the In-Reply-To: header in the same manner (<logbook>-<entryId>@<domain>). Which is incorrect because this header relates to email messages, not elog entries, and should contain the email Message-Id of the email message to which it replies, itself handled by the email messaing system. But elogd hasn't received any email messsage in the first place. So I believe this header should simply be dropped.

I think I can provide a pull request on bitbucket for the Message-Id issue, and probably also for the In-Reply-To: if you decide it can be removed.

Cheers

 

       icon2.gif   Re: Possible misuse of email headers Message-Id and In-Reply-To, posted by fbretel on Wed Mar 15 16:04:13 2017 

Pull-request posted. Cheers.

          icon2.gif   Re: Possible misuse of email headers Message-Id and In-Reply-To, posted by Stefan Ritt on Wed Mar 15 16:42:35 2017 

Pull-request merged.

fbretel wrote:

Pull-request posted. Cheers.

 

icon5.gif   Is it possible change content of the notifying mail content (attachements...) ?, posted by Christine Quicot on Tue Feb 7 18:45:08 2017 

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

    icon2.gif   Re: Is it possible change content of the notifying mail content (attachements...) ?, posted by Stefan Ritt on Tue Feb 7 18:54:00 2017 

Please look in the manual under "Email Format" and "Use Email Subject".

Christine Quicot wrote:

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

 

       icon2.gif   Re: Is it possible change content of the notifying mail content (attachements...) ?, posted by Christine Quicot on Wed Feb 8 09:34:39 2017 

Hello,

I'm sorry but that's a part of the manual I've read many times, and I'm not interested in changing the subject of the email, but only body and attachements.

I guess that if I didn't find these answers in the manual, it's because the answer for both questions is no ?

 

Thank you

Stefan Ritt wrote:

Please look in the manual under "Email Format" and "Use Email Subject".

Christine Quicot wrote:

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

 

 

          icon2.gif   Re: Is it possible change content of the notifying mail content (attachements...) ?, posted by Stefan Ritt on Wed Feb 8 13:09:58 2017 

I'm sorry but you are only half right. The mail contenct cannot be changed. But if your email notifications are sent as HTML, they contain a 1:1 copy of the elog entry, which does not make sense to change. For the attachment to be attached to the email, you need the flags of "Email Format". The default there is 63, which means that elog attachments ARE sent as mail attachments.

Christine Quicot wrote:

Hello,

I'm sorry but that's a part of the manual I've read many times, and I'm not interested in changing the subject of the email, but only body and attachements.

I guess that if I didn't find these answers in the manual, it's because the answer for both questions is no ?

 

Thank you

Stefan Ritt wrote:

Please look in the manual under "Email Format" and "Use Email Subject".

Christine Quicot wrote:

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

 

 

 

icon6.gif   calculate diff of 2 date(s), posted by Alex Kühnel on Wed Sep 28 18:48:04 2016 

hi

I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?

 

Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem 
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}

......

Type Einsatzbeginn = datetime
Type Einsatzende = datetime

....

Subst Einsatzzeit  = $shell(Einsatzende - Einsatzbeginn) 

 

regards

/alex

    icon2.gif   Re: calculate diff of 2 date(s), posted by Alex Kühnel on Fri Sep 30 11:21:44 2016 

I found the solution in the forum :-)

subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\" \"$Einsatzende\")

and diff.sh is

#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
 

 

 

Alex Kühnel wrote:

hi

I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?

 

Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem 
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}

......

Type Einsatzbeginn = datetime
Type Einsatzende = datetime

....

Subst Einsatzzeit  = $shell(Einsatzende - Einsatzbeginn) 

 

regards

/alex

 

       icon2.gif   Re: calculate diff of 2 date(s), posted by Alex Kühnel on Fri Sep 30 11:25:08 2016 

is ist possible that subst only works for the initial create of a logbook entry? when I change/edit one of the parameter "Einsatzbegin" or "Einsatzende" the "Einsatzzeit" is not changed.

regards

/alex

Alex Kühnel wrote:

I found the solution in the forum :-)

subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\" \"$Einsatzende\")

and diff.sh is

#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
 

 

 

Alex Kühnel wrote:

hi

I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?

 

Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem 
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}

......

Type Einsatzbeginn = datetime
Type Einsatzende = datetime

....

Subst Einsatzzeit  = $shell(Einsatzende - Einsatzbeginn) 

 

regards

/alex

 

 

          icon2.gif   Re: calculate diff of 2 date(s), posted by Stefan Ritt on Fri Sep 30 12:33:38 2016 

There is the "subst on edit = ..." option you should use in addition.

Stefan

Alex Kühnel wrote:

is ist possible that subst only works for the initial create of a logbook entry? when I change/edit one of the parameter "Einsatzbegin" or "Einsatzende" the "Einsatzzeit" is not changed.

regards

/alex

Alex Kühnel wrote:

I found the solution in the forum :-)

subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\" \"$Einsatzende\")

and diff.sh is

#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
 

 

 

Alex Kühnel wrote:

hi

I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?

 

Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem 
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}

......

Type Einsatzbeginn = datetime
Type Einsatzende = datetime

....

Subst Einsatzzeit  = $shell(Einsatzende - Einsatzbeginn) 

 

regards

/alex

 

 

 

             icon2.gif   Re: calculate diff of 2 date(s), posted by Alex Kühnel on Mon Oct 3 10:01:53 2016 

thx!

Stefan Ritt wrote:

There is the "subst on edit = ..." option you should use in addition.

Stefan

Alex Kühnel wrote:

is ist possible that subst only works for the initial create of a logbook entry? when I change/edit one of the parameter "Einsatzbegin" or "Einsatzende" the "Einsatzzeit" is not changed.

regards

/alex

Alex Kühnel wrote:

I found the solution in the forum :-)

subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\" \"$Einsatzende\")

and diff.sh is

#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
 

 

 

Alex Kühnel wrote:

hi

I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?

 

Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem 
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}

......

Type Einsatzbeginn = datetime
Type Einsatzende = datetime

....

Subst Einsatzzeit  = $shell(Einsatzende - Einsatzbeginn) 

 

regards

/alex

 

 

 

 

icon5.gif   How can change the justification of a column?, posted by fabio vitale on Mon Jan 30 17:52:20 2017 

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

    icon2.gif   Re: How can change the justification of a column?, posted by Stefan Ritt on Mon Jan 30 17:58:11 2017 

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

       icon2.gif   Re: How can change the justification of a column?, posted by fabio vitale on Mon Jan 30 18:30:30 2017 

I need to set text-align:left but only for an attribute in the List mode, For example, say that FirstName column must be left justified in list view. What is the name of the cell content in the default elog.css?

Stefan Ritt wrote:

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

 

          icon2.gif   Re: How can change the justification of a column?, posted by Andreas Luedeke on Tue Jan 31 08:42:54 2017 

You might tell your browser to show you the source code of an ELOG page in list mode. There you'll find the class name you're looking for.

Cheers, Andreas

fabio vitale wrote:

I need to set text-align:left but only for an attribute in the List mode, For example, say that FirstName column must be left justified in list view. What is the name of the cell content in the default elog.css?

Stefan Ritt wrote:

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

 

 

          icon2.gif   Re: How can change the justification of a column?, posted by Stefan Ritt on Tue Jan 31 09:20:07 2017 

The CSS class for the list display table "listframe". If you want the second column to be left-aligned, you put following into elog.css:

.listframe td:nth-child(2) {
   text-align:left;
}

that should do the trick. Replace the "2" with the column you would like to change.

Stefan

 

fabio vitale wrote:

I need to set text-align:left but only for an attribute in the List mode, For example, say that FirstName column must be left justified in list view. What is the name of the cell content in the default elog.css?

Stefan Ritt wrote:

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

 

 

             icon2.gif   Re: How can change the justification of a column?, posted by fabio vitale on Tue Jan 31 18:10:29 2017 

Thank you Stefan: it worked!

Now I am wondering if there is some syntax to force this behaviour at the attribute level in elog.cfg, without the need to modify the css, I mean simply based on the attribute name (not its content). The syntax Style <attribute> <value> = <style> can modify the style but it applies to the whole line in the list, so all the cells in that line are affected. Also it apply *only if* the content of the cell equals <value>.

In other words, an overridden version for Style: Style <attribute> = <style> that will be applied *regardless* of the cell content _AND_ only to the cell specified in <attribute>

What do you think?

 

 

Stefan Ritt wrote:

The CSS class for the list display table "listframe". If you want the second column to be left-aligned, you put following into elog.css:

.listframe td:nth-child(2) {
   text-align:left;
}

that should do the trick. Replace the "2" with the column you would like to change.

Stefan

 

fabio vitale wrote:

I need to set text-align:left but only for an attribute in the List mode, For example, say that FirstName column must be left justified in list view. What is the name of the cell content in the default elog.css?

Stefan Ritt wrote:

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

 

 

 

                icon2.gif   Re: How can change the justification of a column?, posted by Stefan Ritt on Tue Jan 31 21:38:44 2017 

This is currently not possible.

/Stefan

fabio vitale wrote:

Thank you Stefan: it worked!

Now I am wondering if there is some syntax to force this behaviour at the attribute level in elog.cfg, without the need to modify the css, I mean simply based on the attribute name (not its content). The syntax Style <attribute> <value> = <style> can modify the style but it applies to the whole line in the list, so all the cells in that line are affected. Also it apply *only if* the content of the cell equals <value>.

In other words, an overridden version for Style: Style <attribute> = <style> that will be applied *regardless* of the cell content _AND_ only to the cell specified in <attribute>

What do you think?

 

 

Stefan Ritt wrote:

The CSS class for the list display table "listframe". If you want the second column to be left-aligned, you put following into elog.css:

.listframe td:nth-child(2) {
   text-align:left;
}

that should do the trick. Replace the "2" with the column you would like to change.

Stefan

 

fabio vitale wrote:

I need to set text-align:left but only for an attribute in the List mode, For example, say that FirstName column must be left justified in list view. What is the name of the cell content in the default elog.css?

Stefan Ritt wrote:

You can do that chaning the CSS of the underlying theme. But you need some experience with CSS.

fabio vitale wrote:

It is possible to change the justification for a column/attribute in the list mode (left-aligned, centered, right-aligned)?

Right now Elog treats each colum of a list as centered,

 

thank you

 

 

 

 

 

ELOG V3.1.5-3fb85fa6