[Plugin] FolderView


Recommended Posts

I think I've found a few bugs (or maybe it's just me).

 

First: when I pause a folder, on the left it says that it is started instead of saying that it is paused (I managed to get it to say paused once but I can't replicate it anymore). This means that if they are paused and I want to resume them all, I have to go one by one, because if you do it from the folder menu it will not do anything because it does not recognize that they are paused.

 

image.png.f9c33707ef8b6b2126078a96b5bde093.png

Image of the bug

 

Second: Sometimes when I click on add folder the text is not in the language it should be. This only happens in the section of adding a folder, in everything else it is always translated.

Link to comment
6 minutes ago, elBelgg said:

when I pause a folder, on the left it says that it is started instead of saying that it is paused (I managed to get it to say paused once but I can't replicate it anymore).

This is intended behavior, docker recognize paused containers as started, and I only check that, not the paused state.
I did this way because there is no clear way to tell in one line that, for example, 2 containers are started and 1 is paused, and you can't just flag them as stopped because they are not.

 

12 minutes ago, elBelgg said:

This means that if they are paused and I want to resume them all, I have to go one by one, because if you do it from the folder menu it will not do anything because it does not recognize that they are paused.

They should be recognized as paused because I will not check the folder but the containers individually, so if the started state and the paused sate is detected it will resume the container (the code for that).

 

15 minutes ago, elBelgg said:

Sometimes when I click on add folder the text is not in the language it should be. This only happens in the section of adding a folder, in everything else it is always translated.

This is hard to catch for me, I use Firefox, and it seems that Firefox don't have these problems. I make test on chrome but very limited and to major functions, so when I have time I will look into that.

Link to comment
36 minutes ago, scolcipitato said:

I did this way because there is no clear way to tell in one line that, for example, 2 containers are started and 1 is paused, and you can't just flag them as stopped because they are not.

 

I agree with this, but if all the dockers in the folder are paused it should say paused instead of running (like the photo I sent). Otherwise I agree with you. 

  

36 minutes ago, scolcipitato said:

They should be recognized as paused because I will not check the folder but the containers individually, so if the started state and the paused sate is detected it will resume the container (the code for that).

 

Video of the bug

 

36 minutes ago, scolcipitato said:

This is hard to catch for me, I use Firefox, and it seems that Firefox don't have these problems. I make test on chrome but very limited and to major functions, so when I have time I will look into that.

It always works in Firefox, but not in Chronium browsers (sometimes it does appear in the language it should, but most of the time it appears in English).

 

Edited by elBelgg
Link to comment
43 minutes ago, elBelgg said:

It always works in Firefox, but not in Chronium browsers (sometimes it does appear in the language it should, but most of the time it appears in English).

I may have spotted the problem, when I have time I will fix it, it shouldn't be that difficult.

Edited by scolcipitato
  • Thanks 1
Link to comment
3 minutes ago, Masterwishx said:

@scolcipitato

As the custom js script added in some versions befor, maybe we can add some message in js in state when autostrarted container stopped? 

In web Gui also email, discord if it possible at all ? 

Maybe you can give some example if it not too hard? 

Not a bad idea and could be cool, but maybe try something like Uptime Kuma to track your containers and be notified if they go down.

If @scolcipitato adds something, great, but Uptime Kuma is sweet.

  • Like 2
Link to comment
5 minutes ago, Masterwishx said:

@scolcipitato

As the custom js script added in some versions befor, maybe we can add some message in js in state when autostrarted container stopped? 

In web Gui also email, discord if it possible at all ? 

Maybe you can give some example if it not too hard? 

It depends on the type of implementation you want, with the current status of the plugin you get events only for containers that are inside a folder, and the code run on the browser. This means you can't track changes in status if you don't have the page open, and you don't refresh.

Speaking of other limits, I don't think you can send emails with JS from your browser, for discord you can use webhook.

tldr you can integrate everything that have some sort of HTTP API, the rest I don't know, and even with this you have to store data persistently in your browser (nothing wrong with it, but I find it a bit inconsistent).

 

20 minutes ago, Mattaton said:

If @scolcipitato adds something, great, but Uptime Kuma is sweet.

I don't think I will never do it, as you said, there are other ways to monitor the container status.

  • Like 1
Link to comment
5 minutes ago, Masterwishx said:

@scolcipitato @Mattaton Oh i got it , sorry you right ....

needs to check it but i have Uptime Kuma , and also changedetection.io with browserless that i think maybe better for check it ...

 

If you want you can use the API that my plugin use, just write your code or use an external service, and you are done. Bear in mind that unraid require a csrf_token you can get it by opening the console then paste csrf_token, then you got it.

Just to warn you if you want to get down this route, the response may seem confusing, for the most part is just a plain copy of the docker API.

If you want to check the code, you can do it here.

  • Thanks 1
Link to comment

Hello, I'm trying to give the final touch to the Spanish translation because it was still missing some details. There is a problem that I don't know how to solve, which is that in the custom actions section part appears in Spanish and part in English.

 

8756731_Capturadepantalla2023-10-20213424.png.28dc8a87978ab70703650693ff37ecfa.png

 

Edit: I just realized that the text in English is the same as the one in Spanish, it's just duplicated. What I don't understand is why it appears if that doesn't appear in the translation.

Edited by elBelgg
Link to comment
31 minutes ago, elBelgg said:

Hello, I'm trying to give the final touch to the Spanish translation because it was still missing some details. There is a problem that I don't know how to solve, which is that in the custom actions section part appears in Spanish and part in English.

 

8756731_Capturadepantalla2023-10-20213424.png.28dc8a87978ab70703650693ff37ecfa.png

 

Edit: I just realized that the text in English is the same as the one in Spanish, it's just duplicated. What I don't understand is why it appears if that doesn't appear in the translation.

Fixed it, I don't know why but the browser didn't like the paragraph, so it closed it before the first list, replaced with a span and now it works.

If you want to, I can add you on GH as a contributor, so you can commit whenever you want.

Link to comment

So, I saw there was an update to FolderView and ran it on one of my servers without issue, but then when I tried on the second server it alternatingly put it as "Unavailable" from the plugins page when checking update status to "up to date" when refreshing the page.

So I figured something was corrupt and uninstalled, but when I went to re-install I got an XML missing error and now the CA page just says "pending" with no interaction when I click on it.

plugin: installing: folder.view.plg
Executing hook script: pre_plugin_checks
plugin: downloading: folder.view.plg ... done

Executing hook script: pre_plugin_checks
plugin: XML file doesn't exist or xml parse error
Executing hook script: post_plugin_checks

Everything else seems to work properly on the server, but it doesn't appear I can even trigger it to check/try again now in CA.

Edited by Alyred
Link to comment
1 minute ago, Shininghell said:

Hello all,
I have a question. Can you sort the created folders in any way. If not it would be super cool if this functionality would be added.

You can reorder folder in the docker page like containers, unlock the padlock then drag and drop, for the containers inside the folder, you can do that in the editing page just by dragging and dropping the containers.

Link to comment

Hi There,
I luved the Folder Plugin, with this new one, i´m missing a important feature, or it isn´t working.
I could drag the Folders to the position i wanted them. 
But now with this new plugin it won´t work, and a new created folder is automatically placed on Top.
So thats an issue, no the order is totally off.

Is there a way to fix this?

 

Link to comment
12 minutes ago, TeamTiger said:

Hi There,
I luved the Folder Plugin, with this new one, i´m missing a important feature, or it isn´t working.
I could drag the Folders to the position i wanted them. 
But now with this new plugin it won´t work, and a new created folder is automatically placed on Top.
So thats an issue, no the order is totally off.

Is there a way to fix this?

 

This isn't the plugin, it's an unRAID version. 6.12 added the lock which you have to unlock before reordering the folders or containers. Then relock it. It's the same with or without the Folderview plugin.

Edited by Mattaton
Link to comment
1 minute ago, exoexo said:

How does one figure out the correct order for docker autostart, to prevent the red pentagon symbol?

 

Documented in this thread:

https://forums.unraid.net/topic/146335-incorrect-autostart-order-in-docker/

 

I'll respond here and link this post there.

To see the order, you have two way:

  1. cat /var/lib/docker/unraid-autostart
    Paste this in the unraid terminal and you will see in what order the container will start.
     
  2. Object.values(JSON.parse(await $.get('/plugins/folder.view/server/read_info.php?type=docker').promise())).filter(el => !(el.info.State.Autostart===false)).sort((a, b) => {if(a.info.State.Autostart < b.info.State.Autostart) {return -1;}if(a.info.State.Autostart > b.info.State.Autostart) {return 1;}return 0;}).map(el => el.info.Name);

    Paste this into the browser console, this is exactly the code that the plugin runs, so if there is a problem you will likely encounter this.

Then take a look at your container on the docker page, yes even container inside folders, then if the order you see don't match what you got this is the issue. As I said in the post on that thread, you have to reorder, not the container inside the folder, but something in the docker page.

 

Here is an example.

 

 

Note: that in some cases you may not see all the containers inside the folder just in the preview. If you want to check, you can either expand the folder and check that by running this command in the browser console.

$('.ct-name .appname').map(function() {return $(this).text()}).get();

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.