ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-7847. Create Instance is allowed on a View that is still deploying. (yusaku)
Date Mon, 20 Oct 2014 17:12:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 b1821e28b -> 2a9a7bc57


AMBARI-7847. Create Instance is allowed on a View that is still deploying. (yusaku)


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

Branch: refs/heads/branch-1.7.0
Commit: 2a9a7bc57f912a57af7dde4e3c8d322a2c0dd84c
Parents: b1821e2
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Sun Oct 19 18:08:42 2014 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon Oct 20 10:11:48 2014 -0700

----------------------------------------------------------------------
 .../app/scripts/controllers/ambariViews/ViewsListCtrl.js     | 8 +++++++-
 .../src/main/resources/ui/admin-web/app/scripts/routes.js    | 2 +-
 .../ui/admin-web/app/views/ambariViews/listTable.html        | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a9a7bc5/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
index 4fad3b3..b70e6fa 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/ViewsListCtrl.js
@@ -18,7 +18,7 @@
 'use strict';
 
 angular.module('ambariAdminConsole')
-.controller('ViewsListCtrl',['$scope', 'View', '$modal', 'Alert', 'ConfirmationModal', function($scope,
View, $modal, Alert, ConfirmationModal) {
+.controller('ViewsListCtrl',['$scope', 'View', '$modal', 'Alert', 'ConfirmationModal', '$location',
function($scope, View, $modal, Alert, ConfirmationModal, $location) {
   var deferredList = [];
   $scope.$on('$locationChangeStart', function() {
     deferredList.forEach(function(def) {
@@ -114,4 +114,10 @@ angular.module('ambariAdminConsole')
     }
     $scope.filteredViews = result;
   };
+
+  $scope.gotoCreate = function(viewName, isAllowed) {
+    if(isAllowed){
+      $location.path('/views/'+viewName+'/new');
+    }
+  };
 }]);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a9a7bc5/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 e47c97d..bc07133 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
@@ -75,7 +75,7 @@ angular.module('ambariAdminConsole')
       controller: 'ViewsEditCtrl'
     },
     create: {
-      url: '/views/:viewId/versions/:version/new',
+      url: '/views/:viewId/new',
       templateUrl: 'views/ambariViews/create.html',
       controller: 'CreateViewInstanceCtrl'
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a9a7bc5/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
index 41fb450..455898f 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/ambariViews/listTable.html
@@ -80,7 +80,7 @@
           <tr>
             <td class="col-sm-3"></td>
             <td class="col-sm-3">
-              <a tooltip="{{view.canCreateInstance ? '' : 'Unable to create view instances'}}"
class="btn btn-default createisntance-btn {{view.canCreateInstance ? '' : 'disabled'}}" href="#/views/{{view.view_name}}/versions/{{view.versionsList[view.versionsList.length-1].ViewVersionInfo.version}}/new"><span
class="glyphicon glyphicon-plus"></span> Create Instance</a>
+              <a tooltip="{{view.canCreateInstance ? '' : 'Unable to create view instances'}}"
class="btn btn-default createisntance-btn {{view.canCreateInstance ? '' : 'disabled'}}" href
ng-click="gotoCreate(view.view_name, view.canCreateInstance);"><span class="glyphicon
glyphicon-plus"></span> Create Instance</a>
             </td>
             <td class="col-sm-3"></td>
             <td class="col-sm-3">


Mime
View raw message