Re: 3-level conditional not working, posted by Harry Martin on Sun Jul 20 23:20:02 2025
|
Tried a variant, this time for NEW entries (not EDIT), which I meant to do to begin with; sorry if that was confusing.
[cond_test]
attributes = region, manufacturer, model
options region = american{us}, japanese{jp}, european{eu}
show attributes = region
{us} options manufacturer = ford, chrysler, gm
{jp} options manufacturer = toyota{toy}, nissan{nis}, mitsubishi{mit}
{eu} options manufacturer = audi, mercedes, bmw, volvo, fiat
{us} show attributes = region, manufacturer
{jp} show attributes = region, manufacturer
{eu} show attributes = region, manufacturer
{toy} options model = corolla, prius, miata
{nis} options model = sentra, murano
{mit} options model = starion, outlander, mirage
{toy,nis,mit} show attributes = region, manufacturer, model
I'm not sure if my multi-character conditional names are allowed or not, but they do seem to work... somewhat. Note that I even tried a couple different ways of specifying which attributes to show (single versus multiple OR conditionals). The problem now is that all of the attributes are always shown, seeming to ignore the conditionals entirely.
Harry Martin wrote: |
Not sure if this is a bug or not; if it is not, kindly reclassify the category.
Following is a small example of what I will dub a 3-level, conditional logbook:
[cond_test]
attributes = region, manufacturer, model
show attributes edit = region
options region = american{1}, japanese{2}, european{3}
{1} options manufacturer = ford, chrysler, gm
{2} options manufacturer = toyota{4}, nissan{5}, mitsubishi{6}
{3} options manufacturer = audi, mercedes, bmw, volvo, fiat
{1,2,3} show attributes edit = region, manufacturer
{4} options model = corolla, prius, miata
{5} options model = sentra, murano
{6} options model = starion, outlander, mirage
{4,5,6} show attributes edit = region, manufacturer, model
This example is hardly complete, but it is sufficient to demonstrate the issue I am running into. This works until I select from the 2nd level (manufacturer); it won't display the dropdown for the model (I think my show attribute edit is supposed to display that). Is there a restriction on how many levels of conditional I can have? If there is, it would be disappointing because I am trying to do something similar to this example.
I hope there is something very simple I can do to correct this, or perhaps a completely different approach that accomplishes the same thing. I'd like to stick with the multi-level selection process as I have done here.
I am running elog 3.1.5 on Devuan Chimaera (approx. Debian Bullseye, sans systemd) in a Virtualbox VM.
|
|
show attributes directive does not work?, posted by Harry Martin on Sat Aug 16 02:48:42 2025
|
Follows a very simple logbook definition:
[simple]
Comment = test show attributes directive
Attributes = a, b, c
Show Attributes = a
(Assume that all attributes are used farther down. This is for illustration only.)
To see what I see when I run this tiny elogd.cfg, see attachment.
"Show attributes" does not seem to be working because all of the attributes are shown, not just those specified in the directive. Or do I misunderstand/forget something?
|
[CLOSED] Re: show attributes directive does not work? -- It does, if you use show attributes edit, posted by Harry Martin on Sat Aug 16 14:31:49 2025
|
Well, it DOES work.... but only if you use the "Show Attributes Edit" directive. "Show Attributes" is only for the single entry pages, whereas "Show Attributes Edit" is for the "entry pages."
I should have read the docs more carefully, sorry. But isn't this a bit inconsistent with the way other directives work? Usually one uses "<Directive>" for new entries, "<Directive Edit>" for editing existing entries, and "<Directive Reply>" for replies. So I am guessing that "Show Attributes Edit" will be used for new and edit?
Harry Martin wrote: |
Follows a very simple logbook definition:
[simple]
Comment = test show attributes directive
Attributes = a, b, c
Show Attributes = a
(Assume that all attributes are used farther down. This is for illustration only.)
To see what I see when I run this tiny elogd.cfg, see attachment.
"Show attributes" does not seem to be working because all of the attributes are shown, not just those specified in the directive. Or do I misunderstand/forget something?
|
|
[CLOSED] Re: 3-level conditional not working, posted by Harry Martin on Sat Aug 16 22:19:03 2025
|
Closed. This "problem" was due to the same lack of document eyesight as https://elog.psi.ch/elogs/Forum/69889. Sorry for all the noise. New eyeglasses are forthcoming...
Harry Martin wrote: |
Tried a variant, this time for NEW entries (not EDIT), which I meant to do to begin with; sorry if that was confusing.
[cond_test]
attributes = region, manufacturer, model
options region = american{us}, japanese{jp}, european{eu}
show attributes = region
{us} options manufacturer = ford, chrysler, gm
{jp} options manufacturer = toyota{toy}, nissan{nis}, mitsubishi{mit}
{eu} options manufacturer = audi, mercedes, bmw, volvo, fiat
{us} show attributes = region, manufacturer
{jp} show attributes = region, manufacturer
{eu} show attributes = region, manufacturer
{toy} options model = corolla, prius, miata
{nis} options model = sentra, murano
{mit} options model = starion, outlander, mirage
{toy,nis,mit} show attributes = region, manufacturer, model
I'm not sure if my multi-character conditional names are allowed or not, but they do seem to work... somewhat. Note that I even tried a couple different ways of specifying which attributes to show (single versus multiple OR conditionals). The problem now is that all of the attributes are always shown, seeming to ignore the conditionals entirely.
Harry Martin wrote: |
Not sure if this is a bug or not; if it is not, kindly reclassify the category.
Following is a small example of what I will dub a 3-level, conditional logbook:
[cond_test]
attributes = region, manufacturer, model
show attributes edit = region
options region = american{1}, japanese{2}, european{3}
{1} options manufacturer = ford, chrysler, gm
{2} options manufacturer = toyota{4}, nissan{5}, mitsubishi{6}
{3} options manufacturer = audi, mercedes, bmw, volvo, fiat
{1,2,3} show attributes edit = region, manufacturer
{4} options model = corolla, prius, miata
{5} options model = sentra, murano
{6} options model = starion, outlander, mirage
{4,5,6} show attributes edit = region, manufacturer, model
This example is hardly complete, but it is sufficient to demonstrate the issue I am running into. This works until I select from the 2nd level (manufacturer); it won't display the dropdown for the model (I think my show attribute edit is supposed to display that). Is there a restriction on how many levels of conditional I can have? If there is, it would be disappointing because I am trying to do something similar to this example.
I hope there is something very simple I can do to correct this, or perhaps a completely different approach that accomplishes the same thing. I'd like to stick with the multi-level selection process as I have done here.
I am running elog 3.1.5 on Devuan Chimaera (approx. Debian Bullseye, sans systemd) in a Virtualbox VM.
|
|
|
Re: collapse does not seem to work as expected, posted by Harry Martin on Mon Aug 18 03:14:51 2025
|
I am not sure if either "Sort Attributes" or the Quick Filter are the main issue, though they could be. I have implemented a work-around for now, but it really would be nice if this worked as expected. Or perhaps someone can provide an example of a logbook with working "collapse" functionality. Thank you for this nifty program; everything else aside, this tool helps keep my work in order.
Harry Martin wrote: |
I also notice that collapse does not work properly if I have anything selected in the quick filter.
Harry Martin wrote: |
Figured it out: I had "Sort Attributes" set on the logbooks that were failing to collapse correctly. At least, I think that is the distinction.
I think I can live with "Sort Attributes" disabled; I don't recall why I chose to set the "Sort Attributes" in the first place. But I still think this is an issue.
Harry Martin wrote: |
I should add that this does not happen in every logbook. I'm looking into what the distinction is that causes this in certain logbooks and not in others.
Harry Martin wrote: |
When I click on "collapse," even several times, I still see all the replies in each thread rather than just one entry representing each entire thread.
I am running elogd 3.1.5 on devuan chimaera (bullseye) which I built from source. I had the same results with 3.1.4 and 3.1.3.
I tried to disable the quick filter just to see if that impacted the behavior, but it didn't.
If there are any other tests I can use to narrow the problem, please suggest them. Without a working collapse feature, I cannot get a quick birdseye view of, say, all open threads.
|
|
|
|
|
Edit entry from command line and appending attachment, posted by Andrea Capra on Sun Jun 26 01:47:02 2022
|
I would like to edit an existing entry by adding new attachments at each call of elog from the command line.
If I issue
elog -h localhost -p 8XXX -l test -f /path/to/file_0.pdf -e N -x
and then
elog -h localhost -p 8XXX -l test -f /path/to/file_1.pdf -e N -x
file_1.pdf replaces file_0.pdf, while I'd like entry N to have both pdfs.
Is there a workaround?
|
Up-to-date windows-version, posted by Sergei Gavrilov on Sun Oct 18 16:59:38 2020
|
Dear colleagues,
Can someone compile an up-to-date windows-version or write a manual how to do it in Windows without compiling errors?
Thank you. |
Vulnerability?, posted by Alessandro Petrolini on Thu Mar 3 08:26:40 2022
|
Hi, I have been using elog for years at CERN.
Now I installed in my local workstation at my home inistitue
and sysadmin reported the following vulnerabilities:
- Configuration File Disclosure (CVE-2019-3992)
- Password Hash Disclosure (CVE-2019-3993)
- Use After Free (CVE-2019-3994)
- NULL Pointer Dereference (CVE-2019-3995)
- Unintended Proxy (CVE-2019-3996)
Am I doing soimething wrong?
sysadmin will not allow me to use it until it is fixed....
Any help is welcome.
|
|