Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 220 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Categorydown OS ELOG Version Subject
  65948   Mon Aug 11 06:56:56 2008 Reply dale cooperagentdcooper@gmail.comQuestionAll2.7.4xRe: 2 questions :: different colors in list view based on "type" + change verbage of "type"
PERFECT, you answered my questions EXACTLY with what I am looking for! thanks soo much!
agentdcooper


Yoshio Imai wrote:

dale cooper wrote:
I'd love to display in the LIST VIEW (full, summary, or threaded views) different color's based on which TYPE was selected...

You can achieve this by using a "style" directive for this attribute. E.g. if your attribute is called "Shift" and entries with value "Day" should be green, value "Swing" should be blue, you should add
Style Shift Day = background-color:green
Style Shift Swing = background-color:blue
(and so on) to the config file.



Quote:
really I am just wondering if I can change the verbage that ELOG is using for the term TYPE? Is that doable?

As long as I am not missing a key point in your problem, you should be able to define the names of your logbook attributes simply with the "Attribute" directive. So, if you want the users to enter the shift and the name of the shift leader, you would put a line
Attributes = Shift, Shift leader
Options Shift = Day, Swing, ... <and so on>
Options Shift leader = Mike, Edward, John, ... <and so on>
and the logbook display should correctly show "Shift" and "Shift leader" in the header line of each entry ...
  65949   Mon Aug 11 11:02:18 2008 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.7.4-2111Re: Using the command line tool to edit

T. Ribbrock wrote:

I intend to create a script that updates one of our elog logbooks based on mails it receives. I was hoping to be able to do this using the "elog" command line tool. Adding a new entry works fine, as does "replying" to an existing entry. The only thing I cannot get to work is editing an existing entry. All entries ahve several attributes and I intend not to use the "message" itself. I tried the following (on the machine this elogd is running on):

  1. Create a new entry with Attribute1 set to "value":

    elog -a 'Attribute1=value' -x -h localhost -l 'LOGBOOK' -p 8080 -u USER PASSWD

    This works - the entry gets created and is displayed properly.
    NOTE: I found that this does not work if LOGBOOK has any spaces in it - I would get error messages where the logbook was not found.
     
  2. Edit this entry to set a second attribute:

    elog -e 1 -a 'Attribute2=something' -x -h localhost -l 'LOGBOOK' -p 8080 -u USER PASSWD

    The result was: Error transmitting message. Running the same command with -v gives me a whole bunch of text with at the end this message (I've stripped the HTML): "This entry has in meantime been modified by someone else. Submitting it now would overwrite the other modification and is therefore prohibited." However, I know for certain that this entry is not being editied by anyone at that moment, so I'm wondering what I'm doing wrong here...

Also, I have a second, related question: Editing by the ID of the entry seems to be the only way of editing an entry - this makes it a bit difficult for me, as all entries already have a unique ID (which is defined as one of the attributes) that is non-numerical and not sequential. What is the easiest way to retrieve an ID from the command line (basically something like: "What ID has the entry with Attribute1==NAME?")? Is it possible at all? Otherwise, I would not be able to automatically edit the entries, as I don't know which is which... :-}

 I fixed two things:

  • The logbook can now contain a space. Enclose it in double quotes such as elog -l "LOG BOOK" ...
  • The error you report comes from the fact that you are the first person using elog submissions together with "use lock=1" in the configuration file. This has never been tested and therefore does not work . So I fixed this by adding a new hidden parameter. If you update to SVN revision 2122, things should work

Concerning your request of editing existing entries by their idea, I agree with Yoshi that you could grab the ID upon the first submission. An alternative is to make a direct search on a logbook. Since this is not implemented in the elog command line tool, you have to use wget for it:

wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something" -O elog.txt

A problem here is that the username and password are normally transmitted in an encrypted form as cookies by your browser after you logged in. Now you have to convince wget first to log in like

wget "http://localhost:8080/LOGBOOK/?unamee=USER&upassword=PASSWD"--save-cookies cookies.txt

followed by a second call to wget with --load-cookies cookies.txt. I tried that but was not successful since the login procedure above redirects to the elog listing page, and only the cookies set after the redirection were saved in cookies.txt. Maybe you can figure out how to do that. The only way I could get it to work is to supply the encoded password, which I manually obtained from the password file. The URL was then

wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something&unm=USER&upwd=ENC_PWD" -O elog.txt

  65950   Mon Aug 11 15:14:40 2008 Reply T. Ribbrockemgaron+elog@ribbrock.orgQuestionLinux2.7.4-2111Re: Using the command line tool to edit
Stefan Ritt wrote:

I fixed two things:

  • The logbook can now contain a space. Enclose it in double quotes such as elog -l "LOG BOOK" ...
  • The error you report comes from the fact that you are the first person using elog submissions together with "use lock=1" in the configuration file. This has never been tested and therefore does not work . So I fixed this by adding a new hidden parameter. If you update to SVN revision 2122, things should work

Tehe, leave it to us "stupid users" to break your nice little program in new and exiting ways... ;-) But: THANK YOU! Both things are indeed working now - that brings me one step closes to my automated logbook, which is great!

 

Stefan Ritt wrote:

Concerning your request of editing existing entries by their idea, I agree with Yoshi that you could grab the ID upon the first submission. An alternative is to make a direct search on a logbook. Since this is not implemented in the elog command line tool, you have to use wget for it:

wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something" -O elog.txt

A problem here is that the username and password are normally transmitted in an encrypted form as cookies by your browser after you logged in. Now you have to convince wget first to log in like

wget "http://localhost:8080/LOGBOOK/?unamee=USER&upassword=PASSWD"--save-cookies cookies.txt

followed by a second call to wget with --load-cookies cookies.txt. I tried that but was not successful since the login procedure above redirects to the elog listing page, and only the cookies set after the redirection were saved in cookies.txt. Maybe you can figure out how to do that. The only way I could get it to work is to supply the encoded password, which I manually obtained from the password file. The URL was then

wget "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something&unm=USER&upwd=ENC_PWD" -O elog.txt

I thought about grabbing the ID on first creation. The problem with that is that I really would have to run parallel "databases" - one in elog to keep the information I want plus a second one which maps the elog-IDs to the "real" IDs - and the second one would also have to deal with things like "ID exists", "ID doesn't exist", "ID gets deleted" and so on - just the kind of hassle I want to avoid. But what you suggest with wget will most likely be sufficient. The logbook in question is readable for everyone (only editing/writing requires authentication), so I can search without password hassle. In fact, this will work:

 

wget -q "http://localhost:8080/LOGBOOK/?mode=raw&Attribute1=something" -O -| grep '\$@MID'|awk '{print $2}'

Et voila, I have an ID. This will generate a bit more traffic than a parallel "DB", but I think it will be less susceptible to errors, as all information is kept within the elog logbook at all times. Thanks again for your help - time to do some scripting! :-)

  65953   Mon Aug 18 10:56:05 2008 Question dale cooperagentdcooper@gmail.comQuestionLinux2.7.4xExpand TEXT colum in Summary view?

Hello All,

I am wondering if it is possible to configure ELOG to expand the TEXT column in the SUMMARY view? As it stands I get about 48 characters displayed per line in the in the TEXT column, with 3 lines getting displayed per ENTRY (approximately 144 characters per ENTRY). So what I'd like to do is see if it is possible to EXPAND the TEXT column in the SUMMARY view to allow say.... 100 characters per line, or say 275 characters per ENTRY when viewing the SUMMARY view?

 

Is this possible? If so, how does one go about doing this... I tried to search the site thoroughly before posting my question, I just didn't see it mentioned anywhere... Help please =)

 

Thanks!

agentdcooper

  65954   Mon Aug 18 14:08:22 2008 Reply Yoshio ImaiQuestionLinux2.7.4xRe: Expand TEXT colum in Summary view?

dale cooper wrote:
I am wondering if it is possible to configure ELOG to expand the TEXT column in the SUMMARY view?

While it is not possible to specify a number of characters per row, you can control the number of text lines in the summary view using the
Summary lines = NNN
directive (cf. also the ELog admin guide).
  65955   Mon Aug 25 17:23:22 2008 Question Davide Salomonidsalomoni@gmail.comQuestionLinux Grabbing user name from SSL user certificate

With SSL enabled, I'd like to to grab the CN (Common Name) of the user certificate and use that as login authentication method.

I am thinking of the following scenario:

- users with read & write privileges need to have an SSL certificate loaded in their browser. The "Author" field will be pre-set to the CN of the user certificate.

- authorization may be subject to further granularity (e.g. only allow users whose certificate belongs to a certain organization)

- read-only, guest access (without certificate) may or may not be allowed

 

Is there a way to do that?

  65956   Sun Aug 31 14:43:19 2008 Smile Grant Jeffcotegrant@jeffcote.orgQuestionWindowsV2.7.4-212Re: Automatic Copy to
Stefan,

Is there any way I might be able to initiate the 'copy to' function by selecting a 'tick box' (boolean) or conditional attribute choice in an entry page when submitting that page? We have a requirement where we run a main 'Operations' log and have another log with some entries needing to be in both (for additional actions etc). I understand the Operator can always manually use the 'Copy To' function after submitting the original entry but was wondering if there was some way a shell script (execute function?) or similar may be activated by a boolean or even a 'conditional' choice?

Thx
  65957   Mon Sep 1 13:48:29 2008 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux Re: Grabbing user name from SSL user certificate

Davide Salomoni wrote:

With SSL enabled, I'd like to to grab the CN (Common Name) of the user certificate and use that as login authentication method.

I am thinking of the following scenario:

- users with read & write privileges need to have an SSL certificate loaded in their browser. The "Author" field will be pre-set to the CN of the user certificate.

- authorization may be subject to further granularity (e.g. only allow users whose certificate belongs to a certain organization)

- read-only, guest access (without certificate) may or may not be allowed

 

Is there a way to do that?

 I put your request on the wish list.

ELOG V3.1.5-2eba886