You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2013/10/16 19:01:03 UTC
[1/2] git commit: AMBARI-3529. Yarn+MapReduce installing.
(onechiporenko)
Updated Branches:
refs/heads/trunk 65ba892ae -> 8f2b1fe4c
AMBARI-3529. Yarn+MapReduce installing. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/ecf65d23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/ecf65d23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/ecf65d23
Branch: refs/heads/trunk
Commit: ecf65d2319014c181d6de183d2d6dd205a0942c6
Parents: 65ba892
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Wed Oct 16 19:53:33 2013 +0300
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Wed Oct 16 20:00:55 2013 +0300
----------------------------------------------------------------------
ambari-web/app/controllers/main/service.js | 2 +-
ambari-web/app/router.js | 2 +-
ambari-web/app/routes/add_service_routes.js | 24 ++++++++---------
ambari-web/app/views/main/service/menu.js | 33 ++++++++++++++++++++++--
4 files changed, 44 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ecf65d23/ambari-web/app/controllers/main/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service.js b/ambari-web/app/controllers/main/service.js
index dbbccf0..570409f 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -25,7 +25,7 @@ App.MainServiceController = Em.ArrayController.extend({
return [];
}
return App.Service.find();
- }.property('App.router.clusterController.isLoaded'),
+ }.property('App.router.clusterController.isLoaded').volatile(),
cluster: function () {
if (!App.router.get('clusterController.isLoaded')) {
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ecf65d23/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index e1650f3..10ada9e 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -272,7 +272,7 @@ App.Router = Em.Router.extend({
if (!localStorage.getObject('ambari').app.user.admin || clusterStatusOnServer && (clusterStatusOnServer.clusterState === 'CLUSTER_STARTED_5' ||
clusterStatusOnServer.clusterState === 'ADD_HOSTS_COMPLETED_5' || clusterStatusOnServer.clusterState === 'STACK_UPGRADE_COMPLETED' ||
clusterStatusOnServer.clusterState === 'REASSIGN_MASTER_COMPLETED' || clusterStatusOnServer.clusterState === 'SECURITY_COMPLETED' || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_COMPLETED'
- || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_DISABLED')) {
+ || clusterStatusOnServer.clusterState === 'HIGH_AVAILABILITY_DISABLED' || clusterStatusOnServer.clusterState === 'ADD_SERVICES_COMPLETED_5')) {
return 'main.index';
} else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('addHostController.name')) {
// if wizardControllerName == "addHostController", then it means someone closed the browser or the browser was crashed when we were last in Add Hosts wizard
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ecf65d23/ambari-web/app/routes/add_service_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_service_routes.js b/ambari-web/app/routes/add_service_routes.js
index c217e9c..95242b9 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -31,7 +31,7 @@ module.exports = Em.Route.extend({
router.get('clusterController').requestHosts(hostsUrl, function () {
console.log('Request for hosts, with disk_info parameter');
});
- App.ModalPopup.show({
+ var popup = App.ModalPopup.show({
classNames: ['full-width-modal'],
header:Em.I18n.t('services.add.header'),
bodyClass: App.AddServiceView.extend({
@@ -43,19 +43,21 @@ module.exports = Em.Route.extend({
onPrimary:function () {
this.hide();
- App.router.get('updateController').set('isWorking', true);
App.router.transitionTo('main.services.index');
},
onClose: function() {
- this.hide();
App.router.get('updateController').set('isWorking', true);
+ var self = this;
+ App.router.get('updateController').updateServiceMetric(function(){
+ self.hide();
+ });
App.router.transitionTo('main.services.index');
},
didInsertElement: function(){
this.fitHeight();
}
});
-
+ addServiceController.set('popup',popup);
App.clusterStatus.updateFromServer();
var currentClusterStatus = App.clusterStatus.get('value');
@@ -286,15 +288,11 @@ module.exports = Em.Route.extend({
},
back: Em.Router.transitionTo('step6'),
complete: function (router, context) {
- if (true) { // this function will be moved to installerController where it will validate
- var addServiceController = router.get('addServiceController');
- App.router.get('updateController').updateAll();
- addServiceController.finish();
- $(context.currentTarget).parents("#modal").find(".close").trigger('click');
-
- // We need to do recovery based on whether we are in Add Host or Installer wizard
- addServiceController.saveClusterState('ADD_SERVICES_COMPLETED_5');
- }
+ var addServiceController = router.get('addServiceController');
+ addServiceController.get('popup').onClose();
+ addServiceController.finish();
+ // We need to do recovery based on whether we are in Add Host or Installer wizard
+ addServiceController.saveClusterState('ADD_SERVICES_COMPLETED_5');
}
}),
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ecf65d23/ambari-web/app/views/main/service/menu.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/menu.js b/ambari-web/app/views/main/service/menu.js
index c00cb3e..1d1f328 100644
--- a/ambari-web/app/views/main/service/menu.js
+++ b/ambari-web/app/views/main/service/menu.js
@@ -26,9 +26,38 @@ App.MainServiceMenuView = Em.CollectionView.extend({
}
return true;
});
- return items;
- }.property('App.router.mainServiceController.content'),
+ return this.sortByOrder(this.get('servicesSortOrder'), items);
+ }.property('App.router.mainServiceController.content', 'App.router.mainServiceController.content.length'),
+ servicesSortOrder: [
+ 'HDFS',
+ 'YARN',
+ 'MAPREDUCE',
+ 'MAPREDUCE2',
+ 'TEZ',
+ 'HBASE',
+ 'HIVE',
+ 'HCATALOG',
+ 'WEBHCAT',
+ 'FLUME',
+ 'OOZIE',
+ 'GANGLIA',
+ 'NAGIOS',
+ 'ZOOKEEPER',
+ 'PIG',
+ 'SQOOP',
+ 'HUE'
+ ],
+ sortByOrder: function (sortOrder, array) {
+ var sorted = [];
+ for (var i = 0; i < sortOrder.length; i++)
+ for (var j = 0; j < array.length; j++) {
+ if (sortOrder[i] == array[j].get('id')) {
+ sorted.push(array[j]);
+ }
+ }
+ return sorted;
+ },
didInsertElement:function () {
App.router.location.addObserver('lastSetURL', this, 'renderOnRoute');
[2/2] git commit: AMBARI-3528. DB url isn't calculated automatically.
(onechiporenko)
Posted by on...@apache.org.
AMBARI-3528. DB url isn't calculated automatically. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/8f2b1fe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/8f2b1fe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/8f2b1fe4
Branch: refs/heads/trunk
Commit: 8f2b1fe4c6fc673bbaea604d3c1f072276842598
Parents: ecf65d2
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Wed Oct 16 19:55:58 2013 +0300
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Wed Oct 16 20:00:56 2013 +0300
----------------------------------------------------------------------
ambari-web/app/views/wizard/controls_view.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/8f2b1fe4/ambari-web/app/views/wizard/controls_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/controls_view.js b/ambari-web/app/views/wizard/controls_view.js
index 1f13bca..c9f542d 100644
--- a/ambari-web/app/views/wizard/controls_view.js
+++ b/ambari-web/app/views/wizard/controls_view.js
@@ -201,7 +201,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend({
didInsertElement: function () {
// on page render, automatically populate JDBC URLs only for default database settings
// so as to not lose the user's customizations on these fields
- if (App.clusterStatus.clusterState == 'CLUSTER_NOT_CREATED_1' && ['New MySQL Database', 'New Derby Database'].contains(this.get('serviceConfig.value'))) {
+ if (['addServiceController', 'installerController'].contains(App.clusterStatus.wizardControllerName) && ['New MySQL Database', 'New Derby Database'].contains(this.get('serviceConfig.value'))) {
this.onOptionsChange();
}
},