From 722dc0b3afed72651c09658d5ba7881915bfb35c Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 10 Aug 2016 18:38:33 +1200 Subject: [PATCH] feat(global): add the --logo flag to specify an external logo picture (#120) --- README.md | 3 ++- api/main.go | 2 ++ api/settings.go | 1 + index.html | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89a0c7d31..6e2d54965 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ UI For Docker is a web interface for the Docker Remote API. The goal is to prov The current Docker version support policy is the following: `N` to `N-2` included where `N` is the latest version. -At the moment, the following versions are supported: 1.9, 1.10 & 1.11. +At the moment, the following versions are supported: 1.9, 1.10 & 1.11. ## Run @@ -113,3 +113,4 @@ The following options are available for the `ui-for-docker` binary: * `--tlscacert`: Path to the CA (default `/certs/ca.pem`) * `--tlscert`: Path to the TLS certificate file (default `/certs/cert.pem`) * `--tlskey`: Path to the TLS key (default `/certs/key.pem`) +* `--logo`: URL to a picture to be displayed as a logo in the UI diff --git a/api/main.go b/api/main.go index a2c5a0f15..1ab338b69 100644 --- a/api/main.go +++ b/api/main.go @@ -18,6 +18,7 @@ func main() { tlskey = kingpin.Flag("tlskey", "Path to the TLS key").Default("/certs/key.pem").String() swarm = kingpin.Flag("swarm", "Swarm cluster support").Default("false").Short('s').Bool() labels = pairs(kingpin.Flag("hide-label", "Hide containers with a specific label in the UI").Short('l')) + logo = kingpin.Flag("logo", "URL for the logo displayed in the UI").String() ) kingpin.Parse() @@ -36,6 +37,7 @@ func main() { settings := &Settings{ Swarm: *swarm, HiddenLabels: *labels, + Logo: *logo, } api := newAPI(apiConfig) diff --git a/api/settings.go b/api/settings.go index 801904f61..b707a8e69 100644 --- a/api/settings.go +++ b/api/settings.go @@ -9,6 +9,7 @@ import ( type Settings struct { Swarm bool `json:"swarm"` HiddenLabels pairList `json:"hiddenLabels"` + Logo string `json:"logo"` } // configurationHandler defines a handler function used to encode the configuration in JSON diff --git a/index.html b/index.html index 434d0f048..389d0056e 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,8 @@