Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21450 00712125d -> 7b140d0a1


AMBARI-21668 PATCH Repositories Not Visible in Web Client. (atkach)


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

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: 7b140d0a18d7f3551927de3dee3380d9729954f4
Parents: 0071212
Author: Andrii Tkach <atk...@apache.org>
Authored: Mon Aug 7 15:04:09 2017 +0300
Committer: Andrii Tkach <atk...@apache.org>
Committed: Mon Aug 7 15:04:09 2017 +0300

----------------------------------------------------------------------
 .../app/views/main/admin/stack_upgrade/versions_view.js       | 2 ++
 .../test/views/main/admin/stack_upgrade/version_view_test.js  | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7b140d0a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
index ce67d8a..62cf690 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/versions_view.js
@@ -141,6 +141,8 @@ App.MainAdminStackVersionsView = Em.View.extend({
       var index = displayNames.indexOf(patchVersion.get('displayNameSimple'));
       if (index !== -1) {
         allVersions.splice(index + 1, 0, patchVersion);
+      } else {
+        allVersions.push(patchVersion);
       }
     });
     return allVersions;

http://git-wip-us.apache.org/repos/asf/ambari/blob/7b140d0a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js 
b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
index c2a6c2d..e4e3b31 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/version_view_test.js
@@ -489,6 +489,11 @@ describe('App.mainAdminStackVersionsView', function () {
   describe('#sortedRepoVersions', function() {
     var repoVersions = [
       Em.Object.create({
+        isPatch: true,
+        repositoryVersion: '2.5.6.0-9',
+        displayNameSimple: '2.5.6.0'
+      }),
+      Em.Object.create({
         isPatch: false,
         repositoryVersion: '2.5.3.0-10',
         displayNameSimple: '2.5.3.0'
@@ -518,7 +523,7 @@ describe('App.mainAdminStackVersionsView', function () {
     it('should sort repository versions', function() {
       view.set('repoVersions', repoVersions);
       
expect(view.get('sortedRepoVersions').mapProperty('repositoryVersion')).to.be.eql([
-        '2.5.3.0-10', '2.5.3.0-9', '2.5.3.0-11', '2.5.4.0-10', '2.5.4.0-12'
+        '2.5.3.0-10', '2.5.3.0-9', '2.5.3.0-11', '2.5.4.0-10', '2.5.4.0-12', 
'2.5.6.0-9'
       ]);
     });
   });

Reply via email to