How to make personal ELOG to public, posted by Hien Doan on Tue Mar 30 12:56:48 2021
|
Dear experts,
I am trying to use ELOG for my projects which we want to record every daily activities.
I have successful installed the ELOG to the computer (Windows10 -64 bit).
However, I don't know how to make it public or online, that people can access it from their computers.
I am a very newer to the ELOG.
Could you help me on it, please?
Best regards,
Hien. |
Re: How to make personal ELOG to public, posted by Sebastian Schenk on Tue Mar 30 18:08:37 2021
|
Dear Hien,
your problem is more general the question, how to get the elog to the network.
You have to open the port on your system to the network.
I would suggest to google "open port for webserver on windows".
As right now I would just do the same and follow a tutorial.
A remark here: elog by default runs at port 8080, if you haven't changed this, this is the port you should be opening to the network.
If the elog can be accessed in the local network and you want to open it to the whole internet,
then you need to configure your router/gateway/(company) firewall to allow forwarding of the port of the elog.
I can't give you tips here, at this is very user specific.
An other remark, i would suggest (for a productive environment) to use user authentication in the elog to restrict access.
If you do this, then you also should use https reverse proxy or have a read in the SSL section of the elog documentation.
As http only would transmit the credentials in plain text.
I hope, I could give you a route, what your next steps could be.
Best wishes,
Sebastian
> Dear experts,
>
> I am trying to use ELOG for my projects which we want to record every daily activities.
> I have successful installed the ELOG to the computer (Windows10 -64 bit).
> However, I don't know how to make it public or online, that people can access it from their computers.
> I am a very newer to the ELOG.
> Could you help me on it, please?
>
> Best regards,
> Hien. |
Re: How to make personal ELOG to public, posted by Hien Doan on Thu Apr 8 06:25:58 2021
|
Dear Sebastian,
Thank you very much for the instruction.
I am able to make the elog to the network.
Best regards,
Hien.
Sebastian Schenk wrote: | Dear Hien,
your problem is more general the question, how to get the elog to the network.
You have to open the port on your system to the network.
I would suggest to google "open port for webserver on windows".
As right now I would just do the same and follow a tutorial.
A remark here: elog by default runs at port 8080, if you haven't changed this, this is the port you should be opening to the network.
If the elog can be accessed in the local network and you want to open it to the whole internet,
then you need to configure your router/gateway/(company) firewall to allow forwarding of the port of the elog.
I can't give you tips here, at this is very user specific.
An other remark, i would suggest (for a productive environment) to use user authentication in the elog to restrict access.
If you do this, then you also should use https reverse proxy or have a read in the SSL section of the elog documentation.
As http only would transmit the credentials in plain text.
I hope, I could give you a route, what your next steps could be.
Best wishes,
Sebastian
> Dear experts,
>
> I am trying to use ELOG for my projects which we want to record every daily activities.
> I have successful installed the ELOG to the computer (Windows10 -64 bit).
> However, I don't know how to make it public or online, that people can access it from their computers.
> I am a very newer to the ELOG.
> Could you help me on it, please?
>
> Best regards,
> Hien. |
|
Re: How to make personal ELOG to public, posted by Frank Baptista on Mon Apr 26 16:14:49 2021
|
Hello Hien,
If you are sharing ELOG with users on the same network, here's something you can try. First, on the machine running ELOG, you need to find the "Computer name". To do this, locate "This PC", and right click it to get to "Properties" in the drop-down menu. You need to jot down the "Computer name". Now, users on the same network should be able to view ELOG by entering the following:
http://computer-name:(port number)
If you are using port 80 (instead of the default 8080) for ELOG, then there is no need to enter the port number.
Give that a try -- that is working well for us.
Cheers!
Frank
> Dear experts, > > I am trying to use ELOG for my projects which we want to record every daily activities. > I have successful installed the ELOG to the computer (Windows10 -64 bit). > However, I don't know how to make it public or online, that people can access it from their computers. > I am a very newer to the ELOG. > Could you help me on it, please? > > Best regards, > Hien. |
, posted by Vinzenz Bildstein on Fri Apr 23 18:53:16 2021
|
|
auto pre-fill fields issue, posted by Gys Wuyts on Fri Apr 9 16:48:54 2021
|
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G |
Re: auto pre-fill fields issue, posted by Stefan Ritt on Fri Apr 9 17:54:42 2021
|
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
Re: auto pre-fill fields issue, posted by Gys Wuyts on Sat Apr 10 20:58:35 2021
|
Thank you but that is already in place. I have the same issue on both Windows 10 and Windows Server 2016 and 2019.
tnks
g
Stefan Ritt wrote: |
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
|
Re: auto pre-fill fields issue, posted by Andreas Luedeke on Sun Apr 11 18:16:02 2021
|
If you would post a minimal config file where the problem occurs, then we could look what the problem is.
Gys Wuyts wrote: |
Thank you but that is already in place. I have the same issue on both Windows 10 and Windows Server 2016 and 2019.
tnks
g
Stefan Ritt wrote: |
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
|
|
Re: auto pre-fill fields issue, posted by Gys Wuyts on Mon Apr 12 13:32:53 2021
|
[global]
port = 8080
ssl = 0
Password file = passwords.txt
Admin user = user1
SMTP host = smtp. mail.com
SMTP port = 25
SMTP username = user1@mail.com
SMTP Password = GIwbx7UbmkWs5J0P8lVztX7Anje0/21BU/Tmk0aPm.
Logfile = ELog_log.txt
Logging level = 3
[Server]
Logbook dir = Server
Theme = default
Comment = Server Change Log
Attributes = Author, Email, Type, Category, Subject
Subst Author = $long_name from $remote_host
Subst Email = $user_email
Options Type = SRV 1, SRV 2, SRV Sup, BMS content, BMS setpoints, BMS new
Options Category = Config, User, Access, Connection, Change, New, Delete
Extendable Options =
Required Attributes = Author, Type
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type
Andreas Luedeke wrote: |
If you would post a minimal config file where the problem occurs, then we could look what the problem is.
Gys Wuyts wrote: |
Thank you but that is already in place. I have the same issue on both Windows 10 and Windows Server 2016 and 2019.
tnks
g
Stefan Ritt wrote: |
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
|
|
|
Re: auto pre-fill fields issue, posted by Stefan Ritt on Mon Apr 12 13:57:18 2021
|
"Subst xxx" replaces after you submit an entry, while "Preset xxx" replaces before you create an entry. I believe you want the second one.
Stefan
Gys Wuyts wrote: |
[global]
port = 8080
ssl = 0
Password file = passwords.txt
Admin user = user1
SMTP host = smtp. mail.com
SMTP port = 25
SMTP username = user1@mail.com
SMTP Password = GIwbx7UbmkWs5J0P8lVztX7Anje0/21BU/Tmk0aPm.
Logfile = ELog_log.txt
Logging level = 3
[Server]
Logbook dir = Server
Theme = default
Comment = Server Change Log
Attributes = Author, Email, Type, Category, Subject
Subst Author = $long_name from $remote_host
Subst Email = $user_email
Options Type = SRV 1, SRV 2, SRV Sup, BMS content, BMS setpoints, BMS new
Options Category = Config, User, Access, Connection, Change, New, Delete
Extendable Options =
Required Attributes = Author, Type
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type
Andreas Luedeke wrote: |
If you would post a minimal config file where the problem occurs, then we could look what the problem is.
Gys Wuyts wrote: |
Thank you but that is already in place. I have the same issue on both Windows 10 and Windows Server 2016 and 2019.
tnks
g
Stefan Ritt wrote: |
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
|
|
|
|
Re: auto pre-fill fields issue, posted by Gys Wuyts on Mon Apr 12 14:17:52 2021
|
Super, overlooked that one. Works now
g
Stefan Ritt wrote: |
"Subst xxx" replaces after you submit an entry, while "Preset xxx" replaces before you create an entry. I believe you want the second one.
Stefan
Gys Wuyts wrote: |
[global]
port = 8080
ssl = 0
Password file = passwords.txt
Admin user = user1
SMTP host = smtp. mail.com
SMTP port = 25
SMTP username = user1@mail.com
SMTP Password = GIwbx7UbmkWs5J0P8lVztX7Anje0/21BU/Tmk0aPm.
Logfile = ELog_log.txt
Logging level = 3
[Server]
Logbook dir = Server
Theme = default
Comment = Server Change Log
Attributes = Author, Email, Type, Category, Subject
Subst Author = $long_name from $remote_host
Subst Email = $user_email
Options Type = SRV 1, SRV 2, SRV Sup, BMS content, BMS setpoints, BMS new
Options Category = Config, User, Access, Connection, Change, New, Delete
Extendable Options =
Required Attributes = Author, Type
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type
Andreas Luedeke wrote: |
If you would post a minimal config file where the problem occurs, then we could look what the problem is.
Gys Wuyts wrote: |
Thank you but that is already in place. I have the same issue on both Windows 10 and Windows Server 2016 and 2019.
tnks
g
Stefan Ritt wrote: |
You need user-level access control, using
Password file = ...
Stefan
Gys Wuyts wrote: |
Hello,
what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:
Subst Author = $long_name from $remote_host
Subst Email = $user_email
in the elogd.cfg file does not seem to work.
(I see it works here on this platform)
Tnks
G
|
|
|
|
|
|
|
Parsing log files, posted by Alan Grant on Fri Jan 8 05:48:45 2021
|
Sometimes we change the attributes in a config file for a given tab as time goes on, which naturally can get out of sync with the older data in that tab.
I can imagine some other Elog users have encounterd this too at some point so I'm wondering if there's a utilty or some way anyone knows of that I can use to parse a log file DIRECTLY to view the older data, without using the Elog GUI? |
Re: Parsing log files, posted by John on Fri Jan 8 06:14:49 2021
|
Hi Al; if I understand your situation correctly you want to access Elog db (logbooks) via another way. There are many ways depending on your knowledge, type of work needed, and ease of use. I have found that accessing whatever I need via Elog gui is satisfactory in many situations-- by simply exporting. THEN take the raw csv/xml file and manipulte it more easily from there. There are MANY free web sites that will take your data then, and put it in still another format that you choose (usually manipulating the rows/columns to your liking or doing mail-merge type work on your data). BTW WPS (Windows Office clone) is awesome at further 'mail-merg' techniques. THEN at that point you may have close to what you are trying to accomplish. I've also used PHP alot in this type of situation and have replicated Elog's data format for it's db (logbooks)..; so PHP is great in this maner, although of course it takes time to 'get-it-right' if you are not well versed in it. If you go into detail more of what type of format you want as the finalized product, maybe more suggestions will be made.
Happy belated New Years everyone,
John
Alan Grant wrote: |
Sometimes we change the attributes in a config file for a given tab as time goes on, which naturally can get out of sync with the older data in that tab.
I can imagine some other Elog users have encounterd this too at some point so I'm wondering if there's a utilty or some way anyone knows of that I can use to parse a log file DIRECTLY to view the older data, without using the Elog GUI?
|
|
Re: Parsing log files, posted by Alan Grant on Fri Jan 8 15:28:06 2021
|
John wrote: |
Hi Al; if I understand your situation correctly you want to access Elog db (logbooks) via another way. There are many ways depending on your knowledge, type of work needed, and ease of use. I have found that accessing whatever I need via Elog gui is satisfactory in many situations-- by simply exporting. THEN take the raw csv/xml file and manipulte it more easily from there. There are MANY free web sites that will take your data then, and put it in still another format that you choose (usually manipulating the rows/columns to your liking or doing mail-merge type work on your data). BTW WPS (Windows Office clone) is awesome at further 'mail-merg' techniques. THEN at that point you may have close to what you are trying to accomplish. I've also used PHP alot in this type of situation and have replicated Elog's data format for it's db (logbooks)..; so PHP is great in this maner, although of course it takes time to 'get-it-right' if you are not well versed in it. If you go into detail more of what type of format you want as the finalized product, maybe more suggestions will be made.
Happy belated New Years everyone,
John
Alan Grant wrote: |
Sometimes we change the attributes in a config file for a given tab as time goes on, which naturally can get out of sync with the older data in that tab.
I can imagine some other Elog users have encounterd this too at some point so I'm wondering if there's a utilty or some way anyone knows of that I can use to parse a log file DIRECTLY to view the older data, without using the Elog GUI?
|
|
Hi John. The problem with using the Find-->Export method is that some of the Attributes for the older data are no longer shown on that screen because the Config file has since changed. That's why I'm contemplating somehow parsing the log files directly instead. |
Re: Parsing log files, posted by Stefan Ritt on Fri Jan 8 15:35:35 2021
|
Well, you could put the old options back to the config file, do the export, then remove them again.
But have a look at the Elog database files ZZMMDDa.log in your logbook directory, they are pure ASCII files, which are relatively simple to parse.
Hi John. The problem with using the Find-->Export method is that some of the Attributes for the older data are no longer shown on that screen because the Config file has since changed. That's why I'm contemplating somehow parsing the log files directly instead.
|
|
Re: Parsing log files, posted by Lagarde on Wed Apr 7 17:11:28 2021
|
Hi,
I had similar needs (access and parse logs ) so I'm a small library in cpp. Have a look on https://github.com/flagarde/elogpp maybe it could be usefull for you too.
Alan Grant wrote: |
Sometimes we change the attributes in a config file for a given tab as time goes on, which naturally can get out of sync with the older data in that tab.
I can imagine some other Elog users have encounterd this too at some point so I'm wondering if there's a utilty or some way anyone knows of that I can use to parse a log file DIRECTLY to view the older data, without using the Elog GUI?
|
|
Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 16:20:37 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance. |
Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 16:25:36 2021
|
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Wed Mar 24 17:36:15 2021
|
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Wed Mar 24 19:30:50 2021
|
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values from this file via a preset shell script when opening a NEW entry?
Best wishes & thanks in advance
Sebastian Schenk wrote: |
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
|
Re: Pre-fill Attribute with last entry, posted by Stefan Ritt on Wed Mar 24 19:45:41 2021
|
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.
Stefan
Dominic Schneider wrote: |
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values from this file via a preset shell script when opening a NEW entry?
Best wishes & thanks in advance
Sebastian Schenk wrote: |
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
|
|
Re: Pre-fill Attribute with last entry, posted by Dominic Schneider on Thu Mar 25 07:48:24 2021
|
Thank you very much.
So far I testet all functionalities and scripts to reach my goal. I will post a dummy of the solution later on for future purposes.
Best wishes
Stefan Ritt wrote: |
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.
Stefan
Dominic Schneider wrote: |
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values from this file via a preset shell script when opening a NEW entry?
Best wishes & thanks in advance
Sebastian Schenk wrote: |
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
|
|
|
Re: Pre-fill Attribute with last entry, posted by Sebastian Schenk on Thu Mar 25 12:50:08 2021
|
I am glad, we could help.
I can see a caveat in the recommendation.
By having "Execute New = echo $attrib > /path/last_attrib" and "Preset attrib = $shell(cat /path/last_attrib)" as the most simple construction.
But there are cases, where /path/last_attrib can get out of sync with the elog by e.g. editing or deleting the last entry, which is the most likely one to edit or delete.
I am aware, that you can make the logic more complex to fix this issue,
but basically you have the same information stored in two locations and you have to keep them in sync for the system to be reliable.
I am not sure, if it will be more hassle to construct a script/config system to keep them in sync or to find a solution which gets the information from the elog database.
Dominic Schneider wrote: |
Thank you very much.
So far I testet all functionalities and scripts to reach my goal. I will post a dummy of the solution later on for future purposes.
Best wishes
Stefan Ritt wrote: |
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.
Stefan
Dominic Schneider wrote: |
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values from this file via a preset shell script when opening a NEW entry?
Best wishes & thanks in advance
Sebastian Schenk wrote: |
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
|
|
|
|
Re: Pre-fill Attribute with last entry, posted by Richard Stamper on Tue Mar 30 13:43:46 2021
|
Just noting that, depending on what you want to achieve, you may be able to use the threading functionality so that a "new" entry is actually a "reply" to a previous entry. This will allow you to populate attributes with values from that previous entry without having to rely on storing information outside the system, with all the attendant concurrency risks already identified.
Sebastian Schenk wrote: |
I am glad, we could help.
I can see a caveat in the recommendation.
By having "Execute New = echo $attrib > /path/last_attrib" and "Preset attrib = $shell(cat /path/last_attrib)" as the most simple construction.
But there are cases, where /path/last_attrib can get out of sync with the elog by e.g. editing or deleting the last entry, which is the most likely one to edit or delete.
I am aware, that you can make the logic more complex to fix this issue,
but basically you have the same information stored in two locations and you have to keep them in sync for the system to be reliable.
I am not sure, if it will be more hassle to construct a script/config system to keep them in sync or to find a solution which gets the information from the elog database.
Dominic Schneider wrote: |
Thank you very much.
So far I testet all functionalities and scripts to reach my goal. I will post a dummy of the solution later on for future purposes.
Best wishes
Stefan Ritt wrote: |
That would actually be my recommendation. There is a "execute new" which you can call when submitting a new entry.
Stefan
Dominic Schneider wrote: |
Hi Stefan, hi Sebastian,
thank you for your help. Ok I see its not that simple.
Is there maybe a way of executing a Script on submitting, writing the values of the Attributes into an temporary file and loading the values from this file via a preset shell script when opening a NEW entry?
Best wishes & thanks in advance
Sebastian Schenk wrote: |
Sorry Stefan, but it is possible as you have the scripting ability.
The idea is to use "Preset Test_Attribute = $shell(script_to_get_the_last_entry)", where the script asks elog about the details and parses them.
The problem here is, that the elogd already is working to resolve the click on "new entry" request (or similar) and the script can't call elogd until the page is delievered, what is to late.
(If it would, the elogd will hang.)
So the script either has to directly parse all the entry.log files in the logbook folder or you need a second elogd running, which can answer the request from the script.
This second elogd could run on a different port and it doen't need to be public as it only answers internal requests and could use the same config as the "primary" elogd.
My idea for the script uses the python elog module to establish the connection and do the parsing.
I hope this helps as a workaround.
Best wishes,
Sebastian
Stefan Ritt wrote: |
Nope, there is no way to acces the last value of an attribute. Sorry.
Stefan
Dominic Schneider wrote: |
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance.
|
|
|
|
|
|
|
|
automatically obtain entry ID from search, posted by Chris Körner on Tue Mar 23 23:05:20 2021
|
Hi,
in our application I want to have, let's say in the simplest case, two logbooks. One as a database of samples we fabricated and one as a logbook for measurements. When a measurement on a sample is done and an entry is submitted to the 2nd logbook, I want to automatically edit or reply to the corresponding entry in the 1st logbook. For example I want to append a line in the free text field to have a full log of what happened to a sample there. We reference our samples with a unique auto-generated ID in both logbooks. Is is somehow possible to search the 1st logbook for that ID or any other attribute and obtain the elog entry ID since the elog client will need that ID for editing an entry? |
Re: automatically obtain entry ID from search, posted by Stefan Ritt on Wed Mar 24 10:01:34 2021
|
You would have to do that on the scrip level. Use "curl" to search a logbook. Like following URL would search for all entries in this forum where you are the authoer, then return the entries in CSV format:
https://elog.psi.ch/elogs/Forum/?mode=CSV1&Author=k%F6rner
Then you can parese this CSV file and extract the entry ID, which you can pass to the elog client to submit a new entry to the other logbook.
Stefan
Chris Körner wrote: |
Hi,
in our application I want to have, let's say in the simplest case, two logbooks. One as a database of samples we fabricated and one as a logbook for measurements. When a measurement on a sample is done and an entry is submitted to the 2nd logbook, I want to automatically edit or reply to the corresponding entry in the 1st logbook. For example I want to append a line in the free text field to have a full log of what happened to a sample there. We reference our samples with a unique auto-generated ID in both logbooks. Is is somehow possible to search the 1st logbook for that ID or any other attribute and obtain the elog entry ID since the elog client will need that ID for editing an entry?
|
|
Re: automatically obtain entry ID from search, posted by Sebastian Schenk on Wed Mar 24 18:02:07 2021
|
Hi Chris,
Additional the the HTTP request sugested by Stefan you could also use the search functionality of the elog python module.
For the HTTP request you may also need a way to provide credentials or transmit cookies, if the elog needs authentification.
I think your request to alter the samples logbook will be called with "execute new" or similar at submit time of the entry to the measurement logbook.
Then both methods will have the issue that elogd is still processing the submit and can't answer new requests until the old is finished.
Have a look at https://elog.psi.ch/elogs/Forum/69328 for possible workarounds.
Best wishes,
Sebastian
Stefan Ritt wrote: |
You would have to do that on the scrip level. Use "curl" to search a logbook. Like following URL would search for all entries in this forum where you are the authoer, then return the entries in CSV format:
https://elog.psi.ch/elogs/Forum/?mode=CSV1&Author=k%F6rner
Then you can parese this CSV file and extract the entry ID, which you can pass to the elog client to submit a new entry to the other logbook.
Stefan
Chris Körner wrote: |
Hi,
in our application I want to have, let's say in the simplest case, two logbooks. One as a database of samples we fabricated and one as a logbook for measurements. When a measurement on a sample is done and an entry is submitted to the 2nd logbook, I want to automatically edit or reply to the corresponding entry in the 1st logbook. For example I want to append a line in the free text field to have a full log of what happened to a sample there. We reference our samples with a unique auto-generated ID in both logbooks. Is is somehow possible to search the 1st logbook for that ID or any other attribute and obtain the elog entry ID since the elog client will need that ID for editing an entry?
|
|
|
Pre-fill , posted by Dominic Schneider on Wed Mar 24 16:11:04 2021
|
Hi all together,
I struggle a lot with the following problem:
I try to prefill certain attributes with the value of exactly the same attribute in the last entry made in the same logbook.
I know I have to go with Preset, tried a view hours and searched the forum but i didn't find a thing. Am I overlooking a flag, an option or whatever, or is there just not such a functionality (which I dont believe)?
I thought about:
Preset Test_Attribute = $Test_attribute
Preset Test_Attribute = Re:$Test_attribute
Preset Test_Attribute = $shell(Command to somehow get last entry and this attributes value)
Not succesful though.
I would be very thankful for help, thanks in advance. |
Date conversion, posted by Martin Neumann on Tue Feb 23 12:12:14 2021
|
Hi,
I am trying to figure out how ELOG works and I have a problem.
I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons.
How do I manage that this input is converted correctly into the internal format?
I tried adding a hidden locked Attribute called IntDate and use "Subst IntDate = $start" but the result is dates in 1970, even though I have set the Time Format to "%F %H:%M" |
Re: Date conversion, posted by Andreas Luedeke on Tue Feb 23 17:20:39 2021
|
If you define a field as "datetime" then you'll get the standard ELOG input field for datetime. It will be stored as seconds of the epoch (seconds since 1.1.1970).
You can define a field as a default string input, then it is stored as a string. But you can convert that string by a shell scripts into seconds of the epoch. See "subst" command in the documentation of the elog syntax:
Subst <attribute> = <string>
When submitting logbook entries, attribute values can be substituted by some text. This text can contain arbitrary fixed text and following values:
- $<attribute>: The entered value of the attribute itself
- $host: The host name where
elogd is running
- $remote_host: The host name of the host from with the entry was submitted
- $short_name: The login name (if password file is present)
- $long_name: The full name from the password file for the current user
- $user_email: The email address from the password file for the current user
- $logbook: The name of the current logbook
- $date: The current date, formatted via "Date format"
- $utcdate: The current UTC date (GMT) and time, formatted via "Date format"
- $version: The version of the ELOG server in the form x.y.z
- $revision: The Subversion reversion of the ELOG server as an integer number
- $shell(<command>): <command> gets passed to the operating system shell and the result is taken for substitution.
Following example use this feature to add the remote host name to the author:
Subst Author = $author from $remote_host
Following example substitutes an attribute with the contents of a file:
Subst Info = $shell(cat /tmp/filename) (Unix)
Subst Info = $shell(type c:\tmp\filename) (Windows)
A special option are automatically generated tags, which are automatically incremented for each new message. This is achieved by putting #'s into the substitution string, which is used as a placeholder for the incrementing index. Each "#" stands for one digit, thus the statement
Subst Number = XYZ-#####
results in automatically created attributes "Number" of the form
XYZ-00001
XYZ-00002
XYZ-00003
and so on. In addition to the #'s one may specify format specifiers which are passed to the strftime function. This allows to create tags wich contain the current year, month and so on. Once the date part of the attribute changes, the index restarts from one. The statement
Subst Number = XYZ-%Y-%b-###
results in automatically created attributes "Number" of the form
XYZ-2005-Oct-001
XYZ-2005-Oct-002
XYZ-2005-Oct-003
and
XYZ-2005-Nov-001
XYZ-2005-Nov-002
on the next month.
Martin Neumann wrote: |
Hi,
I am trying to figure out how ELOG works and I have a problem.
I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons.
How do I manage that this input is converted correctly into the internal format?
I tried adding a hidden locked Attribute called IntDate and use "Subst IntDate = $start" but the result is dates in 1970, even though I have set the Time Format to "%F %H:%M"
|
|
Re: Date conversion, posted by Martin Neumann on Wed Feb 24 08:44:42 2021
|
I don't feel comfortable allowing the elog daemon to execute random shell scripts. Is there no other way?
Andreas Luedeke wrote: |
If you define a field as "datetime" then you'll get the standard ELOG input field for datetime. It will be stored as seconds of the epoch (seconds since 1.1.1970).
You can define a field as a default string input, then it is stored as a string. But you can convert that string by a shell scripts into seconds of the epoch. See "subst" command in the documentation of the elog syntax:
|
|
Re: Date conversion, posted by Sebastian Schenk on Tue Mar 2 15:17:56 2021
|
One other way would be to do the conversion on the client-side using javascript.
Overwrite the complete datetime input cell and add an event listener to either onChange of this input or the submit event, to trigger the conversion before submitting, so elog would get the converted time.
In out elog some entries get additional information added in this way.
Martin Neumann wrote: |
I don't feel comfortable allowing the elog daemon to execute random shell scripts. Is there no other way?
Andreas Luedeke wrote: |
If you define a field as "datetime" then you'll get the standard ELOG input field for datetime. It will be stored as seconds of the epoch (seconds since 1.1.1970).
You can define a field as a default string input, then it is stored as a string. But you can convert that string by a shell scripts into seconds of the epoch. See "subst" command in the documentation of the elog syntax:
|
|
|
Re: Date conversion, posted by Stefan Ritt on Wed Mar 10 17:30:23 2021
|
Do you actually need to convert the date into the internal format? Why not keeping simply the full string YYYY-MM-DD HH:MM. If the use is disciplined enough to always use the correct format, there should be no issue. I invented the datetime format to "force" all date/time inputs to have the correct format. If you have a proper YYYY-MM-DD HH:MM format, even sorting (now by string) should work correctly.
Martin Neumann wrote: |
Hi,
I am trying to figure out how ELOG works and I have a problem.
I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons.
How do I manage that this input is converted correctly into the internal format?
I tried adding a hidden locked Attribute called IntDate and use "Subst IntDate = $start" but the result is dates in 1970, even though I have set the Time Format to "%F %H:%M"
|
|
|