You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/12/12 15:52:59 UTC
ambari git commit: AMBARI-8681 Duplicate Stack Versions are shown in
Host Details > Versions tab. (ababiichuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 69afc2a05 -> 439f4a5d0
AMBARI-8681 Duplicate Stack Versions are shown in Host Details > Versions tab. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/439f4a5d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/439f4a5d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/439f4a5d
Branch: refs/heads/trunk
Commit: 439f4a5d0e5f23d5265ed42a092ba3008485f376
Parents: 69afc2a
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Dec 12 16:19:57 2014 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Dec 12 16:20:23 2014 +0200
----------------------------------------------------------------------
ambari-web/app/views/main/host/stack_versions_view.js | 4 ++--
.../test/views/main/host/stack_versions_view_test.js | 12 ++++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/439f4a5d/ambari-web/app/views/main/host/stack_versions_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/stack_versions_view.js b/ambari-web/app/views/main/host/stack_versions_view.js
index 8020cbd..43b1a30 100644
--- a/ambari-web/app/views/main/host/stack_versions_view.js
+++ b/ambari-web/app/views/main/host/stack_versions_view.js
@@ -35,8 +35,8 @@ App.MainHostStackVersionsView = App.TableView.extend({
* @type {Ember.Array}
*/
content: function () {
- return App.HostStackVersion.find();
- }.property(),
+ return this.get('host.stackVersions');
+ }.property('host.stackVersions'),
/**
* return filtered number of all content number information displayed on the page footer bar
http://git-wip-us.apache.org/repos/asf/ambari/blob/439f4a5d/ambari-web/test/views/main/host/stack_versions_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/host/stack_versions_view_test.js b/ambari-web/test/views/main/host/stack_versions_view_test.js
index 6d63e4c..86bcbff 100644
--- a/ambari-web/test/views/main/host/stack_versions_view_test.js
+++ b/ambari-web/test/views/main/host/stack_versions_view_test.js
@@ -29,9 +29,13 @@ describe('App.MainHostStackVersionsView', function() {
sinon.stub(App.router, 'get').returns(Em.Object.create({
id: 1
}));
+ sinon.stub(view, 'filter').returns([Em.Object.create({
+ id: 1
+ })]);
});
after(function () {
App.router.get.restore();
+ view.filter.restore();
});
it("", function () {
view.propertyDidChange('host');
@@ -43,12 +47,16 @@ describe('App.MainHostStackVersionsView', function() {
describe("#content", function () {
before(function () {
- sinon.stub(App.HostStackVersion, 'find').returns([Em.Object.create({
+ sinon.stub(view, 'get').returns([Em.Object.create({
+ id: 1
+ })]);
+ sinon.stub(view, 'filter').returns([Em.Object.create({
id: 1
})]);
});
after(function () {
- App.HostStackVersion.find.restore();
+ view.get.restore();
+ view.filter.restore();
});
it("", function () {
view.propertyDidChange('content');