How to Build universaldashboard.community v3

@adam
i have seen that the github project has been updated but its not clear now how to build UD from this project for v3 and what files you need to copy after successful build.
the folder structure like before client,udmaterialize,udmaterializeui … no longer exists and no docs so far on how to open this project and work in it in VS.

any updates or guidelines is appreciated.

Moving forward, UD will be running under the PowerShell Universal platform. There won’t be a Universal Dashboard vs UD Community. More info on that here: https://ironmansoftware.com/ud-ua-powershell-universal/

The UD Community features are being rolled into PSU so you’ll still be able to run your dashboards for free. There are even more components being released to the public repo (Nivo and Map so far).

The UD repo contains just the UD frameworks and components. The PSU platform is downloaded during the tests and then the frameworks are added to the PSU instance.

Here is how PSU is downloaded: https://github.com/ironmansoftware/universal-dashboard/blob/master/src/build.ps1#L16

This folder is the v2.9 framework. It contains both the client folder as well as materialize: https://github.com/ironmansoftware/universal-dashboard/tree/master/src/v2

This folder is the v3.0 framework. It contains both the client folder as well as Material UI: https://github.com/ironmansoftware/universal-dashboard/tree/master/src/v3

You can build the project and run the tests like this: https://github.com/ironmansoftware/universal-dashboard#building

The project is setup for VS Code and not VS proper since its all JavaScript and PowerShell. There is a Build and Test VS Code task you can also use to run those scripts.

Here’s an example of how to add the built framework to PSU and then spin up a dashboard. https://github.com/ironmansoftware/universal-dashboard/blob/master/src/v2/tests.build.ps1#L31

You can also add frameworks via the UI on the Frameworks tab.

There are still some thing missing from PSU but we are actively working to get parity with UD. PSU will provide a much better foundation for the future. It’s an exciting time for UD.

I’ll be working on some official docs for all of this.

Couple 2 things , so far psu explains how to add a dashboard to psu but how to create one?

if you want to add a new component to the project, how to do it ?

Thank you.

How to create a dashboard? The goal is to use your existing dashboard scripts with PSU. For example, you should be able to create a dashboard.ps1 like this:

New-UDDashboard -Title 'Hello, World!' -Content {
New-UDElement -Tag 'h1' -Content { "Hello, World!" }
}

Then you can add that script to PSU.

We will add some neat UI around building dashboard directly in PSU.

If you want to bring in an entirely new component to the UD project that is not part of a framework, you can create components just as you did before with v2.9. All those components will still work.

Custom components will still be their own module: https://github.com/ironmansoftware/universal-dashboard/tree/master/src/UniversalDashboard.Map

When you want to use the component, you will still just use Import-Module to bring in that component.

Soon we will be adding features to assign components to dashboards and search the UD marketplace right in PSU to make it easier to find and use custom components.

@adam
Thank you for the info so that means for the time being you still need the old UD to build dashboards and then import them to PSU.
This info is needed especially for new UD users cause for the time being you still need to update/create UD using old version.

You shouldn’t need an old UD version at all. Here’s an example of building a dashboard with auto-reload in PSU. I don’t have UD installed.

@adam
Thank you so much for the Video but my concern was for loading the dashboard commands into vscode or ise if you are using windows powershell so you can start coding and view available commands.

so for example if you dont have UD installed how you are going to see and work with UD commands in vscode or ise, like new-udbutton wont be recognized if the module is not there?

Ah, I see. That’s certainly something that is missing. I will figure something out for the next version of PSU. For now you can import the module from: “C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta1\UniversalDashboard.psd1”

We should publish these new modules to the gallery.

@adam
Thank you for the tip but it seems not working

Import-Module C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta1\UniversalDashboard.psd1

Cannot convert argument "type", with value: "UniversalDashboard.Models.DashboardColor", for "Add" to 
type "System.Type": "Cannot convert the "UniversalDashboard.Models.DashboardColor" value of type 
"System.String" to type "System.Type"."
At C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta1\UniversalDashbo
ard.Materialize.psm1:2 char:1
+ $TAtype::Add('DashboardColor', 'UniversalDashboard.Models.DashboardCo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
 
Cannot convert argument "type", with value: "UniversalDashboard.Models.Endpoint", for "Add" to type 
"System.Type": "Cannot convert the "UniversalDashboard.Models.Endpoint" value of type "System.String" to 
type "System.Type"."
At C:\ProgramData\PowerShellUniversal\Dashboard\Frameworks\UniversalDashboard\2.9.1-beta1\UniversalDashbo
ard.Materialize.psm1:3 char:1
+ $TAtype::Add('Endpoint', 'UniversalDashboard.Models.Endpoint')
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Yep. That’s a problem. I’ll get this fixed.

Thank you Adam.

Hi Adam,

I don’t have the Auto-reload button in the latest release. Is this a bug or am i doing something wrong?

Kind regards,

Paul

Hi Adam was this fixed? I am trying to load the UD commands in ise and they load up just fine but I get an error when trying to use them from ise.

"Start-UDDashboard : Cannot bind parameter ‘Dashboard’. Cannot create object of type “PowerShellUniversal.Dashboard”. The defaultTheme property was not found for the PowerShellUniversal.Dashboard object. The available property is: [Id <System.Int64>] ,
[Name <System.String>] , [FilePath <System.String>] , [BaseUrl <System.String>] , [DashboardFramework <PowerShellUniversal.DashboardFramework>] , [PowerShellVersion <PowerShellUniversal.PowerShellVersion>] , [Environment <System.String>] , [ProcessId
<System.Int32>] , [ProcessName <System.String>] , [Status <PowerShellUniversal.DashboardStatus>] , [Authenticated <System.Boolean>] , [Role <System.String[]>] , [Content <System.String>] , [GrantAppToken <System.Boolean>] , [Debug <System.Boolean>] ,
[DisableAutoStart <System.Boolean>] , [DisableStartupLog <System.Boolean>] , [DashboardComponents <System.Collections.Generic.List1[[PowerShellUniversal.DashboardComponent, PowerShellUniversal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]>] , [SessionTimeout <System.Int32>] , [IdleTimeout <System.Nullable1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>] , [Deployed <System.Boolean>] , [AutoDeploy <System.Boolean>] , [Description <System.String>] ,
[Credential <System.String>] , [DisableErrorToast <System.Boolean>] , [Pages <PowerShellUniversal.PageDashboard>] , [Maintenance <System.Boolean>] , [Tag <System.Collections.Generic.List`1[[PowerShellUniversal.Tag, PowerShellUniversal, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null]]>]
At line:1 char:56

  • Start-UDDashboard -Port 8083 -Name “TestDB” -Dashboard $TestDashboard
  •                                                    ~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:slight_smile: [Start-UDDashboard], ParameterBindingException
    • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,UniversalAutomation.StartDashboardCommand"
1 Like