Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 766 of 806  Not logged in ELOG logo
    icon2.gif   Re: Attribute option "+x" not searcheable, posted by Andreas Luedeke on Sat Oct 28 09:12:32 2017 
Hi Stefano,
you could try to html encode the "+" and "-" sign in the option list
Options Half = +x, -x, both
Allow HTML = 1

But of course then you would need to change all existing entries.

It is just an idea; I did not try this out, it might not work anyway.

Cheers
Andreas

> Dear experts,
>    I have an elog with an attribute with fixed values, like this:
> 
> Attributes = Half
> Options Half = +x, -x, both
> 
> It works fine, but I would like to find (or quick filter) all entries with Half=+x .
> 
> If I go to the search form, I can select +x from the dropdown menu for Half, but the search returns no result, even if I do have a number of entries with Half=+x. Likewise if I try to do the same with Quick filter.
> 
> I believe that this is due to the fact that the search uses regex, and "+" is reserved. I've tried to perform a search by entering manually and escaped "\+x", and it works as intended.
> 
> https://.../?mode=summary&reverse=0&reverse=1&npp=20&Half=%5E%5C%2Bx%24
> 
> However, since this attribute has a list of fixed values, it is not possible to entry manually something different "\+x" than what is defined in the config, that is "+x".
> 
> Is there a solution for this problem?
> 
> I would rather not change the attributes options (to, say, positive/negative), since that would mean changing manually a non negligible number of entries.
> 
> thanks,
>   Stefano
    icon2.gif   Re: Attribute option "+x" not searcheable, posted by Andreas Luedeke on Tue Oct 31 16:56:24 2017 
Hi Stefano,
I've tested it: it does not work.
Neither in edit nor in list view the HTML encoded characters show correctly.
Only in the "Quick filter" menu they show as they should!
But then selecting them in the quick filter will not find any entries :-(

So the short answer: 
avoid characters with a special meaning for regular-expressions in attribute values, in particular if you want to use quick filters.

Cheers
Andreas

> Hi Stefano,
> you could try to html encode the "+" and "-" sign in the option list
> Options Half = +x, -x, both
> Allow HTML = 1
> 
> But of course then you would need to change all existing entries.
> 
> It is just an idea; I did not try this out, it might not work anyway.
> 
> Cheers
> Andreas
> 
> > Dear experts,
> >    I have an elog with an attribute with fixed values, like this:
> > 
> > Attributes = Half
> > Options Half = +x, -x, both
> > 
> > It works fine, but I would like to find (or quick filter) all entries with Half=+x .
> > 
> > If I go to the search form, I can select +x from the dropdown menu for Half, but the search returns no result, even if I do have a number of entries with Half=+x. Likewise if I try to do the same with Quick filter.
> > 
> > I believe that this is due to the fact that the search uses regex, and "+" is reserved. I've tried to perform a search by entering manually and escaped "\+x", and it works as intended.
> > 
> > https://.../?mode=summary&reverse=0&reverse=1&npp=20&Half=%5E%5C%2Bx%24
> > 
> > However, since this attribute has a list of fixed values, it is not possible to entry manually something different "\+x" than what is defined in the config, that is "+x".
> > 
> > Is there a solution for this problem?
> > 
> > I would rather not change the attributes options (to, say, positive/negative), since that would mean changing manually a non negligible number of entries.
> > 
> > thanks,
> >   Stefano
    icon2.gif   Re: hosts allow, posted by Andreas Luedeke on Sat Nov 18 19:36:57 2017 

Hi Susan,

according to the documentation you need to add "Hosts deny = All" in addition to the "Hosts allow" command.
Here is the relevant excerpt from the documentation (https://midas.psi.ch/elog/config.html#access).
Cheers
Andreas
  • Hosts allow = <list>
  • Hosts deny = <list>

These two settings can be used to restrict the access to the logbook to certain computers. It is similar to the UNIX hosts.allow and hosts.deny files. The list can consist of individual host names or IP numbers, subnet masks like 123.213. (note the trailing '.') or .mit.edu, or the word All. The following rules are applied:

  • Access will be granted when a host matches a pattern in "hosts allow".
  • Otherwise, access will be denied when a host matches a pattern in "hosts deny".
  • Otherwise, access will be granted.

These rules are applied before any password is checked. To debug problems, start elogd with the "-v" flag, in which case the rule checking is printed on the screen.

 

Susan James wrote:

I'm trying to wrap our elog instance to our company domain which is lbl.gov

I add this entry below (without quotes) to elogd.cfg and it's not working.  the world can see our logbooks

" Hosts Allow = *.lbl.gov ".

can someone help?

 

 

 

    icon2.gif   Re: Config: conditional coloring of items when 2 conditions are met (and|or), posted by Andreas Luedeke on Mon Nov 27 22:10:22 2017 

I am not aware that it is forseen to define logical operators in combination with the Style command. How did you get the idea that this should work?

But you should be able to define multiple Style commands, acting on different format parameter.

Tim Schelfhout wrote:

Hello,

Trying to color an entry log when 2 conditions are met. Tried 

Style Result Hired and Administration NOK = background-color:red

where Result and Administration are Attributes.  Anyone?

 

 

 

    icon2.gif   Re: hosts allow, posted by Andreas Luedeke on Fri Dec 8 19:47:04 2017 
Hi Susan,
the documentation states that you should start elogd with the -v option from the command line and look at the output. Did you try this?
You might post the output here to get further help.
Cheers
Andreas
Susan James wrote:

Hi All,

We're still having trouble with hosts.allow and hosts.deny.

We're trying to allow all of our domain  lbl.gov to the access list

for our logbooks.  But the combination below is not working.

==========================

[ below denies ALL ]

Hosts allow = .lbl.gov
Hosts deny = ALL

[ below denies ALL ]

Hosts deny = ALL

Hosts allow = .lbl.gov

========================
Can someone help?

Susan James wrote:

thanks for your quick reply.

the configuration is still not working.  See my entry below which denies everyone.

I've tried many different combinations of 'hosts allow and hosts deny'

we want to restrict all our logbooks to only domain lbl.gov

[ below denies ALL ]

Hosts allow = .lbl.gov
Hosts deny = ALL

[ below denies ALL ]

Hosts deny = ALL

Hosts allow = .lbl.gov
 

Can you help?

 

Andreas Luedeke wrote:

Hi Susan,

according to the documentation you need to add "Hosts deny = All" in addition to the "Hosts allow" command.
Here is the relevant excerpt from the documentation (https://midas.psi.ch/elog/config.html#access).
Cheers
Andreas
  • Hosts allow = <list>
  • Hosts deny = <list>

These two settings can be used to restrict the access to the logbook to certain computers. It is similar to the UNIX hosts.allow and hosts.deny files. The list can consist of individual host names or IP numbers, subnet masks like 123.213. (note the trailing '.') or .mit.edu, or the word All. The following rules are applied:

  • Access will be granted when a host matches a pattern in "hosts allow".
  • Otherwise, access will be denied when a host matches a pattern in "hosts deny".
  • Otherwise, access will be granted.

These rules are applied before any password is checked. To debug problems, start elogd with the "-v" flag, in which case the rule checking is printed on the screen.

 

Susan James wrote:

I'm trying to wrap our elog instance to our company domain which is lbl.gov

I add this entry below (without quotes) to elogd.cfg and it's not working.  the world can see our logbooks

" Hosts Allow = *.lbl.gov ".

can someone help?

 

 

 

 

 

 

    icon2.gif   Re: Is there a python3 api to generate logbook entries from python?, posted by Andreas Luedeke on Tue Jan 16 10:13:00 2018 

Have a look here: https://github.com/paulscherrerinstitute/py_elog

I haven't tried it myself, but it should allow you to add, reply, edit, delete elog entries from python (>= 3.5) via the http elog interface. It's an anaconda package.

markus wrote:

Dear elog community,

I wonder whether there is a python3 api or lib to generate and append entries (and attachments) to the logbook using scripts.
However, so far I did not find anything...

At the moment I am thinking about wrapping the "elog" command line tool.

Is there something usable already out there?

Thanks and regards
Markus

 

    icon2.gif   Re: v3.1.3 does not work with logbooks from v2.9.2?, posted by Andreas Luedeke on Thu Feb 1 10:14:55 2018 
Hi Yves,
just my two pence, maybe they help you to figure out what's going on:
versions 2.* had all entries of one logbook in one directory. Version 3.* create a subdirectory for each year. This had been added for me: if you use AFS for logbook storage, then you have a limit on how many files you can put into a single directory.
So the first time you start elogd 3.* with data from an elogd 2.* it should move all your logbook entries into sub-directories for each year. If that would have happened, you would not be able to use these logbook directories with the 2.9.2 version.
Maybe your logbook client is not allowed to create sub-directories? Although I would guess that it then would just throw an error message and stop.
Cheers, Andreas
Yves wrote:

I have just upgraded elog from 2.9.2 -> 3.1.3.

3.1.3 runs fine with new logbooks. However, when trying to run 3.1.3 with my logbooks created with 2.9.2 things stop working.

Here is the command I run for testing [attachment 1]: first of all it takes a very long time (~ 10 minutes) for it to index the logbooks. When finished indexing I try it out in a web browser - it takes infinite time to load: no error message appears but also no logbook. After an hour or so elogd crashes without an error message.

When running 2.9.2 on the same machine, all runs wel (attachment 2)

 

cfd file: (I only left in one logbook - they are all configured the same)

[global]
port = 18080
Logging level = 3
Max content length = 500000000
Date format = %A, %d %B %Y


[Logrun - Amptek]
Theme = default
Comment = Logrun Amptec
Reverse sort = 0
Quick filter = Date, Type

 

Any ideas on how to solve this?

 

    icon2.gif   Re: Entries disappear after editing + UTF16 problem, posted by Andreas Luedeke on Wed Feb 7 15:28:47 2018 
Hi Stefan,
I think there is a misunderstanding: there is an ELOG commit with the GIT ID bd75964.
It is from Sep. 2016, so: Peter, you should download a newer version.
Cheers
Andreas

https://bitbucket.org/ritt/elog/commits/all?search=bd75964

Stefan Ritt
Release 3.1.2-1
2016-09-05
Stefan Ritt wrote:

Tell me your current seven digit number and I can check if your version is too old.

Peter K wrote:

yes, that is exactly where I got this V3.1.2-bd75964 version!

Do you recommend to download it again from your site and compile?

Stefan Ritt wrote:

The -bd... number must be from the .apk package, which I don't have control over. You have to check the elog git hash code. You see it at the bottom of each elog web page. For this forum server, it's ELOG V3.1.2-7933898 with 7 digit number at the end.

Peter K wrote:

We installed our elog from .apk in November 2017.

Version V3.1.2-bd75964

I suppose it already contains List drafts feature.

Stefan Ritt wrote:

You might have to update to the current elog version. This feature was implemented in Dec. 2016. 

Stefan

Peter K wrote:

Dear Stefan,

Thanks for quick reply.
I checked List drafts = 1 in config file - it does not show drafts in the list in my case.
Can it be blocked by any other option?
I have these options enabled:

Use Lock = 1
Save drafts = 1
List drafts = 1
 

Peter.

Stefan Ritt wrote:

The message is not lost, but becomes a "draft". This works similar in most email systems. When you edit an email and son't send it, it stays in your "draft" email folder and does not show up in your "sent" folder. Same here. You are suppost to "submit" you entry, the "save" is just a temporary safety backup. If you do not submit (if you press BACK or your browser crashes), the entry is not submitted to the system, but stays around as a draft. If you create a new message, the system asks you to edit and finish your draft, so that it does not get lost. So always hit "submit" if you are finished editing a message, not just "save". 

If you want to see the draft message, they are rendered in red in the normal message list if you have

List drafts = 1

in your config file. No ide where your cluttering comes from. 

Stefan

Peter K wrote:

I found a sequence which hides the message from the list.
In addition this sequence corrupts UTF encoding of the text.

  1. create new message
  2. submit it
  3. Edit this message again
  4. click SAVE and then exit the editor (click Logbook name in the header or BACK in the browser)
  5. message disappeared from the list!
  6. by clicking NEW message I found my lost one in the drafts, but all text was corrupted.

I've made small GIF presentation on this issue (attached, open in new window), may be this helps.

 

 

 

 

 

 

 

 

 

 

 

ELOG V3.1.5-3fb85fa6