From a6ba94e03f2101d8ab4a7bb88c95509ce6e47da2 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 12 Dec 2022 09:37:54 -0800 Subject: [PATCH] Adds hostname config for setting UI parameter (#1983) * Adds hostname config to setting a hostname in title * Also updates title for hostname --- README.md | 29 +++++++++++++++-------------- analytics/types.go | 1 + assets/components/SideMenu.vue | 19 ++++++++++++------- assets/composables/title.ts | 3 ++- assets/stores/config.ts | 2 ++ index.html | 3 ++- main.go | 3 +++ web/routes.go | 3 +++ 8 files changed, 40 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index cceea572..721aeabf 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ Dozzle will be available at [http://localhost:8888/](http://localhost:8888/). Yo ports: - 9999:8080 - ### Enabling health check Dozzle doesn't enable healthcheck by default as it adds extra CPU usage. `healthcheck` can be enabled manually. @@ -81,7 +80,6 @@ Dozzle doesn't enable healthcheck by default as it adds extra CPU usage. `health retries: 5 start_period: 30s - #### Security You can control the device Dozzle binds to by passing `--addr` parameter. For example, @@ -119,17 +117,18 @@ If you do not want to be tracked at all, see the `--no-analytics` flag below. Dozzle follows the [12-factor](https://12factor.net/) model. Configurations can use the CLI flags or environment variables. The table below outlines all supported options and their respective env vars. -| Flag | Env Variable | Default | -| ---------------- | --------------------- | ------- | -| `--addr` | `DOZZLE_ADDR` | `:8080` | -| `--base` | `DOZZLE_BASE` | `/` | -| `--level` | `DOZZLE_LEVEL` | `info` | -| `--filter` | `DOZZLE_FILTER` | `""` | -| `--username` | `DOZZLE_USERNAME` | `""` | -| `--password` | `DOZZLE_PASSWORD` | `""` | -| `--usernamefile` | `DOZZLE_USERNAME_FILE`| `""` | -| `--passwordfile` | `DOZZLE_PASSWORD_FILE`| `""` | -| `--no-analytics` | `DOZZLE_NO_ANALYTICS` | false | +| Flag | Env Variable | Default | +| ---------------- | ---------------------- | ------- | +| `--addr` | `DOZZLE_ADDR` | `:8080` | +| `--base` | `DOZZLE_BASE` | `/` | +| `--hostname` | `DOZZLE_HOSTNAME` | `""` | +| `--level` | `DOZZLE_LEVEL` | `info` | +| `--filter` | `DOZZLE_FILTER` | `""` | +| `--username` | `DOZZLE_USERNAME` | `""` | +| `--password` | `DOZZLE_PASSWORD` | `""` | +| `--usernamefile` | `DOZZLE_USERNAME_FILE` | `""` | +| `--passwordfile` | `DOZZLE_PASSWORD_FILE` | `""` | +| `--no-analytics` | `DOZZLE_NO_ANALYTICS` | false | ## Troubleshooting and FAQs @@ -184,17 +183,19 @@ Dozzle has a [special route](https://github.com/amir20/dozzle/blob/master/assets
I installed Dozzle but memory consumption doesn't show up! -*This is an issue specific to ARM devices* +_This is an issue specific to ARM devices_ Dozzle uses the Docker API to gather information about the containers' memory usage. If the memory usage is not showing up, then it is likely that the Docker API is not returning the memory usage. You can verify this by running `docker info`, and you should see the following: + ``` WARNING: No memory limit support WARNING: No swap limit support ``` In this case, you'll need to add the following line to your `/boot/cmdline.txt` file and reboot your device. + ``` cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 ``` diff --git a/analytics/types.go b/analytics/types.go index ca16627c..d3d1f1ff 100644 --- a/analytics/types.go +++ b/analytics/types.go @@ -7,4 +7,5 @@ type StartEvent struct { CustomAddress bool `json:"customAddress"` CustomBase bool `json:"customBase"` Protected bool `json:"protected"` + HasHostname bool `json:"hasHostname"` } diff --git a/assets/components/SideMenu.vue b/assets/components/SideMenu.vue index f8fab8a2..449da93e 100644 --- a/assets/components/SideMenu.vue +++ b/assets/components/SideMenu.vue @@ -2,11 +2,16 @@