ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-17025. "Read Version Info" button is enabled after changing uploaded file (alexantonenko)
Date Fri, 03 Jun 2016 16:01:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 89afd8be7 -> 21fff21d1


AMBARI-17025. "Read Version Info" button is enabled after changing uploaded file (alexantonenko)


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

Branch: refs/heads/branch-2.4
Commit: 21fff21d19a82e622587cce25c13d61fd5b5b2db
Parents: 89afd8b
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Fri Jun 3 12:38:09 2016 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Fri Jun 3 19:01:30 2016 +0300

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/services/AddVersionModal.js    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/21fff21d/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
index 1bef0e6..26b3558 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
@@ -59,24 +59,25 @@ angular.module('ambariAdminConsole')
             index: 2,
             displayName: $t('versions.enterURL'),
             url: "",
-            placeholder: "Enter URL to Version Definition File",
+            placeholder: "Enter URL to Version Definition File"
           };
           $scope.readInfoButtonDisabled = function () {
             return $scope.option1.index == $scope.selectedLocalOption.index ? !$scope.option1.file
: !$scope.option2.url;
           };
           $scope.onFileSelect = function(e){
+            $scope.option1.file = '';
             if (e.files && e.files.length == 1) {
               var file = e.files[0];
               var reader = new FileReader();
               reader.onload = (function () {
                 return function (e) {
                   $scope.option1.file = e.target.result;
+                  $scope.$apply();
                 };
               })(file);
               reader.readAsText(file);
-            } else {
-              $scope.option1.file = '';
             }
+            $scope.$apply();
           };
           /**
            * Load selected file to current page content
@@ -176,4 +177,4 @@ angular.module('ambariAdminConsole')
     };
 
     return modalObject;
-  }]);
\ No newline at end of file
+  }]);


Mime
View raw message