diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index b61e8b32..5a8f7427 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -721,6 +721,27 @@ Ext.define('PVE.Utils', { utilities: { return PVE.Utils.render_size_usage(record.used, record.total); }, + render_optional_url: function(value) { + var match; + if (value && (match = value.match(/^https?:\/\//)) !== null) { + return '' + value + ''; + } + return value; + }, + + render_san: function(value) { + var names = []; + if (Ext.isArray(value)) { + value.forEach(function(val) { + if (!Ext.isNumber(val)) { + names.push(val); + } + }); + return names.join('
'); + } + return value; + }, + windowHostname: function() { return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match, function(m, addr, offset, original) { return addr; });