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

[BUG] Multi-Page Support , can´t get it to work. #1005

Closed
5 tasks done
ostgardh opened this issue Dec 8, 2022 · 42 comments
Closed
5 tasks done

[BUG] Multi-Page Support , can´t get it to work. #1005

ostgardh opened this issue Dec 8, 2022 · 42 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 📌 Keep Open [ISSUE][PR] Prevent auto-closing 🛩️ Released 2.1.2

Comments

@ostgardh
Copy link

ostgardh commented Dec 8, 2022

Environment

Self-Hosted (Docker)

System

Docker

Version

Version: 20.10.21

Describe the problem

I have add

pages:
- name: Work Stuff
  path: 'work.yml'

And make work.yml file

I can see Pages link in Dashy, but If I click on "Work Stuff" I coming to url: "http:mypage/home/work-stuff"
But is not working. I see same page as conf.yml...
And If I reload I get "Cannot GET /work-stuff"

work.yml file is mounded in docker and have r&w.
I don´t understad if I have make something wrong or if this is bug???

Additional info

No response

Please tick the boxes

@ostgardh ostgardh added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Dec 8, 2022
@liss-bot
Copy link
Collaborator

liss-bot commented Dec 8, 2022

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Dec 12, 2022
@ostgardh
Copy link
Author

ostgardh commented Dec 15, 2022

which dir is work.yml mounted in? for the filename only syntax to work it needs to reside in public:

The path (local or remote) to the config file to use.
For files located within /public, you only need to specify filename, for externally hosted files you must include the full URL

https://dashy.to/docs/configuring#pages-optional

** Configuring | Dashy ** All app configuration is specified in /public/conf.yml which is in YAML Format format. If you're using Docker, this file can be passed in as a volume. Changes can either be made directly to this file, or done through the UI. From the UI you can also export, backup, reset, validate and download your configuration file.

Same as conf.yaml
/app/public/work.yml

All app configuration is specified in /public/conf.yml which is in YAML Format format. If you're using Docker, this file can be passed in as a volume. Changes can either be made directly to this file, or done through the UI. From the UI you can also export, backup, reset, validate and download your configuration file.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Dec 15, 2022
@kozoke
Copy link

kozoke commented Dec 25, 2022

Same experience. Have the additional page in the same folder as the config.yml Not working.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Dec 25, 2022
@pcl11
Copy link

pcl11 commented Dec 25, 2022

Same experience. Not working.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Dec 26, 2022
@4lexKidd
Copy link

4lexKidd commented Dec 28, 2022

same issue here.

I had a look into the routing code and found that the logic builds routes based on page "type" (home =default; workspace; dev) but i have not found any way for users to specify the page type in the configs.
Might be the issue there.

Also @Lissy93 may i suggest some fix to clearify and easy up multi-page Support:
Basicly i see two paths that would solve these multipage problems.
A) If page types should be kept, you might extend the needed configs for a sub-page to [name, path, type] and force a type folder (home, dev, etc) within the public forder with the config declared in the path.
B) You might drop the page types and let the routing be created on the domains root (for example https://hostna.me/sub-page-name-with-replaced-whitespaces).
I see a lot of confusion (especially in the docker community) where to place (and in extend, create volumes to) the sub-page configs.

To serve a common use case:
I want to create a sub-page to seperate admin related sections from family used, none admin sections.

Sadly, i am not skilled enough in js and vue to have a try for the fix myself. So @Lissy93 would be nice for us docker heads to check this issue. Thanks in advance.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Dec 28, 2022
@schniggie
Copy link

For me it is also not working.

docker-compose.yml:

version: "3.8"
services:
  dashy:
    # To build from source, replace 'image: lissy93/dashy' with 'build: .'
    # build: .
    image: lissy93/dashy
    container_name: dashy
    # Pass in your config file below, by specifying the path on your host machine
    volumes:
    - /share/CACHEDEV1_DATA/docker/dashy/conf.yml:/app/public/conf.yml
    - /share/CACHEDEV1_DATA/docker/dashy/nas.yml:/app/public/nas.yml
    ...

conf.yml:

...
pages:
  - name: NAS
    path: nas.yml

Clicking the NAS button does nothing, opening in new tab gives 'Cannot GET /home/nas'

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Dec 29, 2022
@semhoun
Copy link

semhoun commented Jan 5, 2023

Same bug in 2.1.1. I try the same configs with 2.1.0 and in this version pages work.
I use docker version.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 5, 2023
@bodrick
Copy link

bodrick commented Jan 7, 2023

So I had the same issue , I fixed it by setting routingMode to hash.
I am using docker.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 8, 2023
@Dylan-Bs
Copy link
Contributor

I got the same problems, it's very frustrating because there is no error message and no logs ... (or I didn't find them).

For me, the problem was in my file for the new page, some syntax problems (in widgets, the "limit: 60" in "type" instead of 'options'.

I can suggest you to try with some examples and when you have a page who work, do changes carrefully!

(using Docker version 20.10.3, build 55f0773)

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 17, 2023
@Thomas-Arildtoft
Copy link

Same experience. Not working.

@Fiala06
Copy link

Fiala06 commented Jan 18, 2023

Was having the same issue, turns out I needed to change the command below so it rebuilds/indexes the files. Now my image folder and custom pages are working.

https://dashy.to/docs/developing/#alternate-start-commands

'yarn' 'start'
to
''yarn' 'build-and-start'

image

This article outlines how to get Dashy running in a development environment, and outlines the basics of the architecture.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 19, 2023
@papampi
Copy link

papampi commented Jan 23, 2023

Don't know if this is related to same issue or not
I can't open dashy/home either, getting "Cannot GET /home"
Adding pages also gives "Cannot GET /home/test"

dashy only opens at http://ip:port and not http://ip:port/home or http://ip:port/home/test or http://ip:port/test

http://ip:port/test.yml shows the test page config yml

Edit:
changing start command as @Fiala06 suggested solve the issue

Edit 2:
Back to square one, changing command not fixed it permanently, it just keeps rebuilding and make it unavailable.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jan 23, 2023
@gavinpoynton
Copy link

same issue, anyone have an resolution?

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Jan 27, 2023
@PuckeyP
Copy link

PuckeyP commented Jun 10, 2023

Is Dashy unsupported ?

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jun 10, 2023
@ykelvis
Copy link

ykelvis commented Sep 12, 2023

If the files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytime the config files are edited)

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 12, 2023
@PuckeyP
Copy link

PuckeyP commented Sep 12, 2023

Nope does not work

@DPCools
Copy link

DPCools commented Sep 12, 2023

files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytim

When you say mounted correctly I have done very tutorial i can find and there's a lot and trayed every possible config, trust me I have wasted hours on this. show how about you wright your how to guide to help people insted of being not so helpful.

@ykelvis
Copy link

ykelvis commented Sep 12, 2023

files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytim

When you say mounted correctly I have done very tutorial i can find and there's a lot and trayed every possible config, trust me I have wasted hours on this. show how about you wright your how to guide to help people insted of being not so helpful.

I just did a test, and it seemed to me "rebuild" is really the one thing fixed it. I'll post configs below so you could give it a test. Upon bring the container up, the "frontpage" button doestn't do anything. After "rebuild" through the web UI, and check the logs to make sure it is rebuilt, the "frontpage" button will work.

docker-compose.yml

  test:
    image: lissy93/dashy
    ports:
      - 8000:80
    volumes:
      - ./test/conf.yml:/app/public/conf.yml
      - ./test/www.yml:/app/public/www.yml
    restart: unless-stopped

conf.yml

appConfig:
  layout: vertical
  defaultOpeningMethod: sametab
  enableMultiTasking: true
  disableContextMenu: true
  iconSize: large
  theme: cherry-blossom
  language: en
  hideComponents:
    hideSearch: false
    hideSettings: false
    hideSplashScreen: true
    hideFooter: true
    hideHeading: false
    hideNav: false
  startingView: default
  statusCheck: true
  statusCheckInterval: 30
  faviconApi: allesedv
  colCount: 4
  routingMode: history
  widgetsAlwaysUseProxy: true
  webSearch:
    disableWebSearch: true
    searchEngine: duckduckgo
    openingMethod: newtab
    searchBangs: {}
  enableFontAwesome: true
  enableMaterialDesignIcons: false
  auth:
    enableGuestAccess: false
    users: []
    enableKeycloak: false
  showSplashScreen: false
  preventWriteToDisk: false
  preventLocalSave: false
  disableConfiguration: false
  disableConfigurationForNonAdmin: false
  allowConfigEdit: true
  enableServiceWorker: false
  disableUpdateChecks: true
  disableSmartSort: false
  enableErrorReporting: false
pageInfo:
  title: homelab
  description: ''
  navLinks: null
  footerText: ''
pages:
  - name: frontpage
    path: 'www.yml'

www.yml

---
# Page meta info, like heading, footer text and nav links
pageInfo:
  title: Hello, Alicia
  description: General browser startpage
  logo: https://i.ibb.co/71WyyzM/little-bot-3.png

# Optional app settings and configuration
appConfig:
  statusCheck: false
  theme: charry-blossom
  fontAwesomeKey: c94dc2b452
  customCss: '.clock p.time { font-size: 3rem !important; }'
  layout: vertical
  iconSize: small

# Main content - An array of sections, each containing an array of items
sections:
- name: Dev & Cloud
  icon: far fa-code
  items:
  - title: GitHub
    icon: favicon
    url: https://github.com/

@DPCools
Copy link

DPCools commented Sep 13, 2023

thanks for the information, i will give it a try but that is just a faf.

@DPCools
Copy link

DPCools commented Sep 13, 2023

may look at this https://homarr.dev/ as its more active and replace dashy.

Simplify the management of your server with Homarr - a sleek, modern dashboard that puts all of your apps and services at your fingertips. With Homarr, you can access and control everything in one convenient location. Homarr seamlessly integrates with the apps you've added, providing you with valuable information and giving you complete control. Installation is a breeze, and Homarr supports a wide range of deployment methods.

@Photo64
Copy link

Photo64 commented Oct 6, 2023

The rebuild didn't work for me, I assume there is still no fix for this?

@rflemen
Copy link

rflemen commented Oct 6, 2023

files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytim

When you say mounted correctly I have done very tutorial i can find and there's a lot and trayed every possible config, trust me I have wasted hours on this. show how about you wright your how to guide to help people insted of being not so helpful.

I just did a test, and it seemed to me "rebuild" is really the one thing fixed it. I'll post configs below so you could give it a test. Upon bring the container up, the "frontpage" button doestn't do anything. After "rebuild" through the web UI, and check the logs to make sure it is rebuilt, the "frontpage" button will work.

docker-compose.yml

  test:
    image: lissy93/dashy
    ports:
      - 8000:80
    volumes:
      - ./test/conf.yml:/app/public/conf.yml
      - ./test/www.yml:/app/public/www.yml
    restart: unless-stopped

conf.yml

appConfig:
  layout: vertical
  defaultOpeningMethod: sametab
  enableMultiTasking: true
  disableContextMenu: true
  iconSize: large
  theme: cherry-blossom
  language: en
  hideComponents:
    hideSearch: false
    hideSettings: false
    hideSplashScreen: true
    hideFooter: true
    hideHeading: false
    hideNav: false
  startingView: default
  statusCheck: true
  statusCheckInterval: 30
  faviconApi: allesedv
  colCount: 4
  routingMode: history
  widgetsAlwaysUseProxy: true
  webSearch:
    disableWebSearch: true
    searchEngine: duckduckgo
    openingMethod: newtab
    searchBangs: {}
  enableFontAwesome: true
  enableMaterialDesignIcons: false
  auth:
    enableGuestAccess: false
    users: []
    enableKeycloak: false
  showSplashScreen: false
  preventWriteToDisk: false
  preventLocalSave: false
  disableConfiguration: false
  disableConfigurationForNonAdmin: false
  allowConfigEdit: true
  enableServiceWorker: false
  disableUpdateChecks: true
  disableSmartSort: false
  enableErrorReporting: false
pageInfo:
  title: homelab
  description: ''
  navLinks: null
  footerText: ''
pages:
  - name: frontpage
    path: 'www.yml'

www.yml

---
# Page meta info, like heading, footer text and nav links
pageInfo:
  title: Hello, Alicia
  description: General browser startpage
  logo: https://i.ibb.co/71WyyzM/little-bot-3.png

# Optional app settings and configuration
appConfig:
  statusCheck: false
  theme: charry-blossom
  fontAwesomeKey: c94dc2b452
  customCss: '.clock p.time { font-size: 3rem !important; }'
  layout: vertical
  iconSize: small

# Main content - An array of sections, each containing an array of items
sections:
- name: Dev & Cloud
  icon: far fa-code
  items:
  - title: GitHub
    icon: favicon
    url: https://github.com/

Making sure each .yml file was mapped and mounted as a volume then rebuilding worked for me. Thanks for this thread and leading me in right direction!

@Photo64
Copy link

Photo64 commented Oct 6, 2023

I've tried this again mimicking the recent post above but still not working for me. I'll have to come up with another solution as the multi-pages just doesn't appear to work or is too complicated to implement.

@rflemen
Copy link

rflemen commented Oct 6, 2023

I've tried this again mimicking the recent post above but still not working for me. I'll have to come up with another solution as the multi-pages just doesn't appear to work or is too complicated to implement.

If it helps at all here is how I did it. You have to make each .yml a volume...here is command I used to run dashy...my .yml files are in the /opt/dashy/config directory before this is run:

docker run -d --name=dashy --restart=always --network=host -v /opt/dashy/config/conf.yml:/app/public/conf.yml -v
/opt/dashy/config/test.yml:/app/public/test.yml lissy93/dashy

You see the two -v statements mapping the yml files....then I build the application from command line like so:

docker exec -it dashy yarn build

After that the pages worked for me...

Screenshot 2023-10-06 at 2 03 15 PM

@Photo64
Copy link

Photo64 commented Oct 6, 2023

So after messing around a little bit more I actually did get it to work so that it switches to the second page however while I was previously able to make updates to the yml code through via ssh in VSCode I noticed that doesn't seem to work anymore. Will any changes or updates now require a re-build each time?

@Photo64
Copy link

Photo64 commented Oct 6, 2023

So unfortunately this app is just becoming too flakey to use. While I did momentarily get the second page to show I am unable to make any edits through the UI and as I mentioned earlier for some reason it no longer recognizes any changes I make directly in the conf.yml or pages.yml. So I thought maybe I need to do a rebuild again however doing that just prevented the second page from showing again.

I really like a lot of the aspects of this Dashboard but it looks like I might have to move on from it until it becomes more stable to work with.

@icf20

This comment was marked as outdated.

@icf20

This comment was marked as outdated.

@pc12346
Copy link

pc12346 commented Nov 13, 2023

I finally got it work! Running Dashy 2.1.0 not in Docker. The answer is here: https://dashy.to/docs/troubleshooting/#refused-to-connect-in-modal-or-workspace-view

Under Troubleshooting, I found this little gem.

404 On Multi-Page Apps
[T]his can be fixed under appConfig, by setting routingMode to hash. Then rebuilding, and refreshing the page.

From the config.xml, my value was history. Changed it to hash. Rebuild Dashy.

Second thing.
I am only maintaining the pages from config.xml. I had an issue trying to access the landing page as home. This is what worked for me in config.xml.

pages:
  - name: Home
    path: ''
  - name: Server Room
    path: serverroom.yml

Hope this helps someone else.

**This document contains common problems and their solutions.**

@system-help-solution
Copy link

system-help-solution commented Nov 26, 2023

Finalmente consegui fazer funcionar! Executando Dashy 2.1.0 não no Docker. A resposta está aqui: https://dashy.to/docs/troubleshooting/#refused-to-connect-in-modal-or-workspace-view

Em Solução de problemas, encontrei esta pequena joia.

404 Em aplicativos de várias páginas Isso pode ser corrigido em appConfig, configurando routingMode como hash. Em seguida, reconstrua e atualize a página.

Faça config.xml, meu valor era history. Mudei para hash. Reconstrua Dashy.

Segunda coisa. Estou apenas mantendo as páginas do config.xml. Tive um problema ao tentar acessar uma página de destino como página inicial. Isso é o que funcionou para mim em config.xml.

pages:
  - name: Home
    path: ''
  - name: Server Room
    path: serverroom.yml

Espero que isso ajude outra pessoa.

** Solução de problemas | Arrojado ** Este documento contém problemas comuns e suas soluções.

I did the solution for this. As said above, using Docker is not very cool.That's why I used it in node but for that the sever configuration adds a rule. As I'm on my cell phone and logged in from home, I can't provide 100% of the solution. But it's about putting the routes for readings coming directly from root using a script with root permission!

**This document contains common problems and their solutions.**

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Feb 29, 2024
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Dashy V3 Feb 29, 2024
@CrazyWolf13 CrazyWolf13 added ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 🛩️ Released 2.1.2 labels Mar 3, 2024
@CrazyWolf13
Copy link
Collaborator

Hi
This Issue seems to contain mutiple differen't problems and becomes barely manageable with some many users slighly different problems and thinking they are the same.
This problems seems to be related to dashy not automatically rebuilding on changes, see #1479 and #1290 (comment)
A new release has just been published, which should fix this issue, so please upgrade to the latest version.
If this is not the case please create you own issue and provide the neccessary info.
Thanks and have a nice day.

@github-project-automation github-project-automation bot moved this from Awaiting Triage to Done in Dashy V3 Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working ✅ Fixed [ISSUE] Auto-Assigned to Tickets whose fix has been deployed 📌 Keep Open [ISSUE][PR] Prevent auto-closing 🛩️ Released 2.1.2
Projects
Status: Done
Development

No branches or pull requests