Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 223 of 797  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  1906   Sat Aug 19 18:45:22 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows Re: Conditional E-Mail Attributes

Grant Jeffcote wrote:

Stefan Ritt wrote:
If I try that little configuration file:
[global]
port = 8080
password file = passwd
smtp host = your.smpt.host

[demo]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject, Email Type
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Options Email Type = plain{1}, html{2}

{1}Email encoding = 1
{2}Email encoding = 2

then the email encoding changes from plain to HTML depending on the conditional attribute Email Type. Maybe you misunderstood the concept of conditional attributes. In the above config the attribute Email Type determines the condition {1} or {2}, which leads then to different values of the email encoding. But it's important to have the line
Options Email Type = plain{1}, html{2}

in order to set a condition.


I use conditional attributes to select the fields I would like displayed on a form or page.
I understand how they work but wish to set the Email Encoding automatically depending on which item they choose from a drop down list (ie. which form they are using)

For example, if they choose 'Fred Bloggs' from the conditional drop down attribute 'Name' it will set the page so that only 'Fred Bloggs' required attributes are viewable. I wish to send this page in Plain text when submitted.

If 'Fred Jones' is chosen then only attributes applicable to 'Fred Jones' are shown. When he submits his entry then I need the email to be sent in HTML.

The email encoding option would have to be set under either Fred Bloggs{1} or Fred Jones{2} conditions.

Attributes = Name,

Options Name = Fred Bloggs{1}, Fred Jones{2}

{1}Email encoding = 1
{1}Email All = sed@frd.fg
{2}Email encoding = 2
{2}Email All = sdf@fgd.hg

I can get options like 'Email All = sed@frd.fg' to change to another email address when used as above but not Email formatting.

I have all the other conditional attributes working fine otherwise but would really like to be able to add this option.

Thanks for your help.


Can you please try the above configuration example, and can you please tell me exactly which version of elog you are using? If I try that example with ELOG V2.6.2-1714, it works fine (it DOES change the email encoding).
  1931   Mon Sep 11 16:32:52 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.6.2-1714Re: Auto-refresh ELog display

Alan Stone wrote:
We have multiple LCDs at a console, and usually one is dedicated to displaying a browser
with the local ELog. Meanwhile, others are making entries from another machine. If
no one clicks on refresh, the ELog display becomes stale. Is there a method to have
the ELog reload every X minutes?

Thanks, Alan


The JavaScript is one possibility as Steve mentioned correctly. Another possibility is to use the RSS feed capability of ELOG. Use any RSS reader, and it will notify you immediately if there is a new entry in ELOG. Have a look at http://midas.psi.ch/elog/config.html and search for RSS on how to configure this.
  1932   Mon Sep 11 17:25:54 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.6Re: Unsubscribe from logbooks

Chris Warner wrote:
Is there a way for user to unsubscribe from a logbook? Can a user delete their own account?


Yes. Yes.

Just click on "Config", and you will see a page where you can unsubscribe from each logbook and a button to remove your account.
  1934   Mon Sep 18 15:21:56 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionAll2.6.2-1714Re: Why are Preset fields blanked out?

Steve Jones wrote:
The snippet of code below sets an attribute to a date depending on the selection. Problem is, if attribute ApprovedDate was previously set, selecting any other value for CRStatus will blank out ApprovedDate (the same occurs for CompletedDate). Why would this be occurring when the conditionals are mutually exclusive?
##################################################
# Define CRState
#
Options CRState = PENDING{a}, APPROVED{b}, HOLD{a}, REJECTED{a}, COMPLETED{c}
{a}
{b} Preset ApprovedDate = $date
{c} Preset CompletedDate = $date


I don't understand your problem. If I use following config file:
[demo]
Theme = default
Attributes = Author, CRState, ApprovedDate, CompletedDate

Options CRState = PENDING{a}, APPROVED{b}, HOLD{a}, REJECTED{a}, COMPLETED{c}
{a}
{b} Preset ApprovedDate = $date
{c} Preset CompletedDate = $date

and make an entry, then edit it, selecting approved, then submit, then edit again, then select completed, then I get following:



which looks ok to me (the previous ApprovedDate does not get blanked out). Can you reproduce that behaviour?
  1941   Tue Sep 19 17:32:28 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionAll2.6.2-1714Re: Re: Why are Preset fields blanked out?

Steve Jones wrote:

I think I found it. Try this:
Locked Attributes = ApprovedDate, CompletedDate
##################################################
# Define CRState
#
Options CRState = PENDING{a}, APPROVED{b}, HOLD{a}, REJECTED{a}, COMPLETED{c}
{a}
{b} Preset ApprovedDate = $date
{c} Preset CompletedDate = $date

In my config when I remove the two attributes from "LOCKED ATTRIBUTES" the fields do not get blanked out.


No, even with that it does not get blanked out. Attached is the complete elogd.cfg with which it works fine in my case (R1714). Can you try that?
  1943   Tue Sep 19 20:28:15 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionAll2.6.2-1714Re: Re: Why are Preset fields blanked out?

Steve Jones wrote:

Setting the "Type" to "date" causes the blanking to occur.


Ok, then don't set the "Type" to "date" Wink
  1946   Fri Sep 22 07:42:57 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportOther2.6.2-1714Re: Shell execution generating error

Steve Jones wrote:
When started as root *but not running as a daemon* shell execution results in the following errors that are sent to Standard Error:
Cannot restore original GID/UID.
Cannot remove pidfile "/var/run/cr-elogd.pid"
; Permission denied
Cannot restore original GID/UID.
Cannot remove pidfile "/var/run/cr-elogd.pid"
; Permission denied


The "/var/run/elogd.pid" file is created from elogd to indicate under which PID it is running. If you run elogd once under root, this file then belongs to root. If you afterwards run it under a user account, it cannot delete or change the file belonging to root. In that case, just delete that file manually.
  1947   Fri Sep 22 07:47:58 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportOther2.6.2-1714Re: SVN1714 will not run in 'daemon" mode on Solaris8

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.
ELOG V3.1.5-2eba886