Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 228 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Versionup Subject
  1772   Tue Mar 14 17:11:10 2006 Reply Giorgio Croci Candianig.crocic@libero.itBug report 2.6.1Re: Access to global configuration in v2.6.1
> > or maybe browser cookies. 
> 
> That rings a bell. If you change user permissions (like password file/no password file/rename logbooks) you might be
> fooled by old cookies. Just delete all cookies in your browser and try again.

Hi,
here I am at it again. Since my first posts, I tried to install the latest version of elog out-of-the-box on one pair of
PCs from scratch (fresh elog install on new, just-installed PCs, OS WinXP Pro and Win2000), but with no results. No
trace of the global configuration menu or the buttons to reach it.
Neither taking a look at the code has helped, I could not figure out exactly where the button bar was generated.
Didn't anybody other point out a similar behaviour? Do you have any suggestion for any tests to carry out?
Thanks
GiorgioCC
  1789   Tue Apr 4 06:18:18 2006 Question Steve Jonessteve.jones@freescale.comRequest 2.6.1Simple math within an elog form
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
  1790   Tue Apr 4 08:15:29 2006 Reply Stefan Rittstefan.ritt@psi.chRequest 2.6.1Re: Simple math within an elog form

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.
  1792   Wed Apr 5 00:00:14 2006 Reply Steve Jonessteve.jones@freescale.comRequest 2.6.1Re: Simple math within an elog form

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?
  1793   Wed Apr 5 10:07:59 2006 Reply Stefan Rittstefan.ritt@psi.chRequest 2.6.1Re: Simple math within an elog form

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.
  1794   Wed Apr 5 13:50:14 2006 Reply Steve Jonessteve.jones@freescale.comRequest 2.6.1Re: Simple math within an elog form

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!
  1795   Wed Apr 5 18:56:48 2006 Agree Steve Jonessteve.jones@freescale.comRequest 2.6.1Re: Simple math within an elog form

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".
  1809   Fri Apr 14 17:01:40 2006 Question Mike Jacksonjacksonmf@hotmail.comQuestionWindows2.6.1Text Field color in Summary display
Is it possible to have the text field be the same color as the other attributes in the summary display? What I mean is how each line is a different color, but the text field is always white. I would like the text field to match the rest. I changed the .summary in the css file but it changes all the text fields, it doesn't allow them to alternate colors like the other fields on the summary display
ELOG V3.1.5-2eba886