aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 2 [3] 4

Author Topic: AJAX skin with xslt stylesheet  (Read 22253 times)

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #30 on: March 24, 2010, 01:02:27 AM »

Pointer shape
I studied the behaviour of the pointer-shape a little on my machine.

On Firefox:
The mouse pointer changing to a hand over areas that have a function when clicked is defined by css. Somehow on firefox after refreshing the contents of the table CSS isn't applied again so the cursor changes into what Firefox thinks it should be. A text-cursor when hovering over text and a normal pointer when not hovering over text. However, the css for highlighting a table row when hovering over it, does seem to hold after refreshing the contents.

On Opera:
The code used for Opera is the same as Firefox's, but: the pointer stays a hand after refreshing if so defined by css, but the row highlight does not stay when refreshing. This is opposite to the behaviour in Firefox where the pointer doesn't work, but the highlight does.

On Safari and Chrome:
Both the shape of the mousepointer and the row-highlighting work, but there's some blinking when refreshing.

Click behaviour
How it's possible that you can totally not click on anything I don't understand. I'm at a loss, really. I checked on every browser I can think of and can't reproduce what you are experiencing in any way. Over here it's working perfectly. Where just using onclick or just using onmouseup would fail I understood that and I could recreate the situations where it would go wrong, but this I can't.

However, just in case this is something that is OS related or driver related ( or maybe you are using a wacom or something :) ), please tell me something more about your OS, mouse, drivers. It's really the only thing I can think of right now and I would also really hate it if this is what makes a difference.

Progress bars
There is no way to send the data for the progress bar images via xml right now, since there is no base64encode in amuleweb. If I would just pass the filenames then the images would not update. I could add a random tag to the filenames, but then all the images will retransmit every refresh. I think that's not very bandwidth efficient. Transferring the images on first load takes about 5 to 10 seconds for me, and that's on LAN. Don't know exactly what the bottleneck is, but it just isn't fast enough to refresh often. As far as I can see, there is no way to just retransmit those pictures that are updated, so I chose to just have bars that fill from left to right that are drawn by some css.

Console
Ok ok, so the bug was in two places :) It should be gone when I release the next update.



Logged

lfroen

  • Guest
Re: AJAX skin with xslt stylesheet
« Reply #31 on: March 24, 2010, 05:13:52 AM »

Quote
There is no way to send the data for the progress bar images via xml right now
Granted, I'm in no way web developer, but - why would you?

Quote
but then all the images will retransmit every refresh
This is progress bar. Either you update it (and retransmit the whole image) or leave it alone.

Quote
I think that's not very bandwidth efficient.
Unless you have hundreds of them, it doesn't matter.

Quote
Transferring the images on first load takes about 5 to 10 seconds for me, and that's on LAN
You can't have _that_ slow LAN. 5 seconds enough for about 50*5=250Mb, or about 30MB. Most probably, delay caused by amule core itself, since amuleweb have to query status data. If amule working thread holding mutex, amuleweb won't get reply.

Quote
As far as I can see, there is no way to just retransmit those pictures that are updated
Actually, if download speed = 0, you can skip progress bar update. Otherwise - reload them. What's a problem again?
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #32 on: March 24, 2010, 12:42:56 PM »

Quote
There is no way to send the data for the progress bar images via xml right now
Granted, I'm in no way web developer, but - why would you?
Transmitting them separately means 1 more request per file in the queue. Thus having a lot of files means a lot of requests and much longer loading time.

Quote
Quote
I think that's not very bandwidth efficient.
Unless you have hundreds of them, it doesn't matter.
I live in a house of 6 students and have to manage all services, including dsl. They do like to download whole series of files, so 200 or more downloads at a time isn't a rare occurrence. But I agree for most people it's probably <50 downloads in queue most of the time.

Quote
You can't have _that_ slow LAN. 5 seconds enough for about 50*5=250Mb, or about 30MB. Most probably, delay caused by amule core itself, since amuleweb have to query status data. If amule working thread holding mutex, amuleweb won't get reply.
I think the problem is negotiating the transfer of 100's of small image files with the server. About the inner workings of amule and linux threading I don't know much (anything).

Quote
Quote
As far as I can see, there is no way to just retransmit those pictures that are updated
Actually, if download speed = 0, you can skip progress bar update. Otherwise - reload them. What's a problem again?
Sources can change as well, so you'd have to keep track of that too.
« Last Edit: March 24, 2010, 12:48:34 PM by woutermense »
Logged

lfroen

  • Guest
Re: AJAX skin with xslt stylesheet
« Reply #33 on: March 24, 2010, 07:53:44 PM »

Quote
They do like to download whole series of files, so 200 or more downloads at a time isn't a rare occurrence
Let's take this example, and consider each image 1K. So, 200 x 1K = 200K = 1600Kb. Over 100Mbps LAN it will take about 2msec (0.02 sec). Since amuleweb doesn't support keep-alive connection, so add some TCP overhead here, but in any event overall network latency will be less than 1 (one!) second.

Quote
Sources can change as well, so you'd have to keep track of that too
Correct.

Quote
I think the problem is negotiating the transfer of 100's of small image files with the server
Unless bug is found in amuleweb code that affect performance in that drastic way - I disagree. Requesting images doesn't require round-trip to core, only internal processing (since images are generated on-the-fly). Of cause, if you have slow or overloaded machine - expect delay.
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #34 on: March 24, 2010, 09:43:00 PM »

Quote
Sources can change as well, so you'd have to keep track of that too
Correct.
lfroen, thank you for these comments, it made me think of an easier way to keep track of changed images.
This code does it really simple, just make a string of parameters as a "random" tag. Each time one parameter changes the image gets refreshed.
Code: [Select]
echo "<progress>dyn_" . $file->hash . ".png?" . $file->size_xfer . $file->src_count . $file->src_count_not_curr . $file->src_count_a4af . $file->src_count_xfer . "</progress>";
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3830
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #35 on: March 24, 2010, 10:09:13 PM »

Windows 7 64, Firefox 3.6 with NoScript (all Scripts allowed for localhost of course) and AdBlockPlus (nothing blocked). Plain mouse, no special driver installed, no mouse problems I'm aware of.
I know the EC side of amuleweb quite well, but nothing of the webserver/php side, or the stuff you are doing, so you are on your own here. I'll try it on Linux and see what happens there. (But I have no time tonight.)

Could anybody else try it out?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #36 on: March 24, 2010, 10:27:22 PM »

Well I'm also running Win7-64, just added NoScript and ABP to FireFox, and also plain mouse nothing special. Tried today to make Windows Virtual Machine run a Linux distro but had no luck.

I tried my laptop which has a touchpad (all other stuff the same), no problems as well. Neither with buttons nor tapping the pad. My keyboard on my desktop also has a touchpad (which is horribly insensitive) but no problems here too.

Like you said: it would really help if anyone else could check this out.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5898
Re: AJAX skin with xslt stylesheet
« Reply #37 on: March 25, 2010, 12:46:29 AM »

Are you guys hinting at anything? I can't really tell.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 86
Re: AJAX skin with xslt stylesheet
« Reply #38 on: March 25, 2010, 09:28:37 AM »

Hi all,

a quick test on Linux Fedora 11 amd64:
Firefox 3.5.8
aMule-SVN 10051

Transfers:
 - shows ok
 - sort by name ok
 - clicking on file name does nothing (shows hand pointer, so it seems to have a function)
 - delete works ok (asks for confirmation)
 
at some point firebug console shows:
Quote
[Exception... "update.locale file doesn't exist in either the XCurProcD or GreD directories" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///usr/lib64/xulrunner-1.9.1/components/nsUpdateService.js :: getLocale :: line 549" data: no]
[Break on this error] " directories", Cr.NS_ERROR_FILE_NOT_FOUND);
nsUpda...vice.js (línea 549)
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #39 on: March 25, 2010, 12:00:06 PM »

a quick test on Linux Fedora 11 amd64:
Firefox 3.5.8
aMule-SVN 10051
Ah, thanks for testing wires :)

Quote
clicking on file name does nothing (shows hand pointer, so it seems to have a function)
Do you use categories? It should filter by the category of the file you click on. If all files are in the same category, then effectively nothing happens.

Quote
at some point firebug console shows:
Quote
[Exception... "update.locale file doesn't exist in either the XCurProcD or GreD directories" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: file:///usr/lib64/xulrunner-1.9.1/components/nsUpdateService.js :: getLocale :: line 549" data: no]
[Break on this error] " directories", Cr.NS_ERROR_FILE_NOT_FOUND);
nsUpda...vice.js (línea 549)
Anything wrong with the "last seen complete" column? It should show dates and times formatted in your (the browser's) locale.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 86
Re: AJAX skin with xslt stylesheet
« Reply #40 on: March 25, 2010, 08:11:00 PM »

Category filter works ok (clicking on file name).
Last seen complete seems to work.

Hope this helps
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #41 on: March 25, 2010, 08:34:21 PM »

Seems the error message is a known error for Firefox, and there is a workaround also posted there.

Thanks for your reports.
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 86
Re: AJAX skin with xslt stylesheet
« Reply #42 on: March 26, 2010, 08:35:28 AM »

Today I've seen this error :
Quote
Propiedad desconocida 'border-radius'.  Declaración rechazada.
http://localhost:4711/skin.css
Line 80

Sorry for language. It states: Unknown property 'border-radius'. I suppose it is related to progress bars as they have squared corners, although global progress bars are rounded

I've found this link : http://www.the-art-of-web.com/css/border-radius/ to make it work on mozilla, safari and chrome, but my firefox keeps showing squared corners for the provided examples...

By the way: I've made a test with Chrome : google-chrome-beta-5.0.342.7-42476.x86_64 (Linux) and it is working. Rounded global progress bars and squared file progress bars.

bye!
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #43 on: March 26, 2010, 01:24:06 PM »

Rounded corners (css3) are supported in Firefox since version 3.6.1 I think. But there is the issue of Firefox wanting it to say -moz- in front of the property and webkit based browsers want -webkit- in front. So what to do? I just added all three and the browser will find it's way in the options of the css.

There have been versions of this skin that had all progress bars like the 'global' progress bars, so they had all rounded corners. But then I switched them over to the images that are in most other skins as well. They are square and it would seem right to keep them that way, but I could experiment with cutting corners, making an overlay maybe and other stuff.

See how you like this one... :)
Logged

wires

  • Jr. Member
  • **
  • Karma: 6
  • Offline Offline
  • Posts: 86
Re: AJAX skin with xslt stylesheet
« Reply #44 on: March 30, 2010, 08:41:20 AM »

Now they all are rounded  :)  and it keeps working. Actually I'm not an amule-web user, but got interested in your idea (ajax + amule) so I decided to do a test as you asked for. For border-radius it was just a guess about the error, so feel free to apply the style you like. Web design may be one of my worst skills  ;)
Logged
Pages: 1 2 [3] 4