AutoRefresh Broken - Any solution?

I’ve been bouncing all over Unviersal Dashboard versions trying to find one that doesn’t have a breaking bug that prevents me from completing my project.

  • v2 - lacked the input validation I needed

  • v3 beta2 - had broken buttons I believe, I can’t find the note from Adam about this release and what it fixed but that is what I recall from memory: GitHub Link

  • v3 beta2 nightly from April 23rd - What I am currently using appears to have broken “AutoRefresh” when I enable AutoRefresh like so:

New-UDElement -Id “test” -Tag ‘div’ -Content {
‘test’
} -AutoRefresh -RefreshInterval 5

I see this in the browser console:

  • v3 beta3 - switched to powershell universal and didn’t have themes or custom css, broken toasts
  • v3 beta5 - is unusable in that it resets every 60 seconds, still no custom CSS

I guess I’m hoping Adam or someone can confirm this version is indeed bugged and I can quit wasting my time trying to make it work.

I’m looking for a nightly that has this fixed but before the huge changes that came with the switch to Universal so I can still use original themes + custom css.

It seems the versions after April 15th are no longer compiled. :frowning:

Unfortunately, there were no Universal Dashboard builds after the v3 beta2 and I wouldn’t be surprised if there were issues with it like you’re experiencing with the auto-refresh.

The reset every 60 seconds and is fixed in the most recent nightly build: Universal Nightly Releases

Here’s the most recent release notes for our upcoming 1.2.1 release: https://imsreleases.blob.core.windows.net/universal-nightly/46078/release.md

You’re right that there isn’t custom CSS yet. Are you hosting a custom CSS file? Just wondering how you are doing the custom CSS with v3. I wonder if wrapping the dashboard in UDStyle would allow you to use your custom CSS in the most recent version.

Hey @BenevolentD im still using 2.X version of UD as was too scared too many things wouldn’t work in the IE browser I am forced to use at work…so to get around say the input problems I did if you didn’t know put a few components out there:-
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDNumberMask
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDRangeSlider
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDSingleSelector
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDField
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDSelectDateTime
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDDatePicker
https://marketplace.universaldashboard.io/Dashboard/UniversalDashboard.UDSelector
So if you are happy with the stability of version 2.X like I am but maybe want a new approach to getting user input then please do have a look at these components, I have used them all in projects I have been tasked with to gather user information via a dashboard. Sometimes you just need to look at something from a different angle to achieve the same thing :thinking:

Hey Adam,

The method that works for me in v3:

$Theme = New-UDTheme -Name 'Basic' -Definition @{
  '.MuiIconButton-root' = @{
    padding = '0px !important;'
    'font-size' = '1.3rem !important;'
  }
} -Parent 'Default'

Could I just create a .css stylesheet file and pass it to my dashboard with -StyleSheets or does that no longer work in the latest nightly?

@psDevUK

I certainly appreciate the idea but I think I’m too dependent on v3 components already to go back now. This auto refresh was literally the last thing I needed to complete my project - major bummer. Kudos on all that work you’ve done.

I’m also hesitant to write a bunch of code dependent on a deprecated version that is likely to be obsolete in a few months. Maybe I misunderstand the interoperability between v2 and v3 components though.

Stand alone components like @psDevUK has made should work fine in v3. We use the same rendering engine and tried to maintain that capability.

As for your dashboard, I was able to get the styling working using UDStyle like this:

You could effectively wrap your dashboard in UDStyle and apply the styles you want. This way you won’t have to put the style around each button. For example, this would style all the buttons with the same style.

New-UDDashboard -Title "Hello, World!" -Content {

    New-UDStyle -Style "button { padding: 0px !important; font-size: 1.3rem !important; }" -Content {
        New-UDButton -Text "Learn more about Universal Dashboard" -OnClick {
            Invoke-UDRedirect https://docs.ironmansoftware.com
        }
        New-UDButton -Text "Learn more about Universal Dashboard" -OnClick {
            Invoke-UDRedirect https://docs.ironmansoftware.com
        }
        New-UDButton -Text "Learn more about Universal Dashboard" -OnClick {
            Invoke-UDRedirect https://docs.ironmansoftware.com
        }
        New-UDButton -Text "Learn more about Universal Dashboard" -OnClick {
            Invoke-UDRedirect https://docs.ironmansoftware.com
        }
    }
}

I was also able to get this to work with a class name selector. For some reason selecting MuiButtonBase-root didn’t work for me but selecting ud-mu-button did.

New-UDDashboard -Title "Hello, World!" -Content {

    New-UDStyle -Style ".ud-mu-button { padding: 0px !important; font-size: 1.3rem !important; }" -Content {
        New-UDButton -Text "Learn more about Universal Dashboard" -OnClick {
            Invoke-UDRedirect https://docs.ironmansoftware.com
        }
    }
}

UDStyle info is here: https://github.com/ironmansoftware/ud-style

1 Like

Thanks for the example Adam-

That’s pretty much what I was looking for. I know you had suggested this on another thread but I didn’t see any examples of applying the style to the entire dashboard, only individual elements, so this is nice to have.

I’ll give this a try when I get a spare moment.

1 Like