From 632ab8589ff01f63b6ac50dc7e476a18390212d7 Mon Sep 17 00:00:00 2001 From: Guilherme Fontenele Date: Fri, 6 Jan 2017 02:45:40 -0200 Subject: [PATCH] Finish release candidate final --- app.html | 202 ++++-------- container-presets.ini | 27 +- css/app.css | 145 +++++++++ js/app.js | 716 +++++++++++++++++++++++++++++++++--------- server.js | 47 ++- 5 files changed, 844 insertions(+), 293 deletions(-) create mode 100644 css/app.css diff --git a/app.html b/app.html index 3cb63d5..1e5874f 100644 --- a/app.html +++ b/app.html @@ -10,114 +10,7 @@ - - + @@ -203,13 +96,12 @@ - - - - - - - + + + + + + @@ -229,9 +121,9 @@ - +
@@ -241,7 +133,7 @@
IDNameImagePortsCommandStatusActionsIDNameImagePortsPublic IPActions
@@ -453,11 +376,7 @@
- -
- + @@ -465,6 +384,13 @@ + + diff --git a/container-presets.ini b/container-presets.ini index eb96b23..e1c44e0 100644 --- a/container-presets.ini +++ b/container-presets.ini @@ -3,6 +3,7 @@ name=ssh command=bash terminal=true interactive=true +background=true [ssh.ports] port[]=23:22 [ssh.volumes] @@ -10,25 +11,27 @@ volume[]=/:/mnt/storage [ssh.links] link[]= -[web] -name=web +[vd-web] +name=vd-web command=bash -terminal=true +terminal=false interactive=true -[web.ports] +background=true +[vd-web.ports] port[]=80:80 port[]=443:443 -[web.volumes] +[vd-web.volumes] volume[]=/home/fontenele/Documents/www:/var/www/html -[web.links] -link[]=db:db +[vd-web.links] +link[]=vd-db:db -[postgres] -name=db +[vd-postgres] +name=vd-db command=bash terminal=true interactive=true -[postgres.ports] +background=true +[vd-postgres.ports] port[]=5432:5432 -[postgres.volumes] -volume[]=/home/fontenele/Documents/db/postgresdata:/data \ No newline at end of file +[vd-postgres.volumes] +volume[]=/home/fontenele/Documents/db/vd3/postgresdata:/data \ No newline at end of file diff --git a/css/app.css b/css/app.css new file mode 100644 index 0000000..71bd063 --- /dev/null +++ b/css/app.css @@ -0,0 +1,145 @@ +html { + position: relative; + min-height: 100%; +} +body { + margin-bottom: 60px; + /*min-height: 600px;*/ + padding-top: 20px; +} +#debug { + display: block; +} +#server-status li { + height: 32px; + padding: 7px 14px; +} +.loading { + background-image: url("img/loading.gif"); + background-repeat: no-repeat; + background-size: 32px; + background-position: center; +} + +#modal-add-image .modal-dialog, +#modal-add-image .modal-content { + height: 80%; +} + +#modal-add-image .modal-body { + /* 100% = dialog height, 120px = header + footer */ + height: 80%; + max-height: calc(100% - 120px); + overflow-y: auto; +} + +.list-ports .divisor, .list-volumes .divisor { + font-size: 20px; + padding-top: 6px !important; +} + +.list-ports .port > div, .list-volumes .volume > div, .list-links .link > div, .list-envs .env > div { + padding: 1px; +} + +.terminal-input { + left: -10000px; + position: absolute; +} + +.dockmodal-body { + padding: 0 !important; +} + +.terminal-container, .terminal { + height: 100%; +} + +.terminal { + overflow-x: hidden !important; +} + +.terminal-size-indicator { + display: none !important; +} + +.table { + table-layout:fixed; +} + +.truncate { + width: 100px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.label-right { + float: right; + padding: 6px 14px; + margin-left: 3px; +} + +.table-without-margin-bottom { + margin-bottom: 0; +} + +.modal-lg { + width: 96%; +} + +#modal-containers-stats .modal-body .panel-container:last-child { + margin-bottom: 0; +} + +.margin-right { + margin-right: 5px; +} + +.dockmodal { + /*top: 60px !important;*/ +} + +@font-face { + font-family: 'FixedsysExcelsior301Regular'; + src: url('css/fonts/fsex300-webfont.eot'); + src: url('css/fonts/fsex300-webfont.eot?#iefix') format('embedded-opentype'), + url('css/fonts/fsex300-webfont.woff') format('woff'), + url('css/fonts/fsex300-webfont.ttf') format('truetype'), + url('css/fonts/fsex300-webfont.svg#FixedsysExcelsior301Regular') format('svg'); + font-weight: normal; + font-style: normal; + -webkit-font-smoothing: none; + -moz-osx-font-smoothing: none; + font-smooth:never; +} + +.font-terminal { + font-family: monospace; + font-size: 10pt; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 60px; + background-color: #f5f5f5; +} + +body > .container { + padding: 60px 15px 0; +} +.container .text-muted { + margin: 20px 0; +} + +.footer > .container { + padding-right: 15px; + padding-left: 15px; +} + +code { + font-size: 80%; +} \ No newline at end of file diff --git a/js/app.js b/js/app.js index 898ef47..a5d4e6f 100644 --- a/js/app.js +++ b/js/app.js @@ -22,7 +22,10 @@ $(document).ready(function() { TIMER: { CONTAINERSTATS: false, CONTAINERSTATSINTERVAL: null, - CONTAINERSTATSCREATED: false + CONTAINERSTATSCREATED: false, + ALLCONTAINERSTATS: false, + ALLCONTAINERSTATSINTERVAL: null, + ALLCONTAINERSTATSCREATED: false } }; @@ -47,11 +50,22 @@ $(document).ready(function() { }); $('.btn-open-server-info').on('click', function() { + var apiVersions = { + '1.12': '1.24', + '1.11': '1.23', + '1.10': '1.22', + '1.9': '1.21', + '1.8': '1.20', + '1.7': '1.19', + '1.6': '1.18' + }; $.getJSON('/server-status', function(data, textStatus, event) { initialLoads.loaded(); if(event.status == 200) { $('#modal-server-info .modal-body ul').html(''); var html = '
  • Name ' + data.result.Name + '
  • '; + html+= '
  • Docker Version ' + data.result.ServerVersion + '
  • '; + html+= '
  • Docker API Version ' + apiVersions[data.result.ServerVersion.substr(0, 4)] + '
  • '; html+= '
  • OS ' + data.result.OperatingSystem + ' / ' + data.result.Architecture + '
  • '; html+= '
  • MemTotal ' + formatBytes(data.result.MemTotal) + '
  • '; html+= '
  • CPUs ' + data.result.NCPU + '
  • '; @@ -137,16 +151,22 @@ $(document).ready(function() { if(data.result.length == 0) { $('#containers-list-none').show(); $('#containers-list').hide(); + $('#btn-containers-stats').hide(); return; } $('#containers-list-none').hide(); $('#containers-list').show(); + $('#btn-containers-stats').show(); for(var i=0,l=data.result.length;i