Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 196 of 796  Not logged in ELOG logo
ID Datedown Icon Author Author Email Category OS ELOG Version Subject
  68170   Wed Oct 28 11:11:27 2015 Reply kenzo Abrahamskenzoabrahams@gmail.comQuestionLinux3.1.1Re: running more then one shell command when new entries is submitted

Hi Andreas

This worked perfectly thank you.

Andreas Luedeke wrote:
As far as I know ELOG is recognising a configuration line as a comment only when it starts with a ';'.
I can assure you that ELOG does not treat the rest of the line as a comment when you use a ';' within a $shell() command: I do it a lot and it works fine. Here's a simple, generic example using the bash:

Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo \"$long_name, $Author\";fi)
It adds $long_name to the Author field for non-anonymous entries.

Cheers Andreas

kenzo Abrahams wrote:

If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.

Stefan Ritt wrote:

The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h

kenzo Abrahams wrote:

Hi

Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.

I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.

Regards

Kenzo

 

 

 

 

  68169   Wed Oct 28 09:15:52 2015 Reply Danidroldan@cells.esQuestionLinux3.1.1Re: dynamic "preset text" option without remplace text if it has changed

thanks Andres for your response!

I was thinking that it cannot be possible, but , I had to try to ask in the forum.

for my question, I think that this could be left on user responsibility to take care about it, and add a comment the the text fied, explaining that will be erased the html text on change the text field.

Thanks four your time.

 

Andreas Luedeke wrote:

I don't think that this is possible.

And it is not clear to me, how you would like it to work: I often use HTML tables in preset text, where the user should fill out columns (e.g. for checklists). I wouldn't want the tables just to append when switching to another checklist. You could rather add a comment to the Type field, explaining that the text field will be overwritten when you change the type.

The Firefox addon Lazarus does store whatever you've typed in an HTML form: at least you could then recover what you've typed.

Cheers, Andreas

Dani wrote:

Dear all,

Is it possible to have a dynamic "preset text" option without remplace text if it has changed?

I would like to switch the template file depending on the attribute value (Type). 

If user already started editing the text body, on change (Type) he could lose this data. 

I'm using this example code :
Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1


I the attribute type change the user lost the data, because the text has been replaced.

Any idea about how to solve it?

Thanks!
Cheers

 

 

  68168   Wed Oct 28 08:51:17 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.1.1Re: dynamic "preset text" option without remplace text if it has changed

I don't think that this is possible.

And it is not clear to me, how you would like it to work: I often use HTML tables in preset text, where the user should fill out columns (e.g. for checklists). I wouldn't want the tables just to append when switching to another checklist. You could rather add a comment to the Type field, explaining that the text field will be overwritten when you change the type.

The Firefox addon Lazarus does store whatever you've typed in an HTML form: at least you could then recover what you've typed.

Cheers, Andreas

Dani wrote:

Dear all,

Is it possible to have a dynamic "preset text" option without remplace text if it has changed?

I would like to switch the template file depending on the attribute value (Type). 

If user already started editing the text body, on change (Type) he could lose this data. 

I'm using this example code :
Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1


I the attribute type change the user lost the data, because the text has been replaced.

Any idea about how to solve it?

Thanks!
Cheers

 

  68167   Tue Oct 27 15:41:57 2015 Question Danidroldan@cells.esQuestionLinux3.1.1 dynamic "preset text" option without remplace text if it has changed

Dear all,

Is it possible to have a dynamic "preset text" option without remplace text if it has changed?

I would like to switch the template file depending on the attribute value (Type). 

If user already started editing the text body, on change (Type) he could lose this data. 

I'm using this example code :
Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1


I the attribute type change the user lost the data, because the text has been replaced.

Any idea about how to solve it?

Thanks!
Cheers

  68166   Tue Oct 27 14:58:20 2015 Reply Julian Browerjulian.brower@stfc.ac.ukQuestionWindowslatestRe: Please advise on how to set up selective email notification on logbooks

Thanks Andreas, I will read that section. Julian

Andreas Luedeke wrote:
Hi Julian,
there is a whole chapter in the documentation about that: https://midas.psi.ch/elog/config.html#email
If I have to send email, e.g. for Controls issues entered in the operation logbook, I do send the email to a specific mailman mailing list for that group.
It is cumbersome to manage email groups in the logbook configuration - in particular if the same lists exists in different logbooks. I only refer to the mailing list then in ELOG, and the groups can manage their lists themself.
I do maintain about 30 logbooks and there are about 10 groups at my institutes that desire email notifications for ELOG entries related to the systems they manage.
Cheers
Andreas
Julian Brower wrote:

Please advise on how to set up selective email notification on logbooks; We want to send an email to specific people when an event that involves them is entered? 

At the moment, we currently get an email entry for every new logbook entry. Thanks

 

 

 

  68165   Tue Oct 27 12:20:16 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.1.1Re: running more then one shell command when new entries is submitted
As far as I know ELOG is recognising a configuration line as a comment only when it starts with a ';'.
I can assure you that ELOG does not treat the rest of the line as a comment when you use a ';' within a $shell() command: I do it a lot and it works fine. Here's a simple, generic example using the bash:

Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo \"$long_name, $Author\";fi)
It adds $long_name to the Author field for non-anonymous entries.

Cheers Andreas

kenzo Abrahams wrote:

If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.

Stefan Ritt wrote:

The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h

kenzo Abrahams wrote:

Hi

Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.

I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.

Regards

Kenzo

 

 

 

  68164   Tue Oct 27 11:23:43 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindowslatestRe: Please advise on how to set up selective email notification on logbooks
Hi Julian,
there is a whole chapter in the documentation about that: https://midas.psi.ch/elog/config.html#email
If I have to send email, e.g. for Controls issues entered in the operation logbook, I do send the email to a specific mailman mailing list for that group.
It is cumbersome to manage email groups in the logbook configuration - in particular if the same lists exists in different logbooks. I only refer to the mailing list then in ELOG, and the groups can manage their lists themself.
I do maintain about 30 logbooks and there are about 10 groups at my institutes that desire email notifications for ELOG entries related to the systems they manage.
Cheers
Andreas
Julian Brower wrote:

Please advise on how to set up selective email notification on logbooks; We want to send an email to specific people when an event that involves them is entered? 

At the moment, we currently get an email entry for every new logbook entry. Thanks

 

 

  68163   Tue Oct 27 11:23:36 2015 Reply kenzo Abrahamskenzoabrahams@gmail.comQuestionLinux3.1.1Re: running more then one shell command when new entries is submitted

If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into it. When I use Execute with one command and pipe its output to a file everything works fine though.

Stefan Ritt wrote:

The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which you can try yourself by entering for example: ls *.c; ls*.h

kenzo Abrahams wrote:

Hi

Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple commands.

I tried using '&&' to seperate more then one command but it seems that the first one only gets executed and the rest are just ignored.

Regards

Kenzo

 

 

ELOG V3.1.5-2eba886