I have been using PSU dashboards for a couple of years now, but have always stayed on version 2.12.6. We are finally working to upgrade our production tenant, but the first step was to upgrade my localhost. After struggling with the installation, I renamed all of the directories in C:\ProgramData and C:\Program Files (x86) and was able to successfully install the new version. However, I am a little confused as to how everything is laid out.
I am also unable to successfully get an existing dashboard to run properly. I created a App using the GUI just as a test, and then edited the dashboards.ps1 file to contain an existing dashboard. Here is the file content:
The only thing I updated was the Environment parameter, and that was the match the new name in the new GUI. Everything else was in the previous dashboards.ps1 file on version 2.12.6. I tried to add the CodeEditor component, but was unable to find the button (see above).
I am just trying to figure out how to get existing dashboards to run on a newer version as seamless as possible. Any kind of help would be greatly appreciated
No, but following the documentation I do not see how to even add a component. I had no problem doing it in 2.x, but the Add Components button does not appear in the newest version.
I also tried removing that parameter altogether, since I do not believe this dashboard uses CodeEditor, but I am still getting the same 500 error.
Here is the current line in dashboards.ps1, which auto-changed to New-PSUApp once I saved the settings in the GUI:
You may have to share a sanitized version of your dashboard and/or page code. It’s possible a breaking change introduced since 2.12.6 has broken it. If nothing else, someone could try to reproduce the issue in their environment.
I am in the process of moving a Universal Dashboard 2 dashboard to PowerShell Universal 3/4 environment. It is a big change. Quite a few cmdlets have changed. The structure has too.
I would recommend creating a new PowerShell Universal 4.2 environment, then moving your code over page by page.
In my Dev environment I made my dashboards/apps using the GUI then pushed the dashboards.ps1 file to other environments. This worked.
That worked for me. Thanks a lot for the help. Most of the dashboards are starting up. However I noticed some errors in the logs about the pages not being loaded properly. After doing some investigation I noticed a pattern where every failing dashboard had this in dashboard.ps1:
This code goes into the Pages directory in the repository and dynamically adds the pages in a grid to the dashboard home page. The working dashboards manually define the $Pages variable with a UDContainer and UDGrid.
Do you see anything that might prevent the dashboard from starting up?