Improvements for WWW Update

Started by Grubix, August 23, 2012, 11:16:24 AM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Grubix

 

Hello.  :)

The "WWW Update" is a great funktion. I would like to wish a few (small) improvements.

Empty line / header between computers: I have several computers and they are written directly to each other. This is a bit confusing. At best, I make an example for now and later.

Now:

Computer  Projekt       Fortschritt  Vergangene Zeit      Verbleibende Zeit Status
Crunchi   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Crunchi   yoyo@home     14,29%       05:58:48 (05:58:30)  18:26:25          Aktiv
Crunchi   yoyo@home     21,92%       06:43:75 (06:42:21)  17:35:18          Aktiv
Crunchi   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv
Bulli01   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Bulli01   yoyo@home     14,29%       05:58:48 (05:58:30)  18:26:25          Aktiv
Bulli01   yoyo@home     21,92%       06:43:75 (06:42:21)  17:35:18          Aktiv
Bulli01   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv
Bulli02   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Bulli02   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv


Later (new, my wish):

Computer  Projekt       Fortschritt  Vergangene Zeit      Verbleibende Zeit Status
Crunchi   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Crunchi   yoyo@home     14,29%       05:58:48 (05:58:30)  18:26:25          Aktiv
Crunchi   yoyo@home     21,92%       06:43:75 (06:42:21)  17:35:18          Aktiv
Crunchi   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv

Computer  Projekt       Fortschritt  Vergangene Zeit      Verbleibende Zeit Status
Bulli01   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Bulli01   yoyo@home     14,29%       05:58:48 (05:58:30)  18:26:25          Aktiv
Bulli01   yoyo@home     21,92%       06:43:75 (06:42:21)  17:35:18          Aktiv
Bulli01   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv

Computer  Projekt       Fortschritt  Vergangene Zeit      Verbleibende Zeit Status
Bulli02   LHC@home 1.0  79,06%       09:12:14 (09:11:13)  02:26:26          Aktiv
Bulli02   yoyo@home     17,65%       06:07:21 (06:07:01)  17:19:73          Aktiv


When this function is placed in the HTML file (tasks_template.html), we can even choose how the table is displayed.

------------------------------------------------------------------------------------------------------------------

German umlauts: With some browsers, the German umlauts are not displayed correctly. Would it be possible to use the HTML code for it?


ä=äe.g.: Aktiv - Hohe Priorität
ö=ö
ü=üe.g.: Zur Ausführung bereit
ß=ß
Ä=Ä
Ö=Ö
Ü=Ü
°=°e.g.: 55,3 °C

Other special characters I have not seen now.

------------------------------------------------------------------------------------------------------------------

Different output files: It would be nice if we can create different HTML files, eg with different sorts, or other representation.


tasks_template.html --> tasks.html  (standard, now)
tasks_template_1.html --> tasks_1.html
tasks_template_2.html --> tasks_2.html
tasks_template_3.html --> tasks_3.html
..
..
tasks_template_9.html --> tasks_9.html

I think that 10 different templates should be enough.  ;D

Thanks, Grubix.

fred

1) I can implement the Later
Quote(new, my wish)
as an option. I hope, because it highly depends on the sorting.
2) Some older browsers may not see the characters as they don't support UTF, I can probably implement that as well.
3) The multiple templates.  :o, that will cause a lot of overhead. I will see what's possible.

Grubix

Hi Fred,

thanks for your answer.

1) If the text in the first sorted column changes, this line would be inserted. So if you test string [n] <> String [n +1], add a new blank line with a header.

2) Would you do the same for special characters from other languages? If so, have you someone looking out of the characters? If there is the relevant texts as a file, I would try to find all the special characters out.

3) I imagine it as follows: With the specified file name as in the example. Here's some pseudo code:

$n = 0;
while ($n<=10)
{
  $filename = "tasks_template_" . $n . ".html";
  if (-e $filename) { create_html_code($filename); }
  $n++;
}


What I at first did not noticed was that the HTML representation depends on the GUI display. So sorting, computer, combined WUs etc.

Could you Imagine that the formatting of the HTML rendering is made in tasks_template.html? So sorted by which column, which computers are displayed, etc.? If so, I would do the following:

Create a list of all options and their meanings. Sample files that can be used by users. When we developed this, I still write a more detailed manual where everything is explained in detail. In German and hopefully with the help of the SETI.Germany forum in English. Of course, I also help in beta testing, if you want.

What do you think? Would it be too much work for you?

I hope I could make myself understood. My English is not very good.

fred

1) The only way to insert a header break is on the computers, so when the computer names change it inserts a header.
2) I will add a conversion, this is standard html, so it should be somewhere on the web.
3) The code that runs it is in C++.

Nothing can run in an HTML file unfortunately. It's the browser or the server that does that.
But in this case the 2 are isolated.

Look at the Mobile tab, that is a more direct implementation.

This is a java script cpp implementation.

Grubix

Quote1) The only way to insert a header break is on the computers, so when the computer names change it inserts a header.
If you only test whether the content has changed, we could also use other columns for the separation. Furthermore, the column "computer" does not necessarily have to be the first sorted column. But only in the first sorted column it makes sense to add a new header. When changing in the first sorted column insert a new header would be more universal.

2.) All right, thank you.

3.) You've written "that will cause a lot of overhead". My code was just an example to explain how easy it could to use several templates.

Otherwise, you've probably understood me completely wrong. Of course, in an HTML file no code can run. You now uses settings in the GUI to create the HTML file. If I see all computers, in the HTML file are also all computers. If I show me just one computer in the HTML file is just one computer. And so on.

This information is what i mean. The information should be optional outsourced in the HTML file. Perhaps I can explain better with a quick example. Please do not take too well, it's just a quick scheme:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <LINK REL="SHORTCUT ICON"   HREF="http://efmer.eu/boinc/boinc_tasks/favicon.ico" type="image/x-icon" >
  <meta http-equiv="refresh" content="600">
  <title>BOINC-Tasks - powered by eFMer BoincTasks</title>
</head>

<!-- Local Configuration Settings
<use_GUI_setting>0</use_GUI_setting>
<first_sorted_column>name</first_sorted_column>
<first_sort_art>1</first_sort_art>
<second_sorted_column>name</second_sorted_column>
<second_sort_art>1</second_sort_art>
<show_all_computer>1</show_all_computer>
<show_only_computer>
  <computer>name</computer>
  <computer>name</computer>
  <computer>name</computer>
  <computer>name</computer>
</show_only_computer>
<compact_display>1</compact_display>
<insert_multiple_header>1</insert_multiple_header>
<deadline_type>1</deadline_type>
<i_do_not_know_yet_1>1</i_do_not_know_yet_1>
<i_do_not_know_yet_2>1</i_do_not_know_yet_2>
<i_do_not_know_yet_3>1</i_do_not_know_yet_3>
-->


<!--
__InsertHeaderTemplateBegin__
<tr>
<td BGCOLOR="#C0C0C0">__Project__</td><td BGCOLOR="#C0C0C0">__Name__</td><td BGCOLOR="#C0C0C0">__Elapsed__</td><td BGCOLOR="#C0C0C0">__Percentage__<br>(__CpuPercentage__)</td><td BGCOLOR="#C0C0C0">__Timeleft__</td><td BGCOLOR="#C0C0C0">__State__</td><td BGCOLOR="#C0C0C0">__Deadline__</td><td BGCOLOR="#C0C0C0">__Computer__</td>
</tr>
__InsertHeaderTemplateEnd__ -->

...


This information can be read by your program and used it to create the HTML file.

fred


Grubix

Thank you, you have really surprised me. I will test it as soon as possible.

Grubix

#7
Quote from: fred on September 05, 2012, 10:25:12 AM
- New: WWW: Allow additional sub headers on the next computer or project.
It works exactly as I had wished. Even with variable spacing, thanks.


Quote from: fred on September 05, 2012, 10:25:12 AM
- Changed: WWW: Character set is now utf-8.
For me everything is properly displayed, thanks again.


Quote from: fred on September 05, 2012, 10:25:12 AM
- New: WWW: allows to create multiple files from different templates.
Of course it works also flawless.

Grubix



I found a small mistake in the tasks_template.html file.

Original:
Quote
...

__InsertSubHeaderTemplateBegin__
<tr>
<td height="10px"</td>
<td></td>
</tr>

<td BGCOLOR="#C0C0C0">__Project__</td><td BGCOLOR="#C0C0C0">__Application__</td><td BGCOLOR="#C0C0C0">__Name__</td><td BGCOLOR="#C0C0C0">__Percentage__</td><td BGCOLOR="#C0C0C0">__Timeleft__</td><td BGCOLOR="#C0C0C0">__State__</td><td BGCOLOR="#C0C0C0">__Deadline__</td><td BGCOLOR="#C0C0C0">__Computer__</td>
</tr>
__InsertSubHeaderTemplateEnd__ -->


Without error:
Quote
...

__InsertSubHeaderTemplateBegin__
<tr>
<td height="10px"></td>
</tr>
<tr>

<td BGCOLOR="#C0C0C0">__Project__</td><td BGCOLOR="#C0C0C0">__Application__</td><td BGCOLOR="#C0C0C0">__Name__</td><td BGCOLOR="#C0C0C0">__Percentage__</td><td BGCOLOR="#C0C0C0">__Timeleft__</td><td BGCOLOR="#C0C0C0">__State__</td><td BGCOLOR="#C0C0C0">__Deadline__</td><td BGCOLOR="#C0C0C0">__Computer__</td>
</tr>
__InsertSubHeaderTemplateEnd__ -->


Bye, Grubix.

fred

Corrected:

<tr>
<td height="10px"></td>
<td></td>
</tr>


This was intended. It adds an extra line, but you can leave it out as you did.