You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/06/03 10:16:45 UTC
ambari git commit: AMBARI-17025. "Read Version Info" button is
enabled after changing uploaded file (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk e3f6ec7a1 -> 2f298b24e
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/2f298b24
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2f298b24
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2f298b24
Branch: refs/heads/trunk
Commit: 2f298b24edbedfbb9b76fe1f4621fcfd9f5f4164
Parents: e3f6ec7
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jun 3 12:38:09 2016 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jun 3 13:16:38 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/2f298b24/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
+ }]);