Webinterface

Questions and answers on how to get the most out of FFAStrans
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Webinterface

Post by momocampo »

That's correct Emcodem,I had the same error with 1.4.0.82 but not with 103 or 108. I did the same method as you @DCCentR, means roll back to the previous version (replace server.exe by the previous).
Impossible to know why we have this issue yet,
emcodem
Posts: 1826
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

emcodem, wrapping since 2009 you got the rhyme?
DCCentR
Posts: 28
Joined: Thu May 04, 2023 7:15 am

Re: Webinterface

Post by DCCentR »

emcodem wrote: Mon Dec 16, 2024 12:41 am Time for a new beta

https://github.com/emcodem/ffastrans_we ... 0.116-beta
Thanks :D
A small report on the issues noticed (likely most of it has to do with your currently ongoing rework, but still might be useful):
1) Looks like window of running jobs only updates upon manual page refresh in this build:
1.png
1.png (486.77 KiB) Viewed 4750 times
2) When switching to the second page and further in the history window, the page shifts down (apparently due to the “Page X” caption broken into two lines):
2.png
2.png (469.57 KiB) Viewed 4750 times
3) Layout resizer icon may be barely visible when the queue is full:
3.png
3.png (490.31 KiB) Viewed 4750 times
4) This area seems to have very narrow vertical frames, which causes the bottom of the letters in these headers to be cut off:
4.png
4.png (490.12 KiB) Viewed 4750 times
5) There is no longer a button to minimize the history window:
5.png
5.png (490.63 KiB) Viewed 4750 times
6) Is it possible to put the filename only back here instead of the full path (on 1080p monitors it can be a problem to fit all the columns needed)?
6.png
6.png (407.9 KiB) Viewed 4750 times
7) These windows are not aligned on the same line:
7.png
7.png (488.01 KiB) Viewed 4748 times
emcodem
Posts: 1826
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

@DCCentR thanks, it is absolutely useful, i did not yet have all of the points on my list. Some of the points are already fixed, others not yet :D

Removing the path from filenames for running jobs was already done, then steinar complained that webint does not work exactly like the inbuilt status monitor so i reverted. I think it is more disturbing now because in the last version, we cut the right side of the path when the column was too small, i did not yet re-implement this feature at the reworked version. If thats not enough we might need to add a choice about how the stuff is represented.
emcodem, wrapping since 2009 you got the rhyme?
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Webinterface

Post by admin »

I don't want to dictate how users wants to view their job status. Making it optional is obviously something worth considering. If not to add as option, one could also have an alternative column called "Job name".... which by default can be derrived from the file name and changed by the user by populating the %s_display_name% variable. This is awailable in the upcoming 1.4.1 release.

-steinar
knk
Posts: 40
Joined: Wed Jun 21, 2017 3:50 pm

Re: Webinterface

Post by knk »

Hello my good people!
Quick question: is there by any chance or coincidence a hidden variable or API request that retrieves the number of current logged in users?
Many thanks!
emcodem
Posts: 1826
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

knk wrote: Mon Jan 13, 2025 3:07 pm API request that retrieves the number of current logged in users?
Not really, the count is pushed from the backend to all connected clients when the connection count changes. (all clients maintain an active connection like in a chat using socket.io).

It is however trivial to add a page that serves the count which you can poll from monitoring or whatever you plan to do:
1) place a new file "usercount.html" in /alternate-server/usercount.html (the alternate-server dir is in the same folder where server.exe is).
2) edit the file and place this content:

Code: Select all

<script src="/socket.io/socket.io.js"></script>
<script>
	var socket = io(); 
    socket.on('logged_in_users_count', function(msg){
        //server should inform us periodically by cron job 
        document.body.innerHTML = Math.round(msg/2);
    });
</script>
3) Call it like: http://localhost:3002/alternate-server/usercount.html
4) if the count never changes in your monitoring system, you might have to add a random number in the url parameter to trick out caching, e.g. http://localhost:3002/alternate-server/ ... 3489098725
5) Hope that the method you use for polling supports javascript, otherwise :roll:

Both, the alternate-server folder and the method of pushing usercount have been there since like forever so i guess chances that this stops working because i change something are pretty small.

Edit: forget it, it only works in the browser or something like phantomjs or domcurl... i'll need to expose the count via some api call
emcodem, wrapping since 2009 you got the rhyme?
knk
Posts: 40
Joined: Wed Jun 21, 2017 3:50 pm

Re: Webinterface

Post by knk »

Hey @emcodem!
Thanks for the effort.
I was just asking in case there was already "something" like it.
The alternative of externally requesting socket connections and such is a pain to achieve in my perspective...
If in the future it could be exposed to the API, amazing! If not, i'll keep doing my human realtime monitoring of "logged users minus me" :lol:
Best regards!
emcodem
Posts: 1826
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

knk wrote: Tue Jan 14, 2025 5:30 pm The alternative of externally requesting socket connections and such is a pain to achieve in my perspective...
You can't really do that anyways, all you could do is to "fake a browser" as if you were scraping in the web, thats what domcurl and phantom do.
Anyway its a pretty hacky approach.

Yesterday i seriously wrapped my head about how this could be done but i was not able to find any neat way to do in a nicely integrated and secure way. I added the count in the /getworkflowjobcount Url so in theory it could be retrieved but you would still need phantomjs or similar to do it because basically any url except login.html is password protected...
It is kind of problematic that i design webinterface in a way that it can be exposed directly to the internet (from security perspective) but at the same time 99.99% of the time it is just used internally...
emcodem, wrapping since 2009 you got the rhyme?
Post Reply