From ae78b2d355ccead8cd66388566b8735adc1e57ba Mon Sep 17 00:00:00 2001 From: Lennart Blom Date: Mon, 3 Dec 2018 16:36:51 +0100 Subject: [PATCH 1/2] Fix navigation bug The href="#" was troubling the view that the history appeared just for a few milliseconds... the button with given onclick event does work now. --- src/style.css | 5 +++++ src/tags/app.tag | 1 + src/tags/tag-history-button.tag | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/style.css b/src/style.css index 58f50d3..ff5f595 100644 --- a/src/style.css +++ b/src/style.css @@ -425,4 +425,9 @@ select { .tag-history-element .container div.value, .tag-history-element .parent div.value { font-size: 12px; +} + +tag-history-button button { + background: none; + border: none; } \ No newline at end of file diff --git a/src/tags/app.tag b/src/tags/app.tag index 02a8226..09f47f6 100644 --- a/src/tags/app.tag +++ b/src/tags/app.tag @@ -68,6 +68,7 @@ along with this program. If not, see . }); route('/taghistory/image/*/tag/*', function(image, tag) { route.routeName = 'taghistory'; + console.log("Route Taghistory"); registryUI.taghistory.image = image; registryUI.taghistory.tag = tag; diff --git a/src/tags/tag-history-button.tag b/src/tags/tag-history-button.tag index ec0d509..b75d99a 100644 --- a/src/tags/tag-history-button.tag +++ b/src/tags/tag-history-button.tag @@ -15,9 +15,9 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> - history - + \ No newline at end of file From 472b4854558b3bbd78d8d0b30263160ff05812ea Mon Sep 17 00:00:00 2001 From: Lennart Blom Date: Mon, 3 Dec 2018 16:48:21 +0100 Subject: [PATCH 2/2] Remove test logging --- src/tags/app.tag | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/tags/app.tag b/src/tags/app.tag index 09f47f6..c527047 100644 --- a/src/tags/app.tag +++ b/src/tags/app.tag @@ -68,7 +68,6 @@ along with this program. If not, see . }); route('/taghistory/image/*/tag/*', function(image, tag) { route.routeName = 'taghistory'; - console.log("Route Taghistory"); registryUI.taghistory.image = image; registryUI.taghistory.tag = tag; @@ -96,27 +95,27 @@ along with this program. If not, see . }; registryUI.errorSnackbar = function(message) { return registryUI.snackbar(message, true); - } + }; registryUI.cleanName = function() { const url = (registryUI.url() && registryUI.url().length > 0 && registryUI.url()) || window.location.host; if (url) { return url.startsWith('http') ? url.replace(/https?:\/\//, '') : url; } return ''; - } + }; route.parser(null, function(path, filter) { const f = filter .replace(/\?/g, '\\?') .replace(/\*/g, '([^?#]+?)') - .replace(/\.\./, '.*') - const re = new RegExp('^' + f + '$') - const args = path.match(re) + .replace(/\.\./, '.*'); + const re = new RegExp('^' + f + '$'); + const args = path.match(re); if (args) return args.slice(1) }); registryUI.isDigit = function(char) { return char >= '0' && char <= '9'; - } + }; registryUI.DockerImage = function(name, tag) { this.name = name; @@ -149,7 +148,7 @@ along with this program. If not, see . acc.push(e); } return acc; - } + }; registryUI.DockerImage.compare = function(e1, e2) { const tag1 = e1.tag.match(/./g).reduce(registryUI.DockerImage._tagReduce, []); @@ -195,7 +194,7 @@ along with this program. If not, see . oReq.open('GET', registryUI.url() + '/v2/' + self.name + '/manifests/' + self.tag); oReq.setRequestHeader('Accept', 'application/vnd.docker.distribution.manifest.v2+json'); oReq.send(); - } + }; registryUI.DockerImage.prototype.getBlobs = function(blob) { const oReq = new Http();