voxpupuli/puppetboard

Broken links in Class view

vchepkov opened this issue · 3 comments

In puppetboard 4.3.0 when ENABLE_CLASS = True, in class view when you click on the class name you get 'Not Found' message. I presume it should lead to https://raw.githubusercontent.com/voxpupuli/puppetboard/master/screenshots/class.png instead

Hello @vchepkov

I'm sorry but I can't reproduce this case.

Here is my most minimal docker-compose configuration with a single worker, without a scheduler to pre-compute the results (default SCHEDULER_ENABLED=False) and using the cache memory (default CACHE_TYPE=SimpleCache):

services:
  puppetboard:
    container_name: puppetboard
    hostname: puppetboard
    image: ghcr.io/voxpupuli/puppetboard:4.3.0
    restart: unless-stopped
    ports:
    - 127.0.0.1:8082:80
    volumes:
    - "/etc/puppetlabs/puppetdb/ssl:/etc/puppetlabs/puppetdb/ssl:ro"
    extra_hosts:
    - <puppetdb_hostname>:10.54.97.12
    environment:
    - PUPPETBOARD_WORKERS=1
    - PUPPETDB_HOST=<puppetdb_hostname>
    - PUPPETDB_PORT=8081
    - PUPPETDB_PROTO=https
    - PUPPETDB_SSL_VERIFY=/etc/puppetlabs/puppetdb/ssl/ca.pem
    - PUPPETDB_KEY=/etc/puppetlabs/puppetdb/ssl/private.pem
    - PUPPETDB_CERT=/etc/puppetlabs/puppetdb/ssl/public.pem
    - ENABLE_CLASS=True
    # - SCHEDULER_ENABLED=True
    # - CACHE_TYPE=MemcachedCache
    - UNRESPONSIVE_HOURS=16
    networks:
      app_net:
        ipv4_address: 10.10.30.10
  # memcached:
  #   container_name: memcached
  #   hostname: memcached
  #   image: memcached:latest
  #   restart: always
  #   networks:
  #     app_net:
  #       ipv4_address: 10.10.30.11

networks:
  app_net:
    driver: bridge
    ipam:
      driver: default
      config:
      - subnet: 10.10.30.0/24

If I understand well, you see the list of Puppet classes with the columns "Nb nodes", "Failure", ...
and when you click on a class to display the concerned nodes, you have a 404 error "Not Found" ?

What do you have in the href link of the class?

<a href="/class_resource/${class_name}">${class_name}</a>

The url has '/all/' in it, if I manually remove it to conform to your pattern, the page does open
I have 'all' environments as default, I think if you select 'All environments' in the drop-down menu, you should be able to reproduce it