diff --git a/admin-ui/app/components/app-detail/include/activity.html b/admin-ui/app/components/app-detail/include/activity.html index bdd865e030..213e662da3 100644 --- a/admin-ui/app/components/app-detail/include/activity.html +++ b/admin-ui/app/components/app-detail/include/activity.html @@ -38,12 +38,11 @@

Notification activity

{{ metric.$message.alert | limitTo : 15 }}{{ metric.$message.alert.length > 15 ? '…' : '' }} {{ metric.ipAddress }} {{ metric.totalReceivers }} receivers / {{ metric.appOpenCounter }} opened - - + Pending... - Succeeded - + Succeeded + diff --git a/admin-ui/app/scripts/endpoints/metricsEndpoint.js b/admin-ui/app/scripts/endpoints/metricsEndpoint.js index 4d62795585..2257423222 100644 --- a/admin-ui/app/scripts/endpoints/metricsEndpoint.js +++ b/admin-ui/app/scripts/endpoints/metricsEndpoint.js @@ -17,10 +17,9 @@ upsServices.factory('metricsEndpoint', function ($resource, $q, apiPrefix) { var deferred = $q.defer(); this.application({id: applicationId, page: pageNo - 1, per_page: perPage, sort:'desc', search: searchString}, function (data, responseHeaders) { angular.forEach(data, function (metric) { - angular.forEach(metric.variantInformations, function (variant) { - if (!variant.deliveryStatus) { - metric.deliveryFailed = true; - } + metric.$deliveryStatus = (metric.servedVariants === metric.totalVariants); + metric.$deliveryFailed = metric.variantInformations.some(function( variantMetric ) { + return variantMetric.reason; }); }); deferred.resolve({