add favicon
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Nginx Monitor</title>
|
||||
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%230b0f14'/%3E%3Ccircle cx='32' cy='32' r='24' fill='%23111821' stroke='%23263344' stroke-width='3'/%3E%3Cpath d='M14 36h9l5-18 8 30 5-16h9' fill='none' stroke='%2345d4d0' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 20h30' fill='none' stroke='%2345d483' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E">
|
||||
<style>
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
|
||||
BIN
assets/favicon.ico
Normal file
BIN
assets/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 186 KiB |
6
assets/favicon.svg
Normal file
6
assets/favicon.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" rx="14" fill="#0b0f14"/>
|
||||
<circle cx="32" cy="32" r="24" fill="#111821" stroke="#263344" stroke-width="3"/>
|
||||
<path d="M14 36h9l5-18 8 30 5-16h9" fill="none" stroke="#45d4d0" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17 20h30" fill="none" stroke="#45d483" stroke-width="4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
@@ -77,6 +77,7 @@ RUN apt-get update \
|
||||
|
||||
COPY --from=builder /usr/local/nginx /usr/local/nginx
|
||||
COPY --from=builder /usr/local/sbin/nginx /usr/local/sbin/nginx
|
||||
COPY assets/favicon.ico /usr/local/nginx/html/favicon.ico
|
||||
COPY dockerized/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -54,6 +54,7 @@ sh dockerized/test.sh
|
||||
- Nginx binary: `/usr/local/sbin/nginx`
|
||||
- Module: `/usr/local/nginx/modules/ngx_http_monitoring_module.so`
|
||||
- Config: `/etc/nginx/nginx.conf`
|
||||
- Favicon: `/usr/local/nginx/html/favicon.ico`, served at `/favicon.ico`
|
||||
- Listen port: `8080`
|
||||
|
||||
The supplied `nginx.conf` enables:
|
||||
|
||||
@@ -44,6 +44,13 @@ http {
|
||||
monitor_cors "*";
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
root /usr/local/nginx/html;
|
||||
default_type image/x-icon;
|
||||
access_log off;
|
||||
add_header Cache-Control "public, max-age=86400";
|
||||
}
|
||||
|
||||
location = / {
|
||||
default_type text/plain;
|
||||
return 200 "ngx_http_monitoring_module docker image\nopen /monitor for the dashboard\n";
|
||||
|
||||
@@ -4,6 +4,7 @@ set -eu
|
||||
BASE_URL="${BASE_URL:-http://127.0.0.1:8080}"
|
||||
|
||||
curl -fsS "$BASE_URL/" >/dev/null
|
||||
curl -fsS "$BASE_URL/favicon.ico" >/dev/null
|
||||
curl -fsS "$BASE_URL/monitor" >/dev/null
|
||||
curl -fsS "$BASE_URL/monitor/api" >/dev/null
|
||||
curl -fsS "$BASE_URL/monitor/api/system" >/dev/null
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
static const u_char ngx_http_monitoring_dashboard_html[] =
|
||||
"<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\">"
|
||||
"<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">"
|
||||
"<title>Nginx Monitor</title><style>"
|
||||
"<title>Nginx Monitor</title><link rel=\"icon\" type=\"image/svg+xml\" href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%230b0f14'/%3E%3Ccircle cx='32' cy='32' r='24' fill='%23111821' stroke='%23263344' stroke-width='3'/%3E%3Cpath d='M14 36h9l5-18 8 30 5-16h9' fill='none' stroke='%2345d4d0' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M17 20h30' fill='none' stroke='%2345d483' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E\">"
|
||||
"<style>"
|
||||
":root{color-scheme:dark;--bg:#0b0f14;--panel:#111821;--panel2:#151f2b;--line:#263344;--text:#e6edf3;--muted:#8fa1b3;--green:#45d483;--red:#ff5f6d;--yellow:#f4c95d;--blue:#5aa9ff;--cyan:#45d4d0}"
|
||||
"*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif}"
|
||||
"header{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line);background:#0f151d;position:sticky;top:0;z-index:5}"
|
||||
|
||||
Reference in New Issue
Block a user