Deployment of Dashboard fails via Azure Portal Cloud Shell for exported json template
Describe the bug
There will be error when running the command az portal dashboard create --input-path .\dashboard-props.json --name testDashboard --resource-group lazinnat-test-so in both PowerShell window and Cloud Shell.
Related command
Errors
Issue script & Debug output
az portal dashboard create --input-path .\dashboard-props.json --name testDashboard --resource-group lazinnat-test-so
Expected behavior
No error
Environment Summary
NO
Additional context
No response
Thank you for opening this issue, we will look into it.
Could you share the version of the extension?
az --version
azure-cli: 2.70.0
What's the version of the portal extension?
Could you share a full ouput like this
Seems it's the wrong format. Please check this sample json of portal 0.1.3 extension.
https://github.com/Azure/azure-cli-extensions/blob/eb35ad2b013747567bb6b6d2b51ff613690412ac/src/portal/azext_portal/tests/latest/properties.json
It has a format like
{
"lenses": {
"0": {
"order": "0",
...
}
}
}
instead of the json you shared
{
"lenses": [
{
"order": "0",
...
}
]
}
Dashboard is using a new api version that has the changes in schema. I think you could try the latest version of portal extension.