diff --git a/dist/less/order-service.less b/dist/less/order-service.less index c479d6c8..380f0598 100644 --- a/dist/less/order-service.less +++ b/dist/less/order-service.less @@ -18,6 +18,12 @@ max-height: 60px; max-width: 60px; } + &[src$=".svg"] { + height: 52px; + @media (min-width: @order-service-title-sm-min) { + height: 60px; + } + } } } } diff --git a/dist/origin-web-catalogs.css b/dist/origin-web-catalogs.css index 109f716a..3795a4c8 100644 --- a/dist/origin-web-catalogs.css +++ b/dist/origin-web-catalogs.css @@ -265,6 +265,14 @@ landingbody, max-width: 60px; } } +.order-service-details .order-service-details-top .service-icon .image img[src$=".svg"] { + height: 52px; +} +@media (min-width: 450px) { + .order-service-details .order-service-details-top .service-icon .image img[src$=".svg"] { + height: 60px; + } +} .order-service-details .order-service-details-top .service-title { font-size: 18px; font-weight: 600; diff --git a/dist/origin-web-catalogs.js b/dist/origin-web-catalogs.js index 5ca97d49..048c30e1 100644 --- a/dist/origin-web-catalogs.js +++ b/dist/origin-web-catalogs.js @@ -11,7 +11,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, function(e, t) { e.exports = '
\n
\n
\n
\n \n \n \n {{$select.selected.name}}\n \n \n {{tag.name}}\n \n {{otherTag}},\n \n \n \n
\n \n
\n \n
\n \n \x3c!-- Wait until users leave the field to avoid flashing errors as they type. --\x3e\n
\n
\n \n Application name is required.\n \n
\n
\n \n Application name consists of lower-case letters, numbers, and dashes. It must start with a letter and can\'t end with a -.\n \n
\n
\n \n Application name must be at least 2 characters.\n \n
\n
\n \n Application name can\'t be more than 24 characters.\n \n
\n
\n
\n
\n\n
\n \n
\n \n \n
\n \n Git repository is required.\n \n
\n
\n \n This might not be a valid Git URL. Check that it is the correct URL to a remote Git repository.\n \n
\n
\n
\n\n \x3c!--\n Only show the link for existing projects. It will be broken for new\n projects. Use class `invisible` when the project list is still loading\n so the dialog doesn\'t resize.\n --\x3e\n
\n If you have a private Git repository or need to change application defaults, view\n advanced options.\n
\n
\n
\n
\n'; }, function(e, t) { - e.exports = '
\n
\n
\n \n
\n
\n
\n {{$ctrl.imageStream.name}}\n {{$ctrl.istag.name}}\n
\n
\n \n {{tag}}\n \n
\n
\n
\n
\n

\n

\n Sample Repository:\n \x3c!-- TODO: Use Git link filter, needs to be added to origin-web-common --\x3e\n \n

\n
\n
\n'; + e.exports = '
\n
\n
\n \n \n
\n
\n
\n {{$ctrl.imageStream.name}}\n {{$ctrl.istag.name}}\n
\n
\n \n {{tag}}\n \n
\n
\n
\n
\n

\n

\n Sample Repository:\n \x3c!-- TODO: Use Git link filter, needs to be added to origin-web-common --\x3e\n \n

\n
\n
\n'; }, function(e, t) { e.exports = '
\n
\n
\n \n Pending\n
\n

\n {{$ctrl.name}} is being created in {{$ctrl.selectedProject | displayName}}.\n

\n
\n
\n
\n
\n
\n \n Success\n
\n

\n {{$ctrl.name}} has been created in {{$ctrl.selectedProject | displayName}} successfully.\n

\n
\n
\n
\n
\n \n \n
\n
\n

\n Continue to the project overview to check the status of your application as it builds and deploys.\n

\n
\n
\n
\n \n
\n

\n {{$ctrl.name}} failed to create in {{$ctrl.selectedProject | displayName}}.\n

\n
\n
\n
\n \n {{$ctrl.error.data.message | upperFirst}}\n \n \n An error occurred creating the application.\n \n
\n \x3c!-- TODO: Improve error message presentation --\x3e\n \n
\n
\n'; }, function(e, t) { @@ -204,7 +204,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { default: "welcome/index.html" }; n.set(window, "OPENSHIFT_CONSTANTS.HELP", i); - var s = [ { + var a = [ { id: 1, title: "Microservices Application", icon: "fa fa-cubes", @@ -228,49 +228,49 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { icon: "fa fa-cubes", url: "https://www.redhat.com/en/technologies/management", description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt. This is way too long! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt." - } ], a = [ { + } ], s = [ { id: "languages", label: "Languages", subCategories: [ { id: "java", label: "Java", tags: [ "java" ], - icon: "font-icon icon-openjdk" + icon: "icon-openjdk" }, { id: "javascript", tags: [ "javascript", "nodejs", "js" ], label: "JavaScript", - icon: "font-icon icon-js" + icon: "icon-js" }, { id: "dotnet", label: ".NET", tags: [ "dotnet" ], - icon: "font-icon icon-dotnet" + icon: "icon-dotnet" }, { id: "perl", label: "Perl", tags: [ "perl" ], - icon: "font-icon icon-perl" + icon: "icon-perl" }, { id: "ruby", label: "Ruby", tags: [ "ruby" ], - icon: "font-icon icon-ruby" + icon: "icon-ruby" }, { id: "php", label: "PHP", tags: [ "php" ], - icon: "font-icon icon-php" + icon: "icon-php" }, { id: "python", label: "Python", tags: [ "python" ], - icon: "font-icon icon-python" + icon: "icon-python" }, { id: "golang", label: "Go", tags: [ "golang", "go" ], - icon: "font-icon icon-go-gopher" + icon: "icon-go-gopher" } ] }, { id: "databases", @@ -279,22 +279,22 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { id: "mongodb", label: "Mongo", tags: [ "mongodb" ], - icon: "font-icon icon-mongodb" + icon: "icon-mongodb" }, { id: "mysql", label: "mySQL", tags: [ "mysql" ], - icon: "font-icon icon-mysql-database" + icon: "icon-mysql-database" }, { id: "postgresql", label: "Postgres", tags: [ "postgresql" ], - icon: "font-icon icon-postgresql" + icon: "icon-postgresql" }, { id: "mariadb", label: "MariaDB", tags: [ "mariadb" ], - icon: "font-icon icon-mariadb" + icon: "icon-mariadb" } ] }, { id: "middleware", @@ -323,7 +323,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { id: "jenkins", label: "Jenkins", tags: [ "jenkins" ], - icon: "font-icon icon-jenkins" + icon: "icon-jenkins" }, { id: "pipelines", label: "Pipelines", @@ -331,7 +331,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { icon: "fa fa-clone" } ] } ]; - n.set(window, "OPENSHIFT_CONSTANTS.SERVICE_CATALOG_CATEGORIES", a), n.set(window, "OPENSHIFT_CONSTANTS.SAAS_OFFERINGS", s); + n.set(window, "OPENSHIFT_CONSTANTS.SERVICE_CATALOG_CATEGORIES", s), n.set(window, "OPENSHIFT_CONSTANTS.SAAS_OFFERINGS", a); var o = { pod_presets: !1 }; @@ -428,9 +428,9 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { "use strict"; function n() { return function(e, t, r) { - var n, s = t || "project/"; - return n = i.isString(e) ? e : i.get(e, "metadata.name", ""), s.endsWith("/") || (s += "/"), - s + n + "/browse/secrets/" + r; + var n, a = t || "project/"; + return n = i.isString(e) ? e : i.get(e, "metadata.name", ""), a.endsWith("/") || (a += "/"), + a + n + "/browse/secrets/" + r; }; } t.__esModule = !0; @@ -626,19 +626,19 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { - function e(e, t, r, n, i, s) { + var n = r(1), i = r(0), a = function() { + function e(e, t, r, n, i, a) { this.vendors = [], this.$filter = e, this.$q = t, this.constants = r, this.apiService = n, - this.dataService = i, this.logger = s; + this.dataService = i, this.logger = a; } return e.prototype.getCatalogItems = function(e) { - var t = this, r = this.$q.defer(), n = {}, i = 0, s = 0, a = [], o = this.apiService.getPreferredVersion("clusterserviceclasses"); + var t = this, r = this.$q.defer(), n = {}, i = 0, a = 0, s = [], o = this.apiService.getPreferredVersion("clusterserviceclasses"); this.apiService.apiInfo(o) && (++i, this.dataService.list(o, {}).then(function(e) { n.serviceClasses = e.by("metadata.name"); }, function() { - a.push("service classes"); + s.push("service classes"); }).finally(function() { - t.returnCatalogItems(r, n, ++s, i, a); + t.returnCatalogItems(r, n, ++a, i, s); })), ++i; var c = this.apiService.getPreferredVersion("imagestreams"); if (this.dataService.list(c, { @@ -646,9 +646,9 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }).then(function(e) { n.imageStreams = e.by("metadata.name"); }, function() { - a.push("builder images"); + s.push("builder images"); }).finally(function() { - t.returnCatalogItems(r, n, ++s, i, a); + t.returnCatalogItems(r, n, ++a, i, s); }), e) { ++i; var l = this.apiService.getPreferredVersion("templates"); @@ -659,9 +659,9 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }).then(function(e) { n.templates = e.by("metadata.name"); }, function() { - a.push("templates"); + s.push("templates"); }).finally(function() { - t.returnCatalogItems(r, n, ++s, i, a); + t.returnCatalogItems(r, n, ++a, i, s); }); } return r.promise; @@ -673,40 +673,40 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, e.prototype.getProjectCatalogItems = function(e, t, r, n) { var i = this; void 0 === t && (t = !0), void 0 === r && (r = !0), void 0 === n && (n = !1); - var s = this.$q.defer(), a = { + var a = this.$q.defer(), s = { imageStreams: [], templates: [] }, o = 0, c = 0, l = []; return t && (o++, this.dataService.list("imagestreams", { namespace: e }).then(function(e) { - a.imageStreams = e.by("metadata.name"); + s.imageStreams = e.by("metadata.name"); }, function() { l.push("builder images"); }).finally(function() { - i.returnCatalogItems(s, a, ++c, o, l); + i.returnCatalogItems(a, s, ++c, o, l); })), r && (o++, this.dataService.list("templates", { namespace: e }, null, { partialObjectMetadataList: n }).then(function(e) { - a.templates = e.by("metadata.name"); + s.templates = e.by("metadata.name"); }, function() { l.push("templates"); }).finally(function() { - i.returnCatalogItems(s, a, ++c, o, l); - })), s.promise; + i.returnCatalogItems(a, s, ++c, o, l); + })), a.promise; }, e.prototype.convertToServiceItems = function(e, t, r) { - var n = this, s = i.map(e, function(e) { + var n = this, a = i.map(e, function(e) { return n.getServiceItem(e); }); - return s = s.concat(i.map(t, function(e) { + return a = a.concat(i.map(t, function(e) { return n.getImageItem(e); - })), s = s.concat(i.map(r, function(e) { + })), a = a.concat(i.map(r, function(e) { return n.getTemplateItem(e); - })), s = i.reject(s, function(e) { + })), a = i.reject(a, function(e) { return !e; - }), s = s.sort(function(e, t) { + }), a = a.sort(function(e, t) { var r = i.get(e, "name", "").localeCompare(i.get(t, "name", ""), void 0, { sensitivity: "base" }); @@ -715,9 +715,9 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { })), 0 === r && (r = i.get(e, "resource.metadata.name", "").localeCompare(i.get(t, "resource.metadata.name", ""), void 0, { sensitivity: "base" })), r; - }), this.categorizeItems(s), s; + }), this.categorizeItems(a), a; }, e.prototype.getServiceItem = function(e) { - return new a(e, this); + return new s(e, this); }, e.prototype.getImageItem = function(e) { var t = new o(e, this); return t.builderSpecTagName ? t : null; @@ -725,20 +725,22 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return new c(e, this); }, e.prototype.getPublisherSynonym = function(e) { return i.get(this.constants, [ "PUBLISHER_SYNONYMS", e ]) || e; + }, e.prototype.getImageForIconClass = function(e) { + return this.$filter("imageForIconClass")(e); }, e.prototype.categorizeItems = function(e) { - var t, r, s = this; + var t, r, a = this; this.categories = n.copy(this.constants.SERVICE_CATALOG_CATEGORIES), this.createAllAndOtherMainCategories(); - var a = i.head(this.categories), o = i.get(a, "subCategories[0]"), c = i.last(this.categories), l = i.get(c, "subCategories[0]"), d = {}; + var s = i.head(this.categories), o = i.get(s, "subCategories[0]"), c = i.last(this.categories), l = i.get(c, "subCategories[0]"), d = {}; i.each(e, function(e) { - e.vendor && (d[e.vendor] = !0), r = !1, i.each(s.categories, function(n) { - n.tags ? s.hasMatchingTags(n.tags, e.tags) && (r = s.categorizeItem(e, n, "all"), - t = s.filterSubCatsByTags(n.subCategories, e.tags), i.isEmpty(t) ? s.categorizeItem(e, n, "other") : i.each(t, function(t) { - s.categorizeItem(e, n, t); - })) : (t = s.filterSubCatsByTags(n.subCategories, e.tags), i.isEmpty(t) || (r = s.categorizeItem(e, n, "all"), + e.vendor && (d[e.vendor] = !0), r = !1, i.each(a.categories, function(n) { + n.tags ? a.hasMatchingTags(n.tags, e.tags) && (r = a.categorizeItem(e, n, "all"), + t = a.filterSubCatsByTags(n.subCategories, e.tags), i.isEmpty(t) ? a.categorizeItem(e, n, "other") : i.each(t, function(t) { + a.categorizeItem(e, n, t); + })) : (t = a.filterSubCatsByTags(n.subCategories, e.tags), i.isEmpty(t) || (r = a.categorizeItem(e, n, "all"), i.each(t, function(t) { - s.categorizeItem(e, n, t); + a.categorizeItem(e, n, t); }))); - }), r || s.categorizeItem(e, c, l), s.categorizeItem(e, a, o); + }), r || a.categorizeItem(e, c, l), a.categorizeItem(e, s, o); }), this.vendors = i.keys(d).sort(); }, e.prototype.categorizeItem = function(e, t, r) { return i.isString(r) && (r = this.getAllOrOtherSubCategory(t, r)), r.items = i.isArray(r.items) ? r.items.concat([ e ]) : [ e ], @@ -782,11 +784,11 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return i.filter(e, function(e) { return r.hasMatchingTags(e.tags, t); }); - }, e.prototype.returnCatalogItems = function(e, t, r, n, s) { + }, e.prototype.returnCatalogItems = function(e, t, r, n, a) { if (!(r < n)) { - s = i.size(s) ? "Unable to load all content for the catalog. Error loading " + this.formatArray(s) : null; - var a = this.convertToServiceItems(t.serviceClasses, t.imageStreams, t.templates); - e.resolve([ a, s ]); + a = i.size(a) ? "Unable to load all content for the catalog. Error loading " + this.formatArray(a) : null; + var s = this.convertToServiceItems(t.serviceClasses, t.imageStreams, t.templates); + e.resolve([ s, a ]); } }, e.prototype.formatArray = function(e) { var t = ""; @@ -794,16 +796,19 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { t + "."; }, e; }(); - s.$inject = [ "$filter", "$q", "Constants", "APIService", "DataService", "Logger" ], - t.CatalogService = s; - var a = function() { + a.$inject = [ "$filter", "$q", "Constants", "APIService", "DataService", "Logger" ], + t.CatalogService = a; + var s = function() { function e(e, t) { this.resource = e, this.catalogSrv = t, this.imageUrl = this.getImage(), this.iconClass = this.getIcon(), this.name = this.getName(), this.description = this.getDescription(), this.longDescription = this.getLongDescription(), this.tags = this.getTags(), this.kind = "ServiceClass", this.vendor = this.getVendor(); } return e.prototype.getImage = function() { - return i.get(this.resource, "spec.externalMetadata.imageUrl") || ""; + var e = i.get(this.resource, "spec.externalMetadata.imageUrl"); + if (e) return e; + var t = i.get(this.resource, [ "spec", "externalMetadata", "console.openshift.io/iconClass" ]); + return this.catalogSrv.getImageForIconClass(t); }, e.prototype.getIcon = function() { var e = i.get(this.resource, [ "spec", "externalMetadata", "console.openshift.io/iconClass" ]) || "fa fa-clone"; return e = -1 !== e.indexOf("icon-") ? "font-icon " + e : e; @@ -820,13 +825,13 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return this.catalogSrv.getPublisherSynonym(e); }, e; }(); - t.ServiceItem = a; + t.ServiceItem = s; var o = function() { function e(e, t) { this.resource = e, this.catalogSrv = t, this.builderSpecTagName = this.getBuilderSpecTagName(), - this.builderSpecTagName && (this.tags = this.getTags(), this.iconClass = this.getIcon(), - this.name = this.getName(), this.description = this.getDescription(), this.longDescription = this.getLongDescription(), - this.kind = "ImageStream", this.vendor = this.getVendor()); + this.builderSpecTagName && (this.tags = this.getTags(), this.imageUrl = this.getImage(), + this.iconClass = this.getIcon(), this.name = this.getName(), this.description = this.getDescription(), + this.longDescription = this.getLongDescription(), this.kind = "ImageStream", this.vendor = this.getVendor()); } return e.prototype.getBuilderSpecTagName = function() { var e, t = this; @@ -838,6 +843,9 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { })), e ? e.name : null) : null; }, e.prototype.getTags = function() { return this.catalogSrv.$filter("imageStreamTagTags")(this.resource, this.builderSpecTagName); + }, e.prototype.getImage = function() { + var e = this.catalogSrv.$filter("imageStreamTagIconClass")(this.resource, this.builderSpecTagName); + return this.catalogSrv.getImageForIconClass(e); }, e.prototype.getIcon = function() { var e = this.catalogSrv.$filter("imageStreamTagIconClass")(this.resource, this.builderSpecTagName); return e = -1 !== e.indexOf("icon-") ? "font-icon " + e : e; @@ -860,7 +868,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { this.tags = this.getTags(), this.kind = "Template", this.vendor = this.getVendor(); } return e.prototype.getImage = function() { - return ""; + var e = i.get(this.resource, "metadata.annotations.iconClass"); + return this.catalogSrv.getImageForIconClass(e); }, e.prototype.getIcon = function() { var e = i.get(this.resource, "metadata.annotations.iconClass", "fa fa-clone"); return e = -1 !== e.indexOf("icon-") ? "font-icon " + e : e; @@ -919,11 +928,11 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, function(e, t) { e.exports = '\n
\n \n \n \n {{$select.selected | displayName}}\n \n \x3c!-- refresh-delay must be set using ng-attr-refresh-delay to work as a dynamic value --\x3e\n \n \n \n \n \n \n \n \n
\n \n You are not authorized to add to this project.\n \n
\n
\n \n Please select or create a project.\n \n
\n
\n
\n\n\n
\n \n
\n \n
A unique name for the project.
\n
\n \n Name must have at least two characters.\n \n
\n
\n \n Project names may only contain lower-case letters, numbers, and dashes.\n They may not start or end with a dash.\n \n
\n
\n \n This name is already in use. Please choose a different name.\n \n
\n
\n
\n\n
\n \n \n
\n\n
\n \n \n
\n
\n'; }, function(e, t) { - e.exports = '
\n
\n
\n
\n
\n
\n

Browse Catalog

\n
\n \n \n
\n
\n \n\n
\n \x3c!-- Do not show sub-category items for \'All\' or \'Other\' main categories --\x3e\n \n\n \x3c!-- Show catalog item for \'All\' and \'Other\' main categories --\x3e\n
\n
\n
There are no catalog items.
\n \n \n \n
\n \n
\n
\n \n
\n
\n {{item.name}}\n
\n
\n
\n
\n
\n
\n
\n'; + e.exports = '
\n
\n
\n
\n
\n
\n

Browse Catalog

\n
\n \n \n
\n
\n \n\n
\n \x3c!-- Do not show sub-category items for \'All\' or \'Other\' main categories --\x3e\n \n\n \x3c!-- Show catalog item for \'All\' and \'Other\' main categories --\x3e\n
\n
\n
There are no catalog items.
\n \n \n \n
\n \n
\n
\n \n
\n
\n {{item.name}}\n
\n
\n
\n
\n
\n
\n
\n'; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { + var n = r(1), i = r(0), a = function() { function e(e, t) { var r = this; this.ctrl = this, this.onKeywordKeyPress = function(e) { @@ -1020,7 +1029,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }); }, e; }(); - s.$inject = [ "$scope", "Catalog" ], t.CatalogFilterController = s; + a.$inject = [ "$scope", "Catalog" ], t.CatalogFilterController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; @@ -1065,11 +1074,11 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { t.__esModule = !0; var n = r(0), i = function() { function e(e, t, r, n, i) { - var s = this; + var a = this; this.ctrl = this, this.loaded = !1, this.maxResultsToShow = 5, this.onKeyPress = function(e) { - 13 === e.which && s.ctrl.searchText && (s.$rootScope.$emit("filter-catalog-items", { - searchText: s.ctrl.searchText - }), s.ctrl.searchText = ""); + 13 === e.which && a.ctrl.searchText && (a.$rootScope.$emit("filter-catalog-items", { + searchText: a.ctrl.searchText + }), a.ctrl.searchText = ""); }, this.$rootScope = e, this.$scope = t, this.$q = r, this.Catalog = n, this.KeywordService = i; } return e.prototype.$onInit = function() { @@ -1087,28 +1096,28 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return e ? this.loaded ? this.filterForKeywords(e) : (this.searchDeferred = this.$q.defer(), this.searchDeferred.promise) : []; }, e.prototype.filterForKeywords = function(e) { - var t = this.KeywordService.generateKeywords(e), r = this.KeywordService.filterForKeywords(this.ctrl.catalogItems, [ "name", "tags" ], t), i = n.size(r), s = n.take(r, this.maxResultsToShow); - return 0 === i ? s.push({ + var t = this.KeywordService.generateKeywords(e), r = this.KeywordService.filterForKeywords(this.ctrl.catalogItems, [ "name", "tags" ], t), i = n.size(r), a = n.take(r, this.maxResultsToShow); + return 0 === i ? a.push({ id: "viewNone", text: "No results found for Keyword: " + e, name: e - }) : 1 === i ? s.push({ + }) : 1 === i ? a.push({ id: "viewAll", text: "View the result for Keyword: " + e, name: e - }) : i > 1 && s.push({ + }) : i > 1 && a.push({ id: "viewAll", text: "View all " + i + " results for Keyword: " + e, name: e - }), s; + }), a; }, e; }(); i.$inject = [ "$rootScope", "$scope", "$q", "Catalog", "KeywordService" ], t.CatalogSearchController = i; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = r(59), a = function() { - function e(e, t, r, n, s, a, o, c, l, d, p) { + var n = r(1), i = r(0), a = r(59), s = function() { + function e(e, t, r, n, a, s, o, c, l, d, p) { var h = this; this.ctrl = this, this.watches = [], this.clearValidityWatcher = function() { h.validityWatcher && (h.validityWatcher(), h.validityWatcher = void 0); @@ -1142,8 +1151,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, this.isServiceBindable = function(e) { var t, r = h.BindingService.getServiceClassForInstance(e, h.ctrl.serviceClasses), n = i.get(e, "spec.servicePlanRef.name"); return n && (t = h.ctrl.servicePlans[n]), h.BindingService.isServiceBindable(e, r, t); - }, this.$scope = e, this.$filter = t, this.$location = r, this.$q = n, this.BuilderAppService = s, - this.ProjectsService = a, this.DataService = o, this.APIService = c, this.BindingService = l, + }, this.$scope = e, this.$filter = t, this.$location = r, this.$q = n, this.BuilderAppService = a, + this.ProjectsService = s, this.DataService = o, this.APIService = c, this.BindingService = l, this.Logger = d, this.ctrl.serviceToBind = null, this.ctrl.showPodPresets = i.get(p, [ "ENABLE_TECH_PREVIEW_FEATURE", "pod_presets" ], !1); } return e.prototype.$onInit = function() { @@ -1204,7 +1213,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { this.ctrl.namePattern.test(e) && (this.ctrl.name = e); } }, e.prototype.navigateToAdvancedForm = function() { - var e = "project/{project}/create/fromimage?imageStream={imageStream}&imageTag={imageTag}&namespace={namespace}&displayName={displayName}&name={name}&sourceURI={sourceURI}&advanced=true", t = s.expand(e, { + var e = "project/{project}/create/fromimage?imageStream={imageStream}&imageTag={imageTag}&namespace={namespace}&displayName={displayName}&name={name}&sourceURI={sourceURI}&advanced=true", t = a.expand(e, { project: this.ctrl.selectedProject.metadata.name, imageStream: this.ctrl.imageStream.resource.metadata.name, imageTag: this.ctrl.istag.name, @@ -1223,14 +1232,14 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { i.each(n, function(n) { if (e.referencesSameImageStream(n)) return t[n.name] = n.from.name, e.ctrl.referencedBy[n.from.name] = e.ctrl.referencedBy[n.from.name] || [], void e.ctrl.referencedBy[n.from.name].push(n.name); - var s = i.get(n, "annotations.tags", ""), a = s.split(/\s*,\s*/); - i.includes(a, "builder") && !i.includes(a, "hidden") && (r[n.name] = n); + var a = i.get(n, "annotations.tags", ""), s = a.split(/\s*,\s*/); + i.includes(s, "builder") && !i.includes(s, "hidden") && (r[n.name] = n); }); - var s = [], a = i.get(this, "ctrl.imageStream.resource.status.tags", []); - return i.each(a, function(e) { + var a = [], s = i.get(this, "ctrl.imageStream.resource.status.tags", []); + return i.each(s, function(e) { var t = r[e.tag]; - t && s.push(t); - }), s; + t && a.push(t); + }), a; }, e.prototype.getImageStreamTag = function() { var e = this.ctrl.imageStream.resource.metadata.name + ":" + this.ctrl.istag.name; return this.DataService.get("imagestreamtags", e, { @@ -1242,8 +1251,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { e.sort(function(e, r) { var n = "True" === i.get(t(e, "Ready"), "status"); if (n === ("True" === i.get(t(r, "Ready"), "status"))) { - var s = i.get(e, "metadata.creationTimestamp"); - return i.get(r, "metadata.creationTimestamp").localeCompare(s); + var a = i.get(e, "metadata.creationTimestamp"); + return i.get(r, "metadata.creationTimestamp").localeCompare(a); } return n ? -1 : 1; }), this.ctrl.serviceInstances = e; @@ -1313,8 +1322,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { } }, e; }(); - a.$inject = [ "$scope", "$filter", "$location", "$q", "BuilderAppService", "ProjectsService", "DataService", "APIService", "BindingService", "Logger", "Constants" ], - t.CreateFromBuilderController = a; + s.$inject = [ "$scope", "$filter", "$location", "$q", "BuilderAppService", "ProjectsService", "DataService", "APIService", "BindingService", "Logger", "Constants" ], + t.CreateFromBuilderController = s; }, function(e, t, r) { "use strict"; t.__esModule = !0; @@ -1345,8 +1354,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { - function e(e, t, r, n, s, a, o, c, l) { + var n = r(1), i = r(0), a = function() { + function e(e, t, r, n, a, s, o, c, l) { var d = this; this.ctrl = this, this.watches = [], this.clearValidityWatcher = function() { d.validityWatcher && (d.validityWatcher(), d.validityWatcher = void 0), d.ctrl.reviewStep.allowed = !1; @@ -1404,7 +1413,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }); })); }, this.$scope = e, this.$filter = t, this.ApplicationsService = r, this.ProjectsService = n, - this.DataService = s, this.BindingService = a, this.Logger = o, this.ctrl.showPodPresets = i.get(c, [ "ENABLE_TECH_PREVIEW_FEATURE", "pod_presets" ], !1), + this.DataService = a, this.BindingService = s, this.Logger = o, this.ctrl.showPodPresets = i.get(c, [ "ENABLE_TECH_PREVIEW_FEATURE", "pod_presets" ], !1), this.DNS1123_SUBDOMAIN_VALIDATION = l; } return e.prototype.$onInit = function() { @@ -1482,17 +1491,17 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { this.ctrl.selectedPlan = e, this.ctrl.parameterData = {}, this.updateParameterSchema(e), this.updateBindability(); }, e.prototype.createService = function() { - var e = this, t = this.getParameters(), r = i.isEmpty(t) ? null : this.generateSecretName(), n = this.makeServiceInstance(r), s = { + var e = this, t = this.getParameters(), r = i.isEmpty(t) ? null : this.generateSecretName(), n = this.makeServiceInstance(r), a = { group: "servicecatalog.k8s.io", resource: "serviceinstances" - }, a = { + }, s = { namespace: this.ctrl.selectedProject.metadata.name }; - this.DataService.create(s, null, n, a).then(function(n) { - if (e.ctrl.orderInProgress = !0, e.watchResults(s, n, a), e.ctrl.serviceInstance = n, + this.DataService.create(a, null, n, s).then(function(n) { + if (e.ctrl.orderInProgress = !0, e.watchResults(a, n, s), e.ctrl.serviceInstance = n, r) { var o = e.makeParametersSecret(r, t, n); - e.DataService.create("secrets", null, o, a).then(i.noop, function(t) { + e.DataService.create("secrets", null, o, s).then(i.noop, function(t) { e.ctrl.error = i.get(t, "data"); }); } @@ -1587,12 +1596,12 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return !this.ctrl.selectedProject || !i.has(this.ctrl.selectedProject, "metadata.uid"); }, e; }(); - s.$inject = [ "$scope", "$filter", "ApplicationsService", "ProjectsService", "DataService", "BindingService", "Logger", "Constants", "DNS1123_SUBDOMAIN_VALIDATION" ], - t.OrderServiceController = s; + a.$inject = [ "$scope", "$filter", "ApplicationsService", "ProjectsService", "DataService", "BindingService", "Logger", "Constants", "DNS1123_SUBDOMAIN_VALIDATION" ], + t.OrderServiceController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(2), s = function() { + var n = r(1), i = r(2), a = function() { function e() { var e = this; this.ctrl = this, this.closePanel = function() { @@ -1611,12 +1620,12 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { i("body").removeClass("overlay-open"); }, e; }(); - t.OverlayPanelController = s; + t.OverlayPanelController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { - function e(t, r, s, a, o, c, l, d, p, h, m) { + var n = r(1), i = r(0), a = function() { + function e(t, r, a, s, o, c, l, d, p, h, m) { var u = this; this.ctrl = this, this.newProjectPanelShown = !1, this.editProjectPanelShown = !1, this.projects = [], this.watches = [], this.maxDisplayProjects = 5, this.watchingProjects = !1, @@ -1655,7 +1664,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { u.ctrl.editProjectPanelShown = !1, u.watchingProjects || u.ProjectsService.list().then(u.onProjectsUpdate); }, this.onDeleteProject = function() { u.watchingProjects || u.ProjectsService.list().then(u.onProjectsUpdate); - }, this.$filter = t, this.$rootScope = r, this.$scope = s, this.$window = a, this.AuthService = o, + }, this.$filter = t, this.$rootScope = r, this.$scope = a, this.$window = s, this.AuthService = o, this.Constants = c, this.DataService = l, this.Logger = d, this.ProjectsService = p, this.RecentlyViewedProjectsService = h, this.RecentlyViewedItems = m; } @@ -1673,10 +1682,10 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return 0 !== t.status && (n += " (" + t.status + ")"), void e.Logger.warn(n); } if (r.details) { - var s = []; + var a = []; i.forEach(r.details.causes || [], function(e) { - e.message && s.push(e.message); - }), s.length > 0 && (e.ctrl.newProjectMessage = s.join("\n")); + e.message && a.push(e.message); + }), a.length > 0 && (e.ctrl.newProjectMessage = a.join("\n")); } }).finally(function() { e.init(); @@ -1711,12 +1720,12 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { } }, e; }(); - s.$inject = [ "$filter", "$rootScope", "$scope", "$window", "AuthService", "Constants", "DataService", "Logger", "ProjectsService", "RecentlyViewedProjectsService", "RecentlyViewedServiceItems" ], - s.MAX_PROJETS_TO_WATCH = 250, t.ProjectsSummaryController = s; + a.$inject = [ "$filter", "$rootScope", "$scope", "$window", "AuthService", "Constants", "DataService", "Logger", "ProjectsService", "RecentlyViewedProjectsService", "RecentlyViewedServiceItems" ], + a.MAX_PROJETS_TO_WATCH = 250, t.ProjectsSummaryController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { + var n = r(1), i = r(0), a = function() { function e(e, t, r, n) { var i = this; this.ctrl = this, this.onWindowResize = function() { @@ -1744,12 +1753,12 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { this.ctrl.itemsOverflow = t > 4 || t > 2 && e < this.BREAKPOINTS.screenLgMin; }, e; }(); - s.$inject = [ "$scope", "$window", "$element", "BREAKPOINTS" ], t.SaasListController = s; + a.$inject = [ "$scope", "$window", "$element", "BREAKPOINTS" ], t.SaasListController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = function() { - function e(t, r, n, s, a, o, c) { + var n = r(1), i = r(0), a = function() { + function e(t, r, n, a, s, o, c) { var l = this; this.ctrl = this, this.getProjectChoices = function() { return l.ctrl.matchingProjects ? l.ctrl.matchingProjects : l.largeProjectList ? [] : l.projects; @@ -1759,8 +1768,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { var r; r = l.lastSearch && t.startsWith(l.lastSearch) ? l.lastResults : l.projects, l.lastSearch = t, l.lastResults = l.filterProjects(t, r), l.ctrl.matchingProjects = i.take(l.lastResults, e.LARGE_PROJECT_LIST_SIZE); - }, this.$filter = t, this.AuthService = r, this.AuthorizationService = n, this.KeywordService = s, - this.Logger = a, this.ProjectsService = o, this.RecentlyViewedProjectsService = c, + }, this.$filter = t, this.AuthService = r, this.AuthorizationService = n, this.KeywordService = a, + this.Logger = s, this.ProjectsService = o, this.RecentlyViewedProjectsService = c, this.largeProjectList = !1, this.lastSearch = "", this.lastResults = []; } return e.prototype.$onInit = function() { @@ -1817,13 +1826,13 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }); }, e; }(); - s.$inject = [ "$filter", "AuthService", "AuthorizationService", "KeywordService", "Logger", "ProjectsService", "RecentlyViewedProjectsService" ], - s.LARGE_PROJECT_LIST_SIZE = 500, t.SelectProjectController = s; + a.$inject = [ "$filter", "AuthService", "AuthorizationService", "KeywordService", "Logger", "ProjectsService", "RecentlyViewedProjectsService" ], + a.LARGE_PROJECT_LIST_SIZE = 500, t.SelectProjectController = a; }, function(e, t, r) { "use strict"; t.__esModule = !0; - var n = r(1), i = r(0), s = r(2), a = function() { - function e(e, t, r, n, s, a, o, c, l, d) { + var n = r(1), i = r(0), a = r(2), s = function() { + function e(e, t, r, n, a, s, o, c, l, d) { var p = this; this.ctrl = this, this.previousSubCategoryHeight = 0, this.resizeRetries = 0, this.serviceViewItemClicked = function(e, t) { p.$scope.$emit("open-overlay-panel", e); @@ -1839,7 +1848,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { } }), p.ctrl.filterConfig.resultsCount = p.ctrl.filteredItems.length, p.ctrl.keywordFilterValue = null; }, this.constants = e, this.catalog = t, this.keywordService = r, this.logger = n, - this.htmlService = s, this.element = a[0], this.$filter = o, this.$rootScope = c, + this.htmlService = a, this.element = s[0], this.$filter = o, this.$rootScope = c, this.$scope = l, this.$timeout = d, this.ctrl.loaded = !1, this.ctrl.isEmpty = !1, this.ctrl.mobileView = "categories", this.ctrl.filterConfig = {}, this.ctrl.keywordFilterValue = null; } @@ -1849,7 +1858,7 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { return e.resizeExpansion(!1); }, 50, { maxWait: 250 - }), n.element(window).bind("resize", this.debounceResize), s(window).on("resize.services", this.debounceResize), + }), n.element(window).bind("resize", this.debounceResize), a(window).on("resize.services", this.debounceResize), this.removeFilterListener = this.$rootScope.$on("filter-catalog-items", function(t, r) { e.ctrl.keywordFilterValue = r.searchText, e.ctrl.currentFilter = e.ctrl.currentSubFilter = "all", e.ctrl.mobileView = "subcategories"; @@ -1866,11 +1875,11 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { "min-height": "calc(100vh - " + this.scrollParent.getBoundingClientRect().top + "px)" }); }, e.prototype.$onDestroy = function() { - s(window).off("resize.services"), this.removeFilterListener(); + a(window).off("resize.services"), this.removeFilterListener(); }, e.prototype.selectCategory = function(e) { if (this.ctrl.mobileView = "subcategories", this.clearAppliedFilters(), this.filterByCategory(e, null, !0), this.scrollParent) { - var t = s(this.scrollParent); + var t = a(this.scrollParent); t.scrollTop() !== this.element.offsetTop && t.animate({ scrollTop: this.element.offsetTop }, 200); @@ -1888,14 +1897,14 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }, e.prototype.applyFilters = function(e) { this.filterChange(e.appliedFilters); }, e.prototype.filterByCategory = function(e, t, r) { - var n, s; + var n, a; "all" === e || "other" === e ? t = "all" : (r && (this.ctrl.subCategories = this.getSubCategories(e)), t = 1 === this.ctrl.subCategories.length ? this.ctrl.subCategories[0].id : t || null), n = i.find(this.ctrl.categories, { id: e - }), n ? t && (s = i.find(n.subCategories, { + }), n ? t && (a = i.find(n.subCategories, { id: t - }), s ? (this.ctrl.filteredItems = s.items, this.ctrl.filterConfig.totalCount = this.ctrl.filteredItems.length, + }), a ? (this.ctrl.filteredItems = a.items, this.ctrl.filterConfig.totalCount = this.ctrl.filteredItems.length, this.ctrl.filterConfig.resultsCount = this.ctrl.filterConfig.totalCount) : this.logger.error("Could not find subcategory '" + t + "' for category '" + e + "'")) : this.logger.error("Could not find category '" + e + "'"), this.ctrl.currentFilter = e, this.ctrl.currentSubFilter = t, this.updateActiveCardStyles(); }, e.prototype.filterForKeywords = function(e, t) { @@ -1915,16 +1924,16 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { var r = this; if ("all" !== this.ctrl.currentFilter && "other" !== this.ctrl.currentFilter && this.ctrl.currentSubFilter && this.htmlService.isWindowAboveBreakpoint(this.htmlService.WINDOW_SIZE_XS)) { if (this.resizeRetries > e.MAX_RESIZE_RETRIES) return void (this.resizeRetries = 0); - var n = s("#" + this.ctrl.currentSubFilter), i = n.find(".services-items"), a = i.outerHeight(!0); - a || (this.resizeRetries++, setTimeout(function() { + var n = a("#" + this.ctrl.currentSubFilter), i = n.find(".services-items"), s = i.outerHeight(!0); + s || (this.resizeRetries++, setTimeout(function() { return r.resizeExpansion(t); - }, 50)), t ? (s(".services-sub-category").removeAttr("style").removeClass("items-shown"), + }, 50)), t ? (a(".services-sub-category").removeAttr("style").removeClass("items-shown"), n.css("margin-bottom", this.previousSubCategoryHeight + "px"), n.animate({ - "margin-bottom": a + "margin-bottom": s }, 100, "swing", function() { n.addClass("items-shown"); - })) : (n.css("margin-bottom", a + "px"), n.addClass("items-shown")), this.previousSubCategoryHeight = a; - } else s(".services-sub-category").removeAttr("style").removeClass("items-shown"), + })) : (n.css("margin-bottom", s + "px"), n.addClass("items-shown")), this.previousSubCategoryHeight = s; + } else a(".services-sub-category").removeAttr("style").removeClass("items-shown"), this.previousSubCategoryHeight = 0, this.resizeRetries = 0; this.$scope.$evalAsync(function() { r.scrollParent = r.getScrollParent(r.element), r.htmlService.isWindowAboveBreakpoint(r.htmlService.WINDOW_SIZE_SM) && r.scrollParent ? r.ctrl.viewStyle = { @@ -1938,8 +1947,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { }); }, e; }(); - a.$inject = [ "Constants", "Catalog", "KeywordService", "Logger", "HTMLService", "$element", "$filter", "$rootScope", "$scope", "$timeout" ], - a.MAX_RESIZE_RETRIES = 20, t.ServicesViewController = a; + s.$inject = [ "Constants", "Catalog", "KeywordService", "Logger", "HTMLService", "$element", "$filter", "$rootScope", "$scope", "$timeout" ], + s.MAX_RESIZE_RETRIES = 20, t.ServicesViewController = s; }, function(e, t) { e.exports = URI; }, function(e, t, r) { @@ -1947,8 +1956,8 @@ webpackJsonp([ 0, 1 ], [ function(e, t) { t.__esModule = !0; var n = r(1); r(3), r(31); - var i = r(32), s = r(33), a = r(34), o = r(21), c = r(22), l = r(35), d = r(23), p = r(24), h = r(25), m = r(26), u = r(27), g = r(28), f = r(29), v = r(30), y = r(36), b = r(20); - t.webCatalog = "webCatalog", n.module(t.webCatalog, [ "patternfly", "ngAnimate", "ui.bootstrap", "angularMoment", "ui.select", "schemaForm" ]).service("BuilderAppService", a.BuilderAppService).service("Catalog", l.CatalogService).service("RecentlyViewedServiceItems", y.RecentlyViewedServiceItems).filter("projectUrl", i.projectUrlFilter).filter("secretUrl", s.secretUrlFilter).component("catalogParameters", o.catalogParameters).component("catalogSearch", c.catalogSearch).component("createFromBuilder", d.createFromBuilder).component("landingPage", p.landingPage).component("orderService", h.orderService).component("overlayPanel", m.overlayPanel).component("projectsSummary", u.projectsSummary).component("saasList", g.saasList).component("selectProject", f.selectProject).component("servicesView", v.servicesView).component("catalogFilter", b.catalogFilter).run([ "$templateCache", function(e) { + var i = r(32), a = r(33), s = r(34), o = r(21), c = r(22), l = r(35), d = r(23), p = r(24), h = r(25), m = r(26), u = r(27), g = r(28), f = r(29), v = r(30), y = r(36), b = r(20); + t.webCatalog = "webCatalog", n.module(t.webCatalog, [ "patternfly", "ngAnimate", "ui.bootstrap", "angularMoment", "ui.select", "schemaForm" ]).service("BuilderAppService", s.BuilderAppService).service("Catalog", l.CatalogService).service("RecentlyViewedServiceItems", y.RecentlyViewedServiceItems).filter("projectUrl", i.projectUrlFilter).filter("secretUrl", a.secretUrlFilter).component("catalogParameters", o.catalogParameters).component("catalogSearch", c.catalogSearch).component("createFromBuilder", d.createFromBuilder).component("landingPage", p.landingPage).component("orderService", h.orderService).component("overlayPanel", m.overlayPanel).component("projectsSummary", u.projectsSummary).component("saasList", g.saasList).component("selectProject", f.selectProject).component("servicesView", v.servicesView).component("catalogFilter", b.catalogFilter).run([ "$templateCache", function(e) { e.put("catalog-search/catalog-search-result.html", r(4)), e.put("create-from-builder/create-from-builder-info.html", r(7)), e.put("create-from-builder/create-from-builder-configure.html", r(6)), e.put("create-from-builder/create-from-builder-bind.html", r(5)), e.put("create-from-builder/create-from-builder-results.html", r(8)), e.put("order-service/order-service-info.html", r(12)), diff --git a/src/components/create-from-builder/create-from-builder-info.html b/src/components/create-from-builder/create-from-builder-info.html index f7e6496f..7655b0fa 100644 --- a/src/components/create-from-builder/create-from-builder-info.html +++ b/src/components/create-from-builder/create-from-builder-info.html @@ -1,7 +1,8 @@
- + +
diff --git a/src/components/services-view/services-view.html b/src/components/services-view/services-view.html index d210128b..6ab5b8bf 100644 --- a/src/components/services-view/services-view.html +++ b/src/components/services-view/services-view.html @@ -60,10 +60,12 @@

Browse Catalog

ng-class="{ active: $ctrl.currentSubFilter === subCategory.id }"> -
- +
+
-
+
{{subCategory.label}}
Back diff --git a/src/constants.ts b/src/constants.ts index b1e72a67..e9d4dfb2 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -20,20 +20,20 @@ var saasOfferings: any = [ var categories: any = [ {id: 'languages', label: 'Languages', subCategories: [ - {id: 'java', label: 'Java', tags: ['java'], icon: 'font-icon icon-openjdk'}, - {id: 'javascript', tags: ['javascript', 'nodejs', 'js'], label: 'JavaScript', icon: 'font-icon icon-js'}, - {id: 'dotnet', label: '.NET', tags: ['dotnet'], icon: 'font-icon icon-dotnet'}, - {id: 'perl', label: 'Perl', tags: ['perl'], icon: 'font-icon icon-perl'}, - {id: 'ruby', label: 'Ruby', tags: ['ruby'], icon: 'font-icon icon-ruby'}, - {id: 'php', label: 'PHP', tags: ['php'], icon: 'font-icon icon-php'}, - {id: 'python', label: 'Python', tags: ['python'], icon: 'font-icon icon-python'}, - {id: 'golang', label: 'Go', tags: ['golang', 'go'], icon: 'font-icon icon-go-gopher'} + {id: 'java', label: 'Java', tags: ['java'], icon: 'icon-openjdk'}, + {id: 'javascript', tags: ['javascript', 'nodejs', 'js'], label: 'JavaScript', icon: 'icon-js'}, + {id: 'dotnet', label: '.NET', tags: ['dotnet'], icon: 'icon-dotnet'}, + {id: 'perl', label: 'Perl', tags: ['perl'], icon: 'icon-perl'}, + {id: 'ruby', label: 'Ruby', tags: ['ruby'], icon: 'icon-ruby'}, + {id: 'php', label: 'PHP', tags: ['php'], icon: 'icon-php'}, + {id: 'python', label: 'Python', tags: ['python'], icon: 'icon-python'}, + {id: 'golang', label: 'Go', tags: ['golang', 'go'], icon: 'icon-go-gopher'}, ]}, {id: 'databases', label: 'Databases', subCategories: [ - {id: 'mongodb', label: 'Mongo', tags: ['mongodb'], icon: 'font-icon icon-mongodb'}, - {id: 'mysql', label: 'mySQL', tags: ['mysql'], icon: 'font-icon icon-mysql-database'}, - {id: 'postgresql', label: 'Postgres', tags: ['postgresql'], icon: 'font-icon icon-postgresql'}, - {id: 'mariadb', label: 'MariaDB', tags: ['mariadb'], icon: 'font-icon icon-mariadb'} + {id: 'mongodb', label: 'Mongo', tags: ['mongodb'], icon: 'icon-mongodb'}, + {id: 'mysql', label: 'mySQL', tags: ['mysql'], icon: 'icon-mysql-database'}, + {id: 'postgresql', label: 'Postgres', tags: ['postgresql'], icon: 'icon-postgresql'}, + {id: 'mariadb', label: 'MariaDB', tags: ['mariadb'], icon: 'icon-mariadb'} ]}, {id: 'middleware', label: 'Middleware', subCategories: [ {id: 'integration', label: 'Integration', tags: ['amq', 'fuse', 'jboss-fuse', 'sso']}, @@ -42,7 +42,7 @@ var categories: any = [ {id: 'runtimes', label: 'Runtimes & Frameworks', tags: ['eap', 'httpd', 'tomcat']} ]}, {id: 'cicd', label: 'CI/CD', subCategories: [ - {id: 'jenkins', label: 'Jenkins', tags: ['jenkins'], icon: 'font-icon icon-jenkins'}, + {id: 'jenkins', label: 'Jenkins', tags: ['jenkins'], icon: 'icon-jenkins'}, {id: 'pipelines', label: 'Pipelines', tags: ['pipelines'], icon: 'fa fa-clone'} ]} ]; diff --git a/src/services/catalog.service.ts b/src/services/catalog.service.ts index baaec4b5..e333fd2a 100644 --- a/src/services/catalog.service.ts +++ b/src/services/catalog.service.ts @@ -173,6 +173,10 @@ export class CatalogService { static $inject = ['$filter', '$q', 'Constants', 'A return _.get(this.constants, ['PUBLISHER_SYNONYMS', rawVendor]) as string || rawVendor; } + public getImageForIconClass(iconClass: string): string { + return this.$filter('imageForIconClass')(iconClass) as string; + } + /** * Creates an items array under each sub-category and categorizes each * item accordingly. Dynamically creates 'all' and 'other' main and sub- @@ -353,7 +357,14 @@ export class ServiceItem implements IServiceItem { } private getImage(): string { - return _.get(this.resource, 'spec.externalMetadata.imageUrl') as string || ''; + let image: string = _.get(this.resource, 'spec.externalMetadata.imageUrl') as string; + if (image) { + return image; + } + + + let iconClass: string = _.get(this.resource, ['spec', 'externalMetadata', 'console.openshift.io/iconClass']) as string; + return this.catalogSrv.getImageForIconClass(iconClass); } private getIcon(): string { @@ -404,6 +415,7 @@ export class ImageItem implements IServiceItem { this.builderSpecTagName = this.getBuilderSpecTagName(); if (this.builderSpecTagName) { this.tags = this.getTags(); + this.imageUrl = this.getImage(); this.iconClass = this.getIcon(); this.name = this.getName(); this.description = this.getDescription(); @@ -442,6 +454,11 @@ export class ImageItem implements IServiceItem { return this.catalogSrv.$filter('imageStreamTagTags')(this.resource, this.builderSpecTagName); } + private getImage() { + let iconClass = this.catalogSrv.$filter('imageStreamTagIconClass')(this.resource, this.builderSpecTagName); + return this.catalogSrv.getImageForIconClass(iconClass); + } + private getIcon() { let icon = this.catalogSrv.$filter('imageStreamTagIconClass')(this.resource, this.builderSpecTagName); icon = (icon.indexOf('icon-') !== -1) ? 'font-icon ' + icon : icon; @@ -495,7 +512,9 @@ export class TemplateItem implements IServiceItem { } private getImage() { - return ''; + // Show images instead for some icon classes that we recognize. + let iconClass = _.get(this.resource, 'metadata.annotations.iconClass') as string; + return this.catalogSrv.getImageForIconClass(iconClass); } private getIcon() { diff --git a/src/styles/order-service.less b/src/styles/order-service.less index c479d6c8..380f0598 100644 --- a/src/styles/order-service.less +++ b/src/styles/order-service.less @@ -18,6 +18,12 @@ max-height: 60px; max-width: 60px; } + &[src$=".svg"] { + height: 52px; + @media (min-width: @order-service-title-sm-min) { + height: 60px; + } + } } } }