diff --git a/app/images/logos/aerogear.svg b/app/images/logos/aerogear.svg new file mode 100755 index 0000000000..083202fc71 --- /dev/null +++ b/app/images/logos/aerogear.svg @@ -0,0 +1,48 @@ + + + + + + + + diff --git a/app/images/logos/angularjs.svg b/app/images/logos/angularjs.svg new file mode 100755 index 0000000000..91cc37dc05 --- /dev/null +++ b/app/images/logos/angularjs.svg @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/app/images/logos/ansible.svg b/app/images/logos/ansible.svg new file mode 100755 index 0000000000..6285967f78 --- /dev/null +++ b/app/images/logos/ansible.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/app/images/logos/apache.svg b/app/images/logos/apache.svg new file mode 100755 index 0000000000..71d485042a --- /dev/null +++ b/app/images/logos/apache.svg @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/beaker.svg b/app/images/logos/beaker.svg new file mode 100755 index 0000000000..1325ac6d48 --- /dev/null +++ b/app/images/logos/beaker.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/capedwarf.svg b/app/images/logos/capedwarf.svg new file mode 100755 index 0000000000..12a0a53cee --- /dev/null +++ b/app/images/logos/capedwarf.svg @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/cassandra.svg b/app/images/logos/cassandra.svg new file mode 100755 index 0000000000..4ad581d7bc --- /dev/null +++ b/app/images/logos/cassandra.svg @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/clojure.svg b/app/images/logos/clojure.svg new file mode 100755 index 0000000000..fc127083b6 --- /dev/null +++ b/app/images/logos/clojure.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/app/images/logos/codeigniter.svg b/app/images/logos/codeigniter.svg new file mode 100755 index 0000000000..bb62bf2dd5 --- /dev/null +++ b/app/images/logos/codeigniter.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/app/images/logos/django.svg b/app/images/logos/django.svg new file mode 100755 index 0000000000..7206611b64 --- /dev/null +++ b/app/images/logos/django.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/app/images/logos/dotnet.svg b/app/images/logos/dotnet.svg new file mode 100755 index 0000000000..b0f3d083a9 --- /dev/null +++ b/app/images/logos/dotnet.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/app/images/logos/drupal.svg b/app/images/logos/drupal.svg new file mode 100755 index 0000000000..39515e529f --- /dev/null +++ b/app/images/logos/drupal.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/elastic.svg b/app/images/logos/elastic.svg new file mode 100755 index 0000000000..5f4a663568 --- /dev/null +++ b/app/images/logos/elastic.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/erlang.svg b/app/images/logos/erlang.svg new file mode 100755 index 0000000000..1bf39338b6 --- /dev/null +++ b/app/images/logos/erlang.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/git.svg b/app/images/logos/git.svg new file mode 100755 index 0000000000..85fc710297 --- /dev/null +++ b/app/images/logos/git.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/github.svg b/app/images/logos/github.svg new file mode 100755 index 0000000000..527cd84547 --- /dev/null +++ b/app/images/logos/github.svg @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/images/logos/gitlab.svg b/app/images/logos/gitlab.svg new file mode 100755 index 0000000000..7ae9489f14 --- /dev/null +++ b/app/images/logos/gitlab.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/glassfish.svg b/app/images/logos/glassfish.svg new file mode 100755 index 0000000000..6a0737ea3f --- /dev/null +++ b/app/images/logos/glassfish.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + diff --git a/app/images/logos/go-gopher.svg b/app/images/logos/go-gopher.svg new file mode 100755 index 0000000000..2ae50a9e11 --- /dev/null +++ b/app/images/logos/go-gopher.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/grails.svg b/app/images/logos/grails.svg new file mode 100755 index 0000000000..7a5acc3970 --- /dev/null +++ b/app/images/logos/grails.svg @@ -0,0 +1,24 @@ + + + + + + diff --git a/app/images/logos/hadoop.svg b/app/images/logos/hadoop.svg new file mode 100755 index 0000000000..c5f60ff6fe --- /dev/null +++ b/app/images/logos/hadoop.svg @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/haproxy.svg b/app/images/logos/haproxy.svg new file mode 100755 index 0000000000..c7d8076bb4 --- /dev/null +++ b/app/images/logos/haproxy.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/infinispan.svg b/app/images/logos/infinispan.svg new file mode 100755 index 0000000000..cfbef0b7e2 --- /dev/null +++ b/app/images/logos/infinispan.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/jboss.svg b/app/images/logos/jboss.svg new file mode 100755 index 0000000000..cd6ffdc731 --- /dev/null +++ b/app/images/logos/jboss.svg @@ -0,0 +1,89 @@ + + + + + diff --git a/app/images/logos/jenkins.svg b/app/images/logos/jenkins.svg new file mode 100755 index 0000000000..b859632881 --- /dev/null +++ b/app/images/logos/jenkins.svg @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/jetty.svg b/app/images/logos/jetty.svg new file mode 100755 index 0000000000..eaad0a5f81 --- /dev/null +++ b/app/images/logos/jetty.svg @@ -0,0 +1,72 @@ + + + + + + + + + + diff --git a/app/images/logos/joomla.svg b/app/images/logos/joomla.svg new file mode 100755 index 0000000000..a24662a717 --- /dev/null +++ b/app/images/logos/joomla.svg @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/app/images/logos/jruby.svg b/app/images/logos/jruby.svg new file mode 100755 index 0000000000..6aa51d22d9 --- /dev/null +++ b/app/images/logos/jruby.svg @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/app/images/logos/js.svg b/app/images/logos/js.svg new file mode 100755 index 0000000000..463aa132c3 --- /dev/null +++ b/app/images/logos/js.svg @@ -0,0 +1,14 @@ + + + + + + + diff --git a/app/images/logos/laravel.svg b/app/images/logos/laravel.svg new file mode 100755 index 0000000000..777c41acb3 --- /dev/null +++ b/app/images/logos/laravel.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/app/images/logos/load-balancer.svg b/app/images/logos/load-balancer.svg new file mode 100755 index 0000000000..39ea851dba --- /dev/null +++ b/app/images/logos/load-balancer.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/app/images/logos/mariadb.svg b/app/images/logos/mariadb.svg new file mode 100755 index 0000000000..edbeaa0563 --- /dev/null +++ b/app/images/logos/mariadb.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + diff --git a/app/images/logos/mediawiki.svg b/app/images/logos/mediawiki.svg new file mode 100755 index 0000000000..30e00d5963 --- /dev/null +++ b/app/images/logos/mediawiki.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/memcached.svg b/app/images/logos/memcached.svg new file mode 100755 index 0000000000..7df732a6b2 --- /dev/null +++ b/app/images/logos/memcached.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/mongodb.svg b/app/images/logos/mongodb.svg new file mode 100755 index 0000000000..ddb570aaa7 --- /dev/null +++ b/app/images/logos/mongodb.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/mysql-database.svg b/app/images/logos/mysql-database.svg new file mode 100755 index 0000000000..bc4bcccba1 --- /dev/null +++ b/app/images/logos/mysql-database.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/nginx.svg b/app/images/logos/nginx.svg new file mode 100755 index 0000000000..1369ae014e --- /dev/null +++ b/app/images/logos/nginx.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/nodejs.svg b/app/images/logos/nodejs.svg new file mode 100755 index 0000000000..ae638fe3b8 --- /dev/null +++ b/app/images/logos/nodejs.svg @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/openjdk.svg b/app/images/logos/openjdk.svg new file mode 100755 index 0000000000..db17c75456 --- /dev/null +++ b/app/images/logos/openjdk.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/openstack.svg b/app/images/logos/openstack.svg new file mode 100755 index 0000000000..b7d008f102 --- /dev/null +++ b/app/images/logos/openstack.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/app/images/logos/perl.svg b/app/images/logos/perl.svg new file mode 100755 index 0000000000..f8c5bd5bb3 --- /dev/null +++ b/app/images/logos/perl.svg @@ -0,0 +1,57 @@ + + + + + + diff --git a/app/images/logos/phalcon.svg b/app/images/logos/phalcon.svg new file mode 100755 index 0000000000..5ad8144137 --- /dev/null +++ b/app/images/logos/phalcon.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/php.svg b/app/images/logos/php.svg new file mode 100755 index 0000000000..d13278f77d --- /dev/null +++ b/app/images/logos/php.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/play.svg b/app/images/logos/play.svg new file mode 100755 index 0000000000..257f52238b --- /dev/null +++ b/app/images/logos/play.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/app/images/logos/postgresql.svg b/app/images/logos/postgresql.svg new file mode 100755 index 0000000000..b80d8d3b8c --- /dev/null +++ b/app/images/logos/postgresql.svg @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/python.svg b/app/images/logos/python.svg new file mode 100755 index 0000000000..e2d74f2c41 --- /dev/null +++ b/app/images/logos/python.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/rabbitmq.svg b/app/images/logos/rabbitmq.svg new file mode 100755 index 0000000000..10532897e2 --- /dev/null +++ b/app/images/logos/rabbitmq.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/app/images/logos/rails.svg b/app/images/logos/rails.svg new file mode 100755 index 0000000000..890b3f1ad2 --- /dev/null +++ b/app/images/logos/rails.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/redis.svg b/app/images/logos/redis.svg new file mode 100755 index 0000000000..a1e677cecd --- /dev/null +++ b/app/images/logos/redis.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/app/images/logos/ruby.svg b/app/images/logos/ruby.svg new file mode 100755 index 0000000000..08ec0d59a7 --- /dev/null +++ b/app/images/logos/ruby.svg @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/scala.svg b/app/images/logos/scala.svg new file mode 100755 index 0000000000..3b33043b33 --- /dev/null +++ b/app/images/logos/scala.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/shadowman.svg b/app/images/logos/shadowman.svg new file mode 100755 index 0000000000..0af1f8925c --- /dev/null +++ b/app/images/logos/shadowman.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + diff --git a/app/images/logos/spring.svg b/app/images/logos/spring.svg new file mode 100755 index 0000000000..06f412772f --- /dev/null +++ b/app/images/logos/spring.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/app/images/logos/stackoverflow.svg b/app/images/logos/stackoverflow.svg new file mode 100755 index 0000000000..aa2f0e2f75 --- /dev/null +++ b/app/images/logos/stackoverflow.svg @@ -0,0 +1,13 @@ + + + + + + + diff --git a/app/images/logos/symfony.svg b/app/images/logos/symfony.svg new file mode 100755 index 0000000000..a8f473321e --- /dev/null +++ b/app/images/logos/symfony.svg @@ -0,0 +1 @@ +symfony \ No newline at end of file diff --git a/app/images/logos/tomcat.svg b/app/images/logos/tomcat.svg new file mode 100755 index 0000000000..325acd5f03 --- /dev/null +++ b/app/images/logos/tomcat.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/wildfly.svg b/app/images/logos/wildfly.svg new file mode 100755 index 0000000000..322c7f065f --- /dev/null +++ b/app/images/logos/wildfly.svg @@ -0,0 +1,337 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/logos/wordpress.svg b/app/images/logos/wordpress.svg new file mode 100755 index 0000000000..44b45b7c26 --- /dev/null +++ b/app/images/logos/wordpress.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/app/images/logos/zend.svg b/app/images/logos/zend.svg new file mode 100755 index 0000000000..552185031e --- /dev/null +++ b/app/images/logos/zend.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/app/scripts/constants.js b/app/scripts/constants.js index 214ad92b90..5f04e13266 100644 --- a/app/scripts/constants.js +++ b/app/scripts/constants.js @@ -560,5 +560,69 @@ angular.extend(window.OPENSHIFT_CONSTANTS, { // Example quota messages to show in notification drawer // "pods": "Upgrade to OpenShift Pro if you need additional resources.", // "limits.memory": "Upgrade to OpenShift Online Pro if you need additional resources." + }, + // The base URL for logos. + LOGO_BASE_URL: "images/logos/", + // Some icon classes we have SVG images for. Use the color images when we have them. + LOGOS: { + 'icon-aerogear': 'aerogear.svg', + 'icon-angularjs': 'angularjs.svg', + 'icon-ansible': 'ansible.svg', + 'icon-apache': 'apache.svg', + 'icon-beaker': 'beaker.svg', + 'icon-capedwarf': 'capedwarf.svg', + 'icon-cassandra': 'cassandra.svg', + 'icon-clojure': 'clojure.svg', + 'icon-codeigniter': 'codeigniter.svg', + 'icon-django': 'django.svg', + 'icon-dotnet': 'dotnet.svg', + 'icon-drupal': 'drupal.svg', + 'icon-elastic': 'elastic.svg', + 'icon-erlang': 'erlang.svg', + 'icon-git': 'git.svg', + 'icon-github': 'github.svg', + 'icon-gitlab': 'gitlab.svg', + 'icon-glassfish': 'glassfish.svg', + 'icon-go-gopher': 'go-gopher.svg', + 'icon-grails': 'grails.svg', + 'icon-hadoop': 'hadoop.svg', + 'icon-haproxy': 'haproxy.svg', + 'icon-infinispan': 'infinispan.svg', + 'icon-jboss': 'jboss.svg', + 'icon-jenkins': 'jenkins.svg', + 'icon-jetty': 'jetty.svg', + 'icon-joomla': 'joomla.svg', + 'icon-jruby': 'jruby.svg', + 'icon-js': 'js.svg', + 'icon-laravel': 'laravel.svg', + 'icon-load-balancer': 'load-balancer.svg', + 'icon-mariadb': 'mariadb.svg', + 'icon-mediawiki': 'mediawiki.svg', + 'icon-memcached': 'memcached.svg', + 'icon-mongodb': 'mongodb.svg', + 'icon-mysql-database': 'mysql-database.svg', + 'icon-nginx': 'nginx.svg', + 'icon-nodejs': 'nodejs.svg', + 'icon-openjdk': 'openjdk.svg', + 'icon-openstack': 'openstack.svg', + 'icon-perl': 'perl.svg', + 'icon-phalcon': 'phalcon.svg', + 'icon-php': 'php.svg', + 'icon-play': 'play.svg', + 'icon-postgresql': 'postgresql.svg', + 'icon-python': 'python.svg', + 'icon-rabbitmq': 'rabbitmq.svg', + 'icon-rails': 'rails.svg', + 'icon-redis': 'redis.svg', + 'icon-ruby': 'ruby.svg', + 'icon-scala': 'scala.svg', + 'icon-shadowman': 'shadowman.svg', + 'icon-spring': 'spring.svg', + 'icon-stackoverflow': 'stackoverflow.svg', + 'icon-symfony': 'symfony.svg', + 'icon-tomcat': 'tomcat.svg', + 'icon-wildfly': 'wildfly.svg', + 'icon-wordpress': 'wordpress.svg', + 'icon-zend': 'zend.svg' } }); diff --git a/app/scripts/directives/processTemplateDialog.js b/app/scripts/directives/processTemplateDialog.js index 67a7c3520c..d4631868c4 100644 --- a/app/scripts/directives/processTemplateDialog.js +++ b/app/scripts/directives/processTemplateDialog.js @@ -35,6 +35,7 @@ RecentlyViewedProjectsService) { var ctrl = this; var validityWatcher; + var imageForIconClass = $filter('imageForIconClass'); ctrl.selectStep = { id: 'projectTemplates', @@ -125,6 +126,7 @@ if (ctrl.template) { initializeSteps(); ctrl.iconClass = getIconClass(); + ctrl.image = getImage(); } } if (changes.useProjectTemplate) { @@ -173,6 +175,7 @@ ctrl.template = _.get(template, 'resource'); ctrl.selectStep.valid = !!template; ctrl.iconClass = getIconClass(); + ctrl.image = getImage(); }; ctrl.templateProjectChange = function () { @@ -201,8 +204,13 @@ }; function getIconClass() { - var icon = _.get(ctrl, 'template.metadata.annotations.iconClass', 'fa fa-clone'); - return (icon.indexOf('icon-') !== -1) ? 'font-icon ' + icon : icon; + var iconClass = _.get(ctrl, 'template.metadata.annotations.iconClass', 'fa fa-clone'); + return (iconClass.indexOf('icon-') !== -1) ? 'font-icon ' + iconClass : iconClass; + } + + function getImage() { + var iconClass = _.get(ctrl, 'template.metadata.annotations.iconClass', 'fa fa-clone'); + return imageForIconClass(iconClass); } function initializeSteps() { diff --git a/app/scripts/directives/util.js b/app/scripts/directives/util.js index 6fdf61dd1a..0827f103f6 100644 --- a/app/scripts/directives/util.js +++ b/app/scripts/directives/util.js @@ -158,7 +158,7 @@ angular.module('openshiftConsole') template: '{{id.substring(0, 6)}}' }; }) - .directive('customIcon', function() { + .directive('customIcon', function($filter) { return { restrict:'E', scope: { @@ -166,21 +166,24 @@ angular.module('openshiftConsole') kind: '@', tag: '=?' }, - controller: function($scope, $filter) { + controller: function($scope) { $scope.$watchGroup(['resource', 'tag'], function() { if ($scope.tag) { $scope.icon = $filter('imageStreamTagAnnotation')($scope.resource, "icon", $scope.tag); } else { $scope.icon = $filter('annotation')($scope.resource, "icon"); } - $scope.isDataIcon = $scope.icon && ($scope.icon.indexOf("data:") === 0); - if (!$scope.isDataIcon) { + var isDataIcon = $scope.icon && ($scope.icon.indexOf("data:") === 0); + if (isDataIcon) { + $scope.image = $scope.icon; + } else { // The icon class filter will at worst return the default icon for the given kind if ($scope.tag) { $scope.icon = $filter('imageStreamTagIconClass')($scope.resource, $scope.tag); } else { $scope.icon = $filter('iconClass')($scope.resource, $scope.kind); } + $scope.image = $filter('imageForIconClass')($scope.icon); } }); }, diff --git a/app/scripts/filters/util.js b/app/scripts/filters/util.js index ea843b6ea2..6b9bd73fc7 100644 --- a/app/scripts/filters/util.js +++ b/app/scripts/filters/util.js @@ -478,16 +478,6 @@ angular.module('openshiftConsole') return _.filter(collection, predicate); }; }) - .filter('isAbsoluteURL', function() { - return function(url) { - if (!url) { - return false; - } - var uri = new URI(url); - var protocol = uri.protocol(); - return uri.is('absolute') && (protocol === 'http' || protocol === 'https'); - }; - }) // Use of isIE and isEdge is HIGHLY discouraged, only use if absolutely required .filter('isIE', function() { var ua = navigator.userAgent; diff --git a/app/views/directives/_custom-icon.html b/app/views/directives/_custom-icon.html index ba35abebea..9b2eb09e33 100644 --- a/app/views/directives/_custom-icon.html +++ b/app/views/directives/_custom-icon.html @@ -1,2 +1,2 @@ - - + + diff --git a/app/views/directives/process-template-dialog/process-template-info.html b/app/views/directives/process-template-dialog/process-template-info.html index 1a0d1a5f95..984d2db5ed 100644 --- a/app/views/directives/process-template-dialog/process-template-info.html +++ b/app/views/directives/process-template-dialog/process-template-info.html @@ -1,7 +1,8 @@
- + +
diff --git a/dist/images/logos/aerogear.svg b/dist/images/logos/aerogear.svg new file mode 100644 index 0000000000..4ffb653a78 --- /dev/null +++ b/dist/images/logos/aerogear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/angularjs.svg b/dist/images/logos/angularjs.svg new file mode 100644 index 0000000000..115456fbf3 --- /dev/null +++ b/dist/images/logos/angularjs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/ansible.svg b/dist/images/logos/ansible.svg new file mode 100644 index 0000000000..5a3c35b27b --- /dev/null +++ b/dist/images/logos/ansible.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/apache.svg b/dist/images/logos/apache.svg new file mode 100644 index 0000000000..196b10ec8e --- /dev/null +++ b/dist/images/logos/apache.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/beaker.svg b/dist/images/logos/beaker.svg new file mode 100644 index 0000000000..1c1a08f7ca --- /dev/null +++ b/dist/images/logos/beaker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/capedwarf.svg b/dist/images/logos/capedwarf.svg new file mode 100644 index 0000000000..9f6e0356a0 --- /dev/null +++ b/dist/images/logos/capedwarf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/cassandra.svg b/dist/images/logos/cassandra.svg new file mode 100644 index 0000000000..e71ebff99c --- /dev/null +++ b/dist/images/logos/cassandra.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/clojure.svg b/dist/images/logos/clojure.svg new file mode 100644 index 0000000000..f85038e2ef --- /dev/null +++ b/dist/images/logos/clojure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/codeigniter.svg b/dist/images/logos/codeigniter.svg new file mode 100644 index 0000000000..cb3fb48a80 --- /dev/null +++ b/dist/images/logos/codeigniter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/django.svg b/dist/images/logos/django.svg new file mode 100644 index 0000000000..c2b75c66e6 --- /dev/null +++ b/dist/images/logos/django.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/dotnet.svg b/dist/images/logos/dotnet.svg new file mode 100644 index 0000000000..d4b7879a97 --- /dev/null +++ b/dist/images/logos/dotnet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/drupal.svg b/dist/images/logos/drupal.svg new file mode 100644 index 0000000000..5b4948bbf6 --- /dev/null +++ b/dist/images/logos/drupal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/elastic.svg b/dist/images/logos/elastic.svg new file mode 100644 index 0000000000..029aa7af85 --- /dev/null +++ b/dist/images/logos/elastic.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/erlang.svg b/dist/images/logos/erlang.svg new file mode 100644 index 0000000000..9b39e6e5e9 --- /dev/null +++ b/dist/images/logos/erlang.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/git.svg b/dist/images/logos/git.svg new file mode 100644 index 0000000000..da09be8b53 --- /dev/null +++ b/dist/images/logos/git.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/github.svg b/dist/images/logos/github.svg new file mode 100644 index 0000000000..6cde3f5289 --- /dev/null +++ b/dist/images/logos/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/gitlab.svg b/dist/images/logos/gitlab.svg new file mode 100644 index 0000000000..ecd89f67ee --- /dev/null +++ b/dist/images/logos/gitlab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/glassfish.svg b/dist/images/logos/glassfish.svg new file mode 100644 index 0000000000..5127acd51b --- /dev/null +++ b/dist/images/logos/glassfish.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/go-gopher.svg b/dist/images/logos/go-gopher.svg new file mode 100644 index 0000000000..4a75ecb82c --- /dev/null +++ b/dist/images/logos/go-gopher.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/grails.svg b/dist/images/logos/grails.svg new file mode 100644 index 0000000000..956183a8d1 --- /dev/null +++ b/dist/images/logos/grails.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/hadoop.svg b/dist/images/logos/hadoop.svg new file mode 100644 index 0000000000..b19057e04b --- /dev/null +++ b/dist/images/logos/hadoop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/haproxy.svg b/dist/images/logos/haproxy.svg new file mode 100644 index 0000000000..1061221b09 --- /dev/null +++ b/dist/images/logos/haproxy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/infinispan.svg b/dist/images/logos/infinispan.svg new file mode 100644 index 0000000000..327c1f282c --- /dev/null +++ b/dist/images/logos/infinispan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/jboss.svg b/dist/images/logos/jboss.svg new file mode 100644 index 0000000000..67c4219301 --- /dev/null +++ b/dist/images/logos/jboss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/jenkins.svg b/dist/images/logos/jenkins.svg new file mode 100644 index 0000000000..54bb101a67 --- /dev/null +++ b/dist/images/logos/jenkins.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/jetty.svg b/dist/images/logos/jetty.svg new file mode 100644 index 0000000000..b880e72e73 --- /dev/null +++ b/dist/images/logos/jetty.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/joomla.svg b/dist/images/logos/joomla.svg new file mode 100644 index 0000000000..bd758eed1f --- /dev/null +++ b/dist/images/logos/joomla.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/jruby.svg b/dist/images/logos/jruby.svg new file mode 100644 index 0000000000..213d769ac2 --- /dev/null +++ b/dist/images/logos/jruby.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/js.svg b/dist/images/logos/js.svg new file mode 100644 index 0000000000..3d5059a3ea --- /dev/null +++ b/dist/images/logos/js.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/laravel.svg b/dist/images/logos/laravel.svg new file mode 100644 index 0000000000..de20608a84 --- /dev/null +++ b/dist/images/logos/laravel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/load-balancer.svg b/dist/images/logos/load-balancer.svg new file mode 100644 index 0000000000..312ceedab7 --- /dev/null +++ b/dist/images/logos/load-balancer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/mariadb.svg b/dist/images/logos/mariadb.svg new file mode 100644 index 0000000000..c08b7538b7 --- /dev/null +++ b/dist/images/logos/mariadb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/mediawiki.svg b/dist/images/logos/mediawiki.svg new file mode 100644 index 0000000000..6e634290c3 --- /dev/null +++ b/dist/images/logos/mediawiki.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/memcached.svg b/dist/images/logos/memcached.svg new file mode 100644 index 0000000000..b783d424fb --- /dev/null +++ b/dist/images/logos/memcached.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/mongodb.svg b/dist/images/logos/mongodb.svg new file mode 100644 index 0000000000..1501ba7929 --- /dev/null +++ b/dist/images/logos/mongodb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/mysql-database.svg b/dist/images/logos/mysql-database.svg new file mode 100644 index 0000000000..1a97728a0d --- /dev/null +++ b/dist/images/logos/mysql-database.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/nginx.svg b/dist/images/logos/nginx.svg new file mode 100644 index 0000000000..30078fa7a6 --- /dev/null +++ b/dist/images/logos/nginx.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/nodejs.svg b/dist/images/logos/nodejs.svg new file mode 100644 index 0000000000..2af40e3f86 --- /dev/null +++ b/dist/images/logos/nodejs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/openjdk.svg b/dist/images/logos/openjdk.svg new file mode 100644 index 0000000000..f4a7dc9c9e --- /dev/null +++ b/dist/images/logos/openjdk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/openstack.svg b/dist/images/logos/openstack.svg new file mode 100644 index 0000000000..5edeba74e7 --- /dev/null +++ b/dist/images/logos/openstack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/perl.svg b/dist/images/logos/perl.svg new file mode 100644 index 0000000000..7f6650cd2a --- /dev/null +++ b/dist/images/logos/perl.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/phalcon.svg b/dist/images/logos/phalcon.svg new file mode 100644 index 0000000000..ad0f25179d --- /dev/null +++ b/dist/images/logos/phalcon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/php.svg b/dist/images/logos/php.svg new file mode 100644 index 0000000000..b990b33429 --- /dev/null +++ b/dist/images/logos/php.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/play.svg b/dist/images/logos/play.svg new file mode 100644 index 0000000000..bb7c72c3b5 --- /dev/null +++ b/dist/images/logos/play.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/postgresql.svg b/dist/images/logos/postgresql.svg new file mode 100644 index 0000000000..8251bb0289 --- /dev/null +++ b/dist/images/logos/postgresql.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/python.svg b/dist/images/logos/python.svg new file mode 100644 index 0000000000..2d034565b4 --- /dev/null +++ b/dist/images/logos/python.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/rabbitmq.svg b/dist/images/logos/rabbitmq.svg new file mode 100644 index 0000000000..a3b4320b8e --- /dev/null +++ b/dist/images/logos/rabbitmq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/rails.svg b/dist/images/logos/rails.svg new file mode 100644 index 0000000000..f40d0aa3d9 --- /dev/null +++ b/dist/images/logos/rails.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/redis.svg b/dist/images/logos/redis.svg new file mode 100644 index 0000000000..d62d47b139 --- /dev/null +++ b/dist/images/logos/redis.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/ruby.svg b/dist/images/logos/ruby.svg new file mode 100644 index 0000000000..d87ba372f3 --- /dev/null +++ b/dist/images/logos/ruby.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/scala.svg b/dist/images/logos/scala.svg new file mode 100644 index 0000000000..bead3325d9 --- /dev/null +++ b/dist/images/logos/scala.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/shadowman.svg b/dist/images/logos/shadowman.svg new file mode 100644 index 0000000000..d089312829 --- /dev/null +++ b/dist/images/logos/shadowman.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/spring.svg b/dist/images/logos/spring.svg new file mode 100644 index 0000000000..80e5dbf89b --- /dev/null +++ b/dist/images/logos/spring.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/stackoverflow.svg b/dist/images/logos/stackoverflow.svg new file mode 100644 index 0000000000..fcbb5a465e --- /dev/null +++ b/dist/images/logos/stackoverflow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/symfony.svg b/dist/images/logos/symfony.svg new file mode 100644 index 0000000000..dc34b38a9e --- /dev/null +++ b/dist/images/logos/symfony.svg @@ -0,0 +1 @@ +symfony \ No newline at end of file diff --git a/dist/images/logos/tomcat.svg b/dist/images/logos/tomcat.svg new file mode 100644 index 0000000000..0dd2ec0ddc --- /dev/null +++ b/dist/images/logos/tomcat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/wildfly.svg b/dist/images/logos/wildfly.svg new file mode 100644 index 0000000000..9017c9f4b3 --- /dev/null +++ b/dist/images/logos/wildfly.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/wordpress.svg b/dist/images/logos/wordpress.svg new file mode 100644 index 0000000000..d4351e7653 --- /dev/null +++ b/dist/images/logos/wordpress.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/images/logos/zend.svg b/dist/images/logos/zend.svg new file mode 100644 index 0000000000..5d479f8519 --- /dev/null +++ b/dist/images/logos/zend.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/dist/scripts/scripts.js b/dist/scripts/scripts.js index b478b81c80..504334387d 100644 --- a/dist/scripts/scripts.js +++ b/dist/scripts/scripts.js @@ -1,6 +1,6 @@ "use strict"; -function OverviewController(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, h, v, y, b, C, S, w, k, j, P) { +function OverviewController(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, v, h, y, b, C, S, w, k, j, P) { var R = this, I = t("isIE")() || t("isEdge")(); e.projectName = n.project, R.catalogLandingPageEnabled = !l.DISABLE_SERVICE_CATALOG_LANDING_PAGE; var E, T, N = t("annotation"), D = t("canI"), A = t("buildConfigForBuild"), B = t("deploymentIsInProgress"), L = t("imageObjectRef"), U = t("isJenkinsPipelineStrategy"), O = t("isNewerResource"), F = t("label"), x = t("podTemplate"), M = r.getPreferredVersion("servicebindings"), V = r.getPreferredVersion("clusterserviceclasses"), q = r.getPreferredVersion("serviceinstances"), z = r.getPreferredVersion("clusterserviceplans"), H = {}, G = {}, K = {}, W = R.state = { @@ -39,7 +39,7 @@ label: "Name" }, { id: "label", label: "Label" -} ], R.filterBy = h.getLabelSelector().isEmpty() ? "name" : "label", R.viewByOptions = [ { +} ], R.filterBy = v.getLabelSelector().isEmpty() ? "name" : "label", R.viewByOptions = [ { id: "app", label: "Application" }, { @@ -100,7 +100,7 @@ R.deploymentConfigsNoPipeline = _.sortBy(e, "metadata.name"), R.pipelineViewHasO }, ie = function() { R.disableFilter = "pipeline" === R.viewBy && _.isEmpty(R.pipelineBuildConfigs); }, se = function(e) { -return h.getLabelSelector().select(e); +return v.getLabelSelector().select(e); }, ce = [ "metadata.name", "spec.externalServiceClassName" ], le = function(e) { return g.filterForKeywords(e, ce, W.filterKeywords); }, ue = function(e) { @@ -115,7 +115,7 @@ return e; }, de = function() { switch (R.filterBy) { case "label": -return !h.getLabelSelector().isEmpty(); +return !v.getLabelSelector().isEmpty(); case "name": return !_.isEmpty(W.filterKeywords); @@ -126,7 +126,7 @@ R.filteredDeploymentConfigs = ue(R.deploymentConfigs), R.filteredReplicationCont R.viewBy = localStorage.getItem(pe) || "app", e.$watch(function() { return R.viewBy; }, function(e) { -localStorage.setItem(pe, e), ie(), ce = "app" === R.viewBy ? [ "metadata.name", "metadata.labels.app" ] : [ "metadata.name" ], me(), "pipeline" === R.viewBy ? h.setLabelSuggestions(G) : h.setLabelSuggestions(H); +localStorage.setItem(pe, e), ie(), ce = "app" === R.viewBy ? [ "metadata.name", "metadata.labels.app" ] : [ "metadata.name" ], me(), "pipeline" === R.viewBy ? v.setLabelSuggestions(G) : v.setLabelSuggestions(H); }), l.DISABLE_OVERVIEW_METRICS || (y.isAvailable(!0).then(function(e) { W.showMetrics = e; }), e.$on("metrics-connection-failed", function(e, t) { @@ -151,16 +151,16 @@ return e && "Pod" === e.kind; }, ge = function(e) { var t = Y(e); return t ? fe(e) ? [ e ] : _.get(R, [ "state", "podsByOwnerUID", t ], []) : []; -}, he = function(e, t) { +}, ve = function(e, t) { var n = Y(e); W.notificationsByObjectUID[n] = t || {}; -}, ve = function(e) { +}, he = function(e) { var t = Y(e); return t ? _.get(W, [ "notificationsByObjectUID", t ], {}) : {}; }, ye = function(e) { if (Y(e)) { var t = ge(e), a = k.getPodAlerts(t, n.project); -he(e, a); +ve(e, a); } }, be = function(e) { _.each(e, ye); @@ -180,9 +180,9 @@ var t = {}, n = Ce(e); _.assign(t, k.getDeploymentStatusAlerts(e, n), k.getPausedDeploymentAlerts(e)); var a = Se(e); _.each(a, function(e) { -var n = ve(e); +var n = he(e); _.assign(t, n); -}), he(e, t); +}), ve(e, t); }, we = function() { _.each(R.deploymentConfigs, _e); }, ke = function(e) { @@ -191,9 +191,9 @@ return t ? _.get(R, [ "replicaSetsByDeploymentUID", t ]) : {}; }, je = function(e) { var t = k.getPausedDeploymentAlerts(e), n = ke(e); _.each(n, function(e) { -var n = ve(e); +var n = he(e); _.assign(t, n); -}), he(e, t); +}), ve(e, t); }, Pe = function() { _.each(R.deployments, je); }, Re = function() { @@ -203,9 +203,9 @@ e.$evalAsync(function() { Re(), we(), Pe(); }); }, 500), Ee = function(e) { -_.isEmpty(e) || (h.addLabelSuggestionsFromResources(e, H), "pipeline" !== R.viewBy && h.setLabelSuggestions(H)); +_.isEmpty(e) || (v.addLabelSuggestionsFromResources(e, H), "pipeline" !== R.viewBy && v.setLabelSuggestions(H)); }, Te = function(e) { -_.isEmpty(e) || (h.addLabelSuggestionsFromResources(e, G), "pipeline" === R.viewBy && h.setLabelSuggestions(G)); +_.isEmpty(e) || (v.addLabelSuggestionsFromResources(e, G), "pipeline" === R.viewBy && v.setLabelSuggestions(G)); }, Ne = function(e) { return "Succeeded" !== e.status.phase && "Failed" !== e.status.phase && (!F(e, "openshift.io/deployer-pod-for.name") && (!N(e, "openshift.io/build.name") && "slave" !== F(e, "jenkins"))); }, De = function() { @@ -336,7 +336,7 @@ return s.sortBuilds(e, !0); k.setQuotaNotifications(W.quotas, W.clusterQuotas, n.project); }; R.clearFilter = function() { -h.clear(), R.filterText = ""; +v.clear(), R.filterText = ""; }, e.$watch(function() { return R.filterText; }, _.debounce(function(t, n) { @@ -347,7 +347,7 @@ maxWait: 250 return R.filterBy; }, function(e, t) { e !== t && (R.clearFilter(), me()); -}), h.onActiveFiltersChanged(function() { +}), v.onActiveFiltersChanged(function() { e.$evalAsync(me); }), R.startBuild = s.startBuild; var tt = function() { @@ -381,43 +381,43 @@ var a = function() { R.pods && f.fetchReferencedImageStreamImages(R.pods, W.imagesByDockerReference, W.imageStreamImageRefByDockerReference, n); }; at.push(u.watch("pods", n, function(e) { -R.pods = e.by("metadata.name"), De(), a(), Ie(), Fe(R.monopods), be(R.monopods), Ee(R.monopods), me(), v.log("pods (subscribe)", R.pods); +R.pods = e.by("metadata.name"), De(), a(), Ie(), Fe(R.monopods), be(R.monopods), Ee(R.monopods), me(), h.log("pods (subscribe)", R.pods); })), at.push(u.watch("replicationcontrollers", n, function(e) { -R.replicationControllers = e.by("metadata.name"), Be(), Fe(R.vanillaReplicationControllers), Fe(R.monopods), be(R.vanillaReplicationControllers), Ee(R.vanillaReplicationControllers), tt(), me(), v.log("replicationcontrollers (subscribe)", R.replicationControllers); +R.replicationControllers = e.by("metadata.name"), Be(), Fe(R.vanillaReplicationControllers), Fe(R.monopods), be(R.vanillaReplicationControllers), Ee(R.vanillaReplicationControllers), tt(), me(), h.log("replicationcontrollers (subscribe)", R.replicationControllers); })), at.push(u.watch("deploymentconfigs", n, function(e) { -R.deploymentConfigs = e.by("metadata.name"), Be(), Fe(R.deploymentConfigs), Fe(R.vanillaReplicationControllers), Ee(R.deploymentConfigs), Pe(), Ye(), Ze(), tt(), me(), v.log("deploymentconfigs (subscribe)", R.deploymentConfigs); +R.deploymentConfigs = e.by("metadata.name"), Be(), Fe(R.deploymentConfigs), Fe(R.vanillaReplicationControllers), Ee(R.deploymentConfigs), Pe(), Ye(), Ze(), tt(), me(), h.log("deploymentconfigs (subscribe)", R.deploymentConfigs); })), at.push(u.watch({ group: "extensions", resource: "replicasets" }, n, function(e) { -R.replicaSets = e.by("metadata.name"), Ue(), Fe(R.vanillaReplicaSets), Fe(R.monopods), be(R.vanillaReplicaSets), Ee(R.vanillaReplicaSets), tt(), me(), v.log("replicasets (subscribe)", R.replicaSets); +R.replicaSets = e.by("metadata.name"), Ue(), Fe(R.vanillaReplicaSets), Fe(R.monopods), be(R.vanillaReplicaSets), Ee(R.vanillaReplicaSets), tt(), me(), h.log("replicasets (subscribe)", R.replicaSets); })), at.push(u.watch({ group: "apps", resource: "deployments" }, n, function(e) { -E = e.by("metadata.uid"), R.deployments = _.sortBy(E, "metadata.name"), Ue(), Fe(R.deployments), Fe(R.vanillaReplicaSets), Ee(R.deployments), tt(), me(), v.log("deployments (subscribe)", R.deploymentsByUID); +E = e.by("metadata.uid"), R.deployments = _.sortBy(E, "metadata.name"), Ue(), Fe(R.deployments), Fe(R.vanillaReplicaSets), Ee(R.deployments), tt(), me(), h.log("deployments (subscribe)", R.deploymentsByUID); })), at.push(u.watch("builds", n, function(e) { -W.builds = e.by("metadata.name"), Xe(), v.log("builds (subscribe)", W.builds); +W.builds = e.by("metadata.name"), Xe(), h.log("builds (subscribe)", W.builds); })), at.push(u.watch({ group: "apps", resource: "statefulsets" }, n, function(e) { -R.statefulSets = e.by("metadata.name"), Fe(R.statefulSets), Fe(R.monopods), be(R.statefulSets), Ee(R.statefulSets), tt(), me(), v.log("statefulsets (subscribe)", R.statefulSets); +R.statefulSets = e.by("metadata.name"), Fe(R.statefulSets), Fe(R.monopods), be(R.statefulSets), Ee(R.statefulSets), tt(), me(), h.log("statefulsets (subscribe)", R.statefulSets); }, { poll: I, pollInterval: 6e4 })), at.push(u.watch("services", n, function(e) { -W.allServices = e.by("metadata.name"), xe(), v.log("services (subscribe)", W.allServices); +W.allServices = e.by("metadata.name"), xe(), h.log("services (subscribe)", W.allServices); }, { poll: I, pollInterval: 6e4 })), at.push(u.watch("routes", n, function(e) { -R.routes = e.by("metadata.name"), Me(), v.log("routes (subscribe)", R.routes); +R.routes = e.by("metadata.name"), Me(), h.log("routes (subscribe)", R.routes); }, { poll: I, pollInterval: 6e4 })), at.push(u.watch("buildConfigs", n, function(e) { -R.buildConfigs = e.by("metadata.name"), He(), Ye(), Xe(), me(), v.log("buildconfigs (subscribe)", R.buildConfigs); +R.buildConfigs = e.by("metadata.name"), He(), Ye(), Xe(), me(), h.log("buildconfigs (subscribe)", R.buildConfigs); }, { poll: I, pollInterval: 6e4 @@ -426,12 +426,12 @@ group: "autoscaling", resource: "horizontalpodautoscalers", version: "v1" }, n, function(e) { -R.horizontalPodAutoscalers = e.by("metadata.name"), Ve(), v.log("autoscalers (subscribe)", R.horizontalPodAutoscalers); +R.horizontalPodAutoscalers = e.by("metadata.name"), Ve(), h.log("autoscalers (subscribe)", R.horizontalPodAutoscalers); }, { poll: I, pollInterval: 6e4 })), at.push(u.watch("imagestreams", n, function(e) { -T = e.by("metadata.name"), f.buildDockerRefMapForImageStreams(T, W.imageStreamImageRefByDockerReference), a(), v.log("imagestreams (subscribe)", T); +T = e.by("metadata.name"), f.buildDockerRefMapForImageStreams(T, W.imageStreamImageRefByDockerReference), a(), h.log("imagestreams (subscribe)", T); }, { poll: I, pollInterval: 6e4 @@ -464,7 +464,7 @@ delete s[t]; }, at.push(u.watch(q, n, function(e) { W.serviceInstances = e.by("metadata.name"), _.each(W.serviceInstances, function(e) { var t = k.getServiceInstanceAlerts(e); -he(e, t), r(e), o(e); +ve(e, t), r(e), o(e); }), nt(), Ee(W.serviceInstances), me(); }, { poll: I, @@ -495,7 +495,7 @@ var o, i = this, s = e("enableTechPreviewFeature"); i.bindings = [], i.bindableServiceInstances = [], i.serviceClasses = [], i.serviceInstances = [], i.showBindings = a.SERVICE_CATALOG_ENABLED && ("ServiceInstance" === _.get(i, "apiObject.kind") || s("pod_presets")); var c = e("isIE")() || e("isEdge")(), l = [], u = e("canI"), d = i.serviceBindingsVersion = t.getPreferredVersion("servicebindings"), m = t.getPreferredVersion("clusterserviceclasses"), p = t.getPreferredVersion("serviceinstances"), f = t.getPreferredVersion("clusterserviceplans"), g = function() { i.apiObject && i.bindings && (i.bindings = n.getBindingsForResource(i.bindings, i.apiObject)); -}, h = function() { +}, v = function() { i.bindableServiceInstances = n.filterBindableServiceInstances(i.serviceInstances, i.serviceClasses, o), i.orderedServiceInstances = n.sortServiceInstances(i.serviceInstances, i.serviceClasses); }; i.createBinding = function() { @@ -503,25 +503,25 @@ i.overlayPanelVisible = !0, i.overlayPanelName = "bindService"; }, i.closeOverlayPanel = function() { i.overlayPanelVisible = !1; }; -var v = function() { +var h = function() { r.unwatchAll(l), l = [], a.SERVICE_CATALOG_ENABLED && u(d, "watch") && l.push(r.watch(d, i.projectContext, function(e) { i.bindings = e.by("metadata.name"), g(); }, { poll: c, pollInterval: 6e4 })), a.SERVICE_CATALOG_ENABLED && u(p, "watch") && (l.push(r.watch(p, i.projectContext, function(e) { -i.serviceInstances = e.by("metadata.name"), h(); +i.serviceInstances = e.by("metadata.name"), v(); }, { poll: c, pollInterval: 6e4 })), r.list(m, {}, function(e) { -i.serviceClasses = e.by("metadata.name"), h(); +i.serviceClasses = e.by("metadata.name"), v(); }), r.list(f, {}, function(e) { o = e.by("metadata.name"); })); }; i.$onChanges = function(e) { -e.projectContext && i.showBindings && v(); +e.projectContext && i.showBindings && h(); }, i.$onDestroy = function() { r.unwatchAll(l); }; @@ -935,7 +935,69 @@ description: "" } ], SAAS_OFFERINGS: [], APP_LAUNCHER_NAVIGATION: [], -QUOTA_NOTIFICATION_MESSAGE: {} +QUOTA_NOTIFICATION_MESSAGE: {}, +LOGO_BASE_URL: "images/logos/", +LOGOS: { +"icon-aerogear": "aerogear.svg", +"icon-angularjs": "angularjs.svg", +"icon-ansible": "ansible.svg", +"icon-apache": "apache.svg", +"icon-beaker": "beaker.svg", +"icon-capedwarf": "capedwarf.svg", +"icon-cassandra": "cassandra.svg", +"icon-clojure": "clojure.svg", +"icon-codeigniter": "codeigniter.svg", +"icon-django": "django.svg", +"icon-dotnet": "dotnet.svg", +"icon-drupal": "drupal.svg", +"icon-elastic": "elastic.svg", +"icon-erlang": "erlang.svg", +"icon-git": "git.svg", +"icon-github": "github.svg", +"icon-gitlab": "gitlab.svg", +"icon-glassfish": "glassfish.svg", +"icon-go-gopher": "go-gopher.svg", +"icon-grails": "grails.svg", +"icon-hadoop": "hadoop.svg", +"icon-haproxy": "haproxy.svg", +"icon-infinispan": "infinispan.svg", +"icon-jboss": "jboss.svg", +"icon-jenkins": "jenkins.svg", +"icon-jetty": "jetty.svg", +"icon-joomla": "joomla.svg", +"icon-jruby": "jruby.svg", +"icon-js": "js.svg", +"icon-laravel": "laravel.svg", +"icon-load-balancer": "load-balancer.svg", +"icon-mariadb": "mariadb.svg", +"icon-mediawiki": "mediawiki.svg", +"icon-memcached": "memcached.svg", +"icon-mongodb": "mongodb.svg", +"icon-mysql-database": "mysql-database.svg", +"icon-nginx": "nginx.svg", +"icon-nodejs": "nodejs.svg", +"icon-openjdk": "openjdk.svg", +"icon-openstack": "openstack.svg", +"icon-perl": "perl.svg", +"icon-phalcon": "phalcon.svg", +"icon-php": "php.svg", +"icon-play": "play.svg", +"icon-postgresql": "postgresql.svg", +"icon-python": "python.svg", +"icon-rabbitmq": "rabbitmq.svg", +"icon-rails": "rails.svg", +"icon-redis": "redis.svg", +"icon-ruby": "ruby.svg", +"icon-scala": "scala.svg", +"icon-shadowman": "shadowman.svg", +"icon-spring": "spring.svg", +"icon-stackoverflow": "stackoverflow.svg", +"icon-symfony": "symfony.svg", +"icon-tomcat": "tomcat.svg", +"icon-wildfly": "wildfly.svg", +"icon-wordpress": "wordpress.svg", +"icon-zend": "zend.svg" +} }), angular.module("openshiftConsole", [ "ngAnimate", "ngCookies", "ngResource", "ngRoute", "ngSanitize", "kubernetesUI", "registryUI.images", "ui.bootstrap", "patternfly.charts", "patternfly.navigation", "patternfly.sort", "patternfly.notification", "openshiftConsoleTemplates", "ui.ace", "extension-registry", "as.sortable", "ui.select", "angular-inview", "angularMoment", "ab-base64", "openshiftCommonServices", "openshiftCommonUI", "webCatalog" ]).config([ "$routeProvider", function(e) { var t, n = { templateUrl: "views/projects.html", @@ -1837,7 +1899,7 @@ return "true" === o(e, "openshift.io/build-config.paused"); return e.status.startTimestamp || e.metadata.creationTimestamp; }, g = function(e) { return _.round(e / 1e3 / 1e3); -}, h = e("imageObjectRef"), v = function(e) { +}, v = e("imageObjectRef"), h = function(e) { var t = o(e, "jenkinsStatus"); if (!t) return null; try { @@ -1990,7 +2052,7 @@ return e; groupBuildConfigsByOutputImage: function(e) { var t = {}; return _.each(e, function(e) { -var n = _.get(e, "spec.output.to"), a = h(n, e.metadata.namespace); +var n = _.get(e, "spec.output.to"), a = v(n, e.metadata.namespace); a && (t[a] = t[a] || [], t[a].push(e)); }), t; }, @@ -2004,9 +2066,9 @@ var r = _.get(e, "metadata.creationTimestamp", ""), o = _.get(a, "metadata.creat return r === o ? n(e, a) : t ? o.localeCompare(r) : r.localeCompare(o); }); }, -getJenkinsStatus: v, +getJenkinsStatus: h, getCurrentStage: function(e) { -var t = v(e), n = _.get(t, "stages", []); +var t = h(e), n = _.get(t, "stages", []); return _.last(n); } }; @@ -2473,7 +2535,7 @@ return { podUID: t[1], descriptor: t[2] + "/" + t[3] }; -}, h = function(e, n, a) { +}, v = function(e, n, a) { var r = _.keyBy(a.pods, "metadata.uid"); return t.post(e, n, { auth: {}, @@ -2489,7 +2551,7 @@ _.set(t, [ a.descriptor, o ], s); }; return _.each(e.data.counter, n), _.each(e.data.gauge, n), t; }); -}, v = _.template("descriptor_name:network/tx_rate|network/rx_rate,type:pod,pod_id:<%= uid %>"), y = _.template("descriptor_name:memory/usage|cpu/usage_rate,type:pod_container,pod_id:<%= uid %>,container_name:<%= containerName %>"), b = _.template("descriptor_name:network/tx_rate|network/rx_rate|memory/usage|cpu/usage_rate,type:pod,pod_id:<%= uid %>"); +}, h = _.template("descriptor_name:network/tx_rate|network/rx_rate,type:pod,pod_id:<%= uid %>"), y = _.template("descriptor_name:memory/usage|cpu/usage_rate,type:pod_container,pod_id:<%= uid %>,container_name:<%= containerName %>"), b = _.template("descriptor_name:network/tx_rate|network/rx_rate|memory/usage|cpu/usage_rate,type:pod,pod_id:<%= uid %>"); return { isAvailable: function(e) { return o().then(function(n) { @@ -2562,7 +2624,7 @@ uid: i, containerName: e.containerName }) }, a)), r.push(_.assign({ -tags: v({ +tags: h({ uid: i }) }, a))) : r.push(_.assign({ @@ -2570,7 +2632,7 @@ tags: b({ uid: i }) }, a)), _.each(r, function(n) { -var a = h(t, n, e); +var a = v(t, n, e); o.push(a); }), n.all(o).then(function(e) { var t = {}; @@ -2832,13 +2894,13 @@ isRequestCalculated: l, isLimitCalculated: u, validatePodLimits: function(t, r, o, i) { if (!o || !o.length) return []; -var s = d(t, r, "Pod", i), c = d(t, r, "Container", i), m = 0, p = 0, f = s.min && n(s.min), g = s.max && n(s.max), h = [], v = e("computeResourceLabel")(r, !0); +var s = d(t, r, "Pod", i), c = d(t, r, "Container", i), m = 0, p = 0, f = s.min && n(s.min), g = s.max && n(s.max), v = [], h = e("computeResourceLabel")(r, !0); return angular.forEach(o, function(e) { var t = e.resources || {}, a = t.requests && t.requests[r] || c.defaultRequest; a && (m += n(a)); var o = t.limits && t.limits[r] || c.defaultLimit; o && (p += n(o)); -}), l(r, i) || (f && m < f && h.push(v + " request total for all containers is less than pod minimum (" + a(s.min, r) + ")."), g && m > g && h.push(v + " request total for all containers is greater than pod maximum (" + a(s.max, r) + ").")), u(r, i) || (f && p < f && h.push(v + " limit total for all containers is less than pod minimum (" + a(s.min, r) + ")."), g && p > g && h.push(v + " limit total for all containers is greater than pod maximum (" + a(s.max, r) + ").")), h; +}), l(r, i) || (f && m < f && v.push(h + " request total for all containers is less than pod minimum (" + a(s.min, r) + ")."), g && m > g && v.push(h + " request total for all containers is greater than pod maximum (" + a(s.max, r) + ").")), u(r, i) || (f && p < f && v.push(h + " limit total for all containers is less than pod minimum (" + a(s.min, r) + ")."), g && p > g && v.push(h + " limit total for all containers is greater than pod maximum (" + a(s.max, r) + ").")), v; } }; } ]), angular.module("openshiftConsole").factory("RoutesService", [ "$filter", function(e) { @@ -3422,10 +3484,10 @@ return !d(e) && 0 !== m(e); }); return !t && !n; }); -}, h = function(e) { +}, v = function(e) { return _.has(e, "spec.activeDeadlineSeconds"); -}, v = function(e, t) { -var n = g(e), a = h(e); +}, h = function(e, t) { +var n = g(e), a = v(e); return _.filter(t, function(e) { var t = e.spec.quota ? e.spec.quota.scopes : e.spec.scopes; return _.every(t, function(e) { @@ -3446,7 +3508,7 @@ return !0; }); }); }, y = function(e, t) { -return e ? "Pod" === e.kind ? v(e, t) : _.has(e, "spec.template") ? v(e.spec.template, t) : t : t; +return e ? "Pod" === e.kind ? h(e, t) : _.has(e, "spec.template") ? h(e.spec.template, t) : t : t; }, b = t("humanizeQuotaResource"), C = t("humanizeKind"), S = function(e, t, n) { var a = e.status.total || e.status; if (m(a.hard[n]) <= m(a.used[n])) { @@ -3545,7 +3607,7 @@ return _.some(e, a) || _.some(t, a); return { filterQuotasForResource: y, isBestEffortPod: g, -isTerminatingPod: h, +isTerminatingPod: v, getResourceLimitAlerts: j, getQuotaAlerts: P, getLatestQuotaAlerts: function(e, t) { @@ -4361,20 +4423,20 @@ name: n }); if (a) return void e.$broadcast("open-overlay-panel", a); } -if (v) if (p.startTour) d(function() { +if (h) if (p.startTour) d(function() { f.replace(), f.search("startTour", null), e.startGuidedTour(); -}, 500); else if (_.get(h, "auto_launch")) { +}, 500); else if (_.get(v, "auto_launch")) { var r = "openshift/viewedHomePage/" + t.user.metadata.name; "true" !== localStorage.getItem(r) && d(function() { e.startGuidedTour() && localStorage.setItem(r, "true"); }, 500); } } -var h = _.get(r, "GUIDED_TOURS.landing_page_tour"), v = h && h.enabled && h.steps; +var v = _.get(r, "GUIDED_TOURS.landing_page_tour"), h = v && v.enabled && v.steps; e.saasOfferings = r.SAAS_OFFERINGS, e.viewMembership = function(e) { i.toProjectMembership(e.metadata.name); -}, v && (e.startGuidedTour = function() { -return !u.isWindowBelowBreakpoint(u.WINDOW_SIZE_SM) && (l.startTour(h.steps), !0); +}, h && (e.startGuidedTour = function() { +return !u.isWindowBelowBreakpoint(u.WINDOW_SIZE_SM) && (l.startTour(v.steps), !0); }), s.clearNotifications(); var y = function() { var t = _.get(e, "template.metadata.uid"); @@ -4412,7 +4474,7 @@ e.catalogItems = t, g(); })); }), e.$on("$destroy", function() { y(); -}), v && e.$on("$locationChangeStart", function(t) { +}), h && e.$on("$locationChangeStart", function(t) { f.search().startTour && (e.startGuidedTour(), t.preventDefault()); }); } ]), angular.module("openshiftConsole").factory("EventsService", [ "BrowserStore", function(e) { @@ -4439,11 +4501,11 @@ var d, m, p = [], f = [], g = !1; e.alerts = e.alerts || {}, e.loading = !0, e.showGetStarted = !1, e.canCreate = void 0, e.search = { text: "" }, e.limitListTo = 250; -var h, v = [ "metadata.name", 'metadata.annotations["openshift.io/display-name"]', 'metadata.annotations["openshift.io/description"]', 'metadata.annotations["openshift.io/requester"]' ], y = function() { -e.projects = s.filterForKeywords(m, v, f); +var v, h = [ "metadata.name", 'metadata.annotations["openshift.io/display-name"]', 'metadata.annotations["openshift.io/description"]', 'metadata.annotations["openshift.io/requester"]' ], y = function() { +e.projects = s.filterForKeywords(m, h, f); }, b = t("displayName"), C = function() { var t = _.get(e, "sortConfig.currentField.id"); -h !== t && (e.sortConfig.isAscending = "metadata.creationTimestamp" !== t); +v !== t && (e.sortConfig.isAscending = "metadata.creationTimestamp" !== t); var n = function(e) { return b(e).toLowerCase(); }, a = e.sortConfig.isAscending ? "asc" : "desc"; @@ -4459,7 +4521,7 @@ break; default: m = _.orderBy(d, [ t ], [ a ]); } -h = t; +v = t; }, S = function() { C(), y(); }; @@ -4581,7 +4643,7 @@ containerStartTime: _.get(n, [ a, "startedAt" ]), containerEndTime: _.get(n, [ a, "finishedAt" ]) }); } -}, h = function() { +}, v = function() { var e = $("").css({ position: "absolute", top: "-100px" @@ -4590,14 +4652,14 @@ width: e.width() / 10, height: e.height() }; return e.remove(), t; -}(), v = $(window), y = function(t) { -t || (t = 0), h.height && h.width && e.selectedTab.terminal && !(t > 10) && e.$apply(function() { +}(), h = $(window), y = function(t) { +t || (t = 0), v.height && v.width && e.selectedTab.terminal && !(t > 10) && e.$apply(function() { var n = $(".container-terminal-wrapper").get(0); if (n) { var r = n.getBoundingClientRect(); if (0 !== r.left || 0 !== r.top || 0 !== r.width || 0 !== r.height) { -var o = v.width(), i = v.height(), s = o - r.left - 54, c = i - r.top - 36; -e.terminalCols = Math.max(_.floor(s / h.width), 80), e.terminalRows = Math.max(_.floor(c / h.height), 24); +var o = h.width(), i = h.height(), s = o - r.left - 54, c = i - r.top - 36; +e.terminalCols = Math.max(_.floor(s / v.width), 80), e.terminalRows = Math.max(_.floor(c / v.height), 24); } else a(function() { y(t + 1); }, 50); @@ -4607,7 +4669,7 @@ y(t + 1); }); }; e.$watch("selectedTab.terminal", function(e) { -e ? (h.height && h.width ? $(window).on("resize.terminalsize", _.debounce(y, 100)) : o.warn("Unable to calculate the bounding box for a character. Terminal will not be able to resize."), a(y, 0)) : $(window).off("resize.terminalsize"); +e ? (v.height && v.width ? $(window).on("resize.terminalsize", _.debounce(y, 100)) : o.warn("Unable to calculate the bounding box for a character. Terminal will not be able to resize."), a(y, 0)) : $(window).off("resize.terminalsize"); }), e.onTerminalSelectChange = function(t) { _.each(e.containerTerminals, function(e) { e.isVisible = !1; @@ -4683,11 +4745,11 @@ message: "Could not delete pod " + n.metadata.name, details: t("getErrorDetails")(a) }; }), e.debugPod = null); -}, h = function() { +}, v = function() { $(".terminal:visible").focus(); }; e.hasFullscreen = s.hasFullscreen(!0), e.fullscreenTerminal = function() { -s.requestFullscreen("#container-terminal-wrapper"), setTimeout(h); +s.requestFullscreen("#container-terminal-wrapper"), setTimeout(v); }, e.exitFullscreen = function() { s.exitFullscreen(); }, e.debugTerminal = function(n) { @@ -4831,12 +4893,12 @@ n.filters = { hideOlderResources: g(e.hideOlderResources) || "true" === e.hideOlderResources, text: "" }; -var h, v, y, b; +var v, h, y, b; l.isAvailable().then(function(e) { n.metricsAvailable = e; }); var C = a("orderObjectsByDate"), S = [ "metadata.name" ], w = [], k = function() { -n.filteredPods = s.filterForKeywords(b, S, w), n.filteredReplicationControllers = s.filterForKeywords(v, S, w), n.filteredReplicaSets = s.filterForKeywords(y, S, w), n.filteredBuilds = s.filterForKeywords(h, S, w), n.filteredStatefulSets = s.filterForKeywords(_.values(n.statefulSets), S, w); +n.filteredPods = s.filterForKeywords(b, S, w), n.filteredReplicationControllers = s.filterForKeywords(h, S, w), n.filteredReplicaSets = s.filterForKeywords(y, S, w), n.filteredBuilds = s.filterForKeywords(v, S, w), n.filteredStatefulSets = s.filterForKeywords(_.values(n.statefulSets), S, w); }, j = function(e) { n.logOptions.pods[e.metadata.name] = { container: e.spec.containers[0].name @@ -4855,16 +4917,16 @@ return !n.filters.hideOlderResources || "Succeeded" !== e.status.phase && "Faile }), n.filteredPods = s.filterForKeywords(b, S, w); }, T = a("isIncompleteBuild"), N = a("buildConfigForBuild"), D = a("isRecentBuild"), A = function() { moment().subtract(5, "m"); -h = _.filter(n.builds, function(e) { +v = _.filter(n.builds, function(e) { if (!n.filters.hideOlderResources) return !0; if (T(e)) return !0; var t = N(e); return t ? n.latestBuildByConfig[t].metadata.name === e.metadata.name : D(e); -}), n.filteredBuilds = s.filterForKeywords(h, S, w); +}), n.filteredBuilds = s.filterForKeywords(v, S, w); }, B = a("deploymentStatus"), L = a("deploymentIsInProgress"), U = function() { -v = _.filter(n.replicationControllers, function(e) { +h = _.filter(n.replicationControllers, function(e) { return !n.filters.hideOlderResources || (L(e) || "Active" === B(e)); -}), n.filteredReplicationControllers = s.filterForKeywords(v, S, w); +}), n.filteredReplicationControllers = s.filterForKeywords(h, S, w); }, O = function() { y = _.filter(n.replicaSets, function(e) { return !n.filters.hideOlderResources || _.get(e, "status.replicas"); @@ -4947,7 +5009,7 @@ e !== t && (localStorage.setItem("monitoring.eventsidebar.collapsed", n.renderOp }); })); } ]), angular.module("openshiftConsole").controller("MembershipController", [ "$filter", "$location", "$routeParams", "$scope", "$timeout", "$uibModal", "AuthService", "AuthorizationService", "DataService", "ProjectsService", "MembershipService", "NotificationsService", "RoleBindingsService", "RolesService", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p) { -var f, g = n.project, h = e("humanizeKind"), v = e("annotation"), y = e("canI"), b = [], C = { +var f, g = n.project, v = e("humanizeKind"), h = e("annotation"), y = e("canI"), b = [], C = { notice: { yourLastRole: _.template('Removing the role "<%= roleName %>" may completely remove your ability to see this project.') }, @@ -5066,7 +5128,7 @@ name: t.metadata.name roleHelp: function(e) { if (e) { var t = _.get(e, "metadata.namespace"), n = _.get(e, "metadata.name"), a = t ? t + " / " + n + ": " : ""; -return e ? a + (v(e, "description") || "") : ""; +return e ? a + (h(e, "description") || "") : ""; } } }); @@ -5075,7 +5137,7 @@ var o = { alerts: {}, detailsMarkup: C.remove.areYouSure.html.subject({ roleName: n, -kindName: h(t), +kindName: v(t), subjectName: e }), okButtonText: "Remove", @@ -5217,11 +5279,11 @@ details: "The active filters are hiding all builds." } : delete a.alerts.builds; } a.project = t; -var h = e("isJenkinsPipelineStrategy"); +var v = e("isJenkinsPipelineStrategy"); p.push(i.watch(d, n, function(e) { -a.builds = _.omitBy(e.by("metadata.name"), h), a.emptyMessage = "No builds to show", f(), s.addLabelSuggestionsFromResources(a.builds, a.labelSuggestions), c.log("builds (subscribe)", a.builds); +a.builds = _.omitBy(e.by("metadata.name"), v), a.emptyMessage = "No builds to show", f(), s.addLabelSuggestionsFromResources(a.builds, a.labelSuggestions), c.log("builds (subscribe)", a.builds); })), p.push(i.watch(m, n, function(e) { -a.unfilteredBuildConfigs = _.omitBy(e.by("metadata.name"), h), s.addLabelSuggestionsFromResources(a.unfilteredBuildConfigs, a.labelSuggestions), s.setLabelSuggestions(a.labelSuggestions), a.buildConfigs = s.getLabelSelector().select(a.unfilteredBuildConfigs), f(), g(), c.log("buildconfigs (subscribe)", a.buildConfigs); +a.unfilteredBuildConfigs = _.omitBy(e.by("metadata.name"), v), s.addLabelSuggestionsFromResources(a.unfilteredBuildConfigs, a.labelSuggestions), s.setLabelSuggestions(a.labelSuggestions), a.buildConfigs = s.getLabelSelector().select(a.unfilteredBuildConfigs), f(), g(), c.log("buildconfigs (subscribe)", a.buildConfigs); })), s.onActiveFiltersChanged(function(e) { a.$apply(function() { a.buildConfigs = e.select(a.unfilteredBuildConfigs), f(), g(); @@ -5258,9 +5320,9 @@ _.set(e, [ n, t.metadata.name ], t); l.push(i.watch("builds", s, function(e) { n.buildsLoaded = !0, c = e.by("metadata.name"), g(); })); -var h = !1; +var v = !1; l.push(i.watch("buildconfigs", s, function(e) { -if (n.buildConfigsLoaded = !0, n.buildConfigs = _.pickBy(e.by("metadata.name"), m), _.isEmpty(n.buildConfigs) && !h && (h = !0, a.SAMPLE_PIPELINE_TEMPLATE)) { +if (n.buildConfigsLoaded = !0, n.buildConfigs = _.pickBy(e.by("metadata.name"), m), _.isEmpty(n.buildConfigs) && !v && (v = !0, a.SAMPLE_PIPELINE_TEMPLATE)) { var t = a.SAMPLE_PIPELINE_TEMPLATE.name, o = a.SAMPLE_PIPELINE_TEMPLATE.namespace; i.get("templates", t, { namespace: o @@ -5312,12 +5374,12 @@ details: t("getErrorDetails")(n) }, e.clearEnvVarUpdates = function() { g(e.buildConfig), e.forms.bcEnvVars.$setPristine(); }; -var h, v = function(n, s) { +var v, h = function(n, s) { e.loaded = !0, e.buildConfig = n, e.buildConfigPaused = r.isPaused(e.buildConfig), e.buildConfig.spec.source.images && (e.imageSources = e.buildConfig.spec.source.images, e.imageSourcesPaths = [], e.imageSources.forEach(function(n) { e.imageSourcesPaths.push(t("destinationSourcePair")(n.paths)); })); var c = _.get(p(n), "from", {}), l = c.kind + "/" + c.name + "/" + (c.namespace || e.projectName); -h !== l && (_.includes([ "ImageStreamTag", "ImageStreamImage" ], c.kind) ? (h = l, i.get(a.kindToResource(c.kind), c.name, { +v !== l && (_.includes([ "ImageStreamTag", "ImageStreamImage" ], c.kind) ? (v = l, i.get(a.kindToResource(c.kind), c.name, { namespace: c.namespace || e.projectName }, { errorNotification: !1 @@ -5349,7 +5411,7 @@ details: "The active filters are hiding all builds." e.project = a, e.projectContext = o, i.get(e.buildConfigsVersion, n.buildconfig, o, { errorNotification: !1 }).then(function(t) { -v(t), f.push(i.watchObject(e.buildConfigsVersion, n.buildconfig, o, v)); +h(t), f.push(i.watchObject(e.buildConfigsVersion, n.buildconfig, o, h)); }, function(n) { e.loaded = !0, e.alerts.load = { type: "error", @@ -5581,7 +5643,7 @@ return t && (n += "/" + t.name), n; }; } ]), angular.module("openshiftConsole").controller("DeploymentsController", [ "$scope", "$filter", "$routeParams", "APIService", "DataService", "DeploymentsService", "LabelFilter", "Logger", "OwnerReferencesService", "ProjectsService", function(e, t, n, a, r, o, i, s, c, l) { e.projectName = n.project, e.replicationControllers = {}, e.unfilteredDeploymentConfigs = {}, e.unfilteredDeployments = {}, e.replicationControllersByDC = {}, e.labelSuggestions = {}, e.alerts = e.alerts || {}, e.emptyMessage = "Loading...", e.expandedDeploymentConfigRow = {}, e.unfilteredReplicaSets = {}, e.unfilteredReplicationControllers = {}; -var u, d, m = t("annotation"), p = a.getPreferredVersion("deployments"), f = a.getPreferredVersion("deploymentconfigs"), g = a.getPreferredVersion("replicationcontrollers"), h = a.getPreferredVersion("replicasets"), v = function() { +var u, d, m = t("annotation"), p = a.getPreferredVersion("deployments"), f = a.getPreferredVersion("deploymentconfigs"), g = a.getPreferredVersion("replicationcontrollers"), v = a.getPreferredVersion("replicasets"), h = function() { u && d && (e.replicaSetsByDeploymentUID = c.groupByControllerUID(u), e.unfilteredReplicaSets = _.get(e, [ "replicaSetsByDeploymentUID", "" ], {}), i.addLabelSuggestionsFromResources(e.unfilteredReplicaSets, e.labelSuggestions), i.setLabelSuggestions(e.labelSuggestions), e.replicaSets = i.getLabelSelector().select(e.unfilteredReplicaSets), e.latestReplicaSetByDeploymentUID = {}, _.each(e.replicaSetsByDeploymentUID, function(t, n) { n && (e.latestReplicaSetByDeploymentUID[n] = o.getActiveReplicaSet(t, d[n])); })); @@ -5605,12 +5667,12 @@ var d = t("deploymentStatus")(r); r ? "DELETED" !== a && (r.causes = t("deploymentCauses")(r)) : angular.forEach(e.replicationControllers, function(e) { e.causes = t("deploymentCauses")(e); }), s.log("replicationControllers (subscribe)", e.replicationControllers); -})), y.push(r.watch(h, a, function(t) { -u = t.by("metadata.name"), v(), s.log("replicasets (subscribe)", e.replicaSets); +})), y.push(r.watch(v, a, function(t) { +u = t.by("metadata.name"), h(), s.log("replicasets (subscribe)", e.replicaSets); })), y.push(r.watch(f, a, function(t) { e.unfilteredDeploymentConfigs = t.by("metadata.name"), i.addLabelSuggestionsFromResources(e.unfilteredDeploymentConfigs, e.labelSuggestions), i.setLabelSuggestions(e.labelSuggestions), e.deploymentConfigs = i.getLabelSelector().select(e.unfilteredDeploymentConfigs), e.emptyMessage = "No deployment configurations to show", e.replicationControllersByDC = o.associateDeploymentsToDeploymentConfig(e.replicationControllers, e.deploymentConfigs, !0), e.replicationControllersByDC[""] && (e.unfilteredReplicationControllers = e.replicationControllersByDC[""], e.replicationControllersByDC[""] = i.getLabelSelector().select(e.replicationControllersByDC[""])), c(), s.log("deploymentconfigs (subscribe)", e.deploymentConfigs); })), y.push(r.watch(p, a, function(t) { -d = e.unfilteredDeployments = t.by("metadata.uid"), i.addLabelSuggestionsFromResources(e.unfilteredDeployments, e.labelSuggestions), i.setLabelSuggestions(e.labelSuggestions), e.deployments = i.getLabelSelector().select(e.unfilteredDeployments), v(), s.log("deployments (subscribe)", e.unfilteredDeployments); +d = e.unfilteredDeployments = t.by("metadata.uid"), i.addLabelSuggestionsFromResources(e.unfilteredDeployments, e.labelSuggestions), i.setLabelSuggestions(e.labelSuggestions), e.deployments = i.getLabelSelector().select(e.unfilteredDeployments), h(), s.log("deployments (subscribe)", e.unfilteredDeployments); })), e.showEmptyMessage = function() { return 0 === t("hashSize")(e.replicationControllersByDC) || !(1 !== t("hashSize")(e.replicationControllersByDC) || !e.replicationControllersByDC[""]); }, i.onActiveFiltersChanged(function(t) { @@ -5629,7 +5691,7 @@ link: "project/" + n.project + "/browse/deployments" }, { title: n.deployment } ]; -var h = a.getPreferredVersion("builds"), v = a.getPreferredVersion("replicasets"), y = a.getPreferredVersion("limitranges"), b = a.getPreferredVersion("imagestreams"); +var v = a.getPreferredVersion("builds"), h = a.getPreferredVersion("replicasets"), y = a.getPreferredVersion("limitranges"), b = a.getPreferredVersion("imagestreams"); e.deploymentsVersion = a.getPreferredVersion("deployments"), e.eventsVersion = a.getPreferredVersion("events"), e.horizontalPodAutoscalersVersion = a.getPreferredVersion("horizontalpodautoscalers"), e.healthCheckURL = d.healthCheckURL(n.project, "Deployment", n.deployment, e.deploymentsVersion.group); var C = []; p.get(n.project).then(_.spread(function(a, d) { @@ -5653,7 +5715,7 @@ e.loaded = !0, e.deployment = t, w(), C.push(r.watchObject(e.deploymentsVersion, type: "warning", message: "This deployment has been deleted." }), e.deployment = t, e.updatingPausedState = !1, w(), s.fetchReferencedImageStreamImages([ t.spec.template ], e.imagesByDockerReference, g, d); -})), C.push(r.watch(v, d, function(n) { +})), C.push(r.watch(h, d, function(n) { e.emptyMessage = "No deployments to show"; var a = n.by("metadata.name"); a = m.filterForController(a, t), e.inProgressDeployment = _.chain(a).filter("status.replicas").length > 1, e.unfilteredReplicaSetsForDeployment = o.sortByRevision(a), e.replicaSetsForDeployment = c.getLabelSelector().select(e.unfilteredReplicaSetsForDeployment), p(), c.addLabelSuggestionsFromResources(e.unfilteredReplicaSetsForDeployment, e.labelSuggestions), c.setLabelSuggestions(e.labelSuggestions); @@ -5671,7 +5733,7 @@ var n = t.by("metadata.name"); s.buildDockerRefMapForImageStreams(n, g), e.deployment && s.fetchReferencedImageStreamImages([ e.deployment.spec.template ], e.imagesByDockerReference, g, d), l.log("imagestreams (subscribe)", e.imageStreams); })), C.push(r.watch(e.horizontalPodAutoscalersVersion, d, function(t) { e.autoscalers = i.filterHPA(t.by("metadata.name"), "Deployment", n.deployment), w(); -})), C.push(r.watch(h, d, function(t) { +})), C.push(r.watch(v, d, function(t) { e.builds = t.by("metadata.name"), l.log("builds (subscribe)", e.builds); })), c.onActiveFiltersChanged(function(t) { e.$evalAsync(function() { @@ -5709,8 +5771,8 @@ f.removeVolume(e.deployment, t, d); r.unwatchAll(C); }); })); -} ]), angular.module("openshiftConsole").controller("DeploymentConfigController", [ "$scope", "$filter", "$routeParams", "APIService", "BreadcrumbsService", "DataService", "DeploymentsService", "HPAService", "ImageStreamResolver", "ModalsService", "Navigate", "NotificationsService", "Logger", "ProjectsService", "StorageService", "LabelFilter", "labelNameFilter", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, h) { -var v = {}; +} ]), angular.module("openshiftConsole").controller("DeploymentConfigController", [ "$scope", "$filter", "$routeParams", "APIService", "BreadcrumbsService", "DataService", "DeploymentsService", "HPAService", "ImageStreamResolver", "ModalsService", "Navigate", "NotificationsService", "Logger", "ProjectsService", "StorageService", "LabelFilter", "labelNameFilter", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, v) { +var h = {}; e.projectName = n.project, e.deploymentConfigName = n.deploymentconfig, e.deploymentConfig = null, e.deployments = {}, e.unfilteredDeployments = {}, e.imagesByDockerReference = {}, e.builds = {}, e.labelSuggestions = {}, e.forms = {}, e.alerts = {}, e.breadcrumbs = r.getBreadcrumbs({ name: n.deploymentconfig, kind: "DeploymentConfig", @@ -5739,7 +5801,7 @@ e.loaded = !0, e.deploymentConfig = a, e.strategyParams = t("deploymentStrategyP "DELETED" === n && (e.alerts.deleted = { type: "warning", message: "This deployment configuration has been deleted." -}), e.deploymentConfig = t, e.updatingPausedState = !1, p(), c.fetchReferencedImageStreamImages([ t.spec.template ], e.imagesByDockerReference, v, r); +}), e.deploymentConfig = t, e.updatingPausedState = !1, p(), c.fetchReferencedImageStreamImages([ t.spec.template ], e.imagesByDockerReference, h, r); })); }, function(n) { e.loaded = !0, e.alerts.load = { @@ -5772,14 +5834,14 @@ e.deployments = g.getLabelSelector().select(e.unfilteredDeployments), e.orderedD }, { http: { params: { -labelSelector: h("deploymentConfig") + "=" + e.deploymentConfigName +labelSelector: v("deploymentConfig") + "=" + e.deploymentConfigName } } })), o.list(C, r).then(function(e) { d = e.by("metadata.name"), p(); }), j.push(o.watch(b, r, function(t) { var n = t.by("metadata.name"); -c.buildDockerRefMapForImageStreams(n, v), e.deploymentConfig && c.fetchReferencedImageStreamImages([ e.deploymentConfig.spec.template ], e.imagesByDockerReference, v, r), m.log("imagestreams (subscribe)", e.imageStreams); +c.buildDockerRefMapForImageStreams(n, h), e.deploymentConfig && c.fetchReferencedImageStreamImages([ e.deploymentConfig.spec.template ], e.imagesByDockerReference, h, r), m.log("imagestreams (subscribe)", e.imageStreams); })), j.push(o.watch(y, r, function(t) { e.builds = t.by("metadata.name"), m.log("builds (subscribe)", e.builds); })), j.push(o.watch(e.horizontalPodAutoscalersVersion, r, function(t) { @@ -5832,7 +5894,7 @@ f.removeVolume(e.deploymentConfig, t, r); o.unwatchAll(j); }); })); -} ]), angular.module("openshiftConsole").controller("ReplicaSetController", [ "$scope", "$filter", "$routeParams", "AuthorizationService", "BreadcrumbsService", "DataService", "DeploymentsService", "HPAService", "ImageStreamResolver", "Logger", "MetricsService", "ModalsService", "Navigate", "OwnerReferencesService", "PodsService", "ProjectsService", "StorageService", "keyValueEditorUtils", "kind", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, h, v, y) { +} ]), angular.module("openshiftConsole").controller("ReplicaSetController", [ "$scope", "$filter", "$routeParams", "AuthorizationService", "BreadcrumbsService", "DataService", "DeploymentsService", "HPAService", "ImageStreamResolver", "Logger", "MetricsService", "ModalsService", "Navigate", "OwnerReferencesService", "PodsService", "ProjectsService", "StorageService", "keyValueEditorUtils", "kind", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, v, h, y) { var b = !1, C = t("annotation"), S = t("humanizeKind")(y), w = t("hasDeployment"); switch (y) { case "ReplicaSet": @@ -5856,12 +5918,12 @@ e.logCanRun = !_.includes([ "New", "Pending" ], P(t)); }, I = t("isIE")() || t("isEdge")(); g.get(n.project).then(_.spread(function(u, g) { e.project = u, e.projectContext = g; -var v = {}, E = function() { -if (e.hpaForRS = s.filterHPA(v, y, n.replicaSet), e.deploymentConfigName && e.isActive) { -var t = s.filterHPA(v, "DeploymentConfig", e.deploymentConfigName); +var h = {}, E = function() { +if (e.hpaForRS = s.filterHPA(h, y, n.replicaSet), e.deploymentConfigName && e.isActive) { +var t = s.filterHPA(h, "DeploymentConfig", e.deploymentConfigName); e.autoscalers = e.hpaForRS.concat(t); } else if (e.deployment && e.isActive) { -var a = s.filterHPA(v, "Deployment", e.deployment.metadata.name); +var a = s.filterHPA(h, "Deployment", e.deployment.metadata.name); e.autoscalers = e.hpaForRS.concat(a); } else e.autoscalers = e.hpaForRS; }, T = function() { @@ -5990,7 +6052,7 @@ group: "autoscaling", resource: "horizontalpodautoscalers", version: "v1" }, g, function(e) { -v = e.by("metadata.name"), E(), N(); +h = e.by("metadata.name"), E(), N(); }, { poll: I, pollInterval: 6e4 @@ -6040,7 +6102,7 @@ okButtonText: "Remove", okButtonClass: "btn-danger", cancelButtonText: "Cancel" }).then(function() { -h.removeVolume(e.replicaSet, n, g); +v.removeVolume(e.replicaSet, n, g); }); }, e.$on("$destroy", function() { o.unwatchAll(j); @@ -6658,7 +6720,7 @@ kind: a.kind, namespace: a.project, subpage: "Edit Resource Limits" }); -var h = e("getErrorDetails"), v = function(e, t) { +var v = e("getErrorDetails"), h = function(e, t) { d.addNotification({ id: "set-compute-limits-error", type: "error", @@ -6689,11 +6751,11 @@ type: "success", message: g + " was updated." }), y(); }, function(e) { -r.disableInputs = !1, v(g + " could not be updated.", h(e)); +r.disableInputs = !1, h(g + " could not be updated.", v(e)); }); }; }, function(e) { -v(g + " could not be loaded.", h(e)); +h(g + " could not be loaded.", v(e)); }); var m = function() { r.hideCPU || (r.cpuProblems = l.validatePodLimits(r.limitRanges, "cpu", r.containers, e)), r.memoryProblems = l.validatePodLimits(r.limitRanges, "memory", r.containers, e); @@ -6829,7 +6891,7 @@ delete e.updatedBuildConfig.spec.postCommit.script; } else delete e.updatedBuildConfig.spec.postCommit.command, delete e.updatedBuildConfig.spec.postCommit.args, delete e.updatedBuildConfig.spec.postCommit.script; }; e.secrets = {}; -var h = [], v = t("buildStrategy"), y = function() { +var v = [], h = t("buildStrategy"), y = function() { var t; e.buildConfig ? (t = c.resourceURL(e.buildConfig), n.path(t)) : r.history.back(); }; @@ -6841,7 +6903,7 @@ e.$on("$destroy", b), u.get(a.project).then(_.spread(function(n, r) { e.project = n, e.context = r, i.canI("buildconfigs", "update", a.project) ? s.get("buildconfigs", a.buildconfig, r, { errorNotification: !1 }).then(function(t) { -e.buildConfig = t, f(), e.updatedBuildConfig = angular.copy(e.buildConfig), e.buildStrategy = v(e.updatedBuildConfig), e.strategyType = e.buildConfig.spec.strategy.type, e.envVars = e.buildStrategy.env || [], e.triggers = C(e.triggers, e.buildConfig.spec.triggers), e.sources = I(e.sources, e.buildConfig.spec.source), _.has(t, "spec.strategy.jenkinsPipelineStrategy.jenkinsfile") && (e.jenkinsfileOptions.type = "inline"), s.list("secrets", r).then(function(t) { +e.buildConfig = t, f(), e.updatedBuildConfig = angular.copy(e.buildConfig), e.buildStrategy = h(e.updatedBuildConfig), e.strategyType = e.buildConfig.spec.strategy.type, e.envVars = e.buildStrategy.env || [], e.triggers = C(e.triggers, e.buildConfig.spec.triggers), e.sources = I(e.sources, e.buildConfig.spec.source), _.has(t, "spec.strategy.jenkinsPipelineStrategy.jenkinsfile") && (e.jenkinsfileOptions.type = "inline"), s.list("secrets", r).then(function(t) { var n = m.groupSecretsByType(t), a = _.mapValues(n, function(e) { return _.map(e, "metadata.name"); }); @@ -6873,7 +6935,7 @@ value: e.destinationDir }; })) : (e.imageSourceFromObjects = [], e.sourceImages.forEach(function(t) { e.imageSourceFromObjects.push(t.from); -}))), e.options.forcePull = !!e.buildStrategy.forcePull, "Docker" === e.strategyType && (e.options.noCache = !!e.buildConfig.spec.strategy.dockerStrategy.noCache, e.buildFromTypes.push("None")), h.push(s.watchObject("buildconfigs", a.buildconfig, r, function(t, n) { +}))), e.options.forcePull = !!e.buildStrategy.forcePull, "Docker" === e.strategyType && (e.options.noCache = !!e.buildConfig.spec.strategy.dockerStrategy.noCache, e.buildFromTypes.push("None")), v.push(s.watchObject("buildconfigs", a.buildconfig, r, function(t, n) { "MODIFIED" === n && l.addNotification({ id: "edit-build-config-conflict", type: "warning", @@ -6896,7 +6958,7 @@ var C = function(n, a) { function r(n, a) { return t("imageObjectRef")(n, e.projectName) === t("imageObjectRef")(a, e.projectName); } -var o = v(e.buildConfig).from; +var o = h(e.buildConfig).from; return a.forEach(function(e) { switch (e.type) { case "Generic": @@ -7002,7 +7064,7 @@ switch (e.secrets.picked = { gitSecret: e.buildConfig.spec.source.sourceSecret ? [ e.buildConfig.spec.source.sourceSecret ] : [ { name: "" } ], -pullSecret: v(e.buildConfig).pullSecret ? [ v(e.buildConfig).pullSecret ] : [ { +pullSecret: h(e.buildConfig).pullSecret ? [ h(e.buildConfig).pullSecret ] : [ { name: "" } ], pushSecret: e.buildConfig.spec.output.pushSecret ? [ e.buildConfig.spec.output.pushSecret ] : [ { @@ -7020,7 +7082,7 @@ destinationDir: "" break; case "Custom": -e.secrets.picked.sourceSecrets = v(e.buildConfig).secrets || [ { +e.secrets.picked.sourceSecrets = h(e.buildConfig).secrets || [ { secretSource: { name: "" }, @@ -7054,22 +7116,22 @@ secret: o._generateSecret() }, e.triggers[a + "Webhooks"].push(n); } }, e.save = function() { -switch (e.disableInputs = !0, g(), v(e.updatedBuildConfig).forcePull = e.options.forcePull, e.strategyType) { +switch (e.disableInputs = !0, g(), h(e.updatedBuildConfig).forcePull = e.options.forcePull, e.strategyType) { case "Docker": -v(e.updatedBuildConfig).noCache = e.options.noCache; +h(e.updatedBuildConfig).noCache = e.options.noCache; break; case "JenkinsPipeline": "path" === e.jenkinsfileOptions.type ? delete e.updatedBuildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfile : delete e.updatedBuildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath; } -switch (e.sources.images && !_.isEmpty(e.sourceImages) && (e.updatedBuildConfig.spec.source.images[0].paths = S(e.imageSourcePaths), e.updatedBuildConfig.spec.source.images[0].from = w(e.imageOptions.fromSource)), "None" === e.imageOptions.from.type ? delete v(e.updatedBuildConfig).from : v(e.updatedBuildConfig).from = w(e.imageOptions.from), "None" === e.imageOptions.to.type ? delete e.updatedBuildConfig.spec.output.to : e.updatedBuildConfig.spec.output.to = w(e.imageOptions.to), v(e.updatedBuildConfig).env = p.compactEntries(e.envVars), P(e.updatedBuildConfig.spec.source, _.head(e.secrets.picked.gitSecret), "sourceSecret"), P(v(e.updatedBuildConfig), _.head(e.secrets.picked.pullSecret), "pullSecret"), P(e.updatedBuildConfig.spec.output, _.head(e.secrets.picked.pushSecret), "pushSecret"), e.strategyType) { +switch (e.sources.images && !_.isEmpty(e.sourceImages) && (e.updatedBuildConfig.spec.source.images[0].paths = S(e.imageSourcePaths), e.updatedBuildConfig.spec.source.images[0].from = w(e.imageOptions.fromSource)), "None" === e.imageOptions.from.type ? delete h(e.updatedBuildConfig).from : h(e.updatedBuildConfig).from = w(e.imageOptions.from), "None" === e.imageOptions.to.type ? delete e.updatedBuildConfig.spec.output.to : e.updatedBuildConfig.spec.output.to = w(e.imageOptions.to), h(e.updatedBuildConfig).env = p.compactEntries(e.envVars), P(e.updatedBuildConfig.spec.source, _.head(e.secrets.picked.gitSecret), "sourceSecret"), P(h(e.updatedBuildConfig), _.head(e.secrets.picked.pullSecret), "pullSecret"), P(e.updatedBuildConfig.spec.output, _.head(e.secrets.picked.pushSecret), "pushSecret"), e.strategyType) { case "Source": case "Docker": R(e.updatedBuildConfig.spec.source, e.secrets.picked.sourceSecrets); break; case "Custom": -R(v(e.updatedBuildConfig), e.secrets.picked.sourceSecrets); +R(h(e.updatedBuildConfig), e.secrets.picked.sourceSecrets); } e.updatedBuildConfig.spec.triggers = k(), b(), s.update("buildconfigs", e.updatedBuildConfig.metadata.name, e.updatedBuildConfig, e.context).then(function() { l.addNotification({ @@ -7085,7 +7147,7 @@ details: t("getErrorDetails")(n) }); }); }, e.$on("$destroy", function() { -s.unwatchAll(h); +s.unwatchAll(v); }); } ]), angular.module("openshiftConsole").controller("EditConfigMapController", [ "$filter", "$routeParams", "$scope", "$window", "DataService", "BreadcrumbsService", "Navigate", "NotificationsService", "ProjectsService", function(e, t, n, a, r, o, i, s, c) { var l = []; @@ -7144,7 +7206,7 @@ kind: a.kind, namespace: a.project, subpage: "Edit Deployment Config" }), e.deploymentConfigStrategyTypes = [ "Recreate", "Rolling", "Custom" ]; -var g = t("orderByDisplayName"), h = t("getErrorDetails"), v = function(t, n) { +var g = t("orderByDisplayName"), v = t("getErrorDetails"), h = function(t, n) { e.alerts["from-value-objects"] = { type: "error", message: t, @@ -7221,7 +7283,7 @@ errorNotification: !1 }).then(function(t) { b = g(t.by("metadata.name")), e.availableConfigMaps = b, e.valueFromObjects = b.concat(C); }, function(e) { -403 !== e.code && v("Could not load config maps", h(e)); +403 !== e.code && h("Could not load config maps", v(e)); }), c.list("secrets", r, null, { errorNotification: !1 }).then(function(t) { @@ -7233,7 +7295,7 @@ e.secretsByType = _.each(a, function(e) { e.unshift(""); }); }, function(e) { -403 !== e.code && v("Could not load secrets", h(e)); +403 !== e.code && h("Could not load secrets", v(e)); }), y.push(c.watchObject("deploymentconfigs", a.deploymentconfig, r, function(t, n) { "MODIFIED" === n && (e.alerts["updated/deleted"] = { type: "warning", @@ -7354,14 +7416,14 @@ name: e.name }, e.labels = [], l.isAvailable().then(function(t) { e.metricsWarning = !t; }); -var g = t("getErrorDetails"), h = function() { +var g = t("getErrorDetails"), v = function() { a.history.back(); }; -e.cancel = h; -var v = function() { +e.cancel = v; +var h = function() { d.hideNotification("edit-hpa-error"); }; -e.$on("$destroy", v), m.get(n.project).then(_.spread(function(t, a) { +e.$on("$destroy", h), m.get(n.project).then(_.spread(function(t, a) { e.project = t; var l = "HorizontalPodAutoscaler" === n.kind ? "update" : "create"; if (o.canI({ @@ -7369,7 +7431,7 @@ resource: "horizontalpodautoscalers", group: "autoscaling" }, l, n.project)) { var m = function() { -e.disableInputs = !0, v(); +e.disableInputs = !0, h(); var t = { apiVersion: "autoscaling/v1", kind: "HorizontalPodAutoscaler", @@ -7396,7 +7458,7 @@ group: "autoscaling" d.addNotification({ type: "success", message: "Horizontal pod autoscaler " + e.metadata.name + " successfully created." -}), h(); +}), v(); }, function(t) { e.disableInputs = !1, d.addNotification({ id: "edit-hpa-error", @@ -7413,7 +7475,7 @@ group: "autoscaling" d.addNotification({ type: "success", message: "Horizontal pod autoscaler " + e.metadata.name + " successfully updated." -}), h(); +}), v(); }, function(t) { e.disableInputs = !1, d.addNotification({ id: "edit-hpa-error", @@ -7488,15 +7550,15 @@ details: t t.url(a.resourceURL); }; a.cancel = g; -var h = function() { +var v = function() { l.hideNotification("add-health-check-error"); }; -a.$on("$destroy", h), u.get(n.project).then(_.spread(function(t, u) { -var d = e("humanizeKind")(n.kind) + ' "' + a.name + '"', v = { +a.$on("$destroy", v), u.get(n.project).then(_.spread(function(t, u) { +var d = e("humanizeKind")(n.kind) + ' "' + a.name + '"', h = { resource: i.kindToResource(n.kind), group: n.group }; -r.canI(v, "update", n.project) ? s.get(v, a.name, u).then(function(e) { +r.canI(h, "update", n.project) ? s.get(h, a.name, u).then(function(e) { var r = a.object = angular.copy(e); a.breadcrumbs = o.getBreadcrumbs({ object: r, @@ -7507,7 +7569,7 @@ e[t] = _.get(a.previousProbes, [ e.name, t ], {}), a.form.$setDirty(); }, a.removeProbe = function(e, t) { _.set(a.previousProbes, [ e.name, t ], e[t]), delete e[t], a.form.$setDirty(); }, a.save = function() { -a.disableInputs = !0, h(), s.update(i.kindToResource(n.kind), a.name, r, u).then(function() { +a.disableInputs = !0, v(), s.update(i.kindToResource(n.kind), a.name, r, u).then(function() { l.addNotification({ type: "success", message: p(d) + " was updated." @@ -7728,7 +7790,7 @@ e.projectTemplates = t.by("metadata.name"); })); }))) : l.toErrorPage("Catalog category " + r.category + "/" + r.subcategory + " not found."); } else l.toErrorPage("Catalog category " + r.category + " not found."); -} ]), angular.module("openshiftConsole").controller("CreateFromImageController", [ "$scope", "$filter", "$parse", "$q", "$routeParams", "$uibModal", "APIService", "ApplicationGenerator", "DataService", "HPAService", "ImagesService", "LimitRangesService", "Logger", "MetricsService", "Navigate", "NotificationsService", "ProjectsService", "QuotaService", "SOURCE_URL_PATTERN", "SecretsService", "TaskList", "failureObjectNameFilter", "keyValueEditorUtils", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, h, v, y, b, C, S, w) { +} ]), angular.module("openshiftConsole").controller("CreateFromImageController", [ "$scope", "$filter", "$parse", "$q", "$routeParams", "$uibModal", "APIService", "ApplicationGenerator", "DataService", "HPAService", "ImagesService", "LimitRangesService", "Logger", "MetricsService", "Navigate", "NotificationsService", "ProjectsService", "QuotaService", "SOURCE_URL_PATTERN", "SecretsService", "TaskList", "failureObjectNameFilter", "keyValueEditorUtils", function(e, t, n, a, r, o, i, s, c, l, u, d, m, p, f, g, v, h, y, b, C, S, w) { var k = t("displayName"), j = t("humanize"); e.projectName = r.project, e.sourceURLPattern = y; var P = r.imageStream; @@ -7751,7 +7813,7 @@ g.hideNotification("create-builder-list-config-maps-error"), g.hideNotification( !e.id || "error" !== e.type && "warning" !== e.type || g.hideNotification(e.id); }); }; -e.$on("$destroy", D), h.get(r.project).then(_.spread(function(t, n) { +e.$on("$destroy", D), v.get(r.project).then(_.spread(function(t, n) { e.project = t, r.sourceURI && (e.sourceURIinParams = !0); var i = function() { e.hideCPU || (e.cpuProblems = d.validatePodLimits(e.limitRanges, "cpu", [ e.container ], t)), e.memoryProblems = d.validatePodLimits(e.limitRanges, "memory", [ e.container ], t); @@ -7759,11 +7821,11 @@ e.hideCPU || (e.cpuProblems = d.validatePodLimits(e.limitRanges, "cpu", [ e.cont c.list("limitranges", n).then(function(t) { e.limitRanges = t.by("metadata.name"), _.isEmpty(e.limitRanges) || e.$watch("container", i, !0); }); -var h, y, S = function() { +var v, y, S = function() { e.scaling.autoscale ? e.showCPURequestWarning = !l.hasCPURequest([ e.container ], e.limitRanges, t) : e.showCPURequestWarning = !1; }; c.list("resourcequotas", n).then(function(e) { -h = e.by("metadata.name"), m.log("quotas", h); +v = e.by("metadata.name"), m.log("quotas", v); }), c.list("appliedclusterresourcequotas", n).then(function(e) { y = e.by("metadata.name"), m.log("cluster quotas", y); }), e.$watch("scaling.autoscale", S), e.$watch("container", S, !0), e.$watch("name", function(e, t) { @@ -7925,7 +7987,7 @@ var t = s.generate(e); A = [], angular.forEach(t, function(e) { null !== e && (m.debug("Generated resource definition:", e), A.push(e)); }); -var a = s.ifResourcesDontExist(A, e.projectName), r = v.getLatestQuotaAlerts(A, n), o = function(t) { +var a = s.ifResourcesDontExist(A, e.projectName), r = h.getLatestQuotaAlerts(A, n), o = function(t) { return e.nameTaken = t.nameTaken, r; }; a.then(o, o).then(L, L); @@ -7987,12 +8049,12 @@ k = []; var t = [], n = {}; angular.forEach(e.objects, function(e) { if ("BuildConfig" === e.kind) { -var a = S(b(e), v); +var a = S(b(e), h); a && k.push({ name: a, usesParameters: d(a) }); -var r = S(C(e), v); +var r = S(C(e), h); r && (n[r] = !0); } "DeploymentConfig" === e.kind && (t = t.concat(p(e))); @@ -8009,8 +8071,8 @@ return _.each(r.template.parameters, function(t) { e[t.name] = t.value; }), e; } -var h = a.template, v = a.namespace || "", y = n("spec.template.spec.containers"), b = n("spec.strategy.sourceStrategy.from || spec.strategy.dockerStrategy.from || spec.strategy.customStrategy.from"), C = n("spec.output.to"), S = e("imageObjectRef"); -if (h) { +var v = a.template, h = a.namespace || "", y = n("spec.template.spec.containers"), b = n("spec.strategy.sourceStrategy.from || spec.strategy.dockerStrategy.from || spec.strategy.customStrategy.from"), C = n("spec.output.to"), S = e("imageObjectRef"); +if (v) { r.breadcrumbs = [ { title: "Add to Project", link: "project/" + a.project + "/create" @@ -8018,7 +8080,7 @@ link: "project/" + a.project + "/create" title: "Catalog", link: "project/" + a.project + "/create?tab=fromCatalog" }, { -title: h +title: v } ]; a.templateParamsMap && (r.prefillParameters = function() { try { @@ -8034,8 +8096,8 @@ details: "The `templateParamsMap` URL parameter is not valid JSON. " + e }()); var w = /\${([a-zA-Z0-9\_]+)}/g, k = []; l.get(a.project).then(_.spread(function(n) { -if (r.project = n, v) i.get("templates", h, { -namespace: v || r.project.metadata.name +if (r.project = n, h) i.get("templates", v, { +namespace: h || r.project.metadata.name }).then(function(t) { r.template = t, r.breadcrumbs[2].title = e("displayName")(t), f(t); _.some(k, function(e) { @@ -8333,7 +8395,7 @@ a.history.back(); }; n.cancel = g, u.get(t.project).then(_.spread(function(a, u) { if (n.project = a, i.canI(m, "create", t.project)) { -var h, v = e("orderByDisplayName"); +var v, h = e("orderByDisplayName"); n.routing.to = { kind: "Service", name: n.serviceName, @@ -8341,7 +8403,7 @@ weight: 1 }; var y, b = function() { var e = y, t = _.get(n, "routing.to.name"); -y = _.get(h, [ t, "metadata", "labels" ], {}); +y = _.get(v, [ t, "metadata", "labels" ], {}); var a = d.mapEntries(d.compactEntries(n.labels)), r = _.assign(a, y); e && (r = _.omitBy(r, function(t, n) { return e[n] && !y[n]; @@ -8353,7 +8415,7 @@ value: e }); }; s.list(p, u).then(function(e) { -h = e.by("metadata.name"), n.services = v(h), n.$watch("routing.to.name", b); +v = e.by("metadata.name"), n.services = h(v), n.$watch("routing.to.name", b); }), n.createRoute = function() { if (n.createRouteForm.$valid) { f(), n.disableInputs = !0; @@ -8387,7 +8449,7 @@ details: e("getErrorDetails")(t) if (t.kind && t.name) { var f = [ "Deployment", "DeploymentConfig", "ReplicaSet", "ReplicationController" ], g = e("humanizeKind"); if (_.includes(f, t.kind)) { -var h = { +var v = { resource: r.kindToResource(t.kind), group: t.group }; @@ -8403,9 +8465,9 @@ kind: t.kind, namespace: t.project, subpage: "Add Storage" }), n.pvcVersion = r.getPreferredVersion("persistentvolumeclaims"); -var v = r.getPreferredVersion("resourcequotas"), y = r.getPreferredVersion("appliedclusterresourcequotas"); +var h = r.getPreferredVersion("resourcequotas"), y = r.getPreferredVersion("appliedclusterresourcequotas"); d.get(t.project).then(_.spread(function(r, d) { -if (n.project = r, o.canI(h, "update", t.project)) { +if (n.project = r, o.canI(v, "update", t.project)) { var p = e("orderByDisplayName"), f = e("getErrorDetails"), b = e("generateName"), C = function(e, t) { n.disableInputs = !0, u.addNotification({ id: "attach-pvc-error", @@ -8428,7 +8490,7 @@ var e = _.get(n, "attach.resource.spec.template"); n.existingMountPaths = m.getMountPaths(e, k); }; n.$watchGroup([ "attach.resource", "attach.allContainers" ], j), n.$watch("attach.containers", j, !0); -s.get(h, t.name, d).then(function(e) { +s.get(v, t.name, d).then(function(e) { n.attach.resource = e, n.breadcrumbs = i.getBreadcrumbs({ object: e, project: r, @@ -8440,7 +8502,7 @@ n.existingVolumeNames = m.getVolumeNames(t); C(t.name + " could not be loaded.", f(e)); }), s.list(n.pvcVersion, d).then(function(e) { n.pvcs = p(e.by("metadata.name")), _.isEmpty(n.pvcs) || n.attach.persistentVolumeClaim || (n.attach.persistentVolumeClaim = _.head(n.pvcs)); -}), s.list(v, { +}), s.list(h, { namespace: n.projectName }, function(e) { n.quotas = e.by("metadata.name"), n.outOfClaims = c.isAnyStorageQuotaExceeded(n.quotas, n.clusterQuotas); @@ -8459,7 +8521,7 @@ e.volumeMounts || (e.volumeMounts = []), e.volumeMounts.push(t); } }); var p = m.createVolume(o, r); -a.spec.volumes || (a.spec.volumes = []), a.spec.volumes.push(p), s.update(h, e.metadata.name, n.attach.resource, d).then(function() { +a.spec.volumes || (a.spec.volumes = []), a.spec.volumes.push(p), s.update(v, e.metadata.name, n.attach.resource, d).then(function() { var e; i || (e = "No mount path was provided. The volume reference was added to the configuration, but it will not be mounted into running pods."), u.addNotification({ type: "success", @@ -8492,14 +8554,14 @@ kind: n.kind, namespace: n.project, subpage: "Add Config Files" }), a.configMapVersion = o.getPreferredVersion("configmaps"), a.secretVersion = o.getPreferredVersion("secrets"); -var h = e("humanizeKind"); +var v = e("humanizeKind"); a.groupByKind = function(e) { -return h(e.kind); +return v(e.kind); }; a.$watch("attach.source", function() { _.set(a, "attach.items", [ {} ]); }); -var v = function() { +var h = function() { a.forms.addConfigVolumeForm.$setDirty(); }, y = function() { r.history.back(); @@ -8516,9 +8578,9 @@ details: t u.hideNotification("add-config-volume-error"); }; a.$on("$destroy", C), a.addItem = function() { -a.attach.items.push({}), v(); +a.attach.items.push({}), h(); }, a.removeItem = function(e) { -a.attach.items.splice(e, 1), v(); +a.attach.items.splice(e, 1), h(); }, d.get(n.project).then(_.spread(function(t, r) { if (a.project = t, i.canI(g, "update", n.project)) { var o = e("orderByDisplayName"), d = e("getErrorDetails"), p = e("generateName"); @@ -8547,11 +8609,11 @@ a.secrets = o(e.by("metadata.name")); }); var f = function(e) { return a.attach.allContainers || a.attach.containers[e.name]; -}, v = function() { +}, h = function() { var e = _.get(a, "targetObject.spec.template"); a.existingMountPaths = m.getMountPaths(e, f); }; -a.$watchGroup([ "targetObject", "attach.allContainers" ], v), a.$watch("attach.containers", v, !0); +a.$watchGroup([ "targetObject", "attach.allContainers" ], h), a.$watch("attach.containers", h, !0); a.$watch("attach.items", function() { var e = _.map(a.attach.items, "path"); a.itemPaths = _.compact(e); @@ -8564,25 +8626,25 @@ mountPath: _.get(a, "attach.mountPath") "Secret" === o.kind && (l.readOnly = !0), _.each(i.spec.containers, function(e) { f(e) && (e.volumeMounts = e.volumeMounts || [], e.volumeMounts.push(l)); }); -var m, h = { +var m, v = { name: s }; switch (a.attach.pickKeys && (m = a.attach.items), o.kind) { case "ConfigMap": -h.configMap = { +v.configMap = { name: o.metadata.name, items: m }; break; case "Secret": -h.secret = { +v.secret = { secretName: o.metadata.name, items: m }; } -i.spec.volumes = i.spec.volumes || [], i.spec.volumes.push(h), a.disableInputs = !0, C(); -var v = e("humanizeKind"), S = v(o.kind), w = v(n.kind); +i.spec.volumes = i.spec.volumes || [], i.spec.volumes.push(v), a.disableInputs = !0, C(); +var h = e("humanizeKind"), S = h(o.kind), w = h(n.kind); c.update(g, t.metadata.name, a.targetObject, r).then(function() { u.addNotification({ type: "success", @@ -8593,7 +8655,7 @@ a.disableInputs = !1, b("An error occurred attaching the " + S + " to the " + w }); } }; -} else l.toErrorPage("You do not have authority to update " + h(n.kind) + " " + n.name + ".", "access_denied"); +} else l.toErrorPage("You do not have authority to update " + v(n.kind) + " " + n.name + ".", "access_denied"); })); } else l.toErrorPage("Volumes are not supported for kind " + n.kind + "."); } else l.toErrorPage("Kind or name parameter missing."); @@ -9199,11 +9261,11 @@ p(), e.$evalAsync(g); }, 50, { maxWait: 250 })); -var h = function() { +var v = function() { d(), g(); -}, v = _.debounce(function() { +}, h = _.debounce(function() { t && e.$evalAsync(function() { -e.events = s(t), h(); +e.events = s(t), v(); }); }, 250, { leading: !0, @@ -9213,7 +9275,7 @@ maxWait: 1e3 e.$watch("apiObjects", function(n) { r = {}, _.each(n, function(e) { _.get(e, "metadata.uid") && (r[e.metadata.uid] = !0); -}), e.showKindAndName = 1 !== _.size(r), t && v(); +}), e.showKindAndName = 1 !== _.size(r), t && h(); }), e.$watch("showKindAndName", function(t) { e.sortConfig = { fields: [ { @@ -9238,7 +9300,7 @@ title: "Count", sortType: "numeric" } ], isAscending: !0, -onSortChange: h +onSortChange: v }, t && e.sortConfig.fields.splice(1, 0, { id: "involvedObject.name", title: "Name", @@ -9249,7 +9311,7 @@ title: "Kind", sortType: "alpha" }); }), i.push(n.watch("events", e.projectContext, function(n) { -t = n.by("metadata.name"), v(), o.log("events (subscribe)", e.filteredEvents); +t = n.by("metadata.name"), h(), o.log("events (subscribe)", e.filteredEvents); }, { skipDigest: !0 })), e.$on("$destroy", function() { @@ -9340,7 +9402,7 @@ message: "Resource name is missing in metadata field." message: "Resource is missing metadata field." }, !1)); } -function h() { +function v() { a.open({ animation: !0, templateUrl: "views/modals/process-or-save-template.html", @@ -9350,7 +9412,7 @@ scope: p p.templateOptions.add ? y() : (o.setTemplate(p.resourceList[0]), b()); }); } -function v() { +function h() { a.open({ animation: !0, templateUrl: "views/modals/confirm-replace.html", @@ -9572,9 +9634,9 @@ if (!g(t)) return p.errorOccurred = !0, !1; e.push(C(t)); }), D().then(function(t) { p.input.selectedProject = t, n.all(e).then(function() { -p.errorOccurred || (1 === p.createResources.length && "Template" === p.resourceList[0].kind ? h() : _.isEmpty(p.updateResources) ? l.getLatestQuotaAlerts(p.createResources, { +p.errorOccurred || (1 === p.createResources.length && "Template" === p.resourceList[0].kind ? v() : _.isEmpty(p.updateResources) ? l.getLatestQuotaAlerts(p.createResources, { namespace: p.input.selectedProject.metadata.name -}).then(N) : (p.updateTemplate = 1 === p.updateResources.length && "Template" === p.updateResources[0].kind, p.updateTemplate ? h() : v())); +}).then(N) : (p.updateTemplate = 1 === p.updateResources.length && "Template" === p.updateResources[0].kind, p.updateTemplate ? v() : h())); }); }, function(e) { c.addNotification({ @@ -10400,7 +10462,7 @@ f(e); }(); var g = function() { return _.get(n, "nav.collapsed", !1); -}, h = function(e) { +}, v = function(e) { _.set(n, "nav.showMobileNav", e); }; r.toggleNav = function() { @@ -10408,15 +10470,15 @@ var e = g(); f(!e, !0); }, r.toggleMobileNav = function() { var e = _.get(n, "nav.showMobileNav"); -h(!e); +v(!e); }, r.closeMobileNav = function() { -h(!1); +v(!1); }, r.closeOrderingPanel = function() { _.set(r, "ordering.panelName", ""); }, r.showOrderingPanel = function(e) { _.set(r, "ordering.panelName", e); }, r.catalogLandingPageEnabled = !i.DISABLE_SERVICE_CATALOG_LANDING_PAGE; -var v = p.find(".selectpicker"), y = [], b = function() { +var h = p.find(".selectpicker"), y = [], b = function() { var t = r.currentProjectName; if (t) { var n = function(e, n) { @@ -10425,7 +10487,7 @@ return n ? a.text(d(e)) : a.text(m(e, u)), a; }; _.size(l) <= 100 ? (u = e("orderByDisplayName")(l), y = _.map(u, function(e) { return n(e, !1); -})) : y = [ n(l[t], !0) ], v.empty(), v.append(y), v.append($('')), v.append($('')), v.selectpicker("refresh"); +})) : y = [ n(l[t], !0) ], h.empty(), h.append(y), h.append($('')), h.append($('')), h.selectpicker("refresh"); } }, C = function() { return s.list().then(function(e) { @@ -10443,7 +10505,7 @@ name: r.currentProjectName }), r.currentProject = l[r.currentProjectName], b()); })) : _.set(n, "view.hasProject", !1)); }; -S(), r.$on("$routeChangeSuccess", S), v.selectpicker({ +S(), r.$on("$routeChangeSuccess", S), h.selectpicker({ iconBase: "fa", tickIcon: "fa-check" }).change(function() { @@ -10707,7 +10769,7 @@ id: "@" }, template: '{{id.substring(0, 6)}}' }; -}).directive("customIcon", function() { +}).directive("customIcon", [ "$filter", function(e) { return { restrict: "E", scope: { @@ -10715,14 +10777,14 @@ resource: "=", kind: "@", tag: "=?" }, -controller: [ "$scope", "$filter", function(e, t) { -e.$watchGroup([ "resource", "tag" ], function() { -e.tag ? e.icon = t("imageStreamTagAnnotation")(e.resource, "icon", e.tag) : e.icon = t("annotation")(e.resource, "icon"), e.isDataIcon = e.icon && 0 === e.icon.indexOf("data:"), e.isDataIcon || (e.tag ? e.icon = t("imageStreamTagIconClass")(e.resource, e.tag) : e.icon = t("iconClass")(e.resource, e.kind)); +controller: [ "$scope", function(t) { +t.$watchGroup([ "resource", "tag" ], function() { +t.tag ? t.icon = e("imageStreamTagAnnotation")(t.resource, "icon", t.tag) : t.icon = e("annotation")(t.resource, "icon"), t.icon && 0 === t.icon.indexOf("data:") ? t.image = t.icon : (t.tag ? t.icon = e("imageStreamTagIconClass")(t.resource, t.tag) : t.icon = e("iconClass")(t.resource, t.kind), t.image = e("imageForIconClass")(t.icon)); }); } ], templateUrl: "views/directives/_custom-icon.html" }; -}).directive("bottomOfWindow", function() { +} ]).directive("bottomOfWindow", function() { return { restrict: "A", link: function(e, t) { @@ -11001,10 +11063,10 @@ name: c.apiObject.metadata.name } a.spec.volumes = a.spec.volumes || [], a.spec.volumes.push(m); } -var p = e("humanizeKind"), f = p(c.apiObject.kind), g = p(t.kind), h = { +var p = e("humanizeKind"), f = p(c.apiObject.kind), g = p(t.kind), v = { namespace: c.project.metadata.name }; -r.update(n.kindToResource(t.kind), t.metadata.name, t, h).then(function() { +r.update(n.kindToResource(t.kind), t.metadata.name, t, v).then(function() { i.addNotification({ type: "success", message: "Successfully added " + f + " " + c.apiObject.metadata.name + " to " + g + " " + t.metadata.name + ".", @@ -11283,14 +11345,14 @@ A || (E[o] = c3.generate(n)); })); } } -function h() { +function v() { return "-" + m.options.timeRange.value + "mn"; } -function v() { +function h() { return 60 * m.options.timeRange.value * 1e3; } function y() { -return Math.floor(v() / D) + "ms"; +return Math.floor(h() / D) + "ms"; } function b(e, t, n) { var a, r = { @@ -11343,7 +11405,7 @@ e.data ? e.data = _.chain(e.data).takeRight(D).concat(n).value() : e.data = n; } function P() { if (w()) { -var e = h(), t = []; +var e = v(), t = []; angular.forEach(m.metrics, function(n) { var a = []; n.totalUsed = 0, angular.forEach(n.datasets, function(r) { @@ -11514,9 +11576,9 @@ var o = [], i = { type: "spline" }; return t.showAverage ? (_.each(e[r.descriptor], function(e, t) { -v(r.descriptor, t, e); +h(r.descriptor, t, e); }), i.type = "area-spline", w && r.compactType && (i.type = r.compactType), i.x = "Date", i.columns = a(r), i) : (_.each(e[r.descriptor], function(e, t) { -v(r.descriptor, t, e); +h(r.descriptor, t, e); var a = t + "-dates"; _.set(i, [ "xs", t ], a); var s = [ a ], c = [ t ]; @@ -11575,10 +11637,10 @@ delete t.alerts[n], N = 1, y(); }; } } -function h() { +function v() { return _.isEmpty(t.pods) ? (t.loaded = !0, !1) : !t.metricsError && N < 2; } -function v(e, n, a) { +function h(e, n, a) { t.noData = !1; var r = _.initial(a), o = _.get(R, [ e, n ]); if (o) { @@ -11587,7 +11649,7 @@ _.set(R, [ e, n ], i); } else _.set(R, [ e, n ], r); } function y() { -if (!I && h()) { +if (!I && v()) { P = Date.now(); var e = f(); c.getPodMetrics(e).then(u, g).finally(function() { @@ -11708,8 +11770,8 @@ run: "=?" controller: [ "$scope", function(t) { var l, u, p, g = document.documentElement; t.logViewerID = _.uniqueId("log-viewer"), t.empty = !0; -var h, v; -"ReplicationController" === t.object.kind ? (h = "deploymentconfigs/log", v = a("annotation")(t.object, "deploymentConfig")) : (h = i.kindToResource(t.object.kind) + "/log", v = t.object.metadata.name); +var v, h; +"ReplicationController" === t.object.kind ? (v = "deploymentconfigs/log", h = a("annotation")(t.object, "deploymentConfig")) : (v = i.kindToResource(t.object.kind) + "/log", h = t.object.metadata.name); var y, b = function() { t.$apply(function() { var e = l.getBoundingClientRect(); @@ -11783,7 +11845,7 @@ limitBytes: 10485760 }, t.options), n = 0, a = function(e) { n++, N.appendChild(f(n, e)), D(); }; -(E = c.createStream(h, v, t.context, e)).onMessage(function(r, o, i) { +(E = c.createStream(v, h, t.context, e)).onMessage(function(r, o, i) { t.$evalAsync(function() { t.empty = !1, "logs" !== t.state && (t.state = "logs", R()); }), r && (e.limitBytes && i >= e.limitBytes && (t.$evalAsync(function() { @@ -11809,7 +11871,7 @@ autoScrollActive: !1 }; if (s.getLoggingURL(t.context.project).then(function(a) { var r = _.get(t.context, "project.metadata.name"), i = _.get(t.options, "container"); -r && i && v && a && (angular.extend(t, { +r && i && h && a && (angular.extend(t, { kibanaAuthUrl: e.trustAsResourceUrl(URI(a).segment("auth").segment("token").normalizePathname().toString()), access_token: o.UserStore().getToken() }), t.$watchGroup([ "context.project.metadata.name", "options.container", "name" ], function() { @@ -11817,7 +11879,7 @@ angular.extend(t, { kibanaArchiveUrl: e.trustAsResourceUrl(d.archiveUri({ namespace: t.context.project.metadata.name, namespaceUid: t.context.project.metadata.uid, -podname: v, +podname: h, containername: t.options.container, backlink: URI.encode(n.location.href) })) @@ -11849,7 +11911,7 @@ goChromeless: d.chromelessLink, restartLogs: B }), t.$on("$destroy", function() { A(), m.off("resize", I), m.off("scroll", S), u && $(u).off("scroll", S); -}), "deploymentconfigs/logs" === h && !v) return t.state = "empty", void (t.emptyStateMessage = "Logs are not available for this replication controller because it was not generated from a deployment configuration."); +}), "deploymentconfigs/logs" === v && !h) return t.state = "empty", void (t.emptyStateMessage = "Logs are not available for this replication controller because it was not generated from a deployment configuration."); t.$watchGroup([ "name", "options.container", "run" ], B); } ], require: "logViewer", @@ -12688,14 +12750,14 @@ templateUrl: "views/directives/route-service-bar-chart.html" }(), function() { angular.module("openshiftConsole").component("bindService", { controller: [ "$scope", "$filter", "APIService", "ApplicationsService", "BindingService", "DataService", "ServiceInstancesService", function(e, t, n, a, r, o, i) { -var s, c, l, u, d, m, p = this, f = t("statusCondition"), g = t("enableTechPreviewFeature"), h = function() { +var s, c, l, u, d, m, p = this, f = t("statusCondition"), g = t("enableTechPreviewFeature"), v = function() { var e, t; _.each(p.serviceInstances, function(n) { var a = "True" === _.get(f(n, "Ready"), "status"); a && (!e || n.metadata.creationTimestamp > e.metadata.creationTimestamp) && (e = n), a || t && !(n.metadata.creationTimestamp > t.metadata.creationTimestamp) || (t = n); }), p.serviceToBind = e || t; -}, v = function() { -p.serviceClasses && p.serviceInstances && (p.serviceInstances = r.filterBindableServiceInstances(p.serviceInstances, p.serviceClasses, p.servicePlans), p.orderedServiceInstances = r.sortServiceInstances(p.serviceInstances, p.serviceClasses), p.serviceToBind || h()); +}, h = function() { +p.serviceClasses && p.serviceInstances && (p.serviceInstances = r.filterBindableServiceInstances(p.serviceInstances, p.serviceClasses, p.servicePlans), p.orderedServiceInstances = r.sortServiceInstances(p.serviceInstances, p.serviceClasses), p.serviceToBind || v()); }, y = function() { var e = { namespace: _.get(p.target, "metadata.namespace") @@ -12708,7 +12770,7 @@ var e = { namespace: _.get(p.target, "metadata.namespace") }, t = n.getPreferredVersion("serviceinstances"); o.list(t, e).then(function(e) { -p.serviceInstances = e.by("metadata.name"), v(); +p.serviceInstances = e.by("metadata.name"), h(); }); }; s = { @@ -12758,7 +12820,7 @@ e.$watch("ctrl.serviceToBind", C), p.$onInit = function() { p.serviceSelection = {}, p.projectDisplayName = t("displayName")(p.project), p.podPresets = g("pod_presets"), p.parameterData = {}, p.steps = [ s, c, l ], p.hideBack = c.hidden; var e = n.getPreferredVersion("clusterserviceclasses"); o.list(e, {}).then(function(e) { -p.serviceClasses = e.by("metadata.name"), C(), v(); +p.serviceClasses = e.by("metadata.name"), C(), h(); }); var a = n.getPreferredVersion("clusterserviceplans"); o.list(a, {}).then(function(e) { @@ -12857,29 +12919,29 @@ i ? ((o = a[i[1]] || {}).title = e.annotations[r], a[i[1]] = o) : (i = r.match(n return a; } function f() { -h.prefillParameters && _.each(h.template.parameters, function(e) { -h.prefillParameters[e.name] && (e.value = h.prefillParameters[e.name]); -}), h.labels = _.map(h.template.labels, function(e, t) { +v.prefillParameters && _.each(v.template.parameters, function(e) { +v.prefillParameters[e.name] && (e.value = v.prefillParameters[e.name]); +}), v.labels = _.map(v.template.labels, function(e, t) { return { name: t, value: e }; -}), R() && h.labels.push({ +}), R() && v.labels.push({ name: "app", -value: h.template.metadata.name +value: v.template.metadata.name }); } -var g, h = this, v = e("displayName"), y = e("humanize"); -h.$onInit = function() { -h.labels = [], h.template = angular.copy(h.template), h.templateDisplayName = v(h.template), h.selectedProject = h.project, f(); +var g, v = this, h = e("displayName"), y = e("humanize"); +v.$onInit = function() { +v.labels = [], v.template = angular.copy(v.template), v.templateDisplayName = h(v.template), v.selectedProject = v.project, f(); }; var b, C = function() { var e = { -started: "Creating " + h.templateDisplayName + " in project " + v(h.selectedProject), -success: "Created " + h.templateDisplayName + " in project " + v(h.selectedProject), -failure: "Failed to create " + h.templateDisplayName + " in project " + v(h.selectedProject) -}, a = p(h.template); -d.clear(), d.add(e, a, h.selectedProject.metadata.name, function() { +started: "Creating " + v.templateDisplayName + " in project " + h(v.selectedProject), +success: "Created " + v.templateDisplayName + " in project " + h(v.selectedProject), +failure: "Failed to create " + v.templateDisplayName + " in project " + h(v.selectedProject) +}, a = p(v.template); +d.clear(), d.add(e, a, v.selectedProject.metadata.name, function() { var e = t.defer(); return r.batch(b, g).then(function(t) { var n = [], a = !1; @@ -12896,16 +12958,16 @@ message: "Created " + y(e.kind).toLowerCase() + ' "' + e.metadata.name + '" succ }); })) : n.push({ type: "success", -message: "All items in template " + h.templateDisplayName + " were created successfully." +message: "All items in template " + v.templateDisplayName + " were created successfully." }), e.resolve({ alerts: n, hasErrors: a }); }), e.promise; -}), h.isDialog ? n.$emit("templateInstantiated", { -project: h.selectedProject, -template: h.template -}) : o.toNextSteps(h.templateDisplayName, h.selectedProject.metadata.name); +}), v.isDialog ? n.$emit("templateInstantiated", { +project: v.selectedProject, +template: v.template +}) : o.toNextSteps(v.templateDisplayName, v.selectedProject.metadata.name); }, S = function(e) { a.open({ animation: !0, @@ -12928,26 +12990,26 @@ i.hideNotification("process-template-error"), _.each(w, function(e) { !e.id || "error" !== e.type && "warning" !== e.type || i.hideNotification(e.id); }); }, j = function(e) { -k(), w = u.getSecurityAlerts(b, h.selectedProject.metadata.name); +k(), w = u.getSecurityAlerts(b, v.selectedProject.metadata.name); var t = e.quotaAlerts || []; w = w.concat(t), _.filter(w, { type: "error" -}).length ? (h.disableInputs = !1, _.each(w, function(e) { +}).length ? (v.disableInputs = !1, _.each(w, function(e) { e.id = _.uniqueId("process-template-alert-"), i.addNotification(e); -})) : w.length ? (S(w), h.disableInputs = !1) : C(); +})) : w.length ? (S(w), v.disableInputs = !1) : C(); }, P = function() { -if (_.has(h.selectedProject, "metadata.uid")) return t.when(h.selectedProject); -var n = h.selectedProject.metadata.name, a = h.selectedProject.metadata.annotations["new-display-name"], r = e("description")(h.selectedProject); +if (_.has(v.selectedProject, "metadata.uid")) return t.when(v.selectedProject); +var n = v.selectedProject.metadata.name, a = v.selectedProject.metadata.annotations["new-display-name"], r = e("description")(v.selectedProject); return c.create(n, a, r); }; -h.createFromTemplate = function() { -h.disableInputs = !0, P().then(function(e) { -h.selectedProject = e, g = { -namespace: h.selectedProject.metadata.name -}, h.template.labels = m.mapEntries(m.compactEntries(h.labels)), r.create("processedtemplates", null, h.template, g).then(function(e) { -s.setTemplateData(e.parameters, h.template.parameters, e.message), b = e.objects, l.getLatestQuotaAlerts(b, g).then(j); +v.createFromTemplate = function() { +v.disableInputs = !0, P().then(function(e) { +v.selectedProject = e, g = { +namespace: v.selectedProject.metadata.name +}, v.template.labels = m.mapEntries(m.compactEntries(v.labels)), r.create("processedtemplates", null, v.template, g).then(function(e) { +s.setTemplateData(e.parameters, v.template.parameters, e.message), b = e.objects, l.getLatestQuotaAlerts(b, g).then(j); }, function(e) { -h.disableInputs = !1; +v.disableInputs = !1; var t; e.data && e.data.message && (t = e.data.message), i.addNotification({ id: "process-template-error", @@ -12957,7 +13019,7 @@ details: t }); }); }, function(e) { -h.disableInputs = !1; +v.disableInputs = !1; var t; e.data && e.data.message && (t = e.data.message), i.addNotification({ id: "process-template-error", @@ -12966,11 +13028,11 @@ message: "An error occurred creating the project.", details: t }); }); -}, h.cancel = function() { -k(), o.toProjectOverview(h.project.metadata.name); -}, n.$on("instantiateTemplate", h.createFromTemplate), n.$on("$destroy", k); +}, v.cancel = function() { +k(), o.toProjectOverview(v.project.metadata.name); +}, n.$on("instantiateTemplate", v.createFromTemplate), n.$on("$destroy", k); var R = function() { -return !_.get(h.template, "labels.app") && !_.some(h.template.objects, "metadata.labels.app"); +return !_.get(v.template, "labels.app") && !_.some(v.template.objects, "metadata.labels.app"); }; } ], controllerAs: "$ctrl", @@ -12988,51 +13050,55 @@ templateUrl: "views/directives/process-template.html" angular.module("openshiftConsole").component("processTemplateDialog", { controller: [ "$scope", "$filter", "$routeParams", "Catalog", "DataService", "KeywordService", "NotificationsService", "ProjectsService", "RecentlyViewedProjectsService", function(e, t, n, a, r, o, i, s, c) { function l() { -var e = _.get(y, "template.metadata.annotations.iconClass", "fa fa-clone"); +var e = _.get(b, "template.metadata.annotations.iconClass", "fa fa-clone"); return -1 !== e.indexOf("icon-") ? "font-icon " + e : e; } function u() { -y.steps || (y.steps = [ y.selectStep, y.infoStep, y.configStep, y.resultsStep ]); +var e = _.get(b, "template.metadata.annotations.iconClass", "fa fa-clone"); +return C(e); } function d() { -v && (v(), v = void 0); +b.steps || (b.steps = [ b.selectStep, b.infoStep, b.configStep, b.resultsStep ]); } function m() { +y && (y(), y = void 0); +} +function p() { e.$broadcast("instantiateTemplate"); } -function p(e, t) { +function f(e, t) { return o.filterForKeywords(t, [ "name", "tags" ], o.generateKeywords(e)); } -function f(e) { -y.filterConfig.appliedFilters = e, g(); +function g(e) { +b.filterConfig.appliedFilters = e, v(); } -function g() { -y.filteredItems = y.catalogItems, y.filterConfig.appliedFilters && y.filterConfig.appliedFilters.length > 0 && _.each(y.filterConfig.appliedFilters, function(e) { -y.filteredItems = p(e.value, y.filteredItems); -}), y.filterConfig.resultsCount = y.filteredItems.length, _.includes(y.filteredItems, y.selectedTemplate) || y.templateSelected(); +function v() { +b.filteredItems = b.catalogItems, b.filterConfig.appliedFilters && b.filterConfig.appliedFilters.length > 0 && _.each(b.filterConfig.appliedFilters, function(e) { +b.filteredItems = f(e.value, b.filteredItems); +}), b.filterConfig.resultsCount = b.filteredItems.length, _.includes(b.filteredItems, b.selectedTemplate) || b.templateSelected(); } function h() { -y.unfilteredProjects || s.list().then(function(e) { -y.unfilteredProjects = _.toArray(e.by("metadata.name")); +b.unfilteredProjects || s.list().then(function(e) { +b.unfilteredProjects = _.toArray(e.by("metadata.name")); }, function() { -y.unfilteredProjects = []; +b.unfilteredProjects = []; }).finally(function() { -b(); +S(); }); } -var v, y = this; -y.selectStep = { +var y, b = this, C = t("imageForIconClass"); +b.selectStep = { id: "projectTemplates", label: "Selection", view: "views/directives/process-template-dialog/process-template-select.html", -hidden: !0 !== y.useProjectTemplate, +hidden: !0 !== b.useProjectTemplate, allowed: !0, valid: !1, allowClickNav: !0, onShow: function() { -y.infoStep.selected = !1, y.selectStep.selected = !0, y.configStep.selected = !1, y.resultsStep.selected = !1, y.nextTitle = "Next >", d(), h(); +b.infoStep.selected = !1, b.selectStep.selected = !0, b.configStep.selected = !1, b.resultsStep.selected = !1, b.nextTitle = "Next >", m(), h(); } -}, y.infoStep = { +}, b.infoStep = { id: "info", label: "Information", view: "views/directives/process-template-dialog/process-template-info.html", @@ -13040,9 +13106,9 @@ allowed: !0, valid: !0, allowClickNav: !0, onShow: function() { -y.infoStep.selected = !0, y.selectStep.selected = !1, y.configStep.selected = !1, y.resultsStep.selected = !1, y.nextTitle = "Next >", d(); +b.infoStep.selected = !0, b.selectStep.selected = !1, b.configStep.selected = !1, b.resultsStep.selected = !1, b.nextTitle = "Next >", m(); } -}, y.configStep = { +}, b.configStep = { id: "configuration", label: "Configuration", view: "views/directives/process-template-dialog/process-template-config.html", @@ -13050,11 +13116,11 @@ valid: !1, allowed: !0, allowClickNav: !0, onShow: function() { -y.infoStep.selected = !1, y.selectStep.selected = !1, y.configStep.selected = !0, y.resultsStep.selected = !1, y.nextTitle = "Create", y.resultsStep.allowed = y.configStep.valid, v = e.$watch("$ctrl.form.$valid", function(e) { -y.configStep.valid = e && y.selectedProject, y.resultsStep.allowed = e; +b.infoStep.selected = !1, b.selectStep.selected = !1, b.configStep.selected = !0, b.resultsStep.selected = !1, b.nextTitle = "Create", b.resultsStep.allowed = b.configStep.valid, y = e.$watch("$ctrl.form.$valid", function(e) { +b.configStep.valid = e && b.selectedProject, b.resultsStep.allowed = e; }); } -}, y.resultsStep = { +}, b.resultsStep = { id: "results", label: "Results", view: "views/directives/process-template-dialog/process-template-results.html", @@ -13063,18 +13129,18 @@ allowed: !1, prevEnabled: !1, allowClickNav: !1, onShow: function() { -y.infoStep.selected = !1, y.selectStep.selected = !1, y.configStep.selected = !1, y.resultsStep.selected = !0, y.nextTitle = "Close", d(), y.wizardDone = !0; +b.infoStep.selected = !1, b.selectStep.selected = !1, b.configStep.selected = !1, b.resultsStep.selected = !0, b.nextTitle = "Close", m(), b.wizardDone = !0; } -}, y.$onInit = function() { -y.loginBaseUrl = r.openshiftAPIBaseUrl(), y.preSelectedProject = y.selectedProject = y.project, h(), y.projectEmptyState = { +}, b.$onInit = function() { +b.loginBaseUrl = r.openshiftAPIBaseUrl(), b.preSelectedProject = b.selectedProject = b.project, h(), b.projectEmptyState = { icon: "pficon pficon-info", title: "No Project Selected", info: "Please select a project from the dropdown to load Templates from that project." -}, y.templatesEmptyState = { +}, b.templatesEmptyState = { icon: "pficon pficon-info", title: "No Templates", info: "The selected project has no templates available to import." -}, y.filterConfig = { +}, b.filterConfig = { fields: [ { id: "keyword", title: "Keyword", @@ -13087,34 +13153,34 @@ itemsLabel: "Item", itemsLabelPlural: "Items", resultsCount: 0, appliedFilters: [], -onFilterChange: f -}, n.project || (y.showProjectName = !0); -}, y.$onChanges = function(e) { -e.template && y.template && (u(), y.iconClass = l()), e.useProjectTemplate && u(); +onFilterChange: g +}, n.project || (b.showProjectName = !0); +}, b.$onChanges = function(e) { +e.template && b.template && (d(), b.iconClass = l(), b.image = u()), e.useProjectTemplate && d(); }, e.$on("templateInstantiated", function(e, t) { -y.selectedProject = t.project, y.currentStep = y.resultsStep.label; -}), y.$onDestroy = function() { -d(); -}, y.next = function(e) { -return e.stepId === y.configStep.id ? (m(), !1) : e.stepId !== y.resultsStep.id || (y.close(), !1); -}, y.close = function() { -var e = y.onDialogClosed(); +b.selectedProject = t.project, b.currentStep = b.resultsStep.label; +}), b.$onDestroy = function() { +m(); +}, b.next = function(e) { +return e.stepId === b.configStep.id ? (p(), !1) : e.stepId !== b.resultsStep.id || (b.close(), !1); +}, b.close = function() { +var e = b.onDialogClosed(); _.isFunction(e) && e(); -}, y.onProjectSelected = function(t) { -y.selectedProject = t, y.configStep.valid = e.$ctrl.form.$valid && y.selectedProject; -}, y.templateSelected = function(e) { -y.selectedTemplate = e, y.template = _.get(e, "resource"), y.selectStep.valid = !!e, y.iconClass = l(); -}, y.templateProjectChange = function() { -y.templateProjectName = _.get(y.templateProject, "metadata.name"), y.catalogItems = {}, y.templateSelected(), a.getProjectCatalogItems(y.templateProjectName, !1, !0).then(_.spread(function(e, t) { -y.catalogItems = e, y.totalCount = y.catalogItems.length, f(), t && i.addNotification({ +}, b.onProjectSelected = function(t) { +b.selectedProject = t, b.configStep.valid = e.$ctrl.form.$valid && b.selectedProject; +}, b.templateSelected = function(e) { +b.selectedTemplate = e, b.template = _.get(e, "resource"), b.selectStep.valid = !!e, b.iconClass = l(), b.image = u(); +}, b.templateProjectChange = function() { +b.templateProjectName = _.get(b.templateProject, "metadata.name"), b.catalogItems = {}, b.templateSelected(), a.getProjectCatalogItems(b.templateProjectName, !1, !0).then(_.spread(function(e, t) { +b.catalogItems = e, b.totalCount = b.catalogItems.length, g(), t && i.addNotification({ type: "error", message: t }); })); }; -var b = function() { -var e = _.reject(y.unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName")); -y.searchEnabled = !_.isEmpty(e), y.templateProjects = c.orderByMostRecentlyViewed(n); +var S = function() { +var e = _.reject(b.unfilteredProjects, "metadata.deletionTimestamp"), n = _.sortBy(e, t("displayName")); +b.searchEnabled = !_.isEmpty(e), b.templateProjects = c.orderByMostRecentlyViewed(n); }; } ], controllerAs: "$ctrl", @@ -13422,7 +13488,7 @@ id: p } }, g = function() { s && (s.stop(), s = null); -}, h = function() { +}, v = function() { var e = { follow: !0, tailLines: u @@ -13432,7 +13498,7 @@ s = null; }); }; c.$onInit = function() { -"ReplicationController" === c.apiObject.kind ? (i = "deploymentconfigs/log", o = l(c.apiObject, "deploymentConfig")) : (i = n.kindToResource(c.apiObject.kind) + "/log", o = c.apiObject.metadata.name), h(); +"ReplicationController" === c.apiObject.kind ? (i = "deploymentconfigs/log", o = l(c.apiObject, "deploymentConfig")) : (i = n.kindToResource(c.apiObject.kind) + "/log", o = c.apiObject.metadata.name), v(); }, c.$onDestroy = function() { g(); }; @@ -13503,16 +13569,16 @@ return "ImageChange" === e.type && _.get(e, "imageChangeParams.automatic"); })); }, g = function(e) { e && !l.current && "DeploymentConfig" !== e.kind && "Deployment" !== e.kind && (l.current = e); -}, h = function(e) { +}, v = function(e) { l.rgv = n.objectToResourceGroupVersion(e), g(e), f(e); }; l.$onChanges = function(e) { -e.apiObject && h(e.apiObject.currentValue); +e.apiObject && v(e.apiObject.currentValue); }; -var v = [], y = function(e) { +var h = [], y = function(e) { if (!l.state.hpaByResource) return null; var t = _.get(e, "kind"), n = _.get(e, "metadata.name"); -return _.get(l.state.hpaByResource, [ t, n ], v); +return _.get(l.state.hpaByResource, [ t, n ], h); }; l.showBindings = r.SERVICE_CATALOG_ENABLED && p("pod_presets"), l.$doCheck = function() { l.notifications = i.getNotifications(l.apiObject, l.state), l.hpa = y(l.apiObject), l.current && _.isEmpty(l.hpa) && (l.hpa = y(l.current)); @@ -13791,8 +13857,8 @@ selectedProject: n.project name: "app", value: "" } ]; -var f = e("orderByDisplayName"), g = e("getErrorDetails"), h = {}, v = function() { -c.hideNotification("deploy-image-list-config-maps-error"), c.hideNotification("deploy-image-list-secrets-error"), _.each(h, function(e) { +var f = e("orderByDisplayName"), g = e("getErrorDetails"), v = {}, h = function() { +c.hideNotification("deploy-image-list-config-maps-error"), c.hideNotification("deploy-image-list-secrets-error"), _.each(v, function(e) { !e.id || "error" !== e.type && "warning" !== e.type || c.hideNotification(e.id); }); }; @@ -13931,16 +13997,16 @@ cancelButtonText: "Cancel" } }).result.then(R); }, E = function(e) { -h = e.quotaAlerts || []; -var t = _.filter(h, { +v = e.quotaAlerts || []; +var t = _.filter(v, { type: "error" }); -n.nameTaken || t.length ? (n.disableInputs = !1, _.each(h, function(e) { +n.nameTaken || t.length ? (n.disableInputs = !1, _.each(v, function(e) { e.id = _.uniqueId("deploy-image-alert-"), c.addNotification(e); -})) : h.length ? (I(h), n.disableInputs = !1) : R(); +})) : v.length ? (I(v), n.disableInputs = !1) : R(); }; n.create = function() { -n.disableInputs = !0, v(), y().then(function(e) { +n.disableInputs = !0, h(), y().then(function(e) { n.input.selectedProject = e, j = m(); var t = r.ifResourcesDontExist(j, n.input.selectedProject.metadata.name), a = u.getLatestQuotaAlerts(j, { namespace: n.input.selectedProject.metadata.name @@ -13956,7 +14022,7 @@ message: "An error occurred creating project", details: g(e) }), n.disableInputs = !1; }); -}, n.$on("newAppFromDeployImage", n.create), n.$on("$destroy", v); +}, n.$on("newAppFromDeployImage", n.create), n.$on("$destroy", h); } }; } ]), angular.module("openshiftConsole").directive("selector", function() { @@ -14254,7 +14320,7 @@ bottom: n.offsetBottom } ]), function() { angular.module("openshiftConsole").component("editEnvironmentVariables", { controller: [ "$filter", "APIService", "DataService", "EnvironmentService", "NotificationsService", function(e, t, n, a, r) { -var o, i, s, c, l = this, u = !1, d = [], m = [], p = !1, f = e("canI"), g = e("getErrorDetails"), h = e("humanizeKind"), v = e("orderByDisplayName"), y = function(e, t) { +var o, i, s, c, l = this, u = !1, d = [], m = [], p = !1, f = e("canI"), g = e("getErrorDetails"), v = e("humanizeKind"), h = e("orderByDisplayName"), y = function(e, t) { u || (l.form && !l.form.$pristine && l.updatedObject ? a.isEnvironmentEqual(e, t) ? l.updatedObject = a.mergeEdits(e, t) : (u = !0, r.addNotification({ type: "warning", message: "The environment variables for the " + o + " have been updated in the background.", @@ -14264,18 +14330,18 @@ details: "Saving your changes may create a conflict or cause loss of data." n.list("configmaps", { namespace: l.apiObject.metadata.namespace }).then(function(e) { -d = v(e.by("metadata.name")), l.valueFromObjects = d.concat(m); +d = h(e.by("metadata.name")), l.valueFromObjects = d.concat(m); }); }, C = function() { f("secrets", "list") && n.list("secrets", { namespace: l.apiObject.metadata.namespace }).then(function(e) { -m = v(e.by("metadata.name")), l.valueFromObjects = d.concat(m); +m = h(e.by("metadata.name")), l.valueFromObjects = d.concat(m); }); }, S = function() { p || (p = !0, b(), C()); }, _ = function(e, n) { -o = h(e.kind), i = e.metadata.name, s = t.objectToResourceGroupVersion(e), l.canIUpdate = f(s, "update"), c ? c.finally(function() { +o = v(e.kind), i = e.metadata.name, s = t.objectToResourceGroupVersion(e), l.canIUpdate = f(s, "update"), c ? c.finally(function() { y(e, n); }) : y(e, n), l.containers = a.getContainers(l.updatedObject), l.disableValueFrom || l.ngReadonly || !l.canIUpdate || S(); }; @@ -14361,7 +14427,7 @@ r.showUnreadNotificationsIndicator = !!t; return _.get(e, "params.project") !== _.get(t, "params.project"); }, g = function() { l(t.project, p), m(t.project); -}, h = function() { +}, v = function() { g(), s.push(n.$on("$routeChangeSuccess", function(e, t, n) { f(t, n) && g(); })), s.push(n.$on("NotificationDrawerWrapper.onMarkAllRead", function() { @@ -14369,7 +14435,7 @@ r.showUnreadNotificationsIndicator = !1; })); }; r.$onInit = function() { -o || i ? r.hide = !0 : h(); +o || i ? r.hide = !0 : v(); }, r.$onDestroy = function() { u(), d(); }; @@ -14379,7 +14445,7 @@ u(), d(); angular.module("openshiftConsole").component("notificationDrawerWrapper", { templateUrl: "views/directives/notifications/notification-drawer-wrapper.html", controller: [ "$filter", "$interval", "$location", "$timeout", "$routeParams", "$rootScope", "Constants", "DataService", "EventsService", "NotificationsService", function(e, t, n, a, r, o, i, s, c) { -var l, u, d = _.get(i, "DISABLE_GLOBAL_EVENT_WATCH"), m = e("isIE")() || e("isEdge")(), p = this, f = [], g = {}, h = {}, v = {}, y = function(e) { +var l, u, d = _.get(i, "DISABLE_GLOBAL_EVENT_WATCH"), m = e("isIE")() || e("isEdge")(), p = this, f = [], g = {}, v = {}, h = {}, y = function(e) { e || (p.drawerHidden = !0); }, b = function(e, t) { return _.get(e, "params.project") !== _.get(t, "params.project"); @@ -14387,12 +14453,12 @@ return _.get(e, "params.project") !== _.get(t, "params.project"); return s.get("projects", e, {}, { errorNotification: !1 }).then(function(e) { -return v[e.metadata.name] = e, e; +return h[e.metadata.name] = e, e; }); }, S = function(t, n) { return { -heading: e("displayName")(v[t]), -project: v[t], +heading: e("displayName")(h[t]), +project: h[t], notifications: n }; }, w = function(e) { @@ -14407,7 +14473,7 @@ _.remove(t.notifications, { uid: e.uid, namespace: e.namespace }); -}), delete h[r.project][e.uid]; +}), delete v[r.project][e.uid]; }, P = function(e) { return _.map(e, function(e) { return { @@ -14432,7 +14498,7 @@ return _.assign({}, e[n], t[n]); return _.orderBy(e, [ "event.lastTimestamp", "event.firstTimestamp" ], [ "desc", "desc" ]); }, T = function() { o.$evalAsync(function() { -p.notificationGroups = [ S(r.project, E(I(g, h))) ], k(); +p.notificationGroups = [ S(r.project, E(I(g, v))) ], k(); }); }, N = function() { _.each(f, function(e) { @@ -14446,7 +14512,7 @@ l && l(), l = null; g[r.project] = P(R(e.by("metadata.name"))), T(); }, B = function(e, t) { var n = t.namespace || r.project, a = t.id ? n + "/" + t.id : _.uniqueId("notification_") + Date.now(); -t.showInDrawer && !c.isCleared(a) && (h[n] = h[n] || {}, h[n][a] = { +t.showInDrawer && !c.isCleared(a) && (v[n] = v[n] || {}, v[n][a] = { actions: t.actions, unread: !c.isRead(a), trackByID: t.trackByID, @@ -14491,7 +14557,7 @@ e.unread = !1, c.markRead(e.uid); onClearAll: function(e) { _.each(e.notifications, function(e) { e.unread = !1, c.markRead(e.uid), c.markCleared(e.uid); -}), g[r.project] = {}, h[r.project] = {}, T(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); +}), g[r.project] = {}, v[r.project] = {}, T(), o.$emit("NotificationDrawerWrapper.onMarkAllRead"); }, notificationGroups: [], headingInclude: "views/directives/notifications/header.html", @@ -15681,12 +15747,6 @@ return null === e || void 0 === e ? e : _.round(100 * Number(e), t) + "%"; return function(e, t) { return e && t ? _.filter(e, t) : e; }; -}).filter("isAbsoluteURL", function() { -return function(e) { -if (!e) return !1; -var t = new URI(e), n = t.protocol(); -return t.is("absolute") && ("http" === n || "https" === n); -}; }).filter("isIE", function() { var e = navigator.userAgent, t = /msie|trident/i.test(e); return function() { diff --git a/dist/scripts/templates.js b/dist/scripts/templates.js index 310c6bda99..5f9e2cef1e 100644 --- a/dist/scripts/templates.js +++ b/dist/scripts/templates.js @@ -5349,8 +5349,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/_custom-icon.html', - "\n" + - "\"\"" + "\"\"\n" + + "" ); @@ -8846,7 +8846,8 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( "
\n" + "
\n" + "
\n" + - "\n" + + "\"\"\n" + + "\n" + "
\n" + "
\n" + "
\n" +