ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
2023
|
Fri Oct 27 19:11:32 2006 |
| Steve Jones | steve.jones@freescale.com | Bug report | All | 2.6.2-1723 | Interesting behavior with $shell | eLog does not do math so I am trying to leverage the $SHELL function to perform the math. I am using GAWK to perform the math -- I started trying to use CONDITIONAL ATTRIBUTES to assign numeric values to attributes but with loading up the ATTRIBUTES with all of the options brings elog to its knees in terms of performance -- the parsing of attributes is simply too string intensive.
So, I embedded the numeric score in the OPTIONS of the ATTRIBUTE and leveraged the text processing prowess of GAWK:
Options WhoIsEffected = 1:...Single User, 5:...Project, 10:...Department, 50:...Site
Options ServiceOutage = 1:...0-1 Minutes, 2:...10 Minutes, 10:...20 Minutes, 30:...30 Minutes, 100:...gt60
Then pass the following command to GAWK:
Preset TotalScore = $shell(gawk 'BEGIN{split(\"$WhoIsEffected:$ServiceOutage\",scores,\":\");print scores[1]+scores[3]}' )
The interesting result is this works - the proper summation is returned but apparently elog parsing also returns everything after the first ')' as something that also needs to be returned. So the resulting contents of TotalScore is 2;print scores[1]+scores[3]}' ) assuming one chose the first option of both attributes (the output pasted here are real results).
Before getting to this point I tried using the GAWK internal variable of $0 - but this did not work because apparently $0 in elog is defined as the OS shell!
Stefan, is it possible for you to try creating a logbook on the elog demo site that shows people how to perform math and in the process discover what the $SHELL function is doing? |
2024
|
Sun Oct 29 16:04:05 2006 |
| Steve Jones | steve.jones@freescale.com | Bug report | All | 2.6.2-1723 | Re: Interesting behavior with $shell |
Steve Jones wrote: | eLog does not do math so I am trying to leverage the $SHELL function to perform the math. I am using GAWK to perform the math -- I started trying to use CONDITIONAL ATTRIBUTES to assign numeric values to attributes but with loading up the ATTRIBUTES with all of the options brings elog to its knees in terms of performance -- the parsing of attributes is simply too string intensive.
So, I embedded the numeric score in the OPTIONS of the ATTRIBUTE and leveraged the text processing prowess of GAWK:
Options WhoIsEffected = 1:...Single User, 5:...Project, 10:...Department, 50:...Site
Options ServiceOutage = 1:...0-1 Minutes, 2:...10 Minutes, 10:...20 Minutes, 30:...30 Minutes, 100:...gt60
Then pass the following command to GAWK:
Preset TotalScore = $shell(gawk 'BEGIN{split(\"$WhoIsEffected:$ServiceOutage\",scores,\":\");print scores[1]+scores[3]}' )
The interesting result is this works - the proper summation is returned but apparently elog parsing also returns everything after the first ')' as something that also needs to be returned. So the resulting contents of TotalScore is 2;print scores[1]+scores[3]}' ) assuming one chose the first option of both attributes (the output pasted here are real results).
Before getting to this point I tried using the GAWK internal variable of $0 - but this did not work because apparently $0 in elog is defined as the OS shell!
Stefan, is it possible for you to try creating a logbook on the elog demo site that shows people how to perform math and in the process discover what the $SHELL function is doing? |
Steve Jones wrote: |
So, in order to quickly get around the problem I did the following:
Preset TotalScore = $shell(echo \"$WhoIsEffected:$ServiceOutage\" | gawk -f <gawkscript>' )
This works since all of the script logic is contained in an external script but removes the logic from the elog config, so if anything changes one has to remember to change the script (which is in a comment).
|
|
2025
|
Tue Oct 31 14:45:05 2006 |
| deletoille | xavier.deletoille@synchrotron-soleil.fr | Bug report | Windows | V2.6.2-172 | checkbox | Hello,
I found a small Bug when I create an entry. I activate a checkbox (attachement1) but when I upload a file, the activation disappears (attachement 2). I have to activate again the checkbox.
Is it something I can do?
Thanks in advance,
Xavier Deletoille |
2028
|
Tue Oct 31 22:10:11 2006 |
| Steve Jones | steve.jones@freescale.com | Bug report | Windows | V2.6.2-172 | Re: checkbox |
deletoille wrote: | Hello,
I found a small Bug when I create an entry. I activate a checkbox (attachement1) but when I upload a file, the activation disappears (attachement 2). I have to activate again the checkbox.
Is it something I can do?
Thanks in advance,
Xavier Deletoille |
Steve Jones wrote: |
Xavier, your version number does not indicate the full SVN (it is cutoff at '172') but your screenshot indicates 'SVN1723'. This is an identified problem and looks to be fixed in SVN1740. I have verified with the checkbox "Suppress Email Notification" -- it likely effects all checkboxes.
|
|
2030
|
Thu Nov 2 08:41:34 2006 |
| deletoille | xavier.deletoille@synchrotron-soleil.fr | Bug report | Windows | V2.6.2-172 | Re: checkbox |
Steve Jones wrote: |
deletoille wrote: | Hello,
I found a small Bug when I create an entry. I activate a checkbox (attachement1) but when I upload a file, the activation disappears (attachement 2). I have to activate again the checkbox.
Is it something I can do?
Thanks in advance,
Xavier Deletoille |
Steve Jones wrote: |
Xavier, your version number does not indicate the full SVN (it is cutoff at '172') but your screenshot indicates 'SVN1723'. This is an identified problem and looks to be fixed in SVN1740. I have verified with the checkbox "Suppress Email Notification" -- it likely effects all checkboxes.
|
|
OK ,
sorry for the version number. My SVN numbers is 1723 like in screenshot.
I'm waiting SVN1740 .
thanks in advance |
2033
|
Thu Nov 2 18:02:44 2006 |
| David Spindler | dsspindler@gmail.com | Bug report | Windows | 2.6.2-1734 | Bug? Password file location changed | I just tried to upgrade from 2.6.1-1633 to 2.6.2-1734. Whenever I tried to access the elog, it showed my password to be invalid. I tried this on 2 machines and same results. I did notice on the second one when I started it from a command prompt that it was creating a new empty password file in a different location.
I have a password file called pwd.txt. It resides in the main elog directory, in my case, c:\elog, along with the elgod.exe and elogd.cfg. Apparently, the new version looks for it in the logbooks directory. I adjusted my path to the file and it works fine.
I am reporting this as a bug because it is my guess that this is not an expected result. I would expect the old elogd.cfg file to work without altering in the newer version.
Thanks, keep up the great work, Stefan. You have a great program.
David Spindler |
2034
|
Thu Nov 2 18:10:07 2006 |
| David Spindler | dsspindler@gmail.com | Bug report | Windows | 2.6.2-1734 | Re: Bug? Password file location changed |
David Spindler wrote: | I just tried to upgrade from 2.6.1-1633 to 2.6.2-1734. Whenever I tried to access the elog, it showed my password to be invalid. I tried this on 2 machines and same results. I did notice on the second one when I started it from a command prompt that it was creating a new empty password file in a different location.
I have a password file called pwd.txt. It resides in the main elog directory, in my case, c:\elog, along with the elgod.exe and elogd.cfg. Apparently, the new version looks for it in the logbooks directory. I adjusted my path to the file and it works fine.
I am reporting this as a bug because it is my guess that this is not an expected result. I would expect the old elogd.cfg file to work without altering in the newer version.
Thanks, keep up the great work, Stefan. You have a great program.
David Spindler |
I also just noticed that the text files I use for presetting the text window also have to be in the logbooks directory. |
2036
|
Thu Nov 2 23:17:10 2006 |
| Steve Jones | steve.jones@freescale.com | Bug report | Windows | 2.6.2-1734 | Re: Bug? Password file location changed |
David Spindler wrote: |
David Spindler wrote: | I just tried to upgrade from 2.6.1-1633 to 2.6.2-1734. Whenever I tried to access the elog, it showed my password to be invalid. I tried this on 2 machines and same results. I did notice on the second one when I started it from a command prompt that it was creating a new empty password file in a different location.
I have a password file called pwd.txt. It resides in the main elog directory, in my case, c:\elog, along with the elgod.exe and elogd.cfg. Apparently, the new version looks for it in the logbooks directory. I adjusted my path to the file and it works fine.
I am reporting this as a bug because it is my guess that this is not an expected result. I would expect the old elogd.cfg file to work without altering in the newer version.
Thanks, keep up the great work, Stefan. You have a great program.
David Spindler |
I also just noticed that the text files I use for presetting the text window also have to be in the logbooks directory. |
Quote: | The relocation was a documented change that Stefan made intentionally. Yes, it caught me too  |
|
|