Universal 1.2.8 testing

Universal Version: 1.2.8 (running from IIS)
UD 2.9.1-Beta5

  1. Cannot import module, example I have tried many methods including running (Import-Module “C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard.Style\1.0.0\UniversalDashboard.Style.psd1” -Scope Global ) before New-UdDashboard, or inside New-UdDashboard -Content {} and at the top of the page ps1 but I get ‘Component not registered: ud-style’ (this always worked prior to Universal)
  2. When I select PowerShell version 5x it processes the request then runs on pwsh, if I change it in settings it reverts to pwsh still.

UD 3.0.0-beta7

  1. I cannot work out styles/theme, I have seen the examples Universal Dashboard v3 Progress and https://material-ui.com/customization/default-theme/ which are good, but if I enable one theme I lose dark mode. Also is it possible to add custom css like .btn = @() as in UD2.9?

Thanks - the potential for Universal is amazing, maybe im trying to run before i can walk a little! Is there any further documentation on how endpoints work, as they are automatically recognised how can i trigger them on a schedule?

UD 2.9.1-Beta5

  1. Are there errors in the log on the info page of the dashboard? Does the IIS user have access to the Program Files folder? It won’t by default.
  2. Sounds like a bug. I’ve put it in our backlog to investigate.

UD 3.0.0-beta7

  1. I think we need to work out some better examples of this. Custom CSS isn’t supported yet.

For endpoints, you can just call New-UDEndpoint and assign a schedule and it should pick them up.

$Schedule = New-UDEndpointSchedule 
$Endpoint = New-UDEndpoint -Schedule $Schedule -Endpoint {}

Hi Adam,

IIS does have access to program files, and have tried moving the modules to another location and i still cannot import them, this is running on pwsh, when running natively on the server it imports in pwsh…

Import-Module "C:\Modules\UniversalDashboard.Style\1.0.0\UniversalDashboard.Style.psm1"
# Create Dashboard - Pages
$Pages = @()
$Pages += New-UDPage -id "PageHome" -Name "Home" -DefaultHomePage -Icon globe -Title "Testing..." -Endpoint {
    New-UDStyle -Style '
    .ud-card {
        background-color: #f7f7f7;
    }'-Content {
        New-UdCard -Title "hello" -Content{
        }
    }
}
New-UDDashboard -Title 'ModuleImport' -Pages $Pages

Log:
[07-13-20 02:05:33 PM] Dashboard configuration complete.
[07-13-20 02:06:49 PM] PS: One or more errors occurred. (Cannot overwrite variable null because it is read-only or constant.) (Cannot overwrite variable null because it is read-only or constant.)

Error:

The strange thing here, is its importing modules fine:
[07-14-20 11:36:18 AM] Loading module: C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard.Style\1.0.0\UniversalDashboard.Style.psd1

[07-14-20 11:36:18 AM] Loading module: C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard.UDButtonLoader\1.0.0\UniversalDashboard.UDButtonLoader.psd1

[07-14-20 11:36:18 AM] Loading module: C:\Program Files\WindowsPowerShell\Modules\UniversalDashboard.UDTimeOut\1.0.0\UniversalDashboard.UDTimeOut.psd1

but they are not showing up in PSU (running 2.9 and pwsh7)…

@psDevUK - sorry to drag you into this, but have you seen this with your modules in PSU?

Also, i cant seem to get Publish-UdFolder to work (again 2.9, PSU, pwsh)…

[07-14-20 11:42:32 AM] Startup: The term ‘Publish-UDFolder’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Any thoughts @adam

I have also noticed that in 2.9 PSU when i stop the dashboard i get this popup on the dashboard:


This is good in a way because now there is a signal to the dashboard that its legs have been pulled away from it (something that was missing before). I wonder if its possible to use this information to divert to another website, or trigger a timeout?

Just found a bug in the UDv2 framework that was preventing custom components to load. This will be fixed in 1.2.9.

As for Publish-UDFolder, it doesn’t exist in 1.2 of PSU. We’ve added it in the nightly builds of 1.3.

As for the session timeout, there isn’t a hook yet to allow you to act on the session timeout. We could add something like redirecting.

Sounds really good, thanks Adam for the bug fix, and the UDFolder in 1.3 - i did try the nightly for 1.3 but PSU would not load so i rolled back, must admit i didnt put a lot of effort into it.

Session timeout is one of the key items for me, if its possible for a redirect (to a seperate URL) that would be very helpful.

Cheers!

Hmmm ok. I’ll have to take a look at our nightly build. Something must be funky. Thanks for giving it a shot.

I have had a bit of a muppet moment today where i was upgrading but forgetting to change the dashboard settings inside PSU and it modules still were not working, then changed the settings and it does work in 1.2.9 and 1.3.0nightly…

Publish-UDFolder still does not work in the 1.3.0 Tuesday night release though…

I have to say, it is now SO easy to upgrade UD/PSU and change versions of the dashboards - really good work!!

The docs for the published folders with 1.3 are here: https://docs.ironmansoftware.com/dashboard/published-folders

Can you give those a shot? I should have mentioned that the cmdlet isn’t Publish-UDFolder any more…

Yes that worked a treat. And again, a lot easier to work through than previously.

Next topic! i keep getting 'One or more errors occurred. (Cannot overwrite variable null because it is read-only or constant.) (Cannot overwrite variable null because it is read-only or constant.) ’ in my logs, and there is nowhere that i try and set $null to a value (i do use $null a lot to cancel out variables). I noticed you had also seen this here when debugging: Not sure how to start developing in PSU however i cannot see why, even when trying to debug… any thoughts?

Thanks.

@adam - Looking through the code for my dashboard i have some endpoints which lookup variables with filters. These filters are causing some logging that seems to be causing me some confusion.

For example:
$Endpoint += New-UDEndpoint -id “ScheduleEndpoint10Min” -Schedule $ScheduleEndpoint10Min -Endpoint {
$Cache:testobject = new-object PSObject -property @{
“Item” = 1
“Result” = 2
}
if (Cache:testobject | Where-Object {_.Item -eq 1})
{
}
$Cache:testobject = @(“1”,“2”)
if ($Cache:testobject -eq $null)
{
}
}

Log:
[07-23-20 12:30:04 PM] [DBG] Creating endpoint: ScheduleEndpoint10Min
[07-23-20 12:30:04 PM] [DBG] Found variable: Cache:testobject
[07-23-20 12:30:04 PM] [DBG] Not setting variable Cache:testobject. -
[07-23-20 12:30:04 PM] [DBG] Found variable: Cache:testobject
[07-23-20 12:30:04 PM] [DBG] Not setting variable Cache:testobject. -
[07-23-20 12:30:04 PM] [DBG] Found variable: _
[07-23-20 12:30:04 PM] [DBG] Not setting variable _. -
[07-23-20 12:30:04 PM] [DBG] Found variable: Cache:testobject
[07-23-20 12:30:04 PM] [DBG] Not setting variable Cache:testobject. -
[07-23-20 12:30:04 PM] [DBG] Found variable: Cache:testobject
[07-23-20 12:30:04 PM] [DBG] Not setting variable Cache:testobject. -
[07-23-20 12:30:04 PM] [DBG] Found variable: null
[07-23-20 12:30:04 PM] [DBG] Setting variable null value:
[07-23-20 12:30:04 PM] [DBG] Found variable in endpoint AST: PSScriptRoot

Should i be concerned that PSU has 'Found variable: _ ’ and ‘Setting variable null value:’

Im wondering if this is resulting in this line at the end:
[07-23-20 12:30:04 PM] PS: One or more errors occurred. (Cannot overwrite variable null because it is read-only or constant.) (Cannot overwrite variable null because it is read-only or constant.)

Ahhh interseting. That’s a good find. It probably is what is causing that error.

Hi Adam, I know you are busy but did you get anywhere with this hook for session timeout? this would be very useful!

Also following up on the null variable, i wonder if you have managed to take a look as to why this is happening - I am on 1.3.0 full release now and these errors persist.

Cheers!

We didn’t get a chance to implement the sign out functionality. I’ve opened an issue for that here: https://github.com/ironmansoftware/powershell-universal/issues/24

As for the read-only variable problem, this is still a problem as well.

You seem to have it covered, ill leave it in your more than capable hands, thanks!

Hi Adam, I see ‘Setting variable null value’ has been complete, can you let me know if this has been merged into a nightly?

Also, any idea when https://github.com/ironmansoftware/powershell-universal/issues/24 will be worked on? I would really like this before putting PSU in production (which im 95% ready to do)…

Thanks.