ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
68828
|
Thu Jun 14 19:17:41 2018 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.3 | Re: edit templates from config page | As always, Andreas has clever ideas. Never thought about this possibility.
Stefan |
68827
|
Thu Jun 14 18:17:07 2018 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | Linux | 3.1.3 | Re: edit templates from config page | > Dear all,
> I have some logbook which uses preset text depending on some option values, and uses text files for this.
>
> something similar to:
>
> Options Type = Start of shift{1}, 2h{2}, 4h{3}, 6h{4}, End of shift {5}
>
> {1} Preset text = MCProdStart.txt
> {2} Preset text = MCProd2h.txt
> {3} Preset text = MCProd4h.txt
> {4} Preset text = MCProd6h.txt
> {5} Preset text = MCProdEnd.txt
>
> I wonder if there is a way to change/edit the text files from the web interface if you are admin of that logbook, or if the only way is to change the files directly in the elog server.
>
> thanks Stefano
Hi Stefano,
it is not directly foreseen in the web functionality of ELOG, but it can be done like this:
You could have a second logbook that has the content of these files each in one logbook entry.
You call a script "Execute edit =" that runs on the server and converts the specific ELOG entry into a file on the server.
Of course this is a security vulnerability, but you can confine the possibilities of the script.
E.g. to a hard-coded list of ELOG entries and files in a specific directory.
Still, someone could place a file on the server and then calls that file with an "Execute edit=" himself.
But if you do all this within a protected network that should be okay.
I do like the idea, thank you for the question! If you manage to do it please post it under Contributions :-)
Cheers, Andreas |
68826
|
Thu Jun 14 13:20:26 2018 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.3 | Re: edit templates from config page | > Dear all,
> I have some logbook which uses preset text depending on some option values, and uses text files for this.
>
> something similar to:
>
> Options Type = Start of shift{1}, 2h{2}, 4h{3}, 6h{4}, End of shift {5}
>
> {1} Preset text = MCProdStart.txt
> {2} Preset text = MCProd2h.txt
> {3} Preset text = MCProd4h.txt
> {4} Preset text = MCProd6h.txt
> {5} Preset text = MCProdEnd.txt
>
> I wonder if there is a way to change/edit the text files from the web interface if you are admin of that logbook, or if the only way is to change the files directly in the elog server.
>
> thanks Stefano
No, you can only edit this on the file level.
Stefan |
68825
|
Thu Jun 14 13:17:33 2018 |
| Stefan Ritt | stefan.ritt@psi.ch | Request | Linux | 3.1.3 | Re: number of entries in Login user list | Well, many arrays based on MAX_N_LIST are created on the heap memory, and if you exceed that, elogd simply crashes. There are compile options to increase the stack and heap size, but that depends on the operating system and the compiler. The value of 100 has been proven to work everywhere. If you increase it, you're on your own.
Stefan
Janusz Szuba wrote: |
Thanks, good point, I was not sure that in case of other lists which will be changed as well, there will not be any problems, like overflow, etc.
Regarding admin list, now I remember, that was the limit to send email notification in case of registration requests. But actually it is not important right now.
best
Janusz
Andreas Luedeke wrote: |
Hi Janusz,
You can change the following line in elogd.h and recompile:
#define MAX_N_LIST 100
That'll change the login user list limit. But it'll change other list length as well - which should not do harm unless you are very short of memory.
I don't see the Admin user list limit of 10 - aparently that is hard coded somewhere deep within (or I've just missed it).
Cheers, Andreas
Janusz Szuba wrote: |
Hi,
could it be possible to increase the limit of entries in Login user list from 100 to somewhat reasonably higher? Like twice or 3 times as much. Similar limit exist also on Admin user list, which is afair 10, could this also be increased?
best
Janusz
|
|
|
|
68824
|
Thu Jun 14 13:12:02 2018 |
| Stefano Lacaprara | stefano.lacaprara@pd.infn.it | Question | Linux | 3.1.3 | edit templates from config page | Dear all,
I have some logbook which uses preset text depending on some option values, and uses text files for this.
something similar to:
Options Type = Start of shift{1}, 2h{2}, 4h{3}, 6h{4}, End of shift {5}
{1} Preset text = MCProdStart.txt
{2} Preset text = MCProd2h.txt
{3} Preset text = MCProd4h.txt
{4} Preset text = MCProd6h.txt
{5} Preset text = MCProdEnd.txt
I wonder if there is a way to change/edit the text files from the web interface if you are admin of that logbook, or if the only way is to change the files directly in the elog server.
thanks Stefano |
68823
|
Thu Jun 14 13:07:32 2018 |
| Janusz Szuba | janusz.szuba@xfel.eu | Request | Linux | 3.1.3 | Re: number of entries in Login user list | Thanks, good point, I was not sure that in case of other lists which will be changed as well, there will not be any problems, like overflow, etc.
Regarding admin list, now I remember, that was the limit to send email notification in case of registration requests. But actually it is not important right now.
best
Janusz
Andreas Luedeke wrote: |
Hi Janusz,
You can change the following line in elogd.h and recompile:
#define MAX_N_LIST 100
That'll change the login user list limit. But it'll change other list length as well - which should not do harm unless you are very short of memory.
I don't see the Admin user list limit of 10 - aparently that is hard coded somewhere deep within (or I've just missed it).
Cheers, Andreas
Janusz Szuba wrote: |
Hi,
could it be possible to increase the limit of entries in Login user list from 100 to somewhat reasonably higher? Like twice or 3 times as much. Similar limit exist also on Admin user list, which is afair 10, could this also be increased?
best
Janusz
|
|
|
68822
|
Thu Jun 14 12:37:22 2018 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Request | Linux | 3.1.3 | Re: number of entries in Login user list | Hi Janusz,
You can change the following line in elogd.h and recompile:
#define MAX_N_LIST 100
That'll change the login user list limit. But it'll change other list length as well - which should not do harm unless you are very short of memory.
I don't see the Admin user list limit of 10 - aparently that is hard coded somewhere deep within (or I've just missed it).
Cheers, Andreas
Janusz Szuba wrote: |
Hi,
could it be possible to increase the limit of entries in Login user list from 100 to somewhat reasonably higher? Like twice or 3 times as much. Similar limit exist also on Admin user list, which is afair 10, could this also be increased?
best
Janusz
|
|
68821
|
Wed Jun 13 18:08:06 2018 |
| Janusz Szuba | janusz.szuba@xfel.eu | Request | Linux | 3.1.3 | number of entries in Login user list | Hi,
could it be possible to increase the limit of entries in Login user list from 100 to somewhat reasonably higher? Like twice or 3 times as much. Similar limit exist also on Admin user list, which is afair 10, could this also be increased?
best
Janusz |
|