mirror of
https://github.com/containrrr/watchtower.git
synced 2026-02-16 04:08:06 +01:00
Added dashboard
This commit is contained in:
parent
d744c34886
commit
130429b10a
22 changed files with 2986 additions and 14 deletions
|
|
@ -88,12 +88,12 @@ func (client MockClient) ExecuteCommand(_ t.ContainerID, command string, _ int)
|
|||
}
|
||||
|
||||
// IsContainerStale is true if not explicitly stated in TestData for the mock client
|
||||
func (client MockClient) IsContainerStale(cont container.Container) (bool, t.ImageID, error) {
|
||||
func (client MockClient) IsContainerStale(cont container.Container) (bool, t.ImageID, string, error) {
|
||||
stale, found := client.TestData.Staleness[cont.Name()]
|
||||
if !found {
|
||||
stale = true
|
||||
}
|
||||
return stale, "", nil
|
||||
return stale, "", "", nil
|
||||
}
|
||||
|
||||
// WarnOnHeadPullFailed is always true for the mock client
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func Update(client container.Client, params types.UpdateParams) (types.Report, e
|
|||
staleCheckFailed := 0
|
||||
|
||||
for i, targetContainer := range containers {
|
||||
stale, newestImage, err := client.IsContainerStale(targetContainer)
|
||||
stale, newestImage, _, err := client.IsContainerStale(targetContainer)
|
||||
shouldUpdate := stale && !params.NoRestart && !params.MonitorOnly && !targetContainer.IsMonitorOnly()
|
||||
if err == nil && shouldUpdate {
|
||||
// Check to make sure we have all the necessary information for recreating the container
|
||||
|
|
|
|||
|
|
@ -163,6 +163,12 @@ func RegisterSystemFlags(rootCmd *cobra.Command) {
|
|||
viper.GetBool("WATCHTOWER_HTTP_API_PERIODIC_POLLS"),
|
||||
"Also run periodic updates (specified with --interval and --schedule) if HTTP API is enabled")
|
||||
|
||||
flags.BoolP(
|
||||
"http-web-dashboard",
|
||||
"",
|
||||
viper.GetBool("WATCHTOWER_HTTP_WEB_DASHBOARD"),
|
||||
"Enables the web dashboard at http://localhost:8001")
|
||||
|
||||
// https://no-color.org/
|
||||
flags.BoolP(
|
||||
"no-color",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue