i switch to react-query for the autorefresh and to query endpoints so tell me what you think.
I’m game.
thanks ת just work with the readme its simple
and if you need help ask me and i have demo dashboard with some examples
Thanks. I’ll check it out and let you know if I hit any road blocks.
Think I’m missing something when attempting to build UDantd. I get the following.
PS>cd src
PS>Invoke-Build
Build . C:\bin\ps\UniversalDashboard.Antd\src\invoke.build.ps1
Task /./Clean
Done /./Clean 00:00:00.0301352
Task /./Stage
Directory: C:\bin\ps\UniversalDashboard.Antd\src\output
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 5/31/2020 6:22 AM UniversalDashboard.Antd
Done /./Stage 00:00:00.0291451
Task /./BuildJS
> universal.dashboard.ant.design@0.50.0 build C:\bin\ps\UniversalDashboard.Antd\src
> webpack -p --env production
'webpack' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! universal.dashboard.ant.design@0.50.0 build: `webpack -p --env production`
npm ERR! Exit status 1
it looks like invoke.build.ps1 is missing an npm install. From the src directory, try npm install and then invoke.build.ps1.
Install current version of Node and installed webpack in the src folder. Seems to be looking for a folder called, public and not finding it. I can forward the log if that would be useful.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! universal.dashboard.ant.design@0.50.0 build: `webpack -p --env production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the universal.dashboard.ant.design@0.50.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\caday\AppData\Roaming\npm-cache\_logs\2020-05-31T15_04_08_074Z-debug.log
Done /./BuildJS 00:00:02.6059919
Task /./MergePsm1
ERROR: Cannot find path 'C:\bin\ps\UniversalDashboard.Antd\src\public' because it does not exist.
At C:\bin\ps\UniversalDashboard.Antd\src\invoke.build.ps1:17 char:5
+ Copy-Item "$PSScriptRoot\public\*" "$PSScriptRoot\output\Universa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The prior build error was do to:
Error: Cannot find module '@ant-design/dark-theme'
To resolve this error, I did the following.
npm install @ant-design/dark-theme
Now the build is generating the following error:
Error: Cannot find module 'antd/dist/dark-theme'
Attempting to run ‘npm install antd/disk/dark-theme’ isn’t working. So stuck here at the moment.
will fix that
can you try to build it now
its there
Thanks @AlonGvili. I will give it a try. Been getting slammed at work so may be a few days before I get to it.
thanks and take your time
@AlonGvili After cloning a fresh version of antd I attempted to build again.
Had several Invoke-Build errors due to missing modules and each of the following resolved the issue.
npm install --save-dev webpack
npm install --save-dev webpack-cli
npm install --save-dev html-webpack-plugin
npm install --save-dev antd-dayjs-webpack-plugin
Now stuck on trying to load the ‘antd-theme/plugin’ module.
Build error:
Error: Cannot find module 'antd-theme/plugin'
Module load error:
npm install --save-dev antd-theme/plugin
npm ERR! Error while executing:
npm ERR! C:\bin\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/antd-theme/plugin.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
i think i fix the build script try it, just run invoke-Build on the src dir
Re-tried. Same error. I didn’t update the clone image. Guessing you meant it should have worked without cloning the project again.
try clone again the repo if it still doesn’t work, i upload the output folder to the src to , in the output you have the finish module
roger that. Will get to that later today.
Build worked this time.
Done /./BuildJS 00:08:16.7647362
Task /./MergePsm1
Done /./MergePsm1 00:00:02.8782290
Done /. 00:08:19.8283739
Build succeeded. 5 tasks, 0 errors, 0 warnings 00:08:20.0626624
I’ll check out some the Antd Controls now using UD 2.9.0
Thanks.
In trying the dashboard.ps1 in the Dashboard folder. I get the following error:
Method invocation failed because [UniversalDashboard.Models.Endpoint] does not contain a method named 'Register'.
At C:\bin\ps\UniversalDashboard.Antd\src\output\UniversalDashboard.Antd\UniversalDashboard.Antd.psm1:5268 char:5
+ $Content.Register($Id, $PSCmdlet)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
This in the New-UDPage function. I copied dashboard.ps1 file to a different folder locations and modified it as follows.
Lines added modified at beginning.
Import-Module -Name UniversalDashboard -RequiredVersion 2.9.0
Import-Module C:\bin\ps\UniversalDashboard.Antd\src\output\UniversalDashboard.Antd\UniversalDashboard.Antd.psm1
$Antd = New-UDDashboard -Title "Dashboard" -Pages @(
Lines added modified at ending.
Get-UDDashboard -Name "Antd-Dashboard" | Stop-UDDashboard;
Start-UDDashboard -Name "Antd-Dashboard" -Dashboard $Antd -Port 10031 -AutoReload;
i didn’t check it on ud 2.9 im working on 3.0 of Powershell universal but i will make the changes for it to run on 2.9, thank you for the feedback