Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 177 of 238  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
icon5.gif   TIMEZONE modifier?, posted by Steve Jones on Mon Apr 10 05:34:40 2006 
We host eLog for a number of global sites. Our logbooks use datetime attributes but the timezones are wrong attributes that are either preset (like when a logentry is created) or if we fill in an attribute from an action (like when a logentry is closed). Any possibility of adding a timezone designator to FORMAT or does one already exist?

Thanks!
icon4.gif   elogd 2.6.1 program Crash is repeatable under Windows, posted by Steve Jones on Tue Mar 14 17:51:52 2006 elogd-error-1.JPGelogd-error-2.JPGelogd.cfg.new
Stefan, I have previously reported that elog crashes with a specific URL -- I have now re-created the crash running under WindowsXP Pro using the pre-packaged Windows installation that I just downloaded. I am attaching screenshots, etc. for your information but I think the source of the problem stems from using "Top Group". I hope that you are able to look into this as I have logged other issues that i believe are specifically related to the use of the Top Group feature. I am also including the .cfg that I used on my Windows box which is the same .cfg that I use in our Solaris environment.
    icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Stefan Ritt on Wed Mar 15 09:28:42 2006 Capture.jpgCapture.jpg

Steve Jones wrote:
Stefan, I have previously reported that elog crashes with a specific URL -- I have now re-created the crash running under WindowsXP Pro using the pre-packaged Windows installation that I just downloaded. I am attaching screenshots, etc. for your information but I think the source of the problem stems from using "Top Group". I hope that you are able to look into this as I have logged other issues that i believe are specifically related to the use of the Top Group feature. I am also including the .cfg that I used on my Windows box which is the same .cfg that I use in our Solaris environment.


Steve,

again I could not reproduce your problem. See the attached screenshots. It just works fine with me (of course I miss the HTML files for the header and footer). I use however the most recent version of elog (Revision 1675). I also have a different password file. So try the following:

- look into your password file (it's a simple XML text file), it should contain something like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Wed Mar 15 09:22:02 2006 -->
<list>
  <user>
    <name>stefan</name>
    <password>zFDkjoZsg==</password>
    <full_name>Stefan Ritt</full_name>
    <email>stefan.ritt@psi.ch</email>
    <last_logout>Thu Feb 23 15:35:19 2006</last_logout>
    <last_activity>Wed Mar 15 09:22:02 2006</last_activity>
    <email_notify>
      <logbook>demo</logbook>
    </email_notify>
  </user>
</list>

- make sure that you have the most recent version of elogd. Try at least elog261-3.exe under Windows.

- are you sure you need top groups? Top groups are ment for groups of logbooks which are completele unrelated, like from different departments, with different admins etc. Historically top groups were implemented because some elog installations had several elogd servers running in parallel for different departments. In you case, I suspect that "normal" groups might be enough, like:
Group Engineering Compute Change Logs = TX11-CL, TX30-CL, TX32-CL, AZ34-CL, AZ50-CL, FL29-CL, IL108-CL, IL05-CL, Approvals-CL, Template-CL
Group Engineering Compute Incident Logs =  TX11-IL, TX30-IL, TX32-IL, AZ34-IL, AZ50-IL, FL29-IL, IL108-IL, IL05-IL, Template-IL
       icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Steve Jones on Wed Mar 15 21:42:25 2006 

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
Stefan, I have previously reported that elog crashes with a specific URL -- I have now re-created the crash running under WindowsXP Pro using the pre-packaged Windows installation that I just downloaded. I am attaching screenshots, etc. for your information but I think the source of the problem stems from using "Top Group". I hope that you are able to look into this as I have logged other issues that i believe are specifically related to the use of the Top Group feature. I am also including the .cfg that I used on my Windows box which is the same .cfg that I use in our Solaris environment.


Steve,

again I could not reproduce your problem. See the attached screenshots. It just works fine with me (of course I miss the HTML files for the header and footer). I use however the most recent version of elog (Revision 1675). I also have a different password file. So try the following:

- look into your password file (it's a simple XML text file), it should contain something like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Wed Mar 15 09:22:02 2006 -->
<list>
  <user>
    <name>stefan</name>
    <password>zFDkjoZsg==</password>
    <full_name>Stefan Ritt</full_name>
    <email>stefan.ritt@psi.ch</email>
    <last_logout>Thu Feb 23 15:35:19 2006</last_logout>
    <last_activity>Wed Mar 15 09:22:02 2006</last_activity>
    <email_notify>
      <logbook>demo</logbook>
    </email_notify>
  </user>
</list>

- make sure that you have the most recent version of elogd. Try at least elog261-3.exe under Windows.

- are you sure you need top groups? Top groups are ment for groups of logbooks which are completele unrelated, like from different departments, with different admins etc. Historically top groups were implemented because some elog installations had several elogd servers running in parallel for different departments. In you case, I suspect that "normal" groups might be enough, like:
Group Engineering Compute Change Logs = TX11-CL, TX30-CL, TX32-CL, AZ34-CL, AZ50-CL, FL29-CL, IL108-CL, IL05-CL, Approvals-CL, Template-CL
Group Engineering Compute Incident Logs =  TX11-IL, TX30-IL, TX32-IL, AZ34-IL, AZ50-IL, FL29-IL, IL108-IL, IL05-IL, Template-IL


Aacck! I thought sure that this would do it for you. Ok, to answer your last question first:
1> I am reasonably sure that I need top groups. The logbooks with the -CL extension have a common attribute structure. The logbooks with the -IL extension have a common attribute structure. Neither group is the same. Prior to using Top Group I was using a global config for the -CL's but manually maintaining consistent -IL configs was horrible. Top Group solved my problem: maintaining only two config "areas" as opposed to many is very efficient. Do you have another way of doing this other than running two instances of eLog?

2> My password file on Windows is
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Tue Mar 14 10:35:04 2006 -->
<list>
  <user>
    <name>r4aajl</name>
    <password>TDIwYXVyZW4=</password>
    <full_name>Steve Jones</full_name>
    <last_logout>0</last_logout>
    <last_activity>Tue Mar 14 10:35:04 2006</last_activity>
    <email>steve.jones@freescale.com</email>
    <email_notify>
      <logbook>TX30-CL</logbook>
      <logbook>TX11-CL</logbook>
      <logbook>TX32-CL</logbook>
      <logbook>AZ34-CL</logbook>
      <logbook>AZ50-CL</logbook>
      <logbook>Approvals-CL</logbook>
      <logbook>FL29-CL</logbook>
      <logbook>IL108-CL</logbook>
      <logbook>ZIL05-CL</logbook>
      <logbook>Template-CL</logbook>
    </email_notify>
  </user>
</list>

3> I see your screen shots. Try going in and creating a new logbook and tell me if it dies. In the meantime is the latest version available in compiled form for Windows? If so, I'll install it and try again. At this point I am looking at starting a new config file from scratch but unless you can suggest another way I think Top Group is my only option.
          icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Steve Jones on Wed Mar 15 23:46:54 2006 elog_1.JPGelogd.cfgelogd_2.JPG

Steve Jones wrote:

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
Stefan, I have previously reported that elog crashes with a specific URL -- I have now re-created the crash running under WindowsXP Pro using the pre-packaged Windows installation that I just downloaded. I am attaching screenshots, etc. for your information but I think the source of the problem stems from using "Top Group". I hope that you are able to look into this as I have logged other issues that i believe are specifically related to the use of the Top Group feature. I am also including the .cfg that I used on my Windows box which is the same .cfg that I use in our Solaris environment.


Steve,

again I could not reproduce your problem. See the attached screenshots. It just works fine with me (of course I miss the HTML files for the header and footer). I use however the most recent version of elog (Revision 1675). I also have a different password file. So try the following:

- look into your password file (it's a simple XML text file), it should contain something like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Wed Mar 15 09:22:02 2006 -->
<list>
  <user>
    <name>stefan</name>
    <password>zFDkjoZsg==</password>
    <full_name>Stefan Ritt</full_name>
    <email>stefan.ritt@psi.ch</email>
    <last_logout>Thu Feb 23 15:35:19 2006</last_logout>
    <last_activity>Wed Mar 15 09:22:02 2006</last_activity>
    <email_notify>
      <logbook>demo</logbook>
    </email_notify>
  </user>
</list>

- make sure that you have the most recent version of elogd. Try at least elog261-3.exe under Windows.

- are you sure you need top groups? Top groups are ment for groups of logbooks which are completele unrelated, like from different departments, with different admins etc. Historically top groups were implemented because some elog installations had several elogd servers running in parallel for different departments. In you case, I suspect that "normal" groups might be enough, like:
Group Engineering Compute Change Logs = TX11-CL, TX30-CL, TX32-CL, AZ34-CL, AZ50-CL, FL29-CL, IL108-CL, IL05-CL, Approvals-CL, Template-CL
Group Engineering Compute Incident Logs =  TX11-IL, TX30-IL, TX32-IL, AZ34-IL, AZ50-IL, FL29-IL, IL108-IL, IL05-IL, Template-IL


Aacck! I thought sure that this would do it for you. Ok, to answer your last question first:
1> I am reasonably sure that I need top groups. The logbooks with the -CL extension have a common attribute structure. The logbooks with the -IL extension have a common attribute structure. Neither group is the same. Prior to using Top Group I was using a global config for the -CL's but manually maintaining consistent -IL configs was horrible. Top Group solved my problem: maintaining only two config "areas" as opposed to many is very efficient. Do you have another way of doing this other than running two instances of eLog?

2> My password file on Windows is
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Tue Mar 14 10:35:04 2006 -->
<list>
  <user>
    <name>r4aajl</name>
    <password>TDIwYXVyZW4=</password>
    <full_name>Steve Jones</full_name>
    <last_logout>0</last_logout>
    <last_activity>Tue Mar 14 10:35:04 2006</last_activity>
    <email>steve.jones@freescale.com</email>
    <email_notify>
      <logbook>TX30-CL</logbook>
      <logbook>TX11-CL</logbook>
      <logbook>TX32-CL</logbook>
      <logbook>AZ34-CL</logbook>
      <logbook>AZ50-CL</logbook>
      <logbook>Approvals-CL</logbook>
      <logbook>FL29-CL</logbook>
      <logbook>IL108-CL</logbook>
      <logbook>ZIL05-CL</logbook>
      <logbook>Template-CL</logbook>
    </email_notify>
  </user>
</list>

3> I see your screen shots. Try going in and creating a new logbook and tell me if it dies. In the meantime is the latest version available in compiled form for Windows? If so, I'll install it and try again. At this point I am looking at starting a new config file from scratch but unless you can suggest another way I think Top Group is my only option.


Ok, I completed stripped any attributes and only defined top groups. eLog no longer crashes but returns a completely invalid page with invalid links when I attempt to create a new logbook - see screenshot below. This is good as it means something in the config was causing things to blowup. I have also attached my stripped out config.

Incidently, I added another screenshot - an invalid link when I *delete* a logbook gets returned "http://localhost:8080/Test4-CL/Engineering%20Compute%20Change%20Logs/". Definitely not a correct URL.

Quote:
             icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Steve Jones on Tue Mar 21 00:05:43 2006 

Steve Jones wrote:

Steve Jones wrote:

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
Stefan, I have previously reported that elog crashes with a specific URL -- I have now re-created the crash running under WindowsXP Pro using the pre-packaged Windows installation that I just downloaded. I am attaching screenshots, etc. for your information but I think the source of the problem stems from using "Top Group". I hope that you are able to look into this as I have logged other issues that i believe are specifically related to the use of the Top Group feature. I am also including the .cfg that I used on my Windows box which is the same .cfg that I use in our Solaris environment.


Steve,

again I could not reproduce your problem. See the attached screenshots. It just works fine with me (of course I miss the HTML files for the header and footer). I use however the most recent version of elog (Revision 1675). I also have a different password file. So try the following:

- look into your password file (it's a simple XML text file), it should contain something like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Wed Mar 15 09:22:02 2006 -->
<list>
  <user>
    <name>stefan</name>
    <password>zFDkjoZsg==</password>
    <full_name>Stefan Ritt</full_name>
    <email>stefan.ritt@psi.ch</email>
    <last_logout>Thu Feb 23 15:35:19 2006</last_logout>
    <last_activity>Wed Mar 15 09:22:02 2006</last_activity>
    <email_notify>
      <logbook>demo</logbook>
    </email_notify>
  </user>
</list>

- make sure that you have the most recent version of elogd. Try at least elog261-3.exe under Windows.

- are you sure you need top groups? Top groups are ment for groups of logbooks which are completele unrelated, like from different departments, with different admins etc. Historically top groups were implemented because some elog installations had several elogd servers running in parallel for different departments. In you case, I suspect that "normal" groups might be enough, like:
Group Engineering Compute Change Logs = TX11-CL, TX30-CL, TX32-CL, AZ34-CL, AZ50-CL, FL29-CL, IL108-CL, IL05-CL, Approvals-CL, Template-CL
Group Engineering Compute Incident Logs =  TX11-IL, TX30-IL, TX32-IL, AZ34-IL, AZ50-IL, FL29-IL, IL108-IL, IL05-IL, Template-IL


Aacck! I thought sure that this would do it for you. Ok, to answer your last question first:
1> I am reasonably sure that I need top groups. The logbooks with the -CL extension have a common attribute structure. The logbooks with the -IL extension have a common attribute structure. Neither group is the same. Prior to using Top Group I was using a global config for the -CL's but manually maintaining consistent -IL configs was horrible. Top Group solved my problem: maintaining only two config "areas" as opposed to many is very efficient. Do you have another way of doing this other than running two instances of eLog?

2> My password file on Windows is
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- created by MXML on Tue Mar 14 10:35:04 2006 -->
<list>
  <user>
    <name>r4aajl</name>
    <password>TDIwYXVyZW4=</password>
    <full_name>Steve Jones</full_name>
    <last_logout>0</last_logout>
    <last_activity>Tue Mar 14 10:35:04 2006</last_activity>
    <email>steve.jones@freescale.com</email>
    <email_notify>
      <logbook>TX30-CL</logbook>
      <logbook>TX11-CL</logbook>
      <logbook>TX32-CL</logbook>
      <logbook>AZ34-CL</logbook>
      <logbook>AZ50-CL</logbook>
      <logbook>Approvals-CL</logbook>
      <logbook>FL29-CL</logbook>
      <logbook>IL108-CL</logbook>
      <logbook>ZIL05-CL</logbook>
      <logbook>Template-CL</logbook>
    </email_notify>
  </user>
</list>

3> I see your screen shots. Try going in and creating a new logbook and tell me if it dies. In the meantime is the latest version available in compiled form for Windows? If so, I'll install it and try again. At this point I am looking at starting a new config file from scratch but unless you can suggest another way I think Top Group is my only option.


Ok, I completed stripped any attributes and only defined top groups. eLog no longer crashes but returns a completely invalid page with invalid links when I attempt to create a new logbook - see screenshot below. This is good as it means something in the config was causing things to blowup. I have also attached my stripped out config.

Incidently, I added another screenshot - an invalid link when I *delete* a logbook gets returned "http://localhost:8080/Test4-CL/Engineering%20Compute%20Change%20Logs/". Definitely not a correct URL.


Steve Jones wrote:
BTW, Stefan, unless you can make the most recent version of a Windows eLog available I cannot test the most recent -- I do not have access to a Windows development environment. Solaris-Yes, Linux-Yes, Windoze-No.
                icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Stefan Ritt on Mon Apr 3 17:09:19 2006 

Steve Jones wrote:
BTW, Stefan, unless you can make the most recent version of a Windows eLog available I cannot test the most recent -- I do not have access to a Windows development environment. Solaris-Yes, Linux-Yes, Windoze-No.


There is a 2.6.1-4 version for Windows for download, which contains the most recent code.
                   icon2.gif   Re: elogd 2.6.1 program Crash is repeatable under Windows, posted by Steve Jones on Fri Apr 7 05:07:20 2006 elog_2.JPG

Stefan Ritt wrote:

Steve Jones wrote:
BTW, Stefan, unless you can make the most recent version of a Windows eLog available I cannot test the most recent -- I do not have access to a Windows development environment. Solaris-Yes, Linux-Yes, Windoze-No.


There is a 2.6.1-4 version for Windows for download, which contains the most recent code.



Quote:
Ok, I loaded the new Windows version ELOG V2.6.1-1681. The new version has the same behavior and it is entirely related to Top Group. With a simple Top Group setup things appear to work fine until one attempts to either create or delete a new logbook. There are other quirky things - I don't think Top Group is ready for really complex setups. In fact, this URL that is constructed by elog (http://localhost:8080/Engineering%20Compute%20Change%20Logs/Test/?cmd=Config) will cause elog to coredump but only with a very complex configfile. If I simply remove the "Top" from the "Group" directive I get the expected message "Error: logbook "Engineering Compute Change Logs" not defined in elogd.cfg
Please use your browser's back button to go back".

Another interesting point of reference - I went back to 2.5.9-4 (windows) and get the same behavior.

Now, making things really simple I added Top Group support to the demo that comes with the Windows install. This configfile:
[global]
port = 8080

Show top groups = 1
Top Group Demo Groups = demo, test7

[global Demo Groups]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Extendable Options = Category
Required Attributes = Author, Type
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type

[demo]


results in this redisplay after a new logbook create I have included in an attached screenshot. Please note that everything is generally not correct. So, even though eLog does not crash with this simple config it does support my observation that as I render the congfile more complex I corrupt eLog more until it finally crashes. Stefan, I would be interested in seeing how the above config runs on one of your windows systems.
icon5.gif   Triggering $shell question, posted by Steve Jones on Wed Apr 5 20:25:42 2006 
Should this work? rev1684 now allows $shell to pass attribute contents to the shell command and whenever a new entry is submitted or when one Edits/Replys the Subst is triggered, but I would like to be able to trigger this whenever a new value in the options pulldown is selected (assume Risk2 and Risk3 are identical to Risk1). Being able to trigger a regular Preset works fine (like {1} preset Date = $date ) but I would like to trigger the Subst. Maybe a better question, what actions (Subst, Preset, Change, Execute, etc.) I've tried Subst and Preset but not much luck.

##################################################
# Define Risk1
#
Options Risk1 = 10{30}, 20{31}, 30{32}, 40{33}, 50{34}, 60{35}, 70{36}, 80{37}, 90{38}, 100{39} 
{30,31,32,33,34,35,36,37,38,39} Subst TotalRisk = $shell(gawk 'BEGIN{ print $Risk1 + $Risk2 + $Risk3 }' )

    icon2.gif   Re: Triggering Re: Triggering $shell question, posted by Steve Jones on Wed Apr 5 22:48:49 2006 

Steve Jones wrote:
Should this work? rev1684 now allows $shell to pass attribute contents to the shell command and whenever a new entry is submitted or when one Edits/Replys the Subst is triggered, but I would like to be able to trigger this whenever a new value in the options pulldown is selected (assume Risk2 and Risk3 are identical to Risk1). Being able to trigger a regular Preset works fine (like {1} preset Date = $date ) but I would like to trigger the Subst. Maybe a better question, what actions (Subst, Preset, Change, Execute, etc.) I've tried Subst and Preset but not much luck.

##################################################
# Define Risk1
#
Options Risk1 = 10{30}, 20{31}, 30{32}, 40{33}, 50{34}, 60{35}, 70{36}, 80{37}, 90{38}, 100{39} 
{30,31,32,33,34,35,36,37,38,39} Subst TotalRisk = $shell(gawk 'BEGIN{ print $Risk1 + $Risk2 + $Risk3 }' )



Hmm, maybe I can answer my own question - until the form is saved with the new value selected the old values still exist. I guess what I really need is to trigger the $shell anytime a save happens or logentry is pulled in for edit. I think I do the latter with Subst on edit/Subst on Reply, but how on any save?

. . . Except that when I change an options field that has a dependencies, doesn't the javascript force a server-side revalidation?
icon5.gif   Simple math within an elog form, posted by Steve Jones on Tue Apr 4 06:18:18 2006 
This may sound a little strange but I am trying to determine if it is possible to create a series of attributes that may be assigned an integer value via OPTIONS, and then take the selected values and perform some simple math and display the result. For example:

What we are trying to do is create a simple form that helps a person assign a risk value to a series of identified risks

Attributes = risk1, risk2, risk3, totalrisk
Type risk1 = numeric
Type risk2 = numeric
Type risk3 = numeric

OPtions risk1 = 10, 20, 30
Options risk2 = 10, 20 , 30
OPtions risk3 = 10, 20 , 30

Subst totalrisk = $risk1+$risk2+$risk3

I suppose I could use $shell to do this but I was trying to stay away from $shell for security reasons.

Thanks
    icon2.gif   Re: Simple math within an elog form, posted by Stefan Ritt on Tue Apr 4 08:15:29 2006 

Steve Jones wrote:
This may sound a little strange but I am trying to determine if it is possible to create a series of attributes that may be assigned an integer value via OPTIONS, and then take the selected values and perform some simple math and display the result.


This item is already on the wishlist, so I added your vote there. But due to my workload, it will certainly not be implemented in the next few weeks.
       icon2.gif   Re: Simple math within an elog form, posted by Steve Jones on Wed Apr 5 00:00:14 2006 

Stefan Ritt wrote:

Steve Jones wrote:
This may sound a little strange but I am trying to determine if it is possible to create a series of attributes that may be assigned an integer value via OPTIONS, and then take the selected values and perform some simple math and display the result.


This item is already on the wishlist, so I added your vote there. But due to my workload, it will certainly not be implemented in the next few weeks.



Quote:

Ok, understood. So instead I am trying to use $shell and am running into a problem
##################################################
# Define Risk1
#
Options Risk1 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 


##################################################
# Define Risk2
#
Options Risk2 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 

##################################################
# Define Risk2
#
Options Risk3 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 

##################################################
# Define TotalRisk
#
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)
#Subst TotalRisk = $shell(gawk 'BEGIN{ print $Risk1 + $Risk2 + $Risk3 }' )
#Subst TotalRisk = $shell(uname -a)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?
          icon2.gif   Re: Simple math within an elog form, posted by Stefan Ritt on Wed Apr 5 10:07:59 2006 

Steve Jones wrote:
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?


The reason is that the substitutions get evaluated from left to right, so first the shell is called with $Risk1, and because the shell by itself does a subsitution and $Risk1 is not defined on the unix system, the shell returns an empty string, leading to "+ +" as the result.

I changed that in the current SVN version, so we have first the attribute substitions, then then shell substitution. The "echo $Risk1..." will of course not work, since it gets substituted by elog as "echo 12 + 23 + 45" (or whatever the numbers are), and the "echo" will just return these numbers without adding them. To make the shell to add things, you would need to define the risks as environment variables for the shell, so I guess the "gawk" method will work better for you. I tried it and it worked fine for me.
             icon2.gif   Re: Simple math within an elog form, posted by Steve Jones on Wed Apr 5 13:50:14 2006 

Stefan Ritt wrote:

Steve Jones wrote:
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?


The reason is that the substitutions get evaluated from left to right, so first the shell is called with $Risk1, and because the shell by itself does a subsitution and $Risk1 is not defined on the unix system, the shell returns an empty string, leading to "+ +" as the result.

I changed that in the current SVN version, so we have first the attribute substitions, then then shell substitution. The "echo $Risk1..." will of course not work, since it gets substituted by elog as "echo 12 + 23 + 45" (or whatever the numbers are), and the "echo" will just return these numbers without adding them. To make the shell to add things, you would need to define the risks as environment variables for the shell, so I guess the "gawk" method will work better for you. I tried it and it worked fine for me.


Sorry, I waSn't clear about just why I was using "echo". Since elog removes the /tmp/elog_shell temporary file I couldn't "see" what was actually being passed to the shell - gawk was giving me an error and I was flying blind. So I used echo to create my own temporary file.

Yes, gawk should now work -- I'l download and compile the latest and provide feedback.

Thanks!
                icon14.gif   Re: Simple math within an elog form, posted by Steve Jones on Wed Apr 5 18:56:48 2006 

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
Subst TotalRisk = $shell(echo $Risk1 + $Risk2 + $Risk3 > /tmp/elog_out)

What comes out with my simple echo or gawk line is "+ + " so it looks like the attributes are not getting passed into the $shell code?


The reason is that the substitutions get evaluated from left to right, so first the shell is called with $Risk1, and because the shell by itself does a subsitution and $Risk1 is not defined on the unix system, the shell returns an empty string, leading to "+ +" as the result.

I changed that in the current SVN version, so we have first the attribute substitions, then then shell substitution. The "echo $Risk1..." will of course not work, since it gets substituted by elog as "echo 12 + 23 + 45" (or whatever the numbers are), and the "echo" will just return these numbers without adding them. To make the shell to add things, you would need to define the risks as environment variables for the shell, so I guess the "gawk" method will work better for you. I tried it and it worked fine for me.


Sorry, I waSn't clear about just why I was using "echo". Since elog removes the /tmp/elog_shell temporary file I couldn't "see" what was actually being passed to the shell - gawk was giving me an error and I was flying blind. So I used echo to create my own temporary file.

Yes, gawk should now work -- I'l download and compile the latest and provide feedback.

Thanks!


Ok, confirming that this now works. Passing the command:
Subst <attribute> = $shell(gawk 'BEGIN{ print $Attrib1 + $Attrib2 + $Attrib3 }' ) 
will cause the result to be pushed into <attribute>, so gawk in essence becomes a simple calculator and operates on the formula "$Attrib1 + $Attrib2 + $Attrib3".
icon5.gif   Change in encoding close entry, posted by Holger Mundhahs on Mon Apr 3 10:32:45 2006 
Maybe it is a wrong configuration, because in this forum it works well.
If I change the encoding in the logbook entry I get "Submit modified ELOG entry?",
and after clicking OK the entry is closed. Because this behavior is on all loggbooks
it must be a global config entry, but I dont know, which.
Here is the GLOBAL section:

Expand Selection page = 1
URL = http://sapelogs/
Date Format = %d.%m.%Y
Time Format = %d.%m.%Y %H:%M
Reverse Sort = 1
Menu commands = New, Edit, Delete, Reply, Download, Find, Last day, Last 10, Select, Copy to, Config, Admin, 
Login, Logout, Help
Find Menu commands = New, Edit, Delete, Reply, Download, Find, Last day, Last 10, Select, Config, Admin, Login, 
Logout
Password file = passwords.txt
Login expiration = 2
Admin user = ME
Suppress Email to users = 1
Self register = 0
Logout to main = 1
admin textarea = 150,45
Entries per page = 100
Mode commands = 1
Use Lock = 1
Supress Email on edit = 1
Supress default = 1
Summary lines = 1

Icon comment log.gif = Allg. Log
.....
Group SAP = .....
    icon2.gif   Re: Change in encoding close entry, posted by Stefan Ritt on Mon Apr 3 10:35:37 2006 
> Maybe it is a wrong configuration, because in this forum it works well.
> If I change the encoding in the logbook entry I get "Submit modified ELOG entry?",
> and after clicking OK the entry is closed. Because this behavior is on all loggbooks
> it must be a global config entry, but I dont know, which.
>
> ...
> Use Lock = 1
> ...

I comes from using the lock. If you remove that, you won't get this dialog box any more.
       icon2.gif   Re: Change in encoding close entry, posted by Holger Mundhahs on Mon Apr 3 10:48:45 2006 
> > Maybe it is a wrong configuration, because in this forum it works well.
> > If I change the encoding in the logbook entry I get "Submit modified ELOG entry?",
> > and after clicking OK the entry is closed. Because this behavior is on all loggbooks
> > it must be a global config entry, but I dont know, which.
> >
> > ...
> > Use Lock = 1
> > ...
> 
> I comes from using the lock. If you remove that, you won't get this dialog box any more.
OK, it seems, that the last part of the Use Lock documentation is the explanation:
----
If someone edits an entry, but then goes away from that page or closes the browser without submitting the 
changes, a pop-up window appears asking the user to submit the changed entry. Although this works for most 
browsers in most cases, it could be that Javascript has been turned off in a browser, in which case the stale 
locks still might appear.
---
So if I switch the encoding the whole entry is reloaded, and the JS take it as leaving.
Is it possible to change this behavior? Changing encoding should be handled different as
"regular" leaving.

Additional information:
If you have set Use Lock = 1 you can't switch the encoding on a NEW entry.
The new entry is closed w/o saving. To prevent this you must input any data,
after them you can save the NEW entry with the PopUp-OK. But there can't be 
anyone else on a new entry?
          icon2.gif   Re: Change in encoding close entry, posted by Stefan Ritt on Tue Apr 4 20:45:28 2006 
> So if I switch the encoding the whole entry is reloaded, and the JS take it as leaving.
> Is it possible to change this behavior? Changing encoding should be handled different as
> "regular" leaving.

I fixed that in the current SVN version.
icon5.gif   Numerous questions that I am hoping to get a response on, posted by Steve Jones on Mon Apr 3 16:31:37 2006 
Stefan, I have several issues/questions that I am still hoping to get an answer on. Any chance? If you would rather you can send email to me directly.

Thanks

Steve
    icon2.gif   Re: Numerous questions that I am hoping to get a response on, posted by Stefan Ritt on Mon Apr 3 16:32:52 2006 

Steve Jones wrote:
Stefan, I have several issues/questions that I am still hoping to get an answer on. Any chance? If you would rather you can send email to me directly.


I'm pretty busy these days, since we have a deadline on April 18th. I started already working weekends, so not much time is left for ELOG. But I hope it will get better by the end of this month.
       icon14.gif   Re: Numerous questions that I am hoping to get a response on, posted by Steve Jones on Mon Apr 3 16:39:33 2006 

Steve Jones wrote:

Stefan Ritt wrote:

Steve Jones wrote:
Stefan, I have several issues/questions that I am still hoping to get an answer on. Any chance? If you would rather you can send email to me directly.


I'm pretty busy these days, since we have a deadline on April 18th. I started already working weekends, so not much time is left for ELOG. But I hope it will get better by the end of this month.


I fully understand and appreciate your response!
icon5.gif   Anonymous vs user posts, posted by Chris Warner on Fri Mar 31 22:14:38 2006 
If I have a logbook that will let both registered users Anonymous users post. I would like the author attribute to default to the value in $long_name but if the post is Anonymous display a default text string "Anonymous". Is it possible to do this?
    icon2.gif   Re: Anonymous vs user posts, posted by Stefan Ritt on Sat Apr 1 15:30:32 2006 

Chris Warner wrote:
If I have a logbook that will let both registered users Anonymous users post. I would like the author attribute to default to the value in $long_name but if the post is Anonymous display a default text string "Anonymous". Is it possible to do this?


I added that functionality into the intermediate release 2.6.1-4 which you can download from the ELOG site.
icon5.gif   implement 'hide attribute' and 'sort attribute', posted by Heiko Scheit on Thu Dec 2 14:39:50 2004 
Could you implement a 'hide attribute' and 'sort attribute' config option?
While sort is probably not so easy to do the hide option would already 
be very useful.  What I want to do is to use elog to collect bibtex entries
which are then used to generate a bibtex file.  So, e.g. if the entry 
type 'Article' is selected I would like that all fields that do not make
sense are hidden.  Currently I just lock them.  The config looks like
this:

Attributes                  = Login, Bibtex Key, Entry Type, Address,
Annote, Author, Booktitle, Chapter, Crossref, Edition, Editor, Howpublished,
Institution, Journal, Key, Month, Note, Number, Organization, Pages,
Publisher, School, Series, Title, Type, Volume, Year, URL, Short Comment
Options Entry Type          = Article{1}, Book{2}, Booklet{3}, InBook{4},
InCollection{5}, InProceedings{6}, Manual{7}, MastersThesis{8}, Misc{9},
PhDThesis{a}, Proceedings{b}, TechReport{c}, Unpublished{d}
Required Attributes         = Entry Type
; ARTICLE
{1} Comment Author          = [required]
{1} Comment Journal         = [required]
{1} Comment Title           = [required]
{1} Comment Year            = [required]
{1} Locked Attributes       = Address, Annote, Booktitle, Chapter, Crossref,
Edition, Editor, Howpublished, Institution, Key, Organization, Publisher,
School, Series, Type


Instead of Locking the attributes, hiding them altogether would make the
entry form look much nicer.  
A further improvement would be to sort the attributes, e.g. for author I
would sort the like this, i.e. the more important entries first:

{1} Sort Attributes    = Author, Title, Journal, Volume, Pages, Year, Month,
Number, Note

Attributes not mentioned in the sort line could then be displayed 
in any order. 
    icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Stefan Ritt on Thu Jan 6 11:25:54 2005 
> Could you implement a 'hide attribute' and 'sort attribute' config option?

I implemented it as 'hidden attributes = <list>' and 'sort attributes'.
       icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Heiko Scheit on Mon Jan 10 19:44:16 2005 
> > Could you implement a 'hide attribute' and 'sort attribute' config option?
> 
> I implemented it as 'hidden attributes = <list>' and 'sort attributes'.

'sort attributes' sorts the logbook entries when they are displayed.  Or?

What I want is to rearrange the entry mask.  E.g. if 'Entry type' article is
selected then the attributes 'Author', 'Journal', 'Title', and 'Year' 
should be listed first, as they are required for this bibtex entry type.
Is it possible with the current elogd version to also sort (rearrange) the 
attributes in the entry mask?  If yes, how?  

Thanks for your time.
          icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Stefan Ritt on Mon Jan 10 20:23:35 2005 
> 'sort attributes' sorts the logbook entries when they are displayed.  Or?

Right

> What I want is to rearrange the entry mask.  E.g. if 'Entry type' article is
> selected then the attributes 'Author', 'Journal', 'Title', and 'Year' 
> should be listed first, as they are required for this bibtex entry type.
> Is it possible with the current elogd version to also sort (rearrange) the 
> attributes in the entry mask?  If yes, how?  

Attributes are shown in the order you specify them in the config file, so what about

Attributes = Entry type, Author, Journal, Title, Year     ???
             icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Heiko Scheit on Mon Jan 10 20:52:13 2005 
> > 'sort attributes' sorts the logbook entries when they are displayed.  Or?
> 
> Right
> 
> > What I want is to rearrange the entry mask.  E.g. if 'Entry type' article is
> > selected then the attributes 'Author', 'Journal', 'Title', and 'Year' 
> > should be listed first, as they are required for this bibtex entry type.
> > Is it possible with the current elogd version to also sort (rearrange) the 
> > attributes in the entry mask?  If yes, how?  
> 
> Attributes are shown in the order you specify them in the config file, so what about
> 
> Attributes = Entry type, Author, Journal, Title, Year     ???

Because for 'Entry type'='InProceedings' one needs:
'Author', 'Title', 'Booktitle', 'Year', 'Volume', 'Number'.
So, depending on the entry type that was chosen the entry mask should change,
with the required fields first and the not valid fields should not be shown
at all, which can nicely be done with the 'hidden attributes' config option.
Only the sorting (of the entry mask!) is missing! :)
                icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Stefan Ritt on Tue Jan 11 12:55:35 2005 
> Only the sorting (of the entry mask!) is missing! :)

Ok, I put that on my wish list. So once the second or third person asks for it, I will
implement it (;-)
                   icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Lars Jorgensen on Thu Mar 23 14:49:07 2006 
> > Only the sorting (of the entry mask!) is missing! :)
> 
> Ok, I put that on my wish list. So once the second or third person asks for it, I will
> implement it (;-)

I'm asking! :-)

I have a few Extendable Options attributes, and it would be extremely nice if they got sorted as users put them 
in. So that when you select the drop-down box, alle options are sorted.


Lars
                      icon2.gif   Re: implement 'hide attribute' and 'sort attribute', posted by Steve Jones on Thu Mar 23 21:52:03 2006 
> > > Only the sorting (of the entry mask!) is missing! :)
> > 
> > Ok, I put that on my wish list. So once the second or third person asks for it, I will
> > implement it (;-)
> 
> I'm asking! :-)
> 
> I have a few Extendable Options attributes, and it would be extremely nice if they got sorted as users put them 
> in. So that when you select the drop-down box, alle options are sorted.
> 
> 
> Lars

Agreed - that would be nice
ELOG V3.1.5-3fb85fa6