mirror of https://github.com/portainer/portainer
feat(global): add the --logo flag to specify an external logo picture (#120)
parent
6c29377992
commit
722dc0b3af
|
@ -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.
|
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
|
## 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`)
|
* `--tlscacert`: Path to the CA (default `/certs/ca.pem`)
|
||||||
* `--tlscert`: Path to the TLS certificate file (default `/certs/cert.pem`)
|
* `--tlscert`: Path to the TLS certificate file (default `/certs/cert.pem`)
|
||||||
* `--tlskey`: Path to the TLS key (default `/certs/key.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
|
||||||
|
|
|
@ -18,6 +18,7 @@ func main() {
|
||||||
tlskey = kingpin.Flag("tlskey", "Path to the TLS key").Default("/certs/key.pem").String()
|
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()
|
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'))
|
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()
|
kingpin.Parse()
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ func main() {
|
||||||
settings := &Settings{
|
settings := &Settings{
|
||||||
Swarm: *swarm,
|
Swarm: *swarm,
|
||||||
HiddenLabels: *labels,
|
HiddenLabels: *labels,
|
||||||
|
Logo: *logo,
|
||||||
}
|
}
|
||||||
|
|
||||||
api := newAPI(apiConfig)
|
api := newAPI(apiConfig)
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
type Settings struct {
|
type Settings struct {
|
||||||
Swarm bool `json:"swarm"`
|
Swarm bool `json:"swarm"`
|
||||||
HiddenLabels pairList `json:"hiddenLabels"`
|
HiddenLabels pairList `json:"hiddenLabels"`
|
||||||
|
Logo string `json:"logo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// configurationHandler defines a handler function used to encode the configuration in JSON
|
// configurationHandler defines a handler function used to encode the configuration in JSON
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
<ul class="sidebar">
|
<ul class="sidebar">
|
||||||
<li class="sidebar-main">
|
<li class="sidebar-main">
|
||||||
<a ng-click="toggleSidebar()">
|
<a ng-click="toggleSidebar()">
|
||||||
<img src="images/logo.png" class="img-responsive logo" alt="logo">
|
<img ng-if="config.logo" ng-src="{{ config.logo }}" class="img-responsive logo" alt="CloudInovasi UI">
|
||||||
|
<img ng-if="!config.logo" src="images/logo.png" class="img-responsive logo" alt="CloudInovasi UI">
|
||||||
<span class="menu-icon glyphicon glyphicon-transfer"></span>
|
<span class="menu-icon glyphicon glyphicon-transfer"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue