-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Refreshing Grid #166
Comments
Just going to reference #161 as it sounds like the error I am having. |
Fixed in next build. |
Just tested it with 1.2.1: Grids still dont't refresh for me. Also: I have massive performance issues when I try to filter. I start typing and it takes seconds to accept input and keeps resetting the filter field to empty or a single letter of my input. |
I reopened this so we can investigate your issue. Re: Performance Issue: The filtering calls back to the server to do the filtering. If it takes awhile for your endpoint to return, it can be slow. It is possible to do client side filtering but this is not implemented yet. I need to investigate a way to not filter on every key stroke otherwise long running endpoints may cause the problem you are seeing. I will open another issue for this. |
Just tested on 1.2.1 as well and its not refreshing for me either. It is no longer removing all the entries and showing empty grid but it just isn't updating the values in the grid. Let me know if there is anything I can do to assist. |
Can one of you guys please post an example dashboard? Mine seems to be working as expected. |
So I'm seeing the grid refresh but there are some other weird issues going on here. I wouldn't be surprised that if you messed with the grid a bit it would stop refreshing based on the usability of it right now. I'll take a look to see what I can do. I also can easily reproduce the performance issue with this script. My testing of this fix used static data and likely why a cmdlet that is a bit slow to return causes issues. I will try and get a build out this week to resolve this some how. I'll likely do a pre-release again for you guys to test out. |
@GavinEke @kort3x Can you guys try the grid out on this build? https://github.com/adamdriscoll/poshprotools/releases/tag/ud-1.2.2-beta.1 |
From my testing using 1.2.2 beta the grid is refreshing as it should when it is the only element. But for some reason when I run the following it isn't refreshing, I am not sure if it is trying to do too much or its a combination of the grid with another element on the page but it just doesn't seem to work for me. Start-UdDashboard -Content {
New-UdDashboard -Title "Server Performance Dashboard" -Color '#FF050F7F' -Content {
New-UdRow {
New-UdColumn -Size 6 -Content {
New-UdRow {
New-UdColumn -Size 12 -Content {
New-UdTable -Title "Server Information" -Headers @(" ", " ") -Endpoint {
@{
'Computer Name' = $env:COMPUTERNAME
'Uptime' = (Get-ComputerInfo).OsUptime.ToString()
'Operating System' = (Get-CimInstance -ClassName Win32_OperatingSystem).Caption
'Free Disk Space (C:)' = (Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceID='C:'").FreeSpace / 1GB | ForEach-Object { "$([Math]::Round($_, 2)) GBs " }
}.GetEnumerator() | Out-UDTableData -Property @("Name", "Value")
}
}
}
New-UdRow {
New-UdColumn -Size 12 -Content {
New-UdChart -Title "Disk Space by Drive" -Type Bar -AutoRefresh -Endpoint {
Get-CimInstance -ClassName Win32_LogicalDisk | ForEach-Object {
[PSCustomObject]@{ DeviceId = $_.DeviceID;
Size = [Math]::Round($_.Size / 1GB, 2);
FreeSpace = [Math]::Round($_.FreeSpace / 1GB, 2); } } | Out-UDChartData -LabelProperty "DeviceID" -Dataset @(
New-UdChartDataset -DataProperty "Size" -Label "Size" -BackgroundColor "#80962F23" -HoverBackgroundColor "#80962F23"
New-UdChartDataset -DataProperty "FreeSpace" -Label "Free Space" -BackgroundColor "#8014558C" -HoverBackgroundColor "#8014558C"
)
}
}
}
New-UdRow {
New-UdColumn -Size 12 {
New-UdGrid -Title "Automatic Services NOT Started" -Headers @("Name", "State", "StartMode") -Properties @("Name", "State", "StartMode") -AutoRefresh -RefreshInterval 60 -Endpoint {
Get-CimInstance -ClassName Win32_Service | Where-Object {($_.StartMode -eq "Auto") -and ($_.State -eq "Stopped")} | Out-UDGridData
}
}
}
}
New-UdColumn -Size 6 -Content {
New-UdRow {
New-UdColumn -Size 6 -Content {
New-UdMonitor -Title "CPU (% processor time)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#80FF6B63' -ChartBorderColor '#FFFF6B63' -Endpoint {
try {
Get-Counter '\Processor(_Total)\% Processor Time' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty CounterSamples | Select-Object -ExpandProperty CookedValue | Out-UDMonitorData
}
catch {
0 | Out-UDMonitorData
}
}
}
New-UdColumn -Size 6 -Content {
New-UdMonitor -Title "Memory (% in use)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#8028E842' -ChartBorderColor '#FF28E842' -Endpoint {
try {
Get-Counter '\memory\% committed bytes in use' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty CounterSamples | Select-Object -ExpandProperty CookedValue | Out-UDMonitorData
}
catch {
0 | Out-UDMonitorData
}
}
}
}
New-UdRow {
New-UdColumn -Size 6 -Content {
New-UdMonitor -Title "Network (IO Read Bytes/sec)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#80E8611D' -ChartBorderColor '#FFE8611D' -Endpoint {
try {
Get-Counter '\Process(_Total)\IO Read Bytes/sec' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty CounterSamples | Select-Object -ExpandProperty CookedValue | Out-UDMonitorData
}
catch {
0 | Out-UDMonitorData
}
}
}
New-UdColumn -Size 6 -Content {
New-UdMonitor -Title "Disk (% disk time)" -Type Line -DataPointHistory 20 -RefreshInterval 5 -ChartBackgroundColor '#80E8611D' -ChartBorderColor '#FFE8611D' -Endpoint {
try {
Get-Counter '\physicaldisk(_total)\% disk time' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty CounterSamples | Select-Object -ExpandProperty CookedValue | Out-UDMonitorData
}
catch {
0 | Out-UDMonitorData
}
}
}
}
New-UdRow {
New-UdColumn -Size 12 {
New-UdGrid -Title "Top 10 Processes" -Headers @("ProcessName", "Id", "WS") -Properties @("ProcessName", "Id", "WS") -AutoRefresh -RefreshInterval 60 -Endpoint {
Get-Process | Sort-Object WS -Descending | Select-Object -First 10 | Out-UDGridData
}
}
}
}
}
}
} |
I see the same as Gavin: As soon as the grid isn't the only element it breaks. |
I feel like I'm going crazy! I can't reproduce this on 2 boxes now. I'm running 1.2.2 from the release page and the exact dashboard you posted above, @GavinEke. I've tried in IE11, Firefox and Chrome and I can sort, filter and reload grids. There is something I'm missing here. Would either of you be willing to setup a Skype call sometime to take a look together? |
I had to localize Gavins code to run on my german machines but it works fine (execept for the filter which gets removed from the field but still gets applied everytime the grid refreshes) Maybe two unrelated issues after all where my issue could be my bad code? I will compare Gavins script to mine and keep you posted. |
Ok. Thank you. It's no worries. I just want to make sure everything is working. 😄 |
Gist of log
The text was updated successfully, but these errors were encountered: