Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 783 of 806  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  68436   Fri Sep 30 11:25:08 2016 Reply Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Re: calculate diff of 2 date(s)

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

 

 

  68439   Mon Oct 3 10:01:53 2016 Reply Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Re: calculate diff of 2 date(s)

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

 

 

 

 

  68440   Mon Oct 3 10:02:36 2016 Idea Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Is there a way to export logs

hello

Is there a way to export logs from elog (for example after I have selected a filter) to txt or csv...

I found the "Download" attribute but this works for only one elog entry...

regards

Attachment 1: elog_export.JPG
elog_export.JPG
  68441   Mon Oct 3 10:18:19 2016 Reply Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Re: Is there a way to export logs

shame on me, there is a way!

I can search with find and then export as csv file

/alex

Alex Kühnel wrote:

hello

Is there a way to export logs from elog (for example after I have selected a filter) to txt or csv...

I found the "Download" attribute but this works for only one elog entry...

regards

 

  68535   Sun Jan 8 19:26:29 2017 Agree Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Is it possible to add custom menu commands

hi forum,

my question, is it possible to add a custom menu entry (f.e. "Auswertung"). I will start a new php page and do some system code starting from the new page. I have attached a pic of my "Bereitschaftsdoku".

I have a filter for the week (KW1 2017). With this filer i display all my jobs for this week. At the end I have to count all minutes for class 583 (Tagesstunden) and class 586 (Sonn und Feiertage) and display the results.

 

regards

/alex

Attachment 1: bereitschaft.PNG
bereitschaft.PNG
  68538   Mon Jan 9 16:02:35 2017 Reply Alex Kühnelalexander.kuehnel@gmail.comQuestionLinux3.1.2Re: Is it possible to add custom menu commands

ok, tnx! I will do the export and calculation with Excel

regards

/alex

Stefan Ritt wrote:

No, calculations are not easily possible with elog. You can write some Javascript code to pull out all minutes, add them up and manipulate the DOM tree to show the results, but this requires some JavaScript knowlegde. Alternatively, export your table to a CSV file and do your calculations with a spreadhseet program.

/Stefan

Alex Kühnel wrote:

hi forum,

my question, is it possible to add a custom menu entry (f.e. "Auswertung"). I will start a new php page and do some system code starting from the new page. I have attached a pic of my "Bereitschaftsdoku".

I have a filter for the week (KW1 2017). With this filer i display all my jobs for this week. At the end I have to count all minutes for class 583 (Tagesstunden) and class 586 (Sonn und Feiertage) and display the results.

 

regards

/alex

 

 

  970   Thu Mar 3 16:46:26 2005 Question Alex Halex@synergie-inf.com   2 Extendable options when created new entries
Hello,

I try to have two Extendable options : Client and Equipment
so here is the line in my elogd.cfg
Extendable options = Client, Equipment

When I create a new entrie, I have the 2 scroll menus(Client and 
Equipment) and the 2 buttons(Client and Equipment) but i can't create 2 
news entries, i must create one for client, after I submit, I edit one 
more time and add a new equipement. Is there a solution for this?

Thanks a lot and sorry for mistakes or problem of comprehension i'am 
french :)
  971   Fri Mar 4 10:16:04 2005 Question Alex Halex@synergie-inf.comQuestionWindows2.5.7-1Non clickable column
Hi,

Is there any solution to obtain an non-clickable column ?
For example here : http://midas.psi.ch/elogs/Config+Examples/ what should 
I do to obtain the data of the Category column non clickable?
I don't have find a solution in the Syntax of elogd.cfg  
(http://midas.psi.ch/elog/config.html)

Thanks a lot
ELOG V3.1.5-3fb85fa6