You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/09/19 03:08:23 UTC
[2/3] git commit: AMBARI-7372. Admin View: various UI.(xiwang)
AMBARI-7372. Admin View: various UI.(xiwang)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e0215f54
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e0215f54
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e0215f54
Branch: refs/heads/trunk
Commit: e0215f5401d03ff90cf35cf9cb01b9aba843829b
Parents: bf5f1c6
Author: Xi Wang <xi...@apache.org>
Authored: Wed Sep 17 14:23:48 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Thu Sep 18 16:26:58 2014 -0700
----------------------------------------------------------------------
.../clusters/ClustersManageAccessCtrl.js | 2 +-
.../app/scripts/directives/editableList.js | 18 ++++++++----------
.../resources/ui/admin-web/app/styles/main.css | 14 ++++++++------
.../app/views/directives/editableList.html | 2 +-
.../ui/admin-web/app/views/groups/list.html | 2 +-
.../ui/admin-web/app/views/leftNavbar.html | 4 ++--
.../resources/ui/admin-web/app/views/main.html | 1 +
.../ui/admin-web/app/views/users/list.html | 2 +-
8 files changed, 23 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
index 8999594..4cf39af 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/clusters/ClustersManageAccessCtrl.js
@@ -52,7 +52,7 @@ angular.module('ambariAdminConsole')
PermissionSaver.saveClusterPermissions(
$scope.permissionsEdit,
{
- clusterId: $routeParams.id,
+ clusterId: $routeParams.id
}
).then(reloadClusterData)
.catch(function(data) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
index 5d72078..f157d70 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/directives/editableList.js
@@ -53,7 +53,6 @@ angular.module('ambariAdminConsole')
var elem = $editBox[0];
var selection = window.getSelection(),
range = document.createRange();
-
elem.innerHTML = '\u00a0';
range.selectNodeContents(elem);
selection.removeAllRanges();
@@ -72,6 +71,7 @@ angular.module('ambariAdminConsole')
case 13: // Enter
$scope.$apply(function() {
$scope.addItem();
+ $scope.focusOnInput();
});
return false;
break;
@@ -117,6 +117,7 @@ angular.module('ambariAdminConsole')
$scope.addItem(item);
});
$scope.clearInput();
+ $scope.focusOnInput();
} else {
// Load typeahed items based on current input
@@ -129,30 +130,27 @@ angular.module('ambariAdminConsole')
} else if($scope.resourceType === 'Group'){
name = item.Groups.group_name;
}
-
if($scope.items.indexOf(name) < 0){ // Only if item not in list
items.push(name);
}
- $scope.typeahead = items.slice(0, 5);
- $scope.selectedTypeahed = 0;
});
+ $scope.typeahead = items.slice(0, 5);
+ $scope.selectedTypeahed = 0;
});
}
-
-
} else {
$scope.typeahead = [];
$scope.selectedTypeahed = 0;
+ $scope.focusOnInput();
}
});
- $scope.enableEditMode = function() {
+ $scope.enableEditMode = function(event) {
if( $scope.editable && !$scope.editMode){
$scope.editMode = true;
- if( $scope.items.length === 0){
- $scope.focusOnInput();
- }
+ $scope.focusOnInput();
}
+ event.stopPropagation();
};
$scope.cancel = function(event) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/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 d6237db..4d6d081 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
@@ -112,6 +112,7 @@
.editable-list-container.edit-mode .items-box ul.items-list li.item.add-item-input{
display: inline-block!important;
outline: none;
+ line-height: 20px;
max-width: 200px;
text-overflow: ellipsis;
white-space: nowrap;
@@ -445,24 +446,25 @@
.left-navbar .panel{
border-radius: 0;
- font-size: 15px;
}
.left-navbar .panel-heading {
padding: 8px 15px;
- font-weight: bold;
+ font-size: 15px;
}
.left-navbar .panel-body {
padding: 5px 15px;
+ font-size: 14px;
}
.left-navbar .panel-body #cluster-name input{
- font-size: 17px;
+ font-size: 14px;
}
.left-navbar .panel-body #cluster-name form{
margin-top: 4px;
- margin-bottom: -10px;
+ margin-bottom: -12px;
}
-.left-navbar .panel-body h4 .glyphicon{
- font-size: 14px;
+.left-navbar .panel-body h5 .glyphicon{
+ font-size: 13px;
+ color: #428bca;
}
.left-navbar .panel-body #LDAP-button {
padding: 5px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/views/directives/editableList.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/directives/editableList.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/directives/editableList.html
index 5cdc148..21de4aa 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/directives/editableList.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/directives/editableList.html
@@ -16,7 +16,7 @@
* limitations under the License.
-->
-<div class="editable-list-container well" ng-class="{'edit-mode' : editMode, 'disabled' : !editable}" ng-click="enableEditMode()">
+<div class="editable-list-container well" ng-class="{'edit-mode' : editMode, 'disabled' : !editable}" ng-click="enableEditMode($event)">
<div class="items-box">
<ul class="items-list">
<li class="item" ng-repeat="item in items | orderBy:identity"><span><a href>{{item}}</a><button ng-click="removeFromItems(item)" type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button></span></li><li class="item add-item-input" ng-show="editMode">
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
index 81cb0ac..fefe6fb 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/groups/list.html
@@ -31,7 +31,7 @@
<th class="col-sm-8">
<div class="search-container">
<label for="">Group Name</label>
- <input type="text" class="form-control namefilter" ng-model="currentNameFilter" ng-change="resetPagination()">
+ <input type="text" class="form-control namefilter" placeholder="Any" ng-model="currentNameFilter" ng-change="resetPagination()">
<button type="button" class="close" ng-show="currentNameFilter" ng-click="currentNameFilter=''; resetPagination()"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
</th>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
index 4da46d7..8fd8c6a 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/leftNavbar.html
@@ -21,9 +21,9 @@
<div class="panel-body">
<div ng-show="cluster">
<div id="cluster-name" ng-switch on="editCluster.editingName">
- <h4 ng-switch-when="false">{{cluster.Clusters.cluster_name}}
+ <h5 ng-switch-when="false">{{cluster.Clusters.cluster_name}}
<i ng-click="toggleEditName()" class="glyphicon glyphicon-edit pull-right edit-cluster-name" tooltip="Rename Cluster"></i>
- </h4>
+ </h5>
<form ng-keyup="toggleEditName($event)" tabindex="1" name="editClusterNameForm" class="editClusterNameForm" ng-switch-when="true"
ng-submit="editCluster.name !== cluster.Clusters.cluster_name && editClusterNameForm.newClusterName.$valid && confirmClusterNameChange()">
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
index 7785d2f..a542b4f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/main.html
@@ -21,6 +21,7 @@
<div ng-if="isLoaded" id="main-operations-boxes" class="row thumbnails">
<p ng-hide="cluster">Provision a cluster, manage who can access the cluster, and customize views for Ambari users.</p>
<p ng-show="cluster">Monitor your cluster resources, manage who can access the cluster, and customize views for Ambari users.</p>
+
<!--Clusters-->
<div ng-show="cluster" class="col-sm-11 thumbnail">
<h4 class="title">Operate Your Cluster</h4>
http://git-wip-us.apache.org/repos/asf/ambari/blob/e0215f54/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
index 189110c..76addd3 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/users/list.html
@@ -39,7 +39,7 @@
<th>
<div class="search-container">
<label for="">Username</label>
- <input type="text" class="form-control namefilter" ng-model="currentNameFilter" ng-change="resetPagination()">
+ <input type="text" class="form-control namefilter" placeholder="Any" ng-model="currentNameFilter" ng-change="resetPagination()">
<button type="button" class="close clearfilter" ng-show="currentNameFilter" ng-click="currentNameFilter=''; resetPagination()"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
</th>