ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-7853. Slider app's Quick Links combobox contains repetitive items. (Buzhor Denys via onechiporenko)
Date Mon, 20 Oct 2014 11:13:01 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 9cb7bf69f -> 4e439a85c


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/4e439a85
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4e439a85
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4e439a85

Branch: refs/heads/branch-1.7.0
Commit: 4e439a85caa2f9b4a7138f0125238faa4da48a24
Parents: 9cb7bf6
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Mon Oct 20 13:44:12 2014 +0300
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Mon Oct 20 13:44:12 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/4e439a85/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/4e439a85/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
   });


Mime
View raw message