Skip to content
New issue

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

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

Already on GitHub? # to your account

Weird raw url - Snippet Box Docker ARM64 #55

Open
Tchiimy opened this issue Dec 11, 2022 · 1 comment
Open

Weird raw url - Snippet Box Docker ARM64 #55

Tchiimy opened this issue Dec 11, 2022 · 1 comment

Comments

@Tchiimy
Copy link

Tchiimy commented Dec 11, 2022

Hello,

I'm using Snippet Box on my Raspberry Pi 4 (container arm64). I've wanted to create a snipet holding a .yml configuration and use his raw url with Dashy.

image

With inside this :

pageInfo:
  title: System Panel
  description: Resource Usage Monitoring
  navLinks:
    - title: Portainer
      path: 'http://192.168.0.21:9000'
      target: newtab
    - title: Home Lab
      path: 'http://192.168.0.21:9100'
      target: sametab
sections:
  - name: CPU/RAM Usage
    icon: fas fa-tachometer
    displayData:
      cols: 1
      rows: 3
    widgets:
      - type: gl-cpu-temp
        options:
          hostname: 'http://192.168.0.21:61208'
      - type: gl-current-cpu
        options:
          hostname: 'http://192.168.0.21:61208'
      - type: gl-current-mem
        options:
          hostname: 'http://192.168.0.21:61208'
      - type: gl-current-cores
        options:
          hostname: 'http://192.168.0.21:61208'
  - name: CPU/RAM/Load History
    icon: fas fa-microchip
    displayData:
      rows: 3
      cols: 1
    widgets:
      - type: gl-cpu-history
        options:
          hostname: 'http://192.168.0.21:61208'
          limit: 60
      - type: gl-mem-history
        options:
          hostname: 'http://192.168.0.21:61208'
          limit: 80
      - type: gl-load-history
        options:
          hostname: 'http://192.168.0.21:61208'
  - name: Network Interfaces
    icon: fas fa-ethernet
    displayData:
      rows: 3
      cols: 1
    widgets:
      - type: gl-network-interfaces
        options:
          hostname: 'http://192.168.0.21:61208'
          limit: 500
      - type: pi-hole-stats
        options:
          hostname: 'http://192.168.0.21'
      - type: pi-hole-traffic
        options:
          hostname: 'http://192.168.0.21'
  - name: Vacacions
    icon: https://cdn-icons-png.flaticon.com/128/3187/3187465.png
    displayData:
      rows: 1
      cols: 1
    widgets:
      - type: public-holidays
        options:
          country: FR
          holidayType: all
          monthsToShow: 12
  - name: Vacacions
    icon: https://cdn-icons-png.flaticon.com/128/2960/2960685.png
    displayData:
      rows: 1
      cols: 1
    widgets:
      - type: public-holidays
        options:
          country: ES
          holidayType: all
          monthsToShow: 12
  - name: Internet
    icon: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fstatic.vecteezy.com%2Fsystem%2Fresources%2Fpreviews%2F000%2F450%2F047%2Foriginal%2Fearth-vector-icon.jpg&f=1&nofb=1&ipt=82f3f32544c9f60f966749f17764a39b720490dad5d40894f05d6af6fcdded86&ipo=images
    displayData:
      rows: 1
      cols: 1
    widgets:
      - type: embed
        options:
          scriptSrc: https://cdn.speedcheck.org/basic/scbjs.min.js
          html: |
           <div id="sc-container">
           <div id="sc-branding" class="sc-bb">
           <a target="_blank" href="https://www.speedcheck.org/">
           <img src="https://cdn.speedcheck.org/branding/speedcheck-logo-18.png" alt="Speedcheck"/>
           </a>
           </div>
           </div>
  - name: Laugh
    icon: https://cdn-icons-png.flaticon.com/128/477/477104.png
    displayData:
      rows: 1
      cols: 1
    widgets:
      - type: xkcd-comic
        options:
          comic: latest
  - name: Discover
    icon: https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fcdn.onlinewebfonts.com%2Fsvg%2Fimg_422165.png&f=1&nofb=1&ipt=ee3013dbf0642b0e4ed2e67e3d04a32cf6d2822a45b21bfccadbf7d3ab3ea60a&ipo=images
    displayData:
      rows: 1
      cols: 1
    widgets:
      - type: apod

But then when I copy the raw url and open it with firefox or edge I got this :

image

Is it normal ? Have I made a mistake in the process ?

@go-compile
Copy link

Hi,

The cause of this appears to be a bug in snippet-box regarding content-types. Your browser is trying to render the page as HTML, however if you were to use curl, wget etc the ymal file should remain valid. I haven't used Dashy, but would expect it to still work fine, this is because Get requests don't try render HTML, unlike browsers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants