This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.pug
127 lines (125 loc) · 8.91 KB
/
index.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
mixin statusIcon(status, ratio)
if status.Running
if status.Paused
span(uk-icon="icon: more; ratio: " + ratio title="Paused")
else if status.Restarting
span(uk-icon="icon: refresh; ratio: " + ratio title="Restarting")
else
span(uk-icon="icon: play; ratio: " + ratio title="Running")
else if status.RemovalInProgress
span(uk-icon="icon: trash; ratio: " + ratio title="Removal In Progress")
else if status.Dead
span(uk-icon="icon: close; ratio: " + ratio title="Dead")
else
span(uk-icon="icon: close; ratio: " + ratio title=status.Status)
doctype html
html(lang="en")
head
title Docker Statuspage
link(rel='stylesheet', href='assets/uikit.min.css', type='text/css' )
body
div(class="uk-container")
table(class="uk-table uk-table-striped uk-table-small")
thead
tr
th
th(style="text-align: left") NAMES
th(style="text-align: left") CONTAINER ID
th(style="text-align: left") CREATED
th(style="text-align: left") PORTS
th
tbody
each container in containers
tr
td(class="uk-table-shrink")
+statusIcon(container.State, 1)
td=container.Name.substr(1)
td=container.Id.substr(0, 12)
td=moment(container.Created).fromNow()
td=Object.keys(container.NetworkSettings.Ports || {}).join(', ')
td(class="uk-table-shrink")
a(uk-icon="icon: info" title="more information" href="#"+container.Id uk-toggle)
div(id=container.Id uk-modal class="uk-modal-container")
div(class="uk-modal-dialog")
button(class="uk-modal-close-default" type="button" uk-close)
div(class="uk-modal-body")
h2(class="uk-modal-title")=container.Name.substr(1)
ul(uk-accordion)
li(class="uk-open")
h3(class="uk-accordion-title") Details
div(class="uk-accordion-content")
table(class="uk-table")
tbody
tr
td id
td=container.Id
tr
td Created
td=moment(container.Created).format("dddd, MMMM Do YYYY, h:mm:ss a")
tr
td State
td=container.State.Status.substr(0, 1).toUpperCase() + container.State.Status.substr(1)
tr
td Image
td=container.Config.Image
if container.Config.Env && container.Config.Env.length > 0
li
h3(class="uk-accordion-title") Environment Variables
div(class="uk-accordion-content")
table(class="uk-table")
tbody
each env in container.Config.Env
tr
td=env.split('=')[0]
td=env.substr(env.split('=')[0].length +1)
if container.Mounts && container.Mounts.length > 0
li
h3(class="uk-accordion-title") Volumes
div(class="uk-accordion-content")
table(class="uk-table")
thead
tr
th path
th type
th driver
th host path
tbody
each mount in container.Mounts
tr
td=mount.Destination
td=mount.Type
td=mount.Driver
td=mount.Source
if container.NetworkSettings.Ports && Object.keys(container.NetworkSettings.Ports).length > 0
li
h3(class="uk-accordion-title") Ports
div(class="uk-accordion-content")
table(class="uk-table")
thead
tr
th container port
th type
th host port
th host ip
tbody
each port in Object.keys(container.NetworkSettings.Ports)
if container.NetworkSettings.Ports[port]
each p in container.NetworkSettings.Ports[port]
tr
td=port.split('/')[0]
td=port.split('/')[1]
td=p['HostPort']
td=p['HostIp']
else
tr
td=port.split('/')[0]
td=port.split('/')[1]
td
td
li
h3(class="uk-accordion-title") Logs
div(class="uk-accordion-content")
iframe(src="logs/" + container.Id style="width: 100%; height: 500px;")
script(src='assets/jquery-3.2.0.min.js')
script(src='assets/uikit.min.js')
script(src='assets/uikit-icons.min.js')