ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69259
|
Tue Nov 17 12:10:07 2020 |
| David Dunne | ddunne@seven.com.au | Question | Linux | 3.1.4 | Style <attribute> and Cell Style <attribute> on the same row | Query
(FYI, OS = FreeBSD, Elog Version as showing on logon box = V3.1.4-)
Is it possible to use both Style <attribute> and Cell Style <attribute> on the same row?
For example, have a Logbook containing several Attributes and display a subset of those attributes in Summary Mode. Two attributes are of interest for this query which are part of the attributes displayed in Summary Mode, attributes ‘Assign Line’ and ‘Service’
If the ‘Attribute Assign Line = Assign 1’ then shade all cells in that row #808080
but if the ‘Attribute Service = 1600’ always shade that cell #7A5776
Config file includes
Style Assign Line Assign 1 = background-color:#808080
Cell Style Service 1600 = background-color:#7A5776
The result is the row gets shaded #808080 if ‘Assign Line = Assign Line 1’ but fails to shade the Service cell colour #7A5776 if it equals 1600
Extract from HTML source for the ‘1600’ cell when both conditions are correct shows both background-color values are present and the cell is styled the first value listed (which is Style Assign Line Assign 1 = background-color:#808080 but I always want #7A5776 for cell Service when it is of value 1600)
.
<td class="list2" style="background-color:#808080" style="background-color:#7A5776"><a href="../Daily/1">1600</a></td>
Thank you,
David |
69258
|
Tue Oct 27 22:24:18 2020 |
| David Wallis | wallis@aps.anl.gov | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | Hi Andreas,
It was actually easier than that. The time stamps in the old system were in epoch format, so when I created the new record, (my conversion program was written in Python), I simply formatted that value in the format Stefan pointed out below, and defined the Orig Date field as text. Then I was able to munge the logbook file with 2 global editor commands, and it worked perfectly. Thanks again!
Andreas Luedeke wrote: |
Hi David,
correct. And in addition you will need to convert "Orig Date" from seconds-of-the-epoch into a properly formated date string (see example below from Stefan) ...
Andreas
David Wallis wrote: |
Hi Andreas,
Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.
Andreas Luedeke wrote: |
You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.
If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.
Cheers, Andreas
David Wallis wrote: |
Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
|
|
|
|
69257
|
Tue Oct 27 21:59:03 2020 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | Hi David,
correct. And in addition you will need to convert "Orig Date" from seconds-of-the-epoch into a properly formated date string (see example below from Stefan) ...
Andreas
David Wallis wrote: |
Hi Andreas,
Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.
Andreas Luedeke wrote: |
You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.
If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.
Cheers, Andreas
David Wallis wrote: |
Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
|
|
|
69256
|
Tue Oct 27 17:45:29 2020 |
| David Wallis | wallis@aps.anl.gov | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | Hi Andreas,
Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.
Andreas Luedeke wrote: |
You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.
If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.
Cheers, Andreas
David Wallis wrote: |
Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
|
|
69255
|
Tue Oct 27 17:07:00 2020 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.
If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.
Cheers, Andreas
David Wallis wrote: |
Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
|
69254
|
Tue Oct 27 16:49:53 2020 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | "Date" must be on the first line on each entry and it must be named "Date".
Stefan
David Wallis wrote: |
Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
|
69253
|
Tue Oct 27 16:37:07 2020 |
| David Wallis | wallis@aps.anl.gov | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?
Stefan Ritt wrote: |
You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|
69252
|
Tue Oct 27 16:15:26 2020 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | V3.1.4-ba84827 | Re: Create entry from command line - override Date? | You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:
MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category:
Subject: CURL test
Attachment:
Encoding: plain
========================================
Text body
|
|