From c40df2c6864feb53ab829213e4ef4e4e29dd9193 Mon Sep 17 00:00:00 2001
From: Mathis Neumann <mathis@simpletechs.net>
Date: Sun, 10 Jul 2016 01:06:15 +0200
Subject: [PATCH] show list of updates

---
 app/services/changelog-queue.js      | 5 ++++-
 app/templates/deployments/single.hbs | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/services/changelog-queue.js b/app/services/changelog-queue.js
index 61c3911..435e2c4 100644
--- a/app/services/changelog-queue.js
+++ b/app/services/changelog-queue.js
@@ -19,7 +19,10 @@ export default Ember.Service.extend({
     available: Ember.computed('empty', function() {
         return !this.get('empty');
     }),
+    size: Ember.computed('_private.queue.[]', function() {
+        return this.get('_private.queue.length');
+    }),
     empty: Ember.computed('_private.queue.[]', function() {
-        return this.get('_private.queue.length') === 0;
+        return this.get('size') === 0;
     })
 });
\ No newline at end of file
diff --git a/app/templates/deployments/single.hbs b/app/templates/deployments/single.hbs
index 326f84a..2e61bf8 100644
--- a/app/templates/deployments/single.hbs
+++ b/app/templates/deployments/single.hbs
@@ -1,7 +1,7 @@
 {{#architecture-viewer graph=graphModel}}
 
     <button {{action 'applyQueueUpdates'}} type="button" class="btn {{if changelogQueue.empty 'btn-default' 'btn-warning'}}" disabled={{ changelogQueue.empty }} title="Updates are possible when the deployment changed and new information is ready to get visualized!">
-        <i class="glyphicon glyphicon-refresh"></i> Apply Updates
+        <i class="glyphicon glyphicon-refresh"></i> Apply Updates {{#if changelogQueue.available}}({{ changelogQueue.size }}){{/if}}
     </button>
 
     {{!-- show entity details in sidebar if subroute (details) is used --}}
-- 
GitLab