Jump to content

New Plugin - Disk Space


chef

Recommended Posts

thank you for the list.

 

I'm not sure why emby returns these mounts for linux in the IFileSystem interface GetDrives function, but none the less I have added the following code to 'filter-out' some of these directories.

                    if (dir.Name.Split('\\').Length > 2)  continue; //Windows - too many subfolders to be what we are looking for
                    if (dir.Name.Split('/').Length > 2) continue;   //Linux - too many subfolders to be what we are looking for

                    switch (dir.Name.Split('/')[1]) //Linux - if these sneak past our filter ignore them
                    {
                        case "etc":
                        case "dev":
                        case "run":
                        case "snap":
                        case "sys":
                            continue;
                    }

DOWNLOAD: DiskSpace.zip 

Link to comment
Share on other sites

chacawaca

ok with this version we have / displayed correctly but mount drive are not there anymore. Best world manual mount + local drive should be there.

  • Like 1
Link to comment
Share on other sites

ok with this version we have / displayed correctly but mount drive are not there anymore. Best world manual mount + local drive should be there.

 

I'm not sure if the IFileSystem api interface returns the local mount drive.

 

Technically we are requesting "Environment/Drives" from the api.

 

5e1b4e6f50b13_exampledrives.png

 

Would it be okay to ask you to open the swagger, and see if your local mount drive returns under "Environment/Drives".

 

just in case: swagger is found at the bottom on the dashboard page - 'API'

 

Also, in case I have forgotten to say thank you for taking the time to help me. 

Edited by chef
Link to comment
Share on other sites

I'm not sure if the IFileSystem api interface returns the local mount drive.

 

Technically we are requesting "Environment/Drives" from the api.

 

5e1b4e6f50b13_exampledrives.png

 

Would it be okay to ask you to open the swagger, and see if your mount + drive returns under "Environment/Drives".

 

just in case: swagger is found at the bottom on the dashboard page - 'API'

 

Also, in case I have forgotten to say thank you for taking the time to help me. 

It might be some of the filtering, i dont know much about it so what does (dir.Name.Split('/').Length > 2) mean? As an example my emby drive has a mount point of /media/emby but someone could make it 20 folders or more deep if they desired.

  • Like 1
Link to comment
Share on other sites

It might be some of the filtering, i dont know much about it so what does (dir.Name.Split('/').Length > 2) mean? As an example my emby drive has a mount point of /media/emby but someone could make it 20 folders or more deep if they desired.

 

Okay, I can see how that filter wouldn't work the same in linux, like it would in windows. Paths start with "/". I should have known that I did program a raspi... once... 

 

 

This version ignores the fact that on linux paths could be bigger, and doesn't try and limit the results from the API based on the length of the path, rather it only ignores what was inside the switch statement.

 

I'm not entirely happy with using a switch statement to filter results because I image that that list could get quite large. I'm half way through a seminar on linux file systems as we speak, it's called "The Shell".

 

DOWNLOAD: DiskSpace.zip

Edited by chef
Link to comment
Share on other sites

chacawaca

Code Details

Undocumented

TypeError: Failed to fetch

 

that was for the swagger 

Edited by chacawaca
  • Like 1
Link to comment
Share on other sites

just miss the cool graphic that you have in windows.

 

but at least information is there.

Which browser are you using? The charts are coming from a JavaScript plugin inside the plugin. That sounds like a new issue.

Link to comment
Share on other sites

tested, Brave, Firefox, Opera, none of them have the graphic

Could you send me a log file? And perhaps if you could take a look at the dev options in the browser console and see if there are any errors.

 

I'm about to test the library in Firefox to see what's up.

 

Thank you again.

Link to comment
Share on other sites

chacawaca

no error in log file, first thing i checked. I will try to get you a clear debug log when i have 2 min.

  • Like 1
Link to comment
Share on other sites

tested, Brave, Firefox, Opera, none of them have the graphic

 

 

Browser support will be limited to:

 

Chrome 50+

Firefox 45+

Internet Explorer 11

Edge 14+

Safari 9+

Link to comment
Share on other sites

Interesting,

 

Here is the Disk Space plugin running on Android Server(Bluestacks). Works great, except that no canvas show up like in Linux. Very weird stuff.

 

5e1cafe995f7c_AndroidDiskSpace.png

 

 

@@Luke :)

Link to comment
Share on other sites

I donlt know why that was hard, But I believe we have a proper crossplatform plugin here. Seems to be okay on Android and windows

 

@chacawca you wanna test to see if you finally get charts on linux chrome browsers?

 

:)

DiskSpace.zip

Edited by chef
Link to comment
Share on other sites

chacawaca

ubuntu server

windows brave, firefox, opera

 

sorry no graphic

 

You should rename your plugin and add memory and cpu info :P

  • Like 1
Link to comment
Share on other sites

chacawaca

yep, box size have change (path top and size bottom, instead of left and right), but no graphic

  • Like 1
Link to comment
Share on other sites

Thank you for taking the time to help test that out.

 

I learned a lot from do this project.

 

Now I'm wondering about running bash scripts from command prompts in .netcore.

 

It's a whole new world

Bash is at least one of those things that has been out there so long that there is a plethora of information out there on it. Course i dont know jack about .net so no idea how that goes or how it complicates it. I am mostly a network guy, things get ugly when i have to do anything resembling scripting ( nevermind programming ). But i can make a mean ACL on a firewall. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...