Skip to content

Commit c4bae92

Browse files
authored
chore: change row colors (#42)
- update bindata - change near row colors There's no need to do "pagination" cause we don't have a "filter" function, and it's easy to use Ctrl+F to find the container you need. Besides, the list page is generated by the server with raw HTML code, no js needed, so the loading speed is fast.
2 parents 05d6f39 + 9a9bbbd commit c4bae92

File tree

9 files changed

+205
-196
lines changed

9 files changed

+205
-196
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ proto:
6868
asset: clear static/js static/css static/html
6969
bindata \
7070
-pkg $(PKG)/route/asset \
71-
-resource static/
71+
-src static/
7272

7373
clear:
7474
rm -rf static
@@ -94,7 +94,7 @@ js/node_modules/xterm/dist/xterm.css:
9494
cd js && \
9595
npm install
9696

97-
.PHONY: js/dist/gotty-bundle.js
97+
# .PHONY: js/dist/gotty-bundle.js
9898
js/dist/gotty-bundle.js: js/node_modules/webpack
9999
cd js && \
100100
`npm bin`/webpack

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ require (
99
github.com/docker/go-connections v0.4.0 // indirect
1010
github.com/docker/go-units v0.3.3 // indirect
1111
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
12-
github.com/elazarl/go-bindata-assetfs v1.0.0
1312
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a
1413
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 // indirect
1514
github.com/gin-gonic/gin v1.3.0
@@ -31,8 +30,7 @@ require (
3130
github.com/sirupsen/logrus v1.4.0
3231
github.com/spf13/pflag v1.0.3 // indirect
3332
github.com/ugorji/go/codec v0.0.0-20190320090025-2dc34c0b8780 // indirect
34-
github.com/wrfly/bindata v0.0.0-20190403163452-84af32a30f60 // indirect
35-
github.com/wrfly/ecp v0.1.0
33+
github.com/wrfly/ecp v0.1.1-0.20190725160759-97269b9e95f0
3634
github.com/yudai/gotty v2.0.0-alpha.3+incompatible
3735
golang.org/x/net v0.0.0-20190326090315-15845e8f865b
3836
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect

go.sum

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk
1515
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
1616
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s=
1717
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
18-
github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
19-
github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
2018
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a h1:A4wNiqeKqU56ZhtnzJCTyPZ1+cyu8jKtIchQ3TtxHgw=
2119
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
2220
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g=
@@ -74,12 +72,8 @@ github.com/ugorji/go v1.1.2 h1:JON3E2/GPW2iDNGoSAusl1KDf5TRQ8k8q7Tp097pZGs=
7472
github.com/ugorji/go v1.1.2/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
7573
github.com/ugorji/go/codec v0.0.0-20190320090025-2dc34c0b8780 h1:vG/gY/PxA3v3l04qxe3tDjXyu3bozii8ulSlIPOYKhI=
7674
github.com/ugorji/go/codec v0.0.0-20190320090025-2dc34c0b8780/go.mod h1:iT03XoTwV7xq/+UGwKO3UbC1nNNlopQiY61beSdrtOA=
77-
github.com/wrfly/bindata v0.0.0-20190329131907-372088142650 h1:RcrlTAimjpy8WqvYEJmRr3weVCzT8VkHXCqQQgQ8rdo=
78-
github.com/wrfly/bindata v0.0.0-20190329131907-372088142650/go.mod h1:PJWDAiT81Z8k5Wx4c1hl3aKFIxokgycbdNBlMtF/yaA=
79-
github.com/wrfly/bindata v0.0.0-20190403163452-84af32a30f60 h1:iEapbDpEpM74EUNs2VHchs0BmJwT0C+VRbvN+tz5nhQ=
80-
github.com/wrfly/bindata v0.0.0-20190403163452-84af32a30f60/go.mod h1:PJWDAiT81Z8k5Wx4c1hl3aKFIxokgycbdNBlMtF/yaA=
81-
github.com/wrfly/ecp v0.1.0 h1:btwZO5LGlM5SNykaUXGkJIjwckpjPU2MjFatehSCmY8=
82-
github.com/wrfly/ecp v0.1.0/go.mod h1:cmmFTD+MLlrDa3/EO3gjeKLKUhHiYP3cgaaJamIS1NU=
75+
github.com/wrfly/ecp v0.1.1-0.20190725160759-97269b9e95f0 h1:Zy3Chk4CvwAqJ6YgQym6hJQEk4JE7iPbHRfxkru6Zn0=
76+
github.com/wrfly/ecp v0.1.1-0.20190725160759-97269b9e95f0/go.mod h1:cmmFTD+MLlrDa3/EO3gjeKLKUhHiYP3cgaaJamIS1NU=
8377
github.com/yudai/gotty v2.0.0-alpha.3+incompatible h1:eUFSuV4B2g+Rj+PS3HxhvOGEu2klWRzsl/7z7T/NUJQ=
8478
github.com/yudai/gotty v2.0.0-alpha.3+incompatible/go.mod h1:QBg0hL6VTVdqQk0qoBYk631EHLRH+XtR4wtbVi64UJ4=
8579
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I=

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: #171717;
194+
}
195+
192196
.table.ver3 td {
193197
font-family: Lato-Regular;
194198
font-size: 15px;
195-
color: #808080;
199+
color: #717171;
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="{{ .State }}">{{ .Status }}</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}}

0 commit comments

Comments
 (0)