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

[QUESTION] Pages section not routing? Possibly setup incorrectly. #869

Closed
4 tasks done
bmcgonag opened this issue Aug 24, 2022 · 12 comments
Closed
4 tasks done

[QUESTION] Pages section not routing? Possibly setup incorrectly. #869

bmcgonag opened this issue Aug 24, 2022 · 12 comments
Labels
🤷‍♂️ Question [ISSUE] Further information is requested

Comments

@bmcgonag
Copy link

Question

I'm trying to setup some extra pages, following your documentation, I've setup a servers.yml inside the public directory (same location as my main conf.yml file.

In the conf.yml file I added a top level pages section with the name and path attributes for it.

Section in conf.yml below

appConfig:
  theme: colorful
  layout: auto
  iconSize: small
  language: en

pages:
- name: Servers
  path: 'servers.yml'

pageInfo:
  title: Home Lab
  description: Welcome to your Home Lab!
  footerText: ''
sections:
  - name: Servers
    icon: fas fa-server
    items:

The main page works fine, and the "Servers" button / tab shows up in the upper right. When clicked, the URL path changes to http://:/home/servers (which I presume is right), but the page does not change. If I then click in the URL bar and press the Enter key, the screen shows the message:

Cannot GET /home/servers

My servers.yml is as follows:

sections:
  - name: Bia Info
    widgets:
      - type: gl-current-cpu
        options:
          hostname: http://<server1-ip>:61208
        id: 0_696_glcurrentcpu
      - type: gl-current-mem
        options:
          hostname: http://<server1-ip>:61208
        id: 1_696_glcurrentmem
  - name: Aria Info
    widgets:
      - type: gl-current-cpu
        options:
          hostname: http://<server2-ip>:61208
        id: 0_809_glcurrentcpu
      - type: gl-current-mem
        options:
          hostname: http://<server2-ip>:61208
        id: 1_809_glcurrentmem

I'm excited to use this feature, but I'm obviously doing something wrong. Any help is greatly appreciated.

I also don't know where to see the version, but I did a docker-compose pull and docker-compose up -d this morning to make sure I'm on the latest.

Category

Configuration

Please tick the boxes

@bmcgonag bmcgonag added the 🤷‍♂️ Question [ISSUE] Further information is requested label Aug 24, 2022
@bmcgonag
Copy link
Author

Found the version in the docker logs. I'm on 2.1.1

Thanks.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Aug 30, 2022
@bmcgonag
Copy link
Author

Adding a gif image of the issue.

I have done a docker-compose down and docker-compose up -d to force a rebuild, as well as used the in app "Rebuild Application" option to rebuild the app after adding my servers.yml file to the public directory.
Dashy_pages_issue_recording

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Aug 31, 2022
@barakplasma
Copy link

barakplasma commented Sep 7, 2022

I noticed the same issue for us.

I think this happens because Dashy is a Single Page Application, and is using client-side routing for the "pages" support.
You can see in the package.json that Dashy uses vue-router
So an HTTP GET to the page like hostname/home/servers doesn't have any handler in the server, whereas the hostname/ has an HTTP handler.

There's an opportunity here to add a handler for the pages specified in the config so that a bookmark to a page will work out-of-the-box.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 7, 2022
@steffen-lorenz
Copy link

steffen-lorenz commented Sep 7, 2022

I have the same issue.
Seems like it's a duplicate to #763

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 8, 2022
@barakplasma
Copy link

definitely close as a duplicate. Thanks @steffen-lorenz !

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 8, 2022
@bmcgonag
Copy link
Author

bmcgonag commented Sep 8, 2022

I disagree that this is a duplicate. As you can see in my recording, the link does not take me to the sub-page, whereas #763 clearly states that clicking the link on his dashboard will take him properly to the subpage. His issue is with an F5 / refresh, or trying to route directly without first opening the main dashboard.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 9, 2022
@taintedkernel
Copy link

I was evaluating Dashy this morning (v2.1.1) and also encountered this issue. The behavior for me is the same, I cannot get the subpage to load from the link (despite the URL changing).

If I refresh the page on the subpage link it just shows the primary page (after I set the routingMode to hash as recommended on that issue).

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 13, 2022
@taintedkernel
Copy link

Just following up here, I was able to spend a bit more time on it and resolved the issue. My mistake was giving the full path to the page in my main config; I created a separate directory for pages under /app/public and thus just needed to put pages/docs.yml.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 16, 2022
@bmcgonag
Copy link
Author

I tried this as well, but still have the same result, where the separate page is not loading. Would you mind sharing this section of your conf.yml and your separate page yaml @taintedkernel ?

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 19, 2022
@dowoco
Copy link

dowoco commented Sep 20, 2022

I too was having this same issue running this in a docker container. But @taintedkernel gave the partial answer.
I added an additional line to my docker compose file to include the new .yml page into a folder, which I called "page". The page I wanted to create was called monitoring. After relaunching with "docker compose up -d" it started to work as expected.
I still get the "Cannot GET /home/monitoring" when I refresh the page but at least the new page loads. I will try the routingMode to hash as recommended above.

EDIT: I applied the routingMode fix and all work as expected now.

  - /home/dowoco/DockerVolumes/dashy/public/conf.yml:/app/public/conf.yml
  - /home/dowoco/DockerVolumes/dashy/public/monitoring.yml:/app/public/page/monitoring.yml

@taintedkernel
Copy link

I too was having this same issue running this in a docker container. But @taintedkernel gave the partial answer. I added an additional line to my docker compose file to include the new .yml page into a folder, which I called "page". The page I wanted to create was called monitoring. After relaunching with "docker compose up -d" it started to work as expected. I still get the "Cannot GET /home/monitoring" when I refresh the page but at least the new page loads. I will try the routingMode to hash as recommended above.

EDIT: I applied the routingMode fix and all work as expected now.

  - /home/dowoco/DockerVolumes/dashy/public/conf.yml:/app/public/conf.yml
  - /home/dowoco/DockerVolumes/dashy/public/monitoring.yml:/app/public/page/monitoring.yml

Yep, that is pretty much it. The only difference in my case was that I created a directory called pages in both my local filesystem and in the container under /app/public/pages, then mounted this directory in docker (rather then an individual monitoring.yml):

-v <path>/dashy-data/pages/:/app/public/pages/

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 21, 2022
@bmcgonag
Copy link
Author

Resolved with the above information. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♂️ Question [ISSUE] Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants