ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
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).
|
|
2053
|
Wed Nov 8 13:59:52 2006 |
| Stefan Ritt | stefan.ritt@psi.ch | Info | All | 2.6.2-6 | Denial of Service Vulnerability of elog 2.6.2-6 |
Dear ELOG users,
a denial of service vulnerability has been reported which affects all elog versions prior to 2.6.2-7. With a special request one can crash the elogd server, given that one has access either through a public read access or through an account. This vulnerability has been fixed in version 2.6.2-7. It is advised that all sensitive installations of ELOG are being updated.
Stefan Ritt |
2089
|
Fri Nov 24 11:01:22 2006 |
| Stephane LE | stephane.le@synchrotron-soleil.fr | Question | All | | How to do a preset on MOptions attributes ? |
Hi,
I'm new to elog and I was wondering if it is possible to do some presets on MOptions attributes when displaying a new form ? I've read the elogd config page but couldn't find how to do it.
Thanks for your help,
stephane |
2090
|
Fri Nov 24 14:40:42 2006 |
| Stephane LE | stephane.le@synchrotron-soleil.fr | Question | All | | Re: How to do a preset on MOptions attributes ? |
easy...
Preset MyAttribute = choice1 | choice2 | choice3 |
2098
|
Tue Nov 28 12:48:47 2006 |
| Stefan Ritt | stefan.ritt@psi.ch | Info | All | 2.6.3 | Version 2.6.3 released today |
Dear ELOG users,
ELOG version 2.6.3 has been released today. It contains all the bug fixes, security fixes and a few new features collected since the last release which was actually almost half a year ago. The changelog contains all the details.
Due to the security fixes it is recommended to upgrade from any version prior to 2.6.3. Please note that the location of all password and log files has been moved from the main elog directory to the logbook directory. This means that after upgrading you have to move your password file manually, otherwise you cannot log in any more. This modification was requested because some ELOG installations (especially ones with top groups) can now have a read-only main directory.
Stefan Ritt |
2108
|
Wed Jan 10 22:54:56 2007 |
| Exaos Lee | Exaos.Lee@gmail.com | Info | All | SVN1780 | Chinese language files updated |
As the attachment.
Sorry for no update long time. |
Attachment 1: eloglang-zh_CN.tgz
|
2111
|
Sat Jan 13 17:47:45 2007 |
| Exaos Lee | Exaos.Lee@gmail.com | Request | All | | Group definition under top group |
Hi, I think, if we can put the "Group xxx = xxx" under some "global xxxx" sections, the configure file will be more clean. Don't you think so? In fact, if the "Group XXX" sections are put under "global XXX" section, the "Top Group XXX" can be ignored. I also found that some options (e.g. "Logbook dir =") under "global" don't work under "global XXX".
Maybe the configure file can be defined more flexible, such as this way:
[global]
Port = 8080
Top configuration = yes
[global Group1]
Group config = group1.cfg
[global Group2]
Group config = group2.cfg
The "group1.cfg" looks like this:
[global]
Top configuration = no
Password file = group1.pwd
Group Linux PCs = Red Hat, Debian, Gentoo
Group Windows PCs = 98, ME, XP, Vista
Group Vista = Home, Pro, Media Center
[Red Hat]
...
|
2112
|
Mon Jan 15 09:56:09 2007 |
| Ian MacDonald | elog@irm.thamespower.com | Question | All | ELOG V2.6. | Addition of a Print CSS |
Is there any way to change the the embeded style sheet reference to allow a seperate style sheet for printing ?
Default config:-
<link rel="stylesheet" type="text/css" href="default.css">
Would like to configure to :-
<link rel="stylesheet" type="text/css" href="default.css media="screen">
<link rel="stylesheet" type="text/css" href="print.css" media="print">
Thanks |