ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69398
|
Thu Oct 21 00:42:42 2021 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Info | Linux | Unknown | Re: How to access PSI Elog data from other web clients |
There is a python API to access ELOG via HTTP: https://github.com/paulscherrerinstitute/py_elog
Lin Wang wrote: |
We want to develop separate mobile web pages for the web applications deployed at CSNS accelerator, including the PSI Elog.
In Elog, is there RESTful API or HTTP/JSON or HTTP/XML interface for other web clients to access?
Or is there any workaround?
|
|
69283
|
Wed Dec 16 12:41:42 2020 |
| Simon Däster | simon.daester+elog@gmail.com | Info | Windows | ELOG V3.1.4-a04 | Re: How to increase TEXT_SIZE to address entry text limit |
Hi Illam
You actually have to change the source code of elog and then recompile. Download the code from https://bitbucket.org/ritt/elog/src/master/, change the value of the variable TEXT_SIZE in the file src/elogd.h
Default ist #define TEXT_SIZE 250000
Illam Pakkirisamy wrote: |
Hi,
I'm trying to increase the entry text constraint but not sure how to do this. Couldn't find it in the documentation or may be I missed it. Appreciate your help.
Thanks.
Illam

|
|
69278
|
Thu Dec 3 19:11:38 2020 |
| Illam Pakkirisamy | illam@senseeker.com | Info | Windows | ELOG V3.1.4-a04 | How to increase TEXT_SIZE to address entry text limit |
Hi,
I'm trying to increase the entry text constraint but not sure how to do this. Couldn't find it in the documentation or may be I missed it. Appreciate your help.
Thanks.
Illam

|
69114
|
Wed Feb 12 13:19:31 2020 |
| Stefan Ritt | stefan.ritt@psi.ch | Info | All | 3.1.4 | ELOG Null Pointer Dereference Denial-of-Service Vulnerability |
An ELOG vulnerability has been reported, thanks to Asif Akbar of Trend Micro Security Researchworking with Trend Micro's Zero Day Initiative:
https://www.zerodayinitiative.com/advisories/ZDI-20-252/
The issue has been fixed in the current release 3.1.4-033e292 and in the RPM http://elog.psi.ch/elog/download/RPMS/elog-latest.x86_64.rpm
Best,
Stefan
|
69074
|
Wed Dec 4 20:39:41 2019 |
| John | secondcomingtechnologies@fastmail.com | Info | Linux | Windows | ELOG V3.1.4-ead | Re: How to selectively use Top/Bottom Text JavaScript. |
Wow thanks again Stefan for your kind and prompt responses!!
John
Stefan Ritt wrote: |
In JS, you have access to the browser URL via window.location. So you can write conditional code depending on the actual elog command.
Stefan
John wrote: |
I think I know what the answer(s) will be already.. that I will need to address this in JS. I don't want each screen to run/show the same code, other than the ones I want to. AND I do not want to have to create a custom form for each 'menu option' to achieve this (if possible).
Thanx,
John
|
|
|
69072
|
Wed Dec 4 10:15:56 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Info | Linux | Windows | ELOG V3.1.4-ead | Re: How to selectively use Top/Bottom Text JavaScript. |
In JS, you have access to the browser URL via window.location. So you can write conditional code depending on the actual elog command.
Stefan
John wrote: |
I think I know what the answer(s) will be already.. that I will need to address this in JS. I don't want each screen to run/show the same code, other than the ones I want to. AND I do not want to have to create a custom form for each 'menu option' to achieve this (if possible).
Thanx,
John
|
|
69071
|
Wed Dec 4 03:06:50 2019 |
| John | secondcomingtechnologies@fastmail.com | Info | Linux | Windows | ELOG V3.1.4-ead | How to selectively use Top/Bottom Text JavaScript. |
I think I know what the answer(s) will be already.. that I will need to address this in JS. I don't want each screen to run/show the same code, other than the ones I want to. AND I do not want to have to create a custom form for each 'menu option' to achieve this (if possible).
Thanx,
John |
69060
|
Mon Nov 18 16:58:21 2019 |
| Roger Kalt | roger.kalt@psi.ch | Info | Linux | 3.1.4 | Example scripts how to migrate or combine logbooks |
Attached the shell scripts using awk and sed how I have migrated two separated logbooks into one single and how I re-adjusted certain attributes. |
Attachment 1: run_modif.sh
|
#!/bin/bash
# KR84, 28.10.2019
# the input files are the exported XML files from ELOG -> Finden
# search in XML for sring between <DATE> and </DATE>
# and replace with: <DATE> and </DATE><When> and </When>
echo "converting export_rf.xml ..."
cat ./export_rf.xml |
sed 's/<Personnel\(.*\)Personnel>/<Author\1Author>/g' |
sed 's/<DATE\(.*\)DATE>/<DATE\1DATE>\n\t\t<When\1When>/g' |
sed 's/<Subject>\(.*\)<\/Subject>/<Title>\1<\/Title><Entry_Type><\/Entry_Type>/g' |
sed '/<Machine>SwissFEL<\/Machine>/ {N;N; s/<Machine>SwissFEL<\/Machine>.*<Domain>OBLA<\/Domain>.*<Section>TRFCB/<Machine>OBLA<\/Machine>\n\t\t<Domain>All<\/Domain>\n\t\t<Section>TRFCB/g}' |
sed 's/<When>Mon, /<When>/g' |
sed 's/<When>Tue, /<When>/g' |
sed 's/<When>Wed, /<When>/g' |
sed 's/<When>Thu, /<When>/g' |
sed 's/<When>Fri, /<When>/g' |
sed 's/<When>Sat, /<When>/g' |
sed 's/<When>Sun, /<When>/g' |
sed '/<When>.*<\/When>/{s/ Jan 20/.01./g}' |
sed '/<When>.*<\/When>/{s/ Feb 20/.02./g}' |
sed '/<When>.*<\/When>/{s/ Mar 20/.03./g}' |
sed '/<When>.*<\/When>/{s/ Apr 20/.04./g}' |
sed '/<When>.*<\/When>/{s/ May 20/.05./g}' |
sed '/<When>.*<\/When>/{s/ Jun 20/.06./g}' |
sed '/<When>.*<\/When>/{s/ Jul 20/.07./g}' |
sed '/<When>.*<\/When>/{s/ Aug 20/.08./g}' |
sed '/<When>.*<\/When>/{s/ Sep 20/.09./g}' |
sed '/<When>.*<\/When>/{s/ Oct 20/.10./g}' |
sed '/<When>.*<\/When>/{s/ Nov 20/.11./g}' |
sed '/<When>.*<\/When>/{s/ Dec 20/.12./g}' |
sed 's/ +0100<\/When>/<\/When>/g' |
sed 's/ +0200<\/When>/<\/When>/g' > export_rf_modified.xml
# sed 's/ Jan 20/.01./g' |
# sed 's/ Feb 20/.02./g' |
# sed 's/ Mar 20/.03./g' |
# sed 's/ Apr 20/.04./g' |
# sed 's/ May 20/.05./g' |
# sed 's/ Jun 20/.06./g' |
# sed 's/ Jul 20/.07./g' |
# sed 's/ Aug 20/.08./g' |
# sed 's/ Sep 20/.09./g' |
# sed 's/ Oct 20/.10./g' |
# sed 's/ Nov 20/.11./g' |
# sed 's/ Dec 20/.12./g' |
# search in XML and add offset to all IDs because they shall not overlap when merged.
echo "converting export_llrf.xml ..."
cat ./export_llrf.xml | sed 's/<Subject>\(.*\)<\/Subject>/<Entry_Type><\/Entry_Type>\n\t\t<Status><\/Status>\n\t\t<Title>\1<\/Title>\n\t\t<Inv_ID><\/Inv_ID>/g' > export_llrf_modified1.xml
cat ./export_llrf_modified1.xml | awk -F'\t\t<MID>|</MID>||' '{ if ($2!="") {print "\t\t<MID>"$2+2016"</MID>"} else { print $1} }' > export_llrf_modified2.xml
cat ./export_llrf_modified2.xml | awk -F'\t\t<REPLY_TO>|</REPLY_TO>||' '{ if ($2!="") {print "\t\t<REPLY_TO>"$2+2016"</REPLY_TO>"} else { print $1} }' > export_llrf_modified3.xml
cat ./export_llrf_modified3.xml | awk -F'\t\t<IN_REPLY_TO>|</IN_REPLY_TO>||' '{ if ($2!="") {print "\t\t<IN_REPLY_TO>"$2+2016"</IN_REPLY_TO>"} else { print $1} }' > export_llrf_modified.xml
rm -rf ./export_llrf_modified1.xml ./export_llrf_modified2.xml ./export_llrf_modified3.xml
cat ./export_llrf_modified.xml |
sed '/<Machine>SwissFEL<\/Machine>/ {N;N; s/<Machine>SwissFEL<\/Machine>.*<Domain>Test Systems<\/Domain>.*<Section>TRFCB/<Machine>OBLA<\/Machine>\n\t\t<Domain>All<\/Domain>\n\t\t<Section>TRFCB/g}' |
sed 's/<When>Mon /<When>/g' |
sed 's/<When>Tue /<When>/g' |
sed 's/<When>Wed /<When>/g' |
sed 's/<When>Thu /<When>/g' |
sed 's/<When>Fri /<When>/g' |
sed 's/<When>Sat /<When>/g' |
sed 's/<When>Sun /<When>/g' |
sed 's/-Jan-/.01./g' |
sed 's/-Feb-/.02./g' |
sed 's/-Mar-/.03./g' |
sed 's/-Apr-/.04./g' |
sed 's/-May-/.05./g' |
sed 's/-Jun-/.06./g' |
sed 's/-Jul-/.07./g' |
sed 's/-Aug-/.08./g' |
sed 's/-Sep-/.09./g' |
sed 's/-Oct-/.10./g' |
sed 's/-Nov-/.11./g' |
sed 's/-Dec-/.12./g' |
sed 's/ +0100<\/When>//g' |
sed 's/ +0200<\/When>//g' |
sed 's/<\/When>/:00<\/When>/g' |
sed 's/<When>-:00<\/When>/<When><\/When>/g' > export_llrf_modified_datetime.xml
echo "export_llrf_modified_datetime.xml need manual edit for empty <When></When>"
|
Attachment 2: generate_import_llrf_fwd.sh
|
#!/bin/bash
# KR84, 28.10.2019
# generate emtpy auto-fwd text for LLRF for 3100 entries and offset of 2000
echo "generated import_llrf_fwd.xml"
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > import_llrf_fwd.xml
echo "<ELOG_LIST>" >> import_llrf_fwd.xml
declare -i ID
declare -i IDNEW
for ID in {1..3013}
do
IDNEW=$ID+2016
echo -e "\t<ENTRY>" >> import_llrf_fwd.xml
echo -e "\t\t<MID>${ID}</MID>" >> import_llrf_fwd.xml
echo -e "\t\t<DATE>Mon, 28 Oct 2019 20:00:00 +0200</DATE>" >> import_llrf_fwd.xml
# echo -e "\t\t<DATE>28.10.2019 20:00:00</DATE>" >> import_llrf_fwd.xml
echo -e "\t\t<ATTACHMENT></ATTACHMENT>" >> import_llrf_fwd.xml
echo -e "\t\t<ENCODING>HTML</ENCODING>" >> import_llrf_fwd.xml
echo -e "\t\t<When>28.10.2019 20:00:00</When>" >> import_llrf_fwd.xml
# echo -e "\t\t<When>1572289200</When>" >> import_llrf_fwd.xml
echo -e "\t\t<Author>Kalt Roger (KR84)</Author>" >> import_llrf_fwd.xml
echo -e "\t\t<Machine>SwissFEL</Machine>" >> import_llrf_fwd.xml
echo -e "\t\t<Domain></Domain>" >> import_llrf_fwd.xml
echo -e "\t\t<Section></Section>" >> import_llrf_fwd.xml
echo -e "\t\t<System></System>" >> import_llrf_fwd.xml
echo -e "\t\t<Subsystem></Subsystem>" >> import_llrf_fwd.xml
echo -e "\t\t<Subject>Automatic forward</Subject>" >> import_llrf_fwd.xml
echo -e "\t\t<TEXT><meta http-equiv="refresh" content="0; URL='https://elog-gfa.psi.ch/SwissFEL+RF/${IDNEW}'" /></TEXT>" >> import_llrf_fwd.xml
echo -e "\t</ENTRY>" >> import_llrf_fwd.xml
done
echo "</ELOG_LIST>" >> import_llrf_fwd.xml
|