Repository: ambari
Updated Branches:
  refs/heads/trunk 290a813bb -> 7699e1ddc


AMBARI-7853. Slider app's Quick Links combobox contains repetitive items. 
(Buzhor Denys via onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7699e1dd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7699e1dd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7699e1dd

Branch: refs/heads/trunk
Commit: 7699e1ddc2f2fcdb60ca258a8ff2ede6a4dd022a
Parents: 290a813
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Mon Oct 20 13:40:58 2014 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Mon Oct 20 14:13:13 2014 +0300

----------------------------------------------------------------------
 .../ui/app/controllers/slider_app_controller.js |  2 +-
 .../controllers/slider_app_controller_test.js   | 22 ++++++++------------
 2 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7699e1dd/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
index 15792ef..ceace91 100644
--- 
a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
+++ 
b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js
@@ -47,7 +47,7 @@ App.SliderAppController = 
Ember.ObjectController.extend(App.AjaxErrorHandler, {
    * @type {Array}
    **/
   quickLinksOrdered: function() {
-    var copy = this.store.all('quick-link').slice(0);
+    var copy = this.get('model.quickLinks').slice(0);
     var toTail = ['Metrics UI', 'Metrics API'];
 
     if (this.get('weHaveQuicklinks')) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7699e1dd/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
 
b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
index c022d24..486be3e 100644
--- 
a/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
+++ 
b/contrib/views/slider/src/main/resources/ui/test/unit/controllers/slider_app_controller_test.js
@@ -67,19 +67,15 @@ test('quickLinksOrdered', function() {
   expect(2);
 
   var controller = this.subject({
-    store: Em.Object.create({
-      all: function(model) {
-        return {
-          'quick-link': [
-            Em.Object.create({ label: 'org.apache.slider.thrift'}),
-            Em.Object.create({ label: 'Metrics API'}),
-            Em.Object.create({ label: 'org.apache.slider.hbase'}),
-            Em.Object.create({ label: 'Metrics UI'}),
-            Em.Object.create({ label: 'UI'}),
-            Em.Object.create({ label: 'Some Label'})
-          ]
-        }[model];
-      }
+    model: Em.Object.create({
+      'quickLinks': [
+        Em.Object.create({ label: 'org.apache.slider.thrift'}),
+        Em.Object.create({ label: 'Metrics API'}),
+        Em.Object.create({ label: 'org.apache.slider.hbase'}),
+        Em.Object.create({ label: 'Metrics UI'}),
+        Em.Object.create({ label: 'UI'}),
+        Em.Object.create({ label: 'Some Label'})
+      ]
     }),
     weHaveQuicklinks: true
   });

Reply via email to