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

2014-10-20 Thread onechiporenko
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 
Authored: Mon Oct 20 13:40:58 2014 +0300
Committer: Oleg Nechiporenko 
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
   });



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

2014-10-20 Thread onechiporenko
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 
Authored: Mon Oct 20 13:44:12 2014 +0300
Committer: Oleg Nechiporenko 
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
   });