From 57e1bde9061f58fa9a4eeebd97870106e85def8f Mon Sep 17 00:00:00 2001 From: Samuel Padgett Date: Tue, 9 Jul 2019 09:30:03 -0400 Subject: [PATCH] Bug 1722815: Handle other image name formats in overview --- app/scripts/filters/resources.js | 5 ++++- dist/scripts/scripts.js | 2 +- dist/scripts/vendor.js | 30 ++++++++++++++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/app/scripts/filters/resources.js b/app/scripts/filters/resources.js index d663a4c765..cac9078a55 100644 --- a/app/scripts/filters/resources.js +++ b/app/scripts/filters/resources.js @@ -96,7 +96,10 @@ angular.module('openshiftConsole') var slashSplit = imageWithoutID.split("/"); var semiColonSplit; - if (slashSplit.length === 3) { + if (slashSplit.length > 3) { + return imageWithoutID; + } + else if (slashSplit.length === 3) { semiColonSplit = slashSplit[2].split(":"); return slashSplit[1] + '/' + semiColonSplit[0]; } diff --git a/dist/scripts/scripts.js b/dist/scripts/scripts.js index 89925eac93..e29e3c8439 100644 --- a/dist/scripts/scripts.js +++ b/dist/scripts/scripts.js @@ -15628,7 +15628,7 @@ return e ? e.contains(":") ? e.split(":")[1] : e : ""; return function(e) { if (!e) return ""; var t, n = e.split("@")[0], r = n.split("/"); -return 3 === r.length ? (t = r[2].split(":"), r[1] + "/" + t[0]) : 2 === r.length ? n : 1 === r.length ? (t = n.split(":"))[0] : void 0; +return r.length > 3 ? n : 3 === r.length ? (t = r[2].split(":"), r[1] + "/" + t[0]) : 2 === r.length ? n : 1 === r.length ? (t = n.split(":"))[0] : void 0; }; }).filter("stripTag", function() { return function(e) { diff --git a/dist/scripts/vendor.js b/dist/scripts/vendor.js index 91dc9e5430..55089c8198 100644 --- a/dist/scripts/vendor.js +++ b/dist/scripts/vendor.js @@ -76042,10 +76042,9 @@ return isNaN(Number(e)) ? e : Number(e); } function i(e) { if ("string" != typeof e) throw new TypeError("Invalid argument expected string"); -if (!r.test(e)) throw new Error("Invalid argument not valid semver ('" + e + "' received)"); +if (!a.test(e)) throw new Error("Invalid argument not valid semver ('" + e + "' received)"); } -var r = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; -return function(e, r) { +function r(e, r) { [ e, r ].forEach(i); for (var o = t(e), a = t(r), s = 0; s < Math.max(o.length - 1, a.length - 1); s++) { var l = parseInt(o[s] || 0, 10), c = parseInt(a[s] || 0, 10); @@ -76063,7 +76062,30 @@ if (f[s] > h[s]) return -1; } } else if (u || d) return u ? -1 : 1; return 0; -}; +} +function o(e) { +if ("string" != typeof e) throw new TypeError("Invalid operator type, expected string but got " + typeof e); +if (-1 === s.indexOf(e)) throw new TypeError("Invalid operator, expected one of " + s.join("|")); +} +var a = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, s = [ ">", ">=", "=", "<", "<=" ]; +return r.compare = function(e, t, n) { +switch (o(n), n) { +case ">": +return r(e, t) > 0; + +case ">=": +return r(e, t) >= 0; + +case "<": +return r(e, t) < 0; + +case "<=": +return r(e, t) <= 0; + +default: +return 0 === r(e, t); +} +}, r; }), function() { "use strict"; if (Logger.setLevel(Logger.INFO), window.LogBuffer = 100, "localStorage" in window) {