Posted on 2 Comments

Universal Dashboard – 2.4 Release

After a couple months of development, Universal Dashboard 2.4 is now available on the PowerShell Gallery! This release fixes many issues and implements some really cool features. Check out the notes below to find out more or head over to your favorite command prompt to get the latest.

Install-Module UniversalDashboard -AcceptLicense 

Grid Layout

One issue with dashboards is that it is difficult and time consuming to layout many controls. In UD 2.4, you can now layout controls directly in your web browser. The layout is then output as a JSON string that you can store with your dashboards PS1 file. This reduces the nesting of New-UDRow and New-UDColumn calls and makes it way easier to organize your pages.

You can learn more about the grid layout and how to save your layouts to your dashboards on the doc site.

Material UI Controls

Material UI is the most popular Material Design library for React. It has tons of controls and very customizable. In addition to controls, it provides theming as part of the framework. As we move toward a v3 release of UD, we will be looking at replacing Materialize with Material UI. As we work towards that, we will be bringing in new controls. You can take advantage of some of them right now. Check out the Avatar, Button, Card, Chip, Paper and Typography controls in UD 2.4.

More information can be found on the docs site.

Font Awesome v5

UD2.4 now uses Font Awesome version 5. Previously, it had been using Font Awesome version 4.7. With the introduction of v5, you’ll have access to way more icons. Care has been taken to map existing v4.7 icon names to their v5 counterparts. If you encounter any errors with icons, please open a GitHub issue.

Materialize v1

A change in Chrome introduced a change that caused OnClick event handlers to require two clicks to function. This affected many JavaScript libraries; including Materialize. Because of issues like this, UD2.4 now uses the v1 version of Materialize. This also fixed some issues with date pickers as well as other controls.

Simplified New-UDGrid

New-UDGrid no longer requires passing the Headers and Properties parameters. You can just pass your data to Out-UDGridData. Headers and Properties proved redundant in many scenarios. You can still use Headers and Properties to customize these features.

    New-UDGrid -Title "Processes" -Endpoint {
        Get-Process | Select-Object Name,Path | Out-UDGridData
    }

Improved Custom React Components

Due to enhancements in custom component support, the entire Material UI component library is defined with only JavaScript and PowerShell. There is no need for C# code. This PowerShell to React binding makes it extremely easy to introduce new components. UD can load webpack chunks, CSS and even source maps for custom component libraries.

If you want to see what this looks like, head over to the Universal Dashboard GitHub repository. Full documentation for this feature is in the works and you’ll see many more React controls being brought into the UD ecosystem.

Access to Authorization Policies

You can now access Authorization Policies via Get-UDAuthorizationPolicy. Rather than just limiting which page a user has access to, you can now use this cmdlet in your Endpoints to adjust how the page itself behaves based on that authorization policy. For example, you can check the authorization policy to see if a user is an admin and then hide a control based on if they are not.

Here’s an example of doing just that.

$AuthPolicy = Get-UDAuthorizationPolicy 

if ($AuthPolicy -contains 'AdminPolicy') {
     New-UDHeading -Text "Only Admins See This"
}  

A Word about the Designer

In the 2.4-beta1, the ability to use a basic designer was available. This feature did not make it into the 2.4 release. The designer itself was not very useful in it’s current implementation so it was decided to instead implement the grid layout and work some more on the designer for a future release. Working longer on the designer would have delayed the 2.4 build that had a lot of much needed fixes.

Documentation

Documentation has been updated for the 2.4 release. Additionally, documentation for the 2.3 release is still available. Instead of continuing a single stream of docs, we will now be taking advantage of GitBook Releases. Beginning with the 2.3 release, this will allow for you to access older versions of documentation specific to the UD version you are using.

You can select the doc version by clicking the drop down in the top left navigation menu of the docs site.

And Much More

Check out the full list of release notes here.

2 thoughts on “Universal Dashboard – 2.4 Release

  1. Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    PS C:\WINDOWS\system32> Install-Module UniversalDashboard -AcceptLicense
    Install-Module : A parameter cannot be found that matches parameter name ‘AcceptLicense’.
    At line:1 char:35
    + Install-Module UniversalDashboard -AcceptLicense
    + ~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Install-Module], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Install-Module

    PS C:\WINDOWS\system32>

    1. You’ll need to update your version of PowerShell Get.

      Update-Module PowerShellGet

Leave a Reply

Your email address will not be published. Required fields are marked *