You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2017/03/06 20:27:01 UTC
ambari git commit: AMBARI-20255 Sometimes the Hosts page shows a
different page for page 1 (additional patch). (atkach)
Repository: ambari
Updated Branches:
refs/heads/trunk f60c4ccfa -> 34df76502
AMBARI-20255 Sometimes the Hosts page shows a different page for page 1 (additional patch). (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/34df7650
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/34df7650
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/34df7650
Branch: refs/heads/trunk
Commit: 34df7650207e957a38a5067f1553b753a00297e3
Parents: f60c4cc
Author: Andrii Tkach <at...@apache.org>
Authored: Mon Mar 6 21:20:24 2017 +0200
Committer: Andrii Tkach <at...@apache.org>
Committed: Mon Mar 6 22:26:40 2017 +0200
----------------------------------------------------------------------
.../app/mixins/common/table_server_mixin.js | 2 +-
.../mixins/common/table_server_view_mixin.js | 2 --
.../common/table_server_view_mixin_test.js | 24 --------------------
3 files changed, 1 insertion(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/34df7650/ambari-web/app/mixins/common/table_server_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/table_server_mixin.js b/ambari-web/app/mixins/common/table_server_mixin.js
index 5162a02..c9f0bba 100644
--- a/ambari-web/app/mixins/common/table_server_mixin.js
+++ b/ambari-web/app/mixins/common/table_server_mixin.js
@@ -69,7 +69,7 @@ App.TableServerMixin = Em.Mixin.create({
startIndex = (startIndex > 0) ? startIndex - 1 : startIndex;
this.get('paginationProps').findProperty('name', 'startIndex').value = startIndex;
}
- return this.get('paginationProps');
+ return this.get('paginationProps').slice(0);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/34df7650/ambari-web/app/mixins/common/table_server_view_mixin.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/table_server_view_mixin.js b/ambari-web/app/mixins/common/table_server_view_mixin.js
index ae949d0..d44a09e 100644
--- a/ambari-web/app/mixins/common/table_server_view_mixin.js
+++ b/ambari-web/app/mixins/common/table_server_view_mixin.js
@@ -140,11 +140,9 @@ App.TableServerViewMixin = Em.Mixin.create({
updatePagination: function (key) {
if (!Em.isNone(this.get('displayLength'))) {
App.db.setDisplayLength(this.get('controller.name'), this.get('displayLength'));
- this.get('controller.paginationProps').findProperty('name', 'displayLength').value = this.get('displayLength');
}
if (!Em.isNone(this.get('startIndex'))) {
App.db.setStartIndex(this.get('controller.name'), this.get('startIndex'));
- this.get('controller.paginationProps').findProperty('name', 'startIndex').value = this.get('startIndex');
}
if (key !== 'SKIP_REFRESH') {
http://git-wip-us.apache.org/repos/asf/ambari/blob/34df7650/ambari-web/test/mixins/common/table_server_view_mixin_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mixins/common/table_server_view_mixin_test.js b/ambari-web/test/mixins/common/table_server_view_mixin_test.js
index e5b6f08..ae750de 100644
--- a/ambari-web/test/mixins/common/table_server_view_mixin_test.js
+++ b/ambari-web/test/mixins/common/table_server_view_mixin_test.js
@@ -100,12 +100,6 @@ describe('App.MainConfigHistoryView', function() {
it('setDisplayLength is called with correct arguments', function () {
expect(App.db.setDisplayLength.calledWith('mainConfigHistoryController', '50')).to.be.true;
});
- it('paginationProps.startIndex = 0', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'startIndex').value).to.equal(0);
- });
- it('paginationProps.displayLength = 50', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'displayLength').value).to.equal('50');
- });
});
describe('startIndex is correct', function() {
@@ -124,12 +118,6 @@ describe('App.MainConfigHistoryView', function() {
it('setDisplayLength is not called', function () {
expect(App.db.setDisplayLength.called).to.be.false;
});
- it('paginationProps.startIndex = 10', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'startIndex').value).to.equal(10);
- });
- it('paginationProps.displayLength = 50', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'displayLength').value).to.equal('50');
- });
});
describe('displayLength and startIndex are correct', function() {
@@ -148,12 +136,6 @@ describe('App.MainConfigHistoryView', function() {
it('setDisplayLength is called with valid arguments', function () {
expect(App.db.setDisplayLength.calledWith('mainConfigHistoryController', '100')).to.be.true;
});
- it('paginationProps.startIndex = 20', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'startIndex').value).to.equal(20);
- });
- it('paginationProps.displayLength = 100', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'displayLength').value).to.equal('100');
- });
});
describe('displayLength and startIndex are null', function() {
@@ -171,12 +153,6 @@ describe('App.MainConfigHistoryView', function() {
it('setDisplayLength is not called', function () {
expect(App.db.setDisplayLength.called).to.be.false;
});
- it('paginationProps.startIndex = 20', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'startIndex').value).to.equal(20);
- });
- it('paginationProps.displayLength = 100', function () {
- expect(view.get('controller.paginationProps').findProperty('name', 'displayLength').value).to.equal('100');
- });
});
});