Skip to content

Commit c6f4cc5

Browse files
committed
feat(fe): row color
1 parent 05d6f39 commit c6f4cc5

File tree

5 files changed

+118
-101
lines changed

5 files changed

+118
-101
lines changed

resources/list.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,14 @@ th, td {
189189
background-color: #393939;
190190
}
191191

192+
.t.c.ver2 td {
193+
background-color: #2b2b2b;
194+
}
195+
192196
.table.ver3 td {
193197
font-family: Lato-Regular;
194198
font-size: 15px;
195-
color: #808080;
199+
color: #aeaeae;
196200
line-height: 1.4;
197-
background-color: #222222;
201+
background-color: #00000082;
198202
}

resources/list.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
<div class="table-head">
1515
<table>
1616
<thead>
17-
<tr class="row100 head">
18-
<th class="cell100 column1">Container ID</th>
19-
<th class="cell100 column2">Image</th>
20-
<th class="cell100 column3">Command</th>
21-
<th class="cell100 column4">Name</th>
22-
<th class="cell100 column5">IP</th>
17+
<tr>
18+
<th class="column1">Container ID</th>
19+
<th class="column2">Image</th>
20+
<th class="column3">Command</th>
21+
<th class="column4">Name</th>
22+
<th class="column5">IP</th>
2323
{{- if $showLocation }}
24-
<th class="cell100 column6">Location</th>
24+
<th class="column6">Location</th>
2525
{{- end }}
26-
<th class="cell100 column7">Status</th>
26+
<th class="column7">Status</th>
2727
{{- if $ctl.Enable }}
28-
<th class="cell100 column8">Actions</th>
28+
<th class="column8">Actions</th>
2929
{{- end -}}
3030
</tr>
3131
</thead>
@@ -35,31 +35,31 @@
3535
<div class="table-body">
3636
<table>
3737
<tbody>
38-
{{ range .containers }}
39-
<tr class="row100 body">
40-
<td class="cell100 column1" title="exec into container">
38+
{{ range $i, $e := .containers }}
39+
<tr {{ if (eq (mod $i 2) 1) -}}class="t c ver2"{{- end }}>
40+
<td class="column1" title="exec into container">
4141
<a href="/exec/{{ printf "%.12s" .ID }}" value="{{ .ID }}" target="_blank">{{ printf "%.12s" .ID }}</a>
4242
</td>
4343
{{- if $share -}}
44-
<td class="cell100 column2" title="{{ .Image }} | share tty">
44+
<td class="column2" title="{{ .Image }} | share tty">
4545
<a href="#" class="copy" data-clipboard-text="/share/{{ printf "%.12s" .ID }}">{{ printf .Image }}</a>
4646
</td>
4747
{{- else -}}
48-
<td class="cell100 column2" title="{{ .Image }}">
48+
<td class="column2" title="{{ .Image }}">
4949
{{ printf .Image }}
5050
</td>
5151
{{- end -}}
52-
<td class="cell100 column3" title="{{ .Command }}">{{ printf .Command }}</td>
53-
<td class="cell100 column4" title="{{ .Name }}">
52+
<td class="column3" title="{{ .Command }}">{{ printf .Command }}</td>
53+
<td class="column4" title="{{ .Name }}">
5454
<a href="/logs/{{ printf "%.12s" .ID }}?follow=1&tail=10" target="_blank" title="get logs">{{ printf .Name }}</a>
5555
</td>
56-
<td class="cell100 column5" title="{{ .IPs }}">{{ index .IPs 0 }}</td>
56+
<td class="column5" title="{{ .IPs }}">{{ index .IPs 0 }}</td>
5757
{{- if $showLocation -}}
58-
<td class="cell100 column6" title="{{ .LocServer }}">{{ printf .LocServer }}</td>
58+
<td class="column6" title="{{ .LocServer }}">{{ printf .LocServer }}</td>
5959
{{- end -}}
60-
<td class="cell100 column7" title="{{ .Status }}">{{ .State }}</td>
60+
<td class="column7" title="{{ .Status }}">{{ .State }}</td>
6161
{{ if $ctl.Enable -}}
62-
<td class="cell100 column8">
62+
<td class="column8">
6363
{{ if or $ctl.Start $ctl.All }}
6464
<button title="start">Start</button>{{ end }} {{ if or $ctl.Stop $ctl.All }}
6565
<button title="stop">Stop</button>{{ end }} {{ if or $ctl.Restart $ctl.All}}

route/asset/asset.go

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ var _compress_bytes_3 = []byte("" +
149149
"\x43\x45\x3f\x2a\x91\xf6\xde\x63\x86\x3f\x83\xad\x74\x1b\x76" +
150150
"\x1b\x6b\x10\xb0\xf4\x26\x6b\x2f\x72\x09\xdd\xec\x9e\x2c\x7a" +
151151
"\xed\xed\xae\x97\x4c\xe9\x22\x22\x55\x59\x82\x4e\x98\x39\xb9" +
152-
"\x84\xce\xe7\xdf\x04\x9b\x9e\x0d\xf6\x0b\x6c\x2a\xc1\xf4\x1b" +
153-
"\xe2\xbd\x0b\xec\x77\x29\xde\x91\x80\x66\x6e\xd9\x80\xfe\x0b" +
154-
"\x00\x00\xff\xff\xa6\x66\x3d\x04")
152+
"\x84\xc6\xf3\x9f\x24\x36\xd4\x59\x57\xf2\x11\x83\x59\x6c\xbf" +
153+
"\xd3\xec\xd2\xb3\xd9\x7d\x81\x4d\x25\x98\x7e\x43\x82\x0c\xec" +
154+
"\x77\x29\xc1\x91\x80\x02\xb7\xee\x66\x36\xa4\xff\x02\x00\x00" +
155+
"\xff\xff\xd3\xb3\x4c\xf4")
155156

156157
var _file_3 = &file{
157158
fileInfo: &fileInfo{
@@ -9581,73 +9582,74 @@ var _file_11 = &file{
95819582
}
95829583

95839584
var _compress_bytes_12 = []byte("" +
9584-
"\x78\x9c\xac\x57\xdf\x6f\xdb\x36\x10\x7e\xf7\x5f\x71\x65\xb7" +
9585-
"\xc9\x41\x63\x29\x4e\xfa\x0b\xa9\xa4\x21\x68\xf7\x90\xa1\x18" +
9586-
"\x8a\x66\x7b\x1e\x68\xea\x6c\xb3\xa5\x49\x83\x3c\x3b\x09\x3c" +
9587-
"\xfd\xef\x03\x45\x49\xb6\x6c\xab\x71\xb0\x3d\xd9\x24\xbf\xfb" +
9588-
"\xee\xbb\xe3\xf1\x48\x6d\x36\x23\xf8\x49\x90\x82\xeb\x0c\x62" +
9589-
"\x61\x34\x59\xa3\x60\x54\x96\x50\x2d\xb8\xb9\xb9\xff\x6c\x04" +
9590-
"\x27\x69\x74\x85\x50\x46\xec\xae\x72\x8b\xd5\x74\xf8\x37\x2a" +
9591-
"\xcb\x41\xfa\xa2\x30\x82\x1e\x97\x08\x73\x5a\xa8\x7c\x90\x86" +
9592-
"\x9f\x41\x3a\x47\x5e\xe4\x03\x80\x94\x24\x29\xcc\x37\x1b\x88" +
9593-
"\xab\x7f\x50\x96\x69\x12\xe6\xfc\xaa\x92\xfa\x3b\x58\x54\x19" +
9594-
"\x93\xc2\x68\x06\x9e\x2a\x63\x72\xc1\x67\x98\x2c\xf5\x8c\xc1" +
9595-
"\xdc\xe2\x34\x63\xc9\x94\xaf\x3d\x20\xf6\x73\x7b\x86\x8e\x1e" +
9596-
"\x15\xba\x39\x22\xb5\x68\xe1\x5c\xa2\xa4\xa3\x58\x38\xc7\x20" +
9597-
"\xa9\x0c\x9c\xb0\x72\x49\xe0\xac\xc8\x58\xf2\xcd\x25\x42\xc9" +
9598-
"\xe5\xc4\x70\x5b\xc4\x0b\xa9\xe3\x6f\x8e\xe5\x69\x12\x30\xf9" +
9599-
"\x20\x4d\x82\xfc\x41\x3a\x31\xc5\x63\x65\x5e\xc8\x35\x08\xc5" +
9600-
"\x9d\xcb\x18\xf1\x89\x42\x58\xa3\xbd\x82\xc5\x68\x32\x1a\x8f" +
9601-
"\x2f\x2a\x49\x47\x40\x23\x4f\x53\x2f\xfa\x54\xf8\xb9\x66\xe4" +
9602-
"\xc7\x4d\x92\xb6\x33\xb6\xb1\xb7\xe6\x7e\x7c\x71\x01\x1d\x82" +
9603-
"\xd6\xac\x01\x09\x54\xca\xa3\x84\x51\xab\x85\x1e\xb3\xfc\xa3" +
9604-
"\xd1\xc4\xa5\x46\x0b\xb7\x9f\xd2\x84\xe6\x27\x5a\x5e\xb2\xfc" +
9605-
"\xd6\xa7\xfc\x19\x26\x57\xde\xd9\x62\xc1\x75\xf1\x0c\xa3\xd7" +
9606-
"\x2c\xff\x83\x2f\x9e\xe3\xe6\x0d\xcb\x6f\xbf\x1c\xe2\x7d\x3d" +
9607-
"\xca\xe9\x5e\xc1\x96\xe5\x69\x9c\x6f\x59\xde\xd8\x1c\x67\x46" +
9608-
"\x5d\x9c\x4c\xf6\x8e\xe5\x77\xc4\x69\xe5\xfa\x45\x0a\x52\xf1" +
9609-
"\x6f\xba\x2a\x9a\x53\x59\xdf\xb3\xfc\x46\x78\x81\x3d\xb4\x5e" +
9610-
"\xe1\xa8\x43\x96\x26\x64\x77\x4a\x2b\xe9\xd4\x56\x9a\xec\x94" +
9611-
"\x5e\x9a\x14\x72\x9d\x0f\x7a\x2a\xd6\x17\xfc\x0f\x2a\xb6\x39" +
9612-
"\x0f\x5b\x31\x60\xb9\x9e\x61\x68\x26\x55\xe9\xb9\x6e\x94\x87" +
9613-
"\x35\xdd\x71\xd1\x80\x8a\xbe\x9a\x86\xaa\x59\x64\x0c\x1f\x50" +
9614-
"\x80\xd4\x64\xa0\xf5\xb4\x47\x02\x90\xf2\xa6\x03\x78\x74\xb2" +
9615-
"\xd9\xc0\xd2\x4a\x4d\x53\x60\x3f\xc7\xe3\x4b\xc7\x20\xbe\xfd" +
9616-
"\x04\x65\xc9\x60\xcd\xd5\x0a\x33\xe6\xbb\x52\x3d\x43\xdc\xce" +
9617-
"\x90\x32\xf6\xf7\x44\x71\xfd\x9d\xe5\x7d\xb6\x69\xc2\xf7\xa4" +
9618-
"\x27\x54\xf4\x15\x67\xd3\x25\x4f\x0a\xf5\xb2\x0d\xb5\x92\xe5" +
9619-
"\xcf\x23\x94\x25\xfc\x03\x81\x87\x68\x3f\x69\x3b\xf1\xbe\x64" +
9620-
"\x2d\xa7\x59\x3e\x32\x28\x38\xf1\x51\xdb\xe1\x46\x84\x0f\x94" +
9621-
"\xb1\xa4\x22\xea\xcf\xca\x4e\xcc\xad\xfb\x13\xc3\x45\xe5\xfe" +
9622-
"\x73\xa4\x07\xd1\x1d\x91\x73\x8a\x94\x83\xa3\xf1\x03\x25\x57" +
9623-
"\x1d\x25\x75\x43\xdb\xcf\xc5\x76\xfa\xd0\x63\x2f\xf3\xeb\x0e" +
9624-
"\xb3\xef\x7a\xc7\x42\xdc\x16\xac\x32\x33\xd7\xbb\x35\xbf\x4e" +
9625-
"\x8d\x52\xe6\x3e\x1b\xff\x42\x5c\xaa\x6c\x7c\x71\x50\xaf\x8d" +
9626-
"\xb3\x19\x12\x78\xaa\x4e\x00\xb5\xf7\x13\xf6\xb2\x37\x9c\x37" +
9627-
"\xdd\x2d\xfb\xe2\x9a\x24\x49\x5d\xe0\x43\x98\xb9\x38\x9a\xa1" +
9628-
"\xa3\xad\xfa\xe4\x0d\x7a\xdb\xf1\xfb\xd9\x88\x3b\xb4\x6b\xb4" +
9629-
"\xfb\x5b\xb4\xbb\xf0\x3f\x94\xc5\xbb\x8e\xd7\xd0\xdf\x1b\x97" +
9630-
"\xd5\x10\x7b\xfc\xec\xf7\xfb\x93\x3d\xbe\x3f\x56\xfd\x72\x0a" +
9631-
"\xc6\x06\xbe\x3b\xe2\x96\xc2\xdf\x1b\xa5\xf6\x4f\x02\x40\x3a" +
9632-
"\x59\x11\x19\xdd\xc8\x76\x1e\x5e\xdd\x4c\x96\xd2\x24\xac\x79" +
9633-
"\xf1\xe1\x66\x3b\xe0\x36\xcb\xe7\x50\x9b\xa5\x67\x36\xcb\x27" +
9634-
"\x89\xbf\xa2\xeb\xc8\x7e\x8a\xda\x62\xad\xbb\x36\x3c\x74\xf0" +
9635-
"\xe4\xf9\x7f\xf2\x66\x6c\x41\x3b\x98\x34\xe9\xdc\x6b\xc7\x6e" +
9636-
"\xcb\xdd\x6b\xf3\xf0\x29\x19\xde\xd1\x7b\x8f\xc8\x16\x18\x88" +
9637-
"\xd6\xdc\xdf\x83\x75\x47\x86\x0c\x34\xde\xc3\xc7\x66\xfc\xfb" +
9638-
"\xdd\x30\x8a\x7d\xeb\x8e\xce\x61\x53\xcb\xf0\x4d\xfb\x1a\xa6" +
9639-
"\x2b\x5d\x3d\x04\x60\x48\x56\xce\x66\x68\xcf\x5a\x00\x80\x45" +
9640-
"\x5a\x59\x0d\xf5\x4a\x3c\xe1\x0e\xff\xfa\x7a\x1b\x5b\x5c\x2a" +
9641-
"\x2e\x70\x18\x25\x2f\xa3\xf3\x28\x3a\x83\x57\x2d\x64\x86\x74" +
9642-
"\x43\x64\xe5\x64\x45\x38\x8c\x8e\x5c\x13\xd1\xd9\x87\x9a\x3e" +
9643-
"\xe4\xa7\xac\xc7\xdb\xe7\xb2\xd1\xc3\xc8\xad\x84\x40\xe7\xa2" +
9644-
"\xf3\x1d\x7d\xb8\x55\x26\x8c\x76\x46\x61\x2c\xf5\xd4\x0c\xa3" +
9645-
"\xf0\x92\xb9\x8e\xce\x01\x63\x5e\xfd\x6f\x7d\x74\x81\x7f\xfa" +
9646-
"\x88\x2b\x98\x57\xd2\x07\x0a\x91\xd4\xb8\x3a\x27\x1f\x06\x35" +
9647-
"\x16\x63\xa1\x90\xdb\x3b\x54\x58\x79\x1a\xb6\x2c\x5c\xa1\xa5" +
9648-
"\x21\x0b\x97\x69\xf5\xf5\x30\x64\xaf\x82\xa7\x57\xec\x0c\x84" +
9649-
"\x59\x4a\x2c\x5e\xb0\x1a\x1f\xc2\xde\xfd\x22\x08\x15\xe2\x3f" +
9650-
"\x0d\xfc\x17\xce\xbf\x01\x00\x00\xff\xff\x7e\x92\xc9\xe2")
9585+
"\x78\x9c\xa4\x57\xdd\x72\xdb\x36\x13\xbd\xd7\x53\x6c\x10\x7f" +
9586+
"\x1f\xa9\xb1\x45\x5a\x76\xfe\xc6\x21\xd9\xf1\x24\xbd\x70\x27" +
9587+
"\xd3\xc9\xc4\xed\x75\x07\x02\x57\x12\x12\x08\x60\x01\x48\xb6" +
9588+
"\x46\xe5\xbb\x77\x40\x90\x14\xa9\x1f\x4b\x6d\xaf\x44\x00\x67" +
9589+
"\xcf\x9e\x5d\x2c\x16\xd0\x66\x33\x82\x0b\x66\x05\xdc\xa5\x10" +
9590+
"\x31\x25\xad\x56\x02\x46\x65\x09\xd5\x82\x99\xab\xa7\x2f\x8a" +
9591+
"\x51\xcb\x95\xac\x10\x42\xb1\xee\x2a\xd5\x58\x4d\xfb\xaf\x51" +
9592+
"\x59\x0e\x92\x57\xb9\x62\x76\x5d\x20\xcc\xed\x42\x64\x83\xc4" +
9593+
"\xff\x0c\x92\x39\xd2\x3c\x1b\x00\x24\x96\x5b\x81\xd9\x66\x03" +
9594+
"\x51\xf5\x05\x65\x99\xc4\x7e\xce\xad\x0a\x2e\x7f\x80\x46\x91" +
9595+
"\x12\xce\x94\x24\xe0\xa8\x52\xc2\x17\x74\x86\x71\x21\x67\x04" +
9596+
"\xe6\x1a\xa7\x29\x89\xa7\x74\xe5\x00\x91\x9b\xdb\x31\x34\x76" +
9597+
"\x2d\xd0\xcc\x11\x6d\x8b\x66\xc6\xc4\x82\x1b\x1b\x31\x63\x08" +
9598+
"\xc4\x95\x81\x61\x9a\x17\x16\x8c\x66\x29\x89\xbf\x9b\x98\x09" +
9599+
"\x5e\x4c\x14\xd5\x79\xb4\xe0\x32\xfa\x6e\x48\x96\xc4\x1e\x93" +
9600+
"\x0d\x92\xd8\xcb\x1f\x24\x13\x95\xaf\x2b\xf3\x9c\xaf\x80\x09" +
9601+
"\x6a\x4c\x4a\x2c\x9d\x08\x84\x15\xea\x5b\x58\x8c\x26\xa3\xf1" +
9602+
"\xf8\xba\x92\x74\x00\x34\x72\x34\xf5\xa2\x4b\x85\x9b\x6b\x46" +
9603+
"\x6e\xdc\x24\x69\x3b\xa3\xbb\xc3\x0a\xd2\x10\x32\x25\x96\x0b" +
9604+
"\x39\x26\xd9\x27\x25\x2d\xe5\x12\x35\x3c\x7c\x4e\x62\x3b\x3f" +
9605+
"\x61\x71\x43\xb2\x07\x97\xce\x33\xa0\xb7\x8e\x7c\xb1\xa0\x32" +
9606+
"\x3f\x03\xfc\x86\x64\xbf\xd2\xc5\x39\xb4\x6f\x49\xf6\xf0\x75" +
9607+
"\x1f\xe7\x6a\x8a\x4f\x77\x8a\xae\x2c\x5f\xe6\x7a\x47\xb2\x06" +
9608+
"\x7b\x98\x11\x65\x7e\x92\xe4\x3d\xc9\x1e\x2d\xb5\x4b\x73\x5c" +
9609+
"\x14\xb3\x22\xfa\x59\x56\x1b\x7d\x8a\xed\x03\xc9\xee\x99\x13" +
9610+
"\x74\x84\xce\x29\x1a\xf5\x48\x92\xb8\xbb\xcf\xce\xaa\x53\x07" +
9611+
"\x49\xdc\x29\x93\x24\xce\xf9\x2a\x1b\x1c\xa9\x2e\x57\x9c\x2f" +
9612+
"\x54\x57\x53\xbb\x5b\x31\xa0\xa9\x9c\x21\x5c\xf0\x2b\xb8\xc0" +
9613+
"\xb6\x05\x54\xc5\x64\xfa\x71\x26\x56\x3b\x3c\x9f\x42\x88\x7f" +
9614+
"\x42\xb8\x50\x39\x5c\x70\xb8\x19\xc2\x78\xe8\x82\x69\x64\x00" +
9615+
"\x73\xe7\xe0\x86\x6c\x33\xbf\x5b\x0b\xf9\x6e\xfd\x42\x75\xf8" +
9616+
"\x53\x82\xcf\xc8\x80\x4b\xab\xa0\xd5\x40\xfa\xc6\x00\x09\x6d" +
9617+
"\x4e\xb4\x43\xc7\x9b\x0d\x14\x9a\x4b\x3b\x05\xf2\xbf\x68\x7c" +
9618+
"\x63\x08\x44\x0f\x9f\xa1\x2c\x09\xac\xa8\x58\x62\x4a\x5c\x97" +
9619+
"\xa9\x67\x2c\xd5\x33\xb4\x29\xf9\x63\x22\xa8\xfc\x41\xb2\x63" +
9620+
"\xb6\x49\x4c\x77\x24\xc7\x36\x3f\x56\xa8\x4d\xd7\x7b\x31\xc4" +
9621+
"\x9b\x36\xc4\x4a\x8e\x3b\x7b\x50\x96\xf0\x17\x78\x7b\x6b\xd7" +
9622+
"\xc7\xe3\x7c\x4d\xb6\x5c\xc5\x9a\x40\x4e\x2d\x1d\xb5\x9d\x6a" +
9623+
"\x64\xf1\xd9\xa6\x24\xae\x88\x8e\x67\xa3\x13\x6b\xeb\xfe\xcc" +
9624+
"\x30\x51\x98\x7f\x1d\xe1\x5e\x54\x07\x64\x9c\x23\x61\xef\xb8" +
9625+
"\x1c\x50\x70\xdb\x53\x50\x37\xad\xdd\xd8\xb7\xd3\xfb\x9e\xf6" +
9626+
"\x18\xdf\xf4\x18\x5d\x67\x3b\x14\xd2\xb6\x20\x85\x9a\x99\xa3" +
9627+
"\x5b\xf0\xd3\x54\x09\xa1\x9e\xd2\xf1\xff\x2d\xe5\x22\x1d\x5f" +
9628+
"\xef\xd5\x63\xe3\x6c\x86\x16\x1c\x55\x4f\x78\xed\xfd\x8c\x3d" +
9629+
"\xdb\x0b\xe3\x6d\x7f\x6b\xbe\x9a\x26\x29\x5c\xe6\xf8\xec\x67" +
9630+
"\xae\x0f\x66\xe4\x60\x3b\x3e\xb9\x11\xef\x7a\xfe\xbe\x28\xf6" +
9631+
"\x88\x7a\x85\x7a\x77\x2b\xba\x0b\xff\x61\xdb\xdf\xf7\xbc\xf9" +
9632+
"\x1e\xde\xb8\xaa\x86\x78\x84\x7f\xb7\xa7\x9f\xf4\xf4\xe1\x50" +
9633+
"\x35\xf3\x29\x28\xed\x79\x1e\x2d\xd5\xd6\x7f\xde\x0b\xb1\x5b" +
9634+
"\xd9\x00\xc9\x64\x69\xad\x92\x8d\x5c\xe3\xe0\xd5\xad\xa3\x6d" +
9635+
"\x12\xfb\x35\x27\xda\xf7\xcc\x3d\x6e\x55\xfc\x13\x6a\x55\x38" +
9636+
"\x66\x55\x9c\x24\xfe\x86\xa6\x27\xfb\x14\xb5\xc6\x5a\x77\x6d" +
9637+
"\xb8\xef\xe0\xe4\x79\x3e\x79\xfb\xb5\xa0\x0e\x26\x89\x7b\x77" +
9638+
"\xd7\xa1\x1b\xb1\x7b\x35\xee\x3f\xed\xfc\xbb\x76\xe7\x51\xd7" +
9639+
"\x02\x3d\xd1\x8a\x6a\x68\x3b\x2b\xa4\x20\xf1\x09\x3e\x35\xe3" +
9640+
"\x5f\x1e\xc3\x20\x72\x2d\x38\xb8\x82\x4d\x2d\xc3\x35\xdf\x3b" +
9641+
"\x98\x2e\x65\x75\xd9\x43\x68\x35\x9f\xcd\x50\x0f\x5b\x00\x80" +
9642+
"\x46\xbb\xd4\x12\xea\x95\x68\x42\x0d\xfe\xfe\xed\x21\xd2\x58" +
9643+
"\x08\xca\x30\x0c\xe2\xd7\xc1\x55\x10\x0c\xe1\xb2\x85\xcc\xd0" +
9644+
"\xde\x5b\xab\xf9\x64\x69\x31\x0c\x0e\xb4\xfb\x60\xf8\xb1\xa6" +
9645+
"\xf7\xf9\x29\xeb\xf1\xf6\xf9\xaa\x64\x18\x98\x25\x63\x68\x4c" +
9646+
"\x70\xd5\xd1\x87\x5b\x65\x4c\x49\xa3\x04\x46\x5c\x4e\x55\x18" +
9647+
"\xf8\xd7\xca\x5d\x70\x05\x18\xd1\xea\xbb\xf5\xd1\x07\xfe\xe6" +
9648+
"\x22\xae\x60\x4e\xc9\x31\x90\x8f\xa4\xc6\xd5\x39\xf9\x38\xa8" +
9649+
"\xb1\x18\x31\x81\x54\x3f\xa2\xc0\xca\x53\xd8\xb2\x50\x81\xda" +
9650+
"\x86\xc4\x5f\x8a\xd5\x6b\x3e\x24\x97\xde\xd3\x25\x19\x02\x53" +
9651+
"\x05\xc7\xfc\x15\xa9\xf1\x3e\xec\xee\x0b\xdd\x57\x88\x7b\xaa" +
9652+
"\xbb\x7f\x1c\x7f\x07\x00\x00\xff\xff\x97\x38\xa8\x2f")
96519653

96529654
var _file_12 = &file{
96539655
fileInfo: &fileInfo{

route/handler.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ func (server *Server) processTTY(ctx context.Context, timeoutCancel context.Canc
8888
}
8989
log.Debugf("exec container: %s, params: %s", container.ID, arguments)
9090

91-
if q, err := parseQuery(strings.TrimSpace(arguments)); err != nil {
91+
q, err := parseQuery(strings.TrimSpace(arguments))
92+
if err != nil {
9293
return err
93-
} else {
94-
container.Exec = types.ExecOptions{
95-
Cmd: q.Get("cmd"),
96-
Env: q.Get("env"),
97-
User: q.Get("user"),
98-
Privileged: q.Get("p") != "",
99-
}
94+
}
95+
container.Exec = types.ExecOptions{
96+
Cmd: q.Get("cmd"),
97+
Env: q.Get("env"),
98+
User: q.Get("user"),
99+
Privileged: q.Get("p") != "",
100100
}
101101

102102
containerTTY, err := server.containerCli.Exec(ctx, container)

route/route.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ var (
4242
titleTemplate *noesctmpl.Template
4343
)
4444

45+
func mod(i, j int) int {
46+
return i % j
47+
}
48+
4549
func init() {
4650
indexData, err := asset.Find("/index.html")
4751
if err != nil {
@@ -53,7 +57,14 @@ func init() {
5357
if err != nil {
5458
log.Fatal(err)
5559
}
56-
listTemplate = listIndexData.Template()
60+
61+
listTemplate, err = template.New(listIndexData.Name()).
62+
Funcs(template.FuncMap{
63+
"mod": mod,
64+
}).Parse(string(listIndexData.Bytes()))
65+
if err != nil {
66+
panic(err)
67+
}
5768

5869
titleFormat := "{{ .containerName }} - {{ printf \"%.8s\" .containerID }}@{{ .containerLoc }}"
5970
titleTemplate, err = noesctmpl.New("title").Parse(titleFormat)

0 commit comments

Comments
 (0)