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 2015/05/31 22:08:47 UTC
[3/3] ambari git commit: AMBARI-11578. View instance creation should
default to automatic mode. (alexantonenko)
AMBARI-11578. View instance creation should default to automatic mode. (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/23604e3a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/23604e3a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/23604e3a
Branch: refs/heads/trunk
Commit: 23604e3a199457030cb531e05e2dc594b3db80b6
Parents: 2ea32f8
Author: Alex Antonenko <hi...@gmail.com>
Authored: Sun May 31 22:59:04 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Sun May 31 23:06:29 2015 +0300
----------------------------------------------------------------------
.../ambariViews/CreateViewInstanceCtrl.js | 27 ++++++++++++--------
1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/23604e3a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
index 9ee7cf7..ddda59e 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/ambariViews/CreateViewInstanceCtrl.js
@@ -52,6 +52,7 @@ angular.module('ambariAdminConsole')
description: '',
isLocalCluster: false
};
+ loadClusters();
});
}
@@ -91,17 +92,21 @@ angular.module('ambariAdminConsole')
$scope.numberOfClusterConfigs = 0;
$scope.numberOfSettingConfigs = 0;
- Cluster.getAllClusters().then(function (clusters) {
- if(clusters.length >0){
- clusters.forEach(function(cluster) {
- $scope.clusters.push(cluster.Clusters.cluster_name)
- });
- $scope.noClusterAvailible = false;
- }else{
- $scope.clusters.push("No Clusters");
- }
- $scope.cluster = $scope.clusters[0];
- });
+ function loadClusters () {
+ Cluster.getAllClusters().then(function (clusters) {
+ if(clusters.length >0){
+ clusters.forEach(function(cluster) {
+ $scope.clusters.push(cluster.Clusters.cluster_name)
+ });
+ $scope.noClusterAvailible = false;
+ $scope.instance.isLocalCluster = $scope.clusterConfigurable;
+ }else{
+ $scope.clusters.push("No Clusters");
+ }
+ $scope.cluster = $scope.clusters[0];
+ });
+ }
+
$scope.versions = [];
$scope.version = null;