ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject [44/51] [abbrv] ambari git commit: AMBARI-15340. Register Version: multiple UI tweaks .(xiwang)
Date Wed, 09 Mar 2016 23:50:36 GMT
AMBARI-15340. Register Version: multiple UI tweaks .(xiwang)


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

Branch: refs/heads/AMBARI-13364
Commit: e5d261f84c8f10d3276ece640659c7b53a6684d1
Parents: 6d3e291
Author: Xi Wang <xiwang@apache.org>
Authored: Tue Mar 8 14:16:52 2016 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Wed Mar 9 14:53:26 2016 -0800

----------------------------------------------------------------------
 .../stackVersions/StackVersionsCreateCtrl.js            | 10 ++++++++--
 .../src/main/resources/ui/admin-web/app/styles/main.css | 11 +++++++++--
 .../app/views/stackVersions/stackVersionPage.html       | 12 ++++++------
 3 files changed, 23 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e5d261f8/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index 038b197..46e4a11 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -39,7 +39,7 @@ angular.module('ambariAdminConsole')
   $scope.option1 = {
     index: 1,
     displayName: $t('versions.uploadFile'),
-    file: null,
+    file: '',
     hasError: false
   };
   $scope.option2 = {
@@ -64,7 +64,11 @@ angular.module('ambariAdminConsole')
     $scope.option2.hasError = false;
   };
   $scope.readInfoButtonDisabled = function () {
-    return $scope.option1.index == $scope.selectedOption.index ? !$scope.option1.file : !$scope.option2.url;
+    return $scope.option1.index == $scope.selectedOption.index ? false : !$scope.option2.url;
+  };
+
+  $scope.allInfoCategoriesBlank = function () {
+    return !$scope.upgradeStack.stack_name;
   };
 
   $scope.onFileSelect = function(e){
@@ -77,6 +81,8 @@ angular.module('ambariAdminConsole')
         };
       })(file);
       reader.readAsText(file);
+    } else {
+      $scope.option1.file = '';
     }
   };
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5d261f8/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
index e4db617..9348564 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/styles/main.css
@@ -1433,9 +1433,13 @@ thead.view-permission-header > tr > th {
 .left-menu-all-repos .repos-table .repos-td.active > a {
   color: white;
 }
-
+#upload-definition-file-panel {
+  background-color: #f5f5f5;
+  padding: 20px 10px 5px 10px;
+  margin-bottom: 15px;
+}
 .register-version-options .read-info-button {
-  margin-bottom: 10px;
+  margin-top: 10px;
 }
 
 .register-version-options .option-radio-button {
@@ -1471,6 +1475,9 @@ thead.view-permission-header > tr > th {
   text-align: center;
   cursor: pointer;
 }
+.register-version-form .repos-panel .repo-name-label {
+  text-align: left;
+}
 
 .register-version-form .repos-panel .os-type-label {
   margin-top: 27px;;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5d261f8/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index c37006b..839b47d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -40,10 +40,10 @@
       </label>
     </div>
     <div class="col-sm-7">
-      <input type="file" class="choose-file-input" onchange="angular.element(this).scope().onFileSelect(this)"/>
+      <input type="file" class="choose-file-input" ng-model="option1.file" onchange="angular.element(this).scope().onFileSelect(this)"/>
     </div>
   </div>
-  <div class="clearfix register-version-options border-bottom bottom-margin">
+  <div class="clearfix register-version-options bottom-margin">
     <div class="col-sm-5 option-radio-button">
       <label class="option-label">
         <input type="radio" ng-model="selectedOption.index" value="2" ng-change="toggleOptionSelect()">
{{'versions.enterURL' | translate}}
@@ -55,7 +55,7 @@
       </div>
     </div>
     <div class="col-sm-12 read-info-button">
-      <button class="btn btn-primary pull-right" ng-click="readVersionInfo()"
+      <button class="btn btn-primary pull-right" ng-model="button" ng-click="readVersionInfo()"
             ng-disabled="readInfoButtonDisabled()">{{'versions.readInfo' | translate}}</button>
     </div>
   </div>
@@ -84,7 +84,7 @@
   </div>
 </accordion>
 
-<form ng-class="{'col-sm-10': editController}" class="form-horizontal register-version-form"
role="form" name="repoRegForm" novalidate>
+<form ng-class="{'col-sm-10': editController, 'visible': !allInfoCategoriesBlank()}" class="form-horizontal
register-version-form hide-soft" role="form" name="repoRegForm" novalidate>
   <div class="panel panel-default details-panel">
     <div class="panel-heading">
       <h3 class="panel-title">{{'common.details' | translate}}</h3>
@@ -129,7 +129,7 @@
     <div class="panel-heading">
       <h3 class="panel-title">{{'versions.repos' | translate}}</h3>
     </div>
-    <div class="panel-body ">
+    <div class="panel-body">
       <div class="alert alert-info" role="alert">{{'versions.alerts.baseURLs' | translate}}</div>
       <div class="alert alert-warning hide-soft" ng-class="{'visible' : hasValidationErrors()}"
role="alert">{{'versions.alerts.validationFailed' | translate}}</div>
       <div class="border-bottom bottom-margin clearfix">
@@ -147,7 +147,7 @@
             </div>
             <div class="col-sm-9">
               <div class="form-group {{repository.Repositories.repo_name}}" ng-class="{'has-error':
repository.hasError }" ng-repeat="repository in os.repositories">
-                <div class="col-sm-3"><label class="control-label">{{repository.Repositories.repo_name}}</label></div>
+                <label class="repo-name-label control-label col-sm-3">{{repository.Repositories.repo_name}}</label>
                 <div class="col-sm-9"><input type="text" class="form-control" ng-model="repository.Repositories.base_url"
                                          ng-change="clearError()" ng-disabled="!os.selected"></div>
               </div>


Mime
View raw message