Repository: ambari Updated Branches: refs/heads/branch-1.7.0 78f76f02c -> 228cf3843
AMBARI-7944. Admin View: the user is allowed to go to the dashboard while cluster deploy is happening. (Levgen Gorbachev via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/228cf384 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/228cf384 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/228cf384 Branch: refs/heads/branch-1.7.0 Commit: 228cf384304b0ce7afcd32136e12b99ffea5386c Parents: 78f76f0 Author: Aleksandr Kovalenko <[email protected]> Authored: Fri Oct 24 13:12:56 2014 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Fri Oct 24 13:13:16 2014 +0300 ---------------------------------------------------------------------- .../ui/admin-web/app/scripts/controllers/mainCtrl.js | 1 + .../main/resources/ui/admin-web/app/scripts/routes.js | 2 +- .../src/main/resources/ui/admin-web/app/styles/main.css | 5 ++++- .../src/main/resources/ui/admin-web/app/views/main.html | 12 +++++++++--- 4 files changed, 15 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/228cf384/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js index 8b8aacc..7e0793b 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/mainCtrl.js @@ -58,6 +58,7 @@ angular.module('ambariAdminConsole') }); }; loadClusterData(); + $scope.viewInstances = []; View.getAllVisibleInstance().then(function(instances) { $scope.viewInstances = instances; http://git-wip-us.apache.org/repos/asf/ambari/blob/228cf384/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js ---------------------------------------------------------------------- diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js index 8a99c18..0eff401 100644 --- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js +++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/routes.js @@ -90,7 +90,7 @@ angular.module('ambariAdminConsole') dashboard:{ url: '/dashboard', controller: ['$window', function($window) { - $window.location.href = '/#/main/dashboard'; + $window.location.replace('/#/main/dashboard'); }], template: '' } http://git-wip-us.apache.org/repos/asf/ambari/blob/228cf384/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 00ec56c..f55de27 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 @@ -829,7 +829,10 @@ table.no-border tr td{ .btn-primary:active, .btn-primary.active, .btn-primary.disabled, -.btn-primary[disabled] { +.btn-primary[disabled], +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover + { color: #ffffff; background-color: #0044cc; *background-color: #003bb3; http://git-wip-us.apache.org/repos/asf/ambari/blob/228cf384/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 9a48dcf..3b96b4c 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,14 @@ <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" 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> + <span ng-class="{active: isActive('clusters.manageAccess')}"> + <a ng-show="cluster.Clusters.provisioning_state != 'INSTALLED'" href class="btn btn-primary permission-button" ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">Manage Permissions</a> + <a ng-show="cluster.Clusters.provisioning_state == 'INSTALLED'" 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 ng-show="cluster.Clusters.provisioning_state != 'INSTALLED'" href class="btn btn-primary go-dashboard-button" target="{{cluster.Clusters.cluster_name}}" ng-disabled="cluster.Clusters.provisioning_state != 'INSTALLED' ">Go to Dashboard</a> + <a ng-show="cluster.Clusters.provisioning_state == 'INSTALLED'" href="'/#/main/dashboard/metrics'" 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"> @@ -59,4 +65,4 @@ </div> </div> </div> -</div> \ No newline at end of file +</div>
