diff --git a/src/index.html b/src/index.html index 72904f1..6397081 100644 --- a/src/index.html +++ b/src/index.html @@ -41,6 +41,7 @@ + diff --git a/src/scripts/http.js b/src/scripts/http.js index 56cb088..22a3745 100644 --- a/src/scripts/http.js +++ b/src/scripts/http.js @@ -24,13 +24,13 @@ function Http() { Http.prototype.addEventListener = function(e, f) { this._events[e] = f; - var self = this; + const self = this; switch (e) { case 'loadend': { self.oReq.addEventListener('loadend', function() { if (this.status == 401) { - var req = new XMLHttpRequest(); + const req = new XMLHttpRequest(); req.open(self._method, self._url); for (key in self._events) { req.addEventListener(key, self._events[key]); diff --git a/src/scripts/script.js b/src/scripts/script.js index 0a8fb18..c9fef6d 100644 --- a/src/scripts/script.js +++ b/src/scripts/script.js @@ -20,7 +20,7 @@ registryUI.URL_PARAM_REGEX = /^url=/; registryUI.name = registryUI.url = function(byPassQueryParam) { if (!registryUI._url) { - var url = registryUI.getUrlQueryParam(); + const url = registryUI.getUrlQueryParam(); if (url) { try { registryUI._url = registryUI.decodeURI(url); @@ -35,7 +35,7 @@ registryUI.name = registryUI.url = function(byPassQueryParam) { } registryUI.getRegistryServer = function(i) { try { - var res = JSON.parse(localStorage.getItem('registryServer')); + const res = JSON.parse(localStorage.getItem('registryServer')); if (res instanceof Array) { return (!isNaN(i)) ? res[i] : res.map(function(url) { return url.trim().replace(/\/*$/, ''); @@ -45,9 +45,9 @@ registryUI.getRegistryServer = function(i) { return (!isNaN(i)) ? '' : []; } registryUI.addServer = function(url) { - var registryServer = registryUI.getRegistryServer(); + const registryServer = registryUI.getRegistryServer(); url = url.trim().replace(/\/*$/, ''); - var index = registryServer.indexOf(url); + const index = registryServer.indexOf(url); if (index != -1) { return; } @@ -56,11 +56,11 @@ registryUI.addServer = function(url) { registryUI.updateHistory(url); } localStorage.setItem('registryServer', JSON.stringify(registryServer)); -} +}; registryUI.changeServer = function(url) { var registryServer = registryUI.getRegistryServer(); url = url.trim().replace(/\/*$/, ''); - var index = registryServer.indexOf(url); + const index = registryServer.indexOf(url); if (index == -1) { return; } @@ -68,11 +68,11 @@ registryUI.changeServer = function(url) { registryServer = [url].concat(registryServer); registryUI.updateHistory(url); localStorage.setItem('registryServer', JSON.stringify(registryServer)); -} +}; registryUI.removeServer = function(url) { - var registryServer = registryUI.getRegistryServer(); + const registryServer = registryUI.getRegistryServer(); url = url.trim().replace(/\/*$/, ''); - var index = registryServer.indexOf(url); + const index = registryServer.indexOf(url); if (index == -1) { return; } @@ -90,9 +90,9 @@ registryUI.updateHistory = function(url) { } registryUI.getUrlQueryParam = function () { - var search = window.location.search; + const search = window.location.search; if (registryUI.URL_QUERY_PARAM_REGEX.test(search)) { - var param = search.split(/^\?|&/).find(function(param) { + const param = search.split(/^\?|&/).find(function(param) { return param && registryUI.URL_PARAM_REGEX.test(param); }); return param ? param.replace(registryUI.URL_PARAM_REGEX, '') : param; diff --git a/src/style.css b/src/style.css index b605dbd..fcaa695 100644 --- a/src/style.css +++ b/src/style.css @@ -194,6 +194,7 @@ material-card table td { text-align: right; } +tag-history-button button:hover, material-card table th.material-card-th-sorted-ascending:hover, material-card table th.material-card-th-sorted-descending:hover { cursor: pointer; } @@ -337,38 +338,31 @@ select { cursor: pointer; } -material-card.tag-history { +tag-history material-card { min-height: auto; - margin-bottom: 0; -} -.tag-history-element { - margin-top:5px; - margin-bottom: 0; } -.tag-history-element > div { - padding: 20px; - min-width: 100px; -} - -.tag-history-element i { +tag-history-element i { font-size: 20px; padding: 0px; } -.tag-history-element .docker_version .headline .material-icons { - background-size: 20px auto; +tag-history-element.docker_version .headline .material-icons { + background-size: 24px auto; background-image: url("images/docker-logo.svg"); background-repeat: no-repeat; } -.tag-history-element > div { +tag-history-element { display: block; + padding: 20px; + min-width: 100px; width: 420px; float: left; + overflow-x: auto; } -.tag-history-element .headline p { +tag-history-element .headline p { font-weight: bold; line-height: 20px; position: relative; @@ -376,9 +370,7 @@ material-card.tag-history { top: -4px; } -.tag-history-element .id div.value, -.tag-history-element .container div.value, -.tag-history-element .parent div.value { +tag-history-element.id div.value { font-size: 12px; } diff --git a/src/tags/app.tag b/src/tags/app.tag index 4cd772c..9a09859 100644 --- a/src/tags/app.tag +++ b/src/tags/app.tag @@ -210,6 +210,7 @@ along with this program. If not, see . e.size = self.layers[i].size; e.id = self.layers[i].digest.replace('sha256:', ''); }); + self.blobs.id = blob.replace('sha256:', ''); self.trigger('creation-date', self.creationDate); self.trigger('blobs', self.blobs); } else if (this.status == 404) { @@ -224,13 +225,13 @@ along with this program. If not, see . }; registryUI.bytesToSize = function (bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; if (bytes == undefined || isNaN(bytes)) { return '?'; } else if (bytes == 0) { return '0 Byte'; } - var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); + const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); return Math.ceil(bytes / Math.pow(1024, i)) + ' ' + sizes[i]; }; route.start(true); diff --git a/src/tags/catalog.tag b/src/tags/catalog.tag index 2259e1c..9763145 100644 --- a/src/tags/catalog.tag +++ b/src/tags/catalog.tag @@ -37,7 +37,7 @@ along with this program. If not, see . registryUI.catalog.instance = this; registryUI.catalog.display = function() { registryUI.catalog.repositories = []; - var oReq = new Http(); + const oReq = new Http(); oReq.addEventListener('load', function() { registryUI.catalog.repositories = []; if (this.status == 200) { diff --git a/src/tags/copy-to-clipboard.tag b/src/tags/copy-to-clipboard.tag index 3dee1ac..f12f7cc 100644 --- a/src/tags/copy-to-clipboard.tag +++ b/src/tags/copy-to-clipboard.tag @@ -22,7 +22,7 @@ + \ No newline at end of file diff --git a/src/tags/tag-history.tag b/src/tags/tag-history.tag index c24b052..b131f8d 100644 --- a/src/tags/tag-history.tag +++ b/src/tags/tag-history.tag @@ -17,7 +17,7 @@ along with this program. If not, see . - + arrow_back @@ -26,17 +26,11 @@ along with this program. If not, see . - + - - {entry.icon} - { entry.key.replace('_', ' ') } - - { entry.value } - - +
{ entry.key.replace('_', ' ') }