diff --git a/static/css/core-ui.css b/static/css/core-ui.css index a29a8c7ac..0a7fa69ef 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -1381,9 +1381,9 @@ a:focus { } .empty-icon { - color: #ddd; - font-size: 46px; - margin-bottom: 20px; + color: #aaa; + font-size: 60px; + margin-bottom: 0px; text-align: center; } diff --git a/static/css/directives/ui/image-feature-view.css b/static/css/directives/ui/image-feature-view.css index 53f95d7d4..c2fae532d 100644 --- a/static/css/directives/ui/image-feature-view.css +++ b/static/css/directives/ui/image-feature-view.css @@ -8,6 +8,10 @@ margin-left: -6px; } +.image-feature-view-element > .empty { + margin-top: 20px; +} + .image-feature-view-element .no-vulns { color: #2FC98E; } diff --git a/static/css/directives/ui/image-vulnerability-view.css b/static/css/directives/ui/image-vulnerability-view.css index f4025da96..3e92e1761 100644 --- a/static/css/directives/ui/image-vulnerability-view.css +++ b/static/css/directives/ui/image-vulnerability-view.css @@ -8,6 +8,10 @@ margin-left: -6px; } +.image-vulnerability-view-element > .empty { + margin-top: 20px; +} + .image-vulnerability-view-element .security-header { margin-top: -4px; margin-bottom: 30px; diff --git a/static/directives/image-feature-view.html b/static/directives/image-feature-view.html index be75710b7..d6b524844 100644 --- a/static/directives/image-feature-view.html +++ b/static/directives/image-feature-view.html @@ -1,6 +1,20 @@
+ +
+
+ +
+
Could not load security scan information
+
+ Please try again in a few minutes. If this problem persists, please contact support. +
+
+
+
+ +
This image has not been indexed yet
Please try again in a few minutes. @@ -9,6 +23,9 @@
+
+ +
This image could not be indexed
Quay security scanner was unable to index this image. @@ -17,7 +34,7 @@
-
+
diff --git a/static/directives/image-vulnerability-view.html b/static/directives/image-vulnerability-view.html index 240eec327..bc3e3f4f4 100644 --- a/static/directives/image-vulnerability-view.html +++ b/static/directives/image-vulnerability-view.html @@ -1,6 +1,20 @@
+ +
+
+ +
+
Could not load security scan information
+
+ Please try again in a few minutes. If this problem persists, please contact support. +
+
+
+
+ +
This image has not been indexed yet
Please try again in a few minutes. @@ -9,6 +23,9 @@
+
+ +
This image could not be indexed
Quay security scanner was unable to index this image. @@ -17,7 +34,7 @@
-
+
diff --git a/static/js/directives/ui/image-feature-view.js b/static/js/directives/ui/image-feature-view.js index d13fe2075..175089318 100644 --- a/static/js/directives/ui/image-feature-view.js +++ b/static/js/directives/ui/image-feature-view.js @@ -21,6 +21,7 @@ angular.module('quay').directive('imageFeatureView', function () { }; $scope.TableService = TableService; + $scope.loading = false; var buildOrderedFeatures = function() { if (!$scope.featuresInfo) { @@ -64,17 +65,20 @@ angular.module('quay').directive('imageFeatureView', function () { }; var loadImageVulnerabilities = function() { - if ($scope.securityResource) { + if ($scope.loading) { return; } - $scope.securityResource = VulnerabilityService.loadImageVulnerabilitiesAsResource($scope.repository, $scope.image.id, function(resp) { + $scope.loading = true; + VulnerabilityService.loadImageVulnerabilities($scope.repository, $scope.image.id, function(resp) { $scope.securityStatus = resp.status; $scope.featuresInfo = VulnerabilityService.buildFeaturesInfo($scope.image, resp); buildOrderedFeatures(); buildChart(); return resp; + }, function() { + $scope.securityStatus = 'error'; }); }; diff --git a/static/js/directives/ui/image-vulnerability-view.js b/static/js/directives/ui/image-vulnerability-view.js index 4ada44d3f..afbf9671e 100644 --- a/static/js/directives/ui/image-vulnerability-view.js +++ b/static/js/directives/ui/image-vulnerability-view.js @@ -22,6 +22,7 @@ angular.module('quay').directive('imageVulnerabilityView', function () { }; $scope.TableService = TableService; + $scope.loading = false; $scope.toggleDetails = function(vuln) { vuln.expanded = !vuln.expanded; @@ -100,17 +101,20 @@ angular.module('quay').directive('imageVulnerabilityView', function () { }; var loadImageVulnerabilities = function() { - if ($scope.securityResource) { + if ($scope.loading) { return; } - $scope.securityResource = VulnerabilityService.loadImageVulnerabilitiesAsResource($scope.repository, $scope.image.id, function(resp) { + $scope.loading = true; + VulnerabilityService.loadImageVulnerabilities($scope.repository, $scope.image.id, function(resp) { $scope.securityStatus = resp.status; $scope.vulnerabilitiesInfo = VulnerabilityService.buildVulnerabilitiesInfo($scope.image, resp); buildOrderedVulnerabilities(); buildChart(); return resp; + }, function() { + $scope.securityStatus = 'error'; }); };