Re: Preloading Options or Moptions from a text file or CSV, posted by Andreas Luedeke on Mon May 11 22:42:44 2015
|
> > > Title says all :)
> > >
> > > Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> > >
>
> So basically, I have a list of 5-10 workers. I'll have to choose one for each entry I make into the logbook. But these workers will change from time to time
> (students) and I don't want the staff to manipulate the config file manually..("Extendable options" is not an option as I will get to many "Darth Vader" entry for
> sure..)
>
> I asked if I could populate that option box from another logbook attribute and Andreas told me only possible via external scripts.
> https://midas.psi.ch/elogs/Forum/67877
Hi Francois.
if those worker lists do change rather infrequently, then I would have an idea how to do it:
You could have an application that updates the Options or MOptions lists in the elogd.cfg file at midnight,
and in case they actually did change the application restarts the elogd process afterwards.
I use such a mechanism to update my user list from our companies LDAP service every second Monday of a month at midnight.
This avoids misspelled user names or wrong email addresses and takes care that all employees (~2000) can log-in to our ELOG.
The passwords are handled anyway by kerberos authentication.
But I admit that it would be a cool feature to have "includes" in the configuration file for dynamic data sources.
Shell scripts of course are useless for "Option" definitions: they would only be executed at start-up anyway,
and that can be accomplished as well by the above mentioned automatic changes to the config file.
Kind Regards
Andreas |
Re: Remote entries with empty messages possible?, posted by Andreas Luedeke on Mon May 11 22:51:44 2015
|
Hi Edmund,
Stefan already supplied a fix, but you could as well use a workaround: provide an empty file as text. The following works for Linux:
elog -h elog-server-adress -l EO -a Fill=111 -m /dev/null
Cheers
Andreas
Edmund Hertle wrote: |
Hey,
I want to submit an entry to elog remotley using the "elog" command. For example:
elog -h elog-server-adress -l EO -a Fill=111
But this does not generate a new entry. Instead the terminal jumps to an empty new line and the command does not respond to any further inputs anymore (CTRL+C to get out). I have to add a message:
elog -h elog-server-adress -l EO -a Fill=111 "test"
also using an empty string does not work:
elog -h elog-server-adress -l EO -a Fill=111 ""
I could add a whitespace as a work-around, but I'm not sure if this is a bug or a feature.
To put this in some context: I want to create entries for certain measurements automatically, where all relevant parameters are already attribute fields. In the usual case the actual message will be empty but might be used if the operator wants to add a note after the meausrement has been done.
|
|
"Leave Page" pop-up when "Submit" entry, posted by Andreas Luedeke on Tue May 12 03:25:45 2015
|
I have a little problem with elogd 3.1.0. The problem persists up to the latest ELOG version, even in the
development branch (V3.1.0-8196b81):
When I want to "Submit" a new entry, I get a javascript pop-up that asks me:
_This page is asking you to confirm that you want to leave - data you have entered may not be saved._
with the options:
"Stay on page" or "Leave page".
The entry is properly submitted if I agree to "Leave page".
But it is very confusing for my users: they are afraid to loose their entry text.
This problem only shows for some specific logbook configurations.
Below is a minimal logbook configuration that shows this problem:
if you select "entry = short", the pop-up is shown;
if you select "entry = long", the pop-up is not shown, the entry is created immediately.
Attributes = entry, when
Options entry = short{1}, long
Type when = datetime
{1} Show Attributes Edit = entry
(PS: it took me several hours to boil down my 120 line configuration into four lines :-) ) |
Re: "Leave Page" pop-up when "Submit" entry, posted by Andreas Luedeke on Wed May 13 01:40:21 2015
|
> Thanks for the "boiling-down" of your config file. That helped me to reproduce the error quickly. It only occurs if you have a date/time attribute which is hidden as a conditional attribute. This is a unusual combination, that's why I haven't seen that bug before. Actually some
> JavaScript code checks the validity of the date attribute, but since it is conditionally not there, the JavaScript code crashes, which triggers the dialog box you see. It's now fixed in the repository.
>
> /Stefan
>
Thank you Stefan!
That works nicely now.
Apparently it was less work to fix than to isolate it ;-)
Andreas |
Re: Attribute not updated, posted by Andreas Luedeke on Thu May 14 02:02:45 2015
|
Hi Francois,
as far as I know there is a limit on the number of conditions you can use (See elog:67303).
I guess you did hit that limit.
I think I've mentioned recently that ELOG is not a relational database, didn't I?
It is of course possible to drive screws with a hammer, but there do exist more suitable tools for that ;-)
Kind regards
Andreas |
Re: csv import timestamp, posted by Andreas Luedeke on Thu May 14 02:19:53 2015
|
Hi Ferdinand,
and that is exactly what happens when you import a csv file with a date field:
the creation date ($entry time) of the imported entries will be used from the "Date" column in the file.
I've just tried it and it works like a charm. Did you have any problems doing it?
Cheers
Andreas
Ferdinand Gassauer wrote: |
I have to import a csv with a date field, which represents the creation date
this date should be used as "date" timestamp which is set automatically, otherwise all entries get the current datetime as timestamp
|
|
Re: Attribute not updated, posted by Andreas Luedeke on Thu May 14 04:59:03 2015
|
> Seriously, I really hope It could make it... Could you try it on your side ?
My personal opinion here is, that if you want others to investigate your problems, then the best way to do it is like that:
- attach a minimal configuration that reproduces your problem (never attach a 100 line configuration, unless you've tested that the problem disappears
regardless of which line you remove!);
- attach the entry data, if the behaviour depends on the data;
- use a specific, to the point subject line;
- explain what you did, what happened and what you would have expected to happen;
- ask kindly; and then
- wait and hope for the best ;-)
(This is actually a very general procedure; I think it is applicable to all newsgroups, forums, etc.)
BTW: This tip was absolutely free of charge ;-) |
Re: Elogd synchronisation with remote server, posted by Andreas Luedeke on Thu May 14 05:13:34 2015
|
> I came accross the admin guide and I was reading / searching for a way to sync logbooks across sites...
> elogd mention "-m" and "-M" ... not elog but elogd... with that description :
> synchronize logbook(s) with remote server
If you would have followed the shown link to the "elogd.cfg syntax page", you would have found the chapter Mirroring:
https://midas.psi.ch/elog/config.html#mirroring
> Does it sync all logbooks ?
Not necessarily, but that is the default.
> is there any examples somewhere or advice ?
See above: you'll find examples under #mirroring
> Thanks :)
You're welcome. |