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 2014/09/26 19:14:53 UTC

git commit: AMBARI-7522. Admin View: the user is allowed to go to the dashboard while cluster deploy is happening (Levgen Gorbachev via alejandro)

Repository: ambari
Updated Branches:
  refs/heads/trunk 5f683a538 -> 6befb4803


AMBARI-7522. Admin View: the user is allowed to go to the dashboard while cluster deploy is happening (Levgen Gorbachev via alejandro)


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

Branch: refs/heads/trunk
Commit: 6befb480331e6206e17b2ece981a2cbe23df7c99
Parents: 5f683a5
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Fri Sep 26 10:10:18 2014 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Fri Sep 26 10:14:24 2014 -0700

----------------------------------------------------------------------
 .../ui/admin-web/app/scripts/services/Cluster.js     |  2 +-
 .../main/resources/ui/admin-web/app/styles/main.css  | 15 +++++++++++++++
 .../ui/admin-web/app/views/ambariViews/create.html   |  2 +-
 .../ui/admin-web/app/views/ambariViews/edit.html     |  2 +-
 .../resources/ui/admin-web/app/views/leftNavbar.html |  3 ++-
 .../main/resources/ui/admin-web/app/views/main.html  |  4 ++--
 6 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
index 3a791f4..624e773 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Cluster.js
@@ -23,7 +23,7 @@ angular.module('ambariAdminConsole')
     getStatus: function() {
       var deferred = $q.defer();
 
-      $http.get(Settings.baseUrl + '/clusters')
+      $http.get(Settings.baseUrl + '/clusters?fields=Clusters/provisioning_state')
       .then(function(data, status, headers) {
         deferred.resolve(data.data.items[0]);
       })

http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/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 d6bcf1f..75f8e84 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
@@ -123,6 +123,14 @@
   transition: none;
 }
 
+.cluster-installation-progress-label{
+  display: block;
+  color: #888;
+  text-align: center;
+  padding: 10px 0px;
+  cursor: default;
+}
+
 .add-item-input span{
   display: block;
   outline: none;
@@ -600,6 +608,13 @@ table.no-border tr td{
   padding: 0;
 }
 
+.property-form label{
+  width: 214px;
+  word-wrap: normal;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+
 .views-list-pane{}
 .views-list-pane .panel-body table{
   margin-bottom: 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
index f92efe9..4bf51ac 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/create.html
@@ -97,7 +97,7 @@
     <div class="panel-heading">
       <h3 class="panel-title">Properties</h3>
     </div>
-    <div class="panel-body">
+    <div class="panel-body property-form">
       <div class="form-group" ng-repeat="parameter in instance.properties"
         ng-class="{'has-error' : (form.isntanceCreateForm[parameter.name].$error.required && form.isntanceCreateForm.submitted)}" >
         <label for="" class="col-sm-3 control-label" ng-class="{'not-required': !parameter.required}" tooltip="{{parameter.description}}">{{parameter.name}}{{parameter.required ? '*' : ''}}</label>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
index d3a1390..5476872 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/edit.html
@@ -134,7 +134,7 @@
     </div>
   </div>
   <div class="panel-body">
-    <form name="propertiesForm" class="form-horizontal" ng-hide="isConfigurationEmpty" novalidate>
+    <form name="propertiesForm" class="form-horizontal property-form" ng-hide="isConfigurationEmpty" novalidate>
       <fieldset>
         <div class="form-group" ng-repeat="property in configurationMeta" ng-class="{'has-error' : property.required && propertiesForm[property.name].$error.required && !editConfigurationDisabled}" tooltip="{{property.description}}">
           <label for="" class="control-label col-sm-3" ng-class="{'not-required': !property.required}">{{property.name}}{{property.required ? '*' : ''}}</label>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/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 4680e9a..9a2f34c 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
@@ -53,12 +53,13 @@
 
         </div>
 
-        <ul class="nav nav-pills nav-stacked">
+        <ul class="nav nav-pills nav-stacked" ng-show="cluster.Clusters.provisioning_state == 'INSTALLED' ">
           <li ng-class="{active: isActive('clusters.manageAccess')}">
             <a href="#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess" class="permissions">Permissions</a>
           </li>
           <li><a href="/#/main/dashboard" class="gotodashboard">Go to Dashboard</a></li>
         </ul>
+        <span class="cluster-installation-progress-label" ng-show="cluster.Clusters.provisioning_state == 'INIT'">Cluster creation in progress...</span>
       </div>
         
       <div ng-hide="cluster">

http://git-wip-us.apache.org/repos/asf/ambari/blob/6befb480/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 126f4f0..9a48dcf 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
@@ -28,8 +28,8 @@
         <div class="description">Manage the configuration of your cluster and monitor the health of your services</div>
         <div class="glyphicon glyphicon-cloud"></div>
         <div class="buttons">
-          <span ng-class="{active: isActive('clusters.manageAccess')}"><a href="#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess" class="btn btn-primary permission-button">Manage Permissions</a></span>
-          <span><a href="/#/main/dashboard" class="btn btn-primary go-dashboard-button" target="{{cluster.Clusters.cluster_name}}">Go to Dashboard</a></span>
+        <span ng-class="{active: isActive('clusters.manageAccess')}"><a href="#/clusters/{{cluster.Clusters.cluster_name}}/manageAccess" class="btn btn-primary permission-button" ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">Manage Permissions</a></span>
+          <span><a href="/#/main/dashboard" class="btn btn-primary go-dashboard-button" target="{{cluster.Clusters.cluster_name}}" ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">Go to Dashboard</a></span>
         </div>
       </div>
       <div ng-hide="cluster" class="col-sm-11 thumbnail">