From b90f147409355ca422ddc63fbd6a1006a19a116c Mon Sep 17 00:00:00 2001 From: Lukas Fryc Date: Thu, 14 Jan 2016 13:06:43 +0100 Subject: [PATCH] updated UI --- admin-ui/app/components/app-detail/include/activity.html | 7 +++---- admin-ui/app/scripts/endpoints/metricsEndpoint.js | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) 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({