mirror of
https://github.com/cuigh/swirl
synced 2024-12-31 16:23:13 +00:00
Add service link
This commit is contained in:
parent
8c380fa23a
commit
9f1855a6ea
@ -76,6 +76,11 @@ func serviceDetail(ctx web.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// redirect if name is service id
|
||||||
|
if name != service.Spec.Name {
|
||||||
|
return ctx.Redirect("/service/" + service.Spec.Name + "/detail")
|
||||||
|
}
|
||||||
|
|
||||||
info := model.NewServiceDetailInfo(service)
|
info := model.NewServiceDetailInfo(service)
|
||||||
for _, vip := range service.Endpoint.VirtualIPs {
|
for _, vip := range service.Endpoint.VirtualIPs {
|
||||||
n, e := docker.NetworkInspect(vip.NetworkID)
|
n, e := docker.NetworkInspect(vip.NetworkID)
|
||||||
|
@ -35,8 +35,10 @@
|
|||||||
<dl class="is-horizontal is-marginless">
|
<dl class="is-horizontal is-marginless">
|
||||||
<dt class="has-text-left">ID</dt>
|
<dt class="has-text-left">ID</dt>
|
||||||
<dd>{{ .Task.ID }}</dd>
|
<dd>{{ .Task.ID }}</dd>
|
||||||
|
<dt class="has-text-left">Service ID</dt>
|
||||||
|
<dd><a href="/service/{{ .Task.ServiceID }}/detail">{{ .Task.ServiceID }}</a></dd>
|
||||||
{{ if .Task.Status.ContainerStatus.ContainerID }}
|
{{ if .Task.Status.ContainerStatus.ContainerID }}
|
||||||
<dt class="has-text-left">ContainerID</dt>
|
<dt class="has-text-left">Container ID</dt>
|
||||||
<dd><a href="/container/{{ .Task.Status.ContainerStatus.ContainerID }}/detail">{{ .Task.Status.ContainerStatus.ContainerID }}</a></dd>
|
<dd><a href="/container/{{ .Task.Status.ContainerStatus.ContainerID }}/detail">{{ .Task.Status.ContainerStatus.ContainerID }}</a></dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Task.Status.ContainerStatus.PID }}
|
{{ if .Task.Status.ContainerStatus.PID }}
|
||||||
|
Loading…
Reference in New Issue
Block a user