chef 3746 Posted February 13, 2020 Author Share Posted February 13, 2020 (edited) This option is only available in the LINE chart, so can it be added to the PIE chart as well ? Can you update the ICONS at the top please. The configuration button would look better with a COG icon and the chart switch with a REFRESH type button. I think that's how you originally had them. Just my opinon, so see what others say. That's easy enough Just wondering where on the chart cards we should put the threshold data? Some of the share names get pretty long, so putting it at the top might cut off the data. I can make the text at the bottom smaller, to fit more on the card. Or I could try to copy embys card overlay, which popups up on mouse over. That might be the best option. Edited February 13, 2020 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted February 13, 2020 Author Share Posted February 13, 2020 @@CBers I think your going to like the direction .99 is going. I was able to access emby's NotificationManager and therefore the DiskSpace Service now knows if the notifications are enabled or disabled for the plugin and can get that info on the chart cards with the threshold. If the notifications are disabled then that data is not shown, and vice versa. TODO: 1. Add notification state to the table data. 2. Add dynamic data to the chart cards based on how the user has set up the plugin. 1 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 13, 2020 Share Posted February 13, 2020 Last update to .99 got me back the network drives: 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted February 13, 2020 Author Share Posted February 13, 2020 Last update to .99 got me back the network drives: Sweet! And also... "Holy TB Batman!" Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 Added some color to partitions which are over the threshold limit so you can see them right away when you look at the table view. thought it would be useful. Question is, should we take control of the charts and color them red when they are over threshold? or leave them alone? Link to comment Share on other sites More sharing options...
CBers 6771 Posted February 14, 2020 Share Posted February 14, 2020 @@chefMy F: drive is showing RED, although it's above (782Gb) the threshold limit (756Gb). Thanks. 1 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 Question is, should we take control of the charts and color them red when they are over threshold? or leave them alone? Good idea to colour them! 1 Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 14, 2020 Share Posted February 14, 2020 i have notifications disabled - which it shows on charts (and updates if i change it) - but shows true on table Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 14, 2020 Share Posted February 14, 2020 @@chef - 3.0 fixes the notification miss match - thanks am now seeing what @@CBers posted above for one drive which does not have low space free 2 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 (edited) As usual, mine is not doing what it's supposed to be doing (and most of the time is magically starts working about 10min after I posted about it... I'll edit this post if that happens). Notice the missing colours and yes, I'm on 1.0.3.0 with a fresh restart of the server and of the browser... Edited February 14, 2020 by Dibbes 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) might need a quick math check again,freespace is in bytes,total is in bytes,threshold is in GB. (freespace / 1000000000.0) > ((total / 1000000000.0) - threshold) ((total / 1000000000.0) - threshold) < (freespace / 1000000000.0) Are these two conditions the same, or are they different? Edited February 14, 2020 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) I see whats happening there are two ways to look at a threshold limit: 1. Is the actually limit in GB where if the available space exceeds the set limit (example: Cbers uses 756GB, anything over that is exceeded) 2. The amount of space left on the drive. (example: 10GB left as freespace on the drive, anything under the 10GB limit would be exceeded) This is how to fix it: input Max value equals drive total space Default will not be 10Gb, it will be drive total space - 10GB. A label needs to be added to the threshold input which explains that it is the exact number in GBs to monitor for. That should fix this problem. Edited February 14, 2020 by chef 2 Link to comment Share on other sites More sharing options...
CBers 6771 Posted February 14, 2020 Share Posted February 14, 2020 I see whats happening there are two ways to look at a threshold limit: 1. Is the actually limit in GB where if the available space exceeds the set limit (example: Cbers uses 756GB, anything over that is exceeded) 2. The amount of space left on the drive. (example: 10GB left as freespace on the drive, anything under the 10GB limit would be exceeded) This is how to fix it: input Max value equals drive total space Default will not be 10Gb, it will be drive total space - 10GB. A label needs to be added to the threshold input which explains that it is the exact number in GBs to monitor for. That should fix this problem. I always thought it was 2, so if the free space drops below the threshold, then an alert is raised. The default can still be 10Gb, but I personally will set it much higher. Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 (edited) might need a quick math check again, freespace is in bytes, total is in bytes, threshold is in GB. (freespace / 1000000000.0) > ((total / 1000000000.0) - threshold) ((total / 1000000000.0) - threshold) < (freespace / 1000000000.0) Are these two conditions the same, or are they different? I don't understand what you're trying to do here... why not put it like: threshold = 1000000000.0 threshold > freespace = alert Also, what is the reason you defining freespace in bytes and threshold in GB? That doesn't make things easier... Edited February 14, 2020 by Dibbes 1 Link to comment Share on other sites More sharing options...
maegibbons 1267 Posted February 14, 2020 Share Posted February 14, 2020 I don't understand what you're trying to do here... why not put it like: threshold = 1000000000.0 threshold > freespace = alert Also, what is the reason you defining freespace in bytes and threshold in GB? That doesn't make things easier... The issue is that the freespace is returned by the SYSTEM as bytes hence the conversion has to be done. Krs Mark Sent from my SM-N976B using Tapatalk Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 The issue is that the freespace is returned by the SYSTEM as bytes hence the conversion has to be done. Krs Mark Sent from my SM-N976B using Tapatalk I get that... it really depends on where you convert the threshold, I suppose... I would just convert it for display purposes, the way the OS does it, but keep the rest of the code in bytes... Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) 3.1 1. Refactored Notification Thresholds. It now expects the limit (in gigs). 2. Opening the individual Drive options will automatically show the default threshold limit in the input (not the saved param), but any number you put in there will save as the new notification limit. This way it can be reset to defaults easily. This is by design, is it a good design choice? Edited February 14, 2020 by chef Link to comment Share on other sites More sharing options...
CBers 6771 Posted February 14, 2020 Share Posted February 14, 2020 This is by design, is it a good design choice? Can't you read from the config file what the "current" value is and display it? 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) There is something else that is happen here that is going to throw people for a loop. This is happening because we are rounding very large numbers, look at this: When we round small numbers like Gigs, we can remove a value of 10 GB from the total size for a default threshold, and it looks okay (example Drive O in the picture above). However when we compare GB to TB like on drive M (posted above), the threshold looks to be 53 GBs over what is listed as the total size (1.8TB). (Threshold set to 1853GB, but total size would read as 1800GB or 1.8TB) This is because we are rounding very large numbers to one decimal point and using TB. The drive itself actually has more room then just 1.8TB but because we round to a more humanly readable value it starts to look contradictory. That is a problem. I should have paid more attention in math class... Edited February 14, 2020 by chef 1 Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 14, 2020 Share Posted February 14, 2020 Hi Chef using 3.1 and all my drives are now red - think you have the threshold round the wrong way? to get more precision - i would have less rounding - i.e. say three decimals for TB and two for GB and %ages as a start - thresholds can stay as whole numbers 3 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 Where do those values come from??? LoL I didn't put those in... Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 14, 2020 Share Posted February 14, 2020 see post #392 Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 see post #392 Yes, but I didn't set it... like this it seems the threshold is larger than the actual drive... Link to comment Share on other sites More sharing options...
Dibbes 431 Posted February 14, 2020 Share Posted February 14, 2020 (edited) New version 1.0.3.2, and.... the default settings are now gone... the ones still there, I set manually 2 version ago... Edited February 14, 2020 by Dibbes Link to comment Share on other sites More sharing options...
chef 3746 Posted February 14, 2020 Author Share Posted February 14, 2020 (edited) Yes I removed an default threshold values because they are calculating badly in the UI (they are actually calculating more precise in the UI, then the Total value which is creating a pretty loose calculation). Now thresholds will have to be set for each notification or else they won't fire, until something better can be figured out. Edited February 14, 2020 by chef 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now