From f593d20051f42c72590c77c553a4e0968bc3b4da Mon Sep 17 00:00:00 2001 From: cuigh Date: Fri, 20 Jul 2018 16:11:24 +0800 Subject: [PATCH] Add container status check to fix page crash --- views/task/detail.jet | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/views/task/detail.jet b/views/task/detail.jet index 2e47d1d..c97fd1c 100644 --- a/views/task/detail.jet +++ b/views/task/detail.jet @@ -37,6 +37,7 @@
{{ .Task.ID }}
Service ID
{{ .Task.ServiceID }}
+ {{ if .Task.Status.ContainerStatus }} {{ if .Task.Status.ContainerStatus.ContainerID }}
Container ID
{{ .Task.Status.ContainerStatus.ContainerID }}
@@ -45,6 +46,11 @@
PID
{{ .Task.Status.ContainerStatus.PID }}
{{ end }} + {{ if .Task.Status.ContainerStatus.ExitCode }} +
Exit code
+
{{ .Task.Status.ContainerStatus.ExitCode }}
+ {{ end }} + {{ end }}
Image
{{ .Task.Spec.ContainerSpec.Image }}
Created at