Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong homepage on Default URL #539

Closed
itfranck opened this issue Jan 5, 2019 · 0 comments
Closed

Wrong homepage on Default URL #539

itfranck opened this issue Jan 5, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@itfranck
Copy link
Contributor

itfranck commented Jan 5, 2019

When using a dashboard containing 2 pages in this specific configuration,

  • Home (Using Content parameter)
  • Claims (Using Endpoint parameter)
  1. The http://localhost:9999 does not redirect to http://localhost:9999/home (BAD, sort of...)
  2. The http://localhost:9999 page actually shows the Claims page (BAD)
  3. Clicking navbar title brings us to http://localhost:9999/home (GOOD)

The problem is that : http://localhost:9999 shows the first page with the Endpoint parameter rather than showing the defined homepage . Also, in other scenarios observed, http://localhost:9999 is always redirected to the homepage. I believe it should be the case there too for sake of consistency.

Get-UDDashboard | Stop-UDDashboard

$HomePage = New-UDPage -Name 'home'  -Content {New-UDCard -Title 'ss' -Text 'test'}
      
$Claims = New-UDPage -Name 'Claims'   -Endpoint {
    New-UDCard -Title 'Claims  - Not home page' -Text 'Not home page'
} 

$Theme =  Get-UDTheme -Name 'Azure'
$Dash = New-UDDashboard -Title 'dashboard' -Theme $Theme -Pages $HomePage,$Claims 

Start-UDDashboard -Dashboard $Dash -Port 9999

There's a workaround that work to fix that issue which is to set the Claims page with the URL parameter and to define its name afterward (so it also shows in the menu), just like this:

$Claims = New-UDPage -url '/Claims'   -Endpoint {
    New-UDCard -Title 'Claims  - Not home page' -Text 'Not home page'
} 
$Claims.Name = 'Claims'
@adamdriscoll adamdriscoll added the bug Something isn't working label Jan 5, 2019
@adamdriscoll adamdriscoll added this to the 2.2.1 milestone Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants