From 81c90009b48f22d65bc8b59944b18c9503fc5676 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Thu, 13 Oct 2022 22:23:31 +0200 Subject: [PATCH] Refine demo content --- dummy-data/README.md | 2 +- dummy-data/proxmox/api2/json/nodes/node1/qemu | 35 +++++++++ .../api2/json/nodes/node1/qemu/index.html | 1 - .../nodes/node1/{status/index.html => status} | 0 public/assets/config-demo.yml.dist | 71 ++++++++++++------- 5 files changed, 80 insertions(+), 29 deletions(-) create mode 100644 dummy-data/proxmox/api2/json/nodes/node1/qemu delete mode 100644 dummy-data/proxmox/api2/json/nodes/node1/qemu/index.html rename dummy-data/proxmox/api2/json/nodes/node1/{status/index.html => status} (100%) diff --git a/dummy-data/README.md b/dummy-data/README.md index deed875..eeff4ec 100644 --- a/dummy-data/README.md +++ b/dummy-data/README.md @@ -11,5 +11,5 @@ The principle is simple: save a sample output of the API used in the service in Example: ``` mkdir pihole -curl http://my-pihile.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `enpoint` property) +curl http://my-pihole.me/admin/api.php -o pihole/api.php # /admin is omited because for PiHole, the implementation expect it to be in the base url (`url` or `enpoint` property) ``` \ No newline at end of file diff --git a/dummy-data/proxmox/api2/json/nodes/node1/qemu b/dummy-data/proxmox/api2/json/nodes/node1/qemu new file mode 100644 index 0000000..35e1d2f --- /dev/null +++ b/dummy-data/proxmox/api2/json/nodes/node1/qemu @@ -0,0 +1,35 @@ +{ + "data": [{ + "disk": 0, + "mem": 983848043, + "cpus": 2, + "pid": 1218, + "maxdisk": 107374182400, + "netin": 43863882954, + "diskread": 0, + "diskwrite": 0, + "name": "HAOS", + "netout": 10426448652, + "cpu": 0.00879886290177172, + "uptime": 3390069, + "status": "running", + "maxmem": 3221225472, + "vmid": 100 + }, { + "cpu": 0.00219971572544293, + "name": "debian1", + "netout": 919020028, + "vmid": 101, + "maxmem": 4294967296, + "uptime": 3390064, + "status": "running", + "maxdisk": 107374182400, + "pid": 1295, + "cpus": 2, + "disk": 0, + "mem": 2755160795, + "diskread": 0, + "diskwrite": 0, + "netin": 5105600872 + }] +} \ No newline at end of file diff --git a/dummy-data/proxmox/api2/json/nodes/node1/qemu/index.html b/dummy-data/proxmox/api2/json/nodes/node1/qemu/index.html deleted file mode 100644 index 9ce2e04..0000000 --- a/dummy-data/proxmox/api2/json/nodes/node1/qemu/index.html +++ /dev/null @@ -1 +0,0 @@ -{"data":[{"disk":0,"mem":983848043,"cpus":2,"pid":1218,"maxdisk":107374182400,"netin":43863882954,"diskread":0,"diskwrite":0,"name":"HAOS","netout":10426448652,"cpu":0.00879886290177172,"uptime":3390069,"status":"running","maxmem":3221225472,"vmid":100},{"cpu":0.00219971572544293,"name":"debian1","netout":919020028,"vmid":101,"maxmem":4294967296,"uptime":3390064,"status":"running","maxdisk":107374182400,"pid":1295,"cpus":2,"disk":0,"mem":2755160795,"diskread":0,"diskwrite":0,"netin":5105600872}]} \ No newline at end of file diff --git a/dummy-data/proxmox/api2/json/nodes/node1/status/index.html b/dummy-data/proxmox/api2/json/nodes/node1/status similarity index 100% rename from dummy-data/proxmox/api2/json/nodes/node1/status/index.html rename to dummy-data/proxmox/api2/json/nodes/node1/status diff --git a/public/assets/config-demo.yml.dist b/public/assets/config-demo.yml.dist index 5bd9bae..153ff6c 100644 --- a/public/assets/config-demo.yml.dist +++ b/public/assets/config-demo.yml.dist @@ -8,7 +8,7 @@ logo: "logo.png" # icon: "fas fa-skull-crossbones" # Optional icon header: true -footer: '

Created with ❤️ with bulma, vuejs & font awesome // Fork me on

' # set false if you want to hide it. +footer: '

Created with ❤️ with Bulma, Vue.js & font awesome // Fork me on

' # set false if you want to hide it. # Optional theme customization theme: default @@ -42,11 +42,9 @@ colors: # Optional message message: - #url: https://b4bz.io style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options. - title: "Demo !" - icon: "fa fa-grin" - content: "This is a dummy homepage demo.
Find more information on github.com/bastienwirtz/homer" + title: "👋 Welcome !" + content: "This demo page shows an overview of Homer possibilities. Feel free to click anywhere!
Find more information on github.com/bastienwirtz/homer" # Optional navbar # links: [] # Allows for navbar (dark mode, layout, and search) without any links @@ -55,9 +53,9 @@ links: icon: "fab fa-github" url: "https://github.com/bastienwirtz/homer" target: "_blank" # optional html a tag target attribute - - name: "Wiki" + - name: "Documentation" icon: "fas fa-book" - url: "https://www.wikipedia.org/" + url: "https://github.com/bastienwirtz/homer/blob/main/README.md#table-of-contents" # this will link to a second homer page that will load config from additional-page.yml and keep default config values as in config.yml file # see url field and assets/additional-page.yml.dist used in this example: - name: "another page!" @@ -68,32 +66,51 @@ links: # First level array represent a group. # Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed). services: - - name: "Applications" + - name: "My apps" icon: "fas fa-cloud" items: - - name: "Awesome app" + - name: "Pi-hole" + logo: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/pihole.png" + url: "https://pi-hole.net/" + endpoint: "https://homer-demo-content.netlify.app/pihole" + type: "PiHole" + - name: "Proxmox - Node1" + logo: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/proxmox.png" + type: "Proxmox" + tag: "sys" + url: "https://www.proxmox.com/en/" + endpoint: "https://homer-demo-content.netlify.app/proxmox" + node: "node1" + warning_value: 50 + danger_value: 80 + api_token: "xxxxxxxxxxxx" + - name: "An awesome app" logo: "assets/tools/sample.png" subtitle: "Bookmark example" tag: "app" keywords: "self hosted reddit" url: "https://www.reddit.com/r/selfhosted/" - target: "_blank" # optional html a tag target attribute - - name: "Another one" - logo: "assets/tools/sample2.png" - subtitle: "Another application" + - name: "Tools" + icon: "fa-solid fa-screwdriver-wrench" + items: + - name: "Example item" + logo: "assets/tools/sample.png" + subtitle: "This another example" tag: "app" + keywords: "demo" url: "#" - - name: "Pi-hole" - logo: "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/pihole.png" - url: "#" - endpoint: "https://homer-demo-content.netlify.app/pihole" - type: "PiHole" - - name: "Proxmox - Node1" - logo: "https://camo.githubusercontent.com/2df2ac41e1b8a1484be236c75e395981b31bfd670eff46b5c182ea0be9475310/68747470733a2f2f7777772e70726f786d6f782e636f6d2f696d616765732f70726f786d6f782f50726f786d6f785f73796d626f6c5f7374616e646172645f6865782e706e67" - type: "Proxmox" - tag: "sys" - url: "https://homer-demo-content.netlify.app/proxmox" - node: "node1" - warning_value: 50 - danger_value: 80 - api_token: "PVEAPIToken=root@pam!monitoring=baaaa46c1-7aee-4f13-b3e5-754d856111a9" + target: "_blank" + - name: "interesting links" + icon: "fas fa-solid fa-arrow-up-right-from-square" + items: + - name: "r/selfhosted" + icon: "fa-brands fa-reddit-alien" + subtitle: "Bookmark example" + tag: "reddit" + url: "https://www.reddit.com/r/selfhosted/" + target: "_blank" + - name: "Awesome selfhosted" + icon: "fa-brands fa-github-alt" + subtitle: "Another application" + tag: "awesome-list" + url: "https://github.com/awesome-selfhosted/awesome-selfhosted"