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/11/07 18:29:52 UTC
[1/3] ambari git commit: AMBARI-8203. Add Service service accounts
look incorrect (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 96bcff5e3 -> 4aae5e4c8
AMBARI-8203. Add Service service accounts look incorrect (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd3b01a9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd3b01a9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd3b01a9
Branch: refs/heads/trunk
Commit: cd3b01a9a28c013985e3cbc721f5673dcbbf4497
Parents: 96bcff5
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Nov 7 15:50:18 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 7 19:29:43 2014 +0200
----------------------------------------------------------------------
.../main/admin/serviceAccounts_controller.js | 9 +++++----
.../app/controllers/main/service/add_controller.js | 4 +++-
ambari-web/app/controllers/wizard/step7_controller.js | 4 ++++
ambari-web/app/routes/add_service_routes.js | 14 ++++++++------
4 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3b01a9/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js b/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
index ecb6f20..0551b2c 100644
--- a/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
+++ b/ambari-web/app/controllers/main/admin/serviceAccounts_controller.js
@@ -28,7 +28,7 @@ App.MainAdminServiceAccountsController = App.MainServiceInfoConfigsController.ex
serviceName: 'MISC'
}),
loadUsers: function () {
- this.set('selectedService', this.get('content.serviceName'));
+ this.set('selectedService', this.get('content.serviceName') ? this.get('content.serviceName') : "MISC");
this.loadServiceConfig();
},
loadServiceConfig: function () {
@@ -36,8 +36,8 @@ App.MainAdminServiceAccountsController = App.MainServiceInfoConfigsController.ex
name: 'config.tags',
sender: this,
data: {
- serviceName: this.get('content.serviceName'),
- serviceConfigsDef: this.get('serviceConfigs').findProperty('serviceName', this.get('content.serviceName'))
+ serviceName: this.get('selectedService'),
+ serviceConfigsDef: this.get('serviceConfigs').findProperty('serviceName', this.get('selectedService'))
},
success: 'loadServiceTagSuccess'
});
@@ -46,7 +46,7 @@ App.MainAdminServiceAccountsController = App.MainServiceInfoConfigsController.ex
var self = this;
var installedServices = App.Service.find().mapProperty("serviceName");
var serviceConfigsDef = params.serviceConfigsDef;
- var serviceName = this.get('content.serviceName');
+ var serviceName = this.get('selectedService');
var loadedClusterSiteToTagMap = {};
for (var site in data.Clusters.desired_configs) {
@@ -71,6 +71,7 @@ App.MainAdminServiceAccountsController = App.MainServiceInfoConfigsController.ex
self.setContentProperty('hdfsUser', 'hdfs_user', misc_configs);
self.setContentProperty('group', 'user_group', misc_configs);
+ self.setContentProperty('smokeuser', 'smokeuser', misc_configs);
self.set('dataIsLoaded', true);
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3b01a9/ambari-web/app/controllers/main/service/add_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/add_controller.js b/ambari-web/app/controllers/main/service/add_controller.js
index 39b57c7..1b3f0e0 100644
--- a/ambari-web/app/controllers/main/service/add_controller.js
+++ b/ambari-web/app/controllers/main/service/add_controller.js
@@ -52,7 +52,9 @@ App.AddServiceController = App.WizardController.extend({
controllerName: 'addServiceController',
configGroups: [],
clients: [],
- additionalClients: []
+ additionalClients: [],
+ smokeuser: "ambari-qa",
+ group: "hadoop"
}),
setCurrentStep: function (currentStep, completed) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3b01a9/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index f840ad1..a7f4251 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1236,6 +1236,10 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, {
*/
activateSpecialConfigs: function () {
var miscConfigs = this.get('stepConfigs').findProperty('serviceName', 'MISC').configs;
+ if(this.get('wizardController.name') == "addServiceController"){
+ miscConfigs.findProperty('name','smokeuser').set('value', this.get('content.smokeuser')).set('isEditable', false);
+ miscConfigs.findProperty('name','user_group').set('value', this.get('content.group')).set('isEditable', false);
+ }
App.config.miscConfigVisibleProperty(miscConfigs, this.get('selectedServiceNames'));
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd3b01a9/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 9f2be68..5a1dd92 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -188,12 +188,14 @@ module.exports = App.WizardRoute.extend({
var controller = router.get('addServiceController');
controller.setCurrentStep('4');
controller.dataLoading().done(function () {
- var wizardStep7Controller = router.get('wizardStep7Controller');
- controller.loadAllPriorSteps();
- controller.loadAdvancedConfigs(wizardStep7Controller);
- wizardStep7Controller.getConfigTags();
- wizardStep7Controller.set('wizardController', controller);
- controller.connectOutlet('wizardStep7', controller.get('content'));
+ controller.usersLoading().done(function () {
+ var wizardStep7Controller = router.get('wizardStep7Controller');
+ controller.loadAllPriorSteps();
+ controller.loadAdvancedConfigs(wizardStep7Controller);
+ wizardStep7Controller.getConfigTags();
+ wizardStep7Controller.set('wizardController', controller);
+ controller.connectOutlet('wizardStep7', controller.get('content'));
+ });
})
},
back: function(router){
[2/3] ambari git commit: AMBARI-8205. Configs: Dashboard > Config
History remove custom date option (alexantonenko)
Posted by al...@apache.org.
AMBARI-8205. Configs: Dashboard > Config History remove custom date option (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b1c4853a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b1c4853a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b1c4853a
Branch: refs/heads/trunk
Commit: b1c4853a61edd2a87977077d065356ea419ca3b3
Parents: cd3b01a
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Nov 7 17:13:51 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 7 19:29:44 2014 +0200
----------------------------------------------------------------------
ambari-web/app/routes/add_service_routes.js | 16 ++++++++--------
.../app/views/main/dashboard/config_history_view.js | 8 +-------
2 files changed, 9 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b1c4853a/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 5a1dd92..8c1326e 100644
--- a/ambari-web/app/routes/add_service_routes.js
+++ b/ambari-web/app/routes/add_service_routes.js
@@ -188,14 +188,14 @@ module.exports = App.WizardRoute.extend({
var controller = router.get('addServiceController');
controller.setCurrentStep('4');
controller.dataLoading().done(function () {
- controller.usersLoading().done(function () {
- var wizardStep7Controller = router.get('wizardStep7Controller');
- controller.loadAllPriorSteps();
- controller.loadAdvancedConfigs(wizardStep7Controller);
- wizardStep7Controller.getConfigTags();
- wizardStep7Controller.set('wizardController', controller);
- controller.connectOutlet('wizardStep7', controller.get('content'));
- });
+ var wizardStep7Controller = router.get('wizardStep7Controller');
+ controller.loadAllPriorSteps();
+ controller.loadAdvancedConfigs(wizardStep7Controller);
+ wizardStep7Controller.getConfigTags();
+ wizardStep7Controller.set('wizardController', controller);
+ controller.usersLoading().done(function () {
+ controller.connectOutlet('wizardStep7', controller.get('content'));
+ });
})
},
back: function(router){
http://git-wip-us.apache.org/repos/asf/ambari/blob/b1c4853a/ambari-web/app/views/main/dashboard/config_history_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/config_history_view.js b/ambari-web/app/views/main/dashboard/config_history_view.js
index a866ae9..1f1d0b3 100644
--- a/ambari-web/app/views/main/dashboard/config_history_view.js
+++ b/ambari-web/app/views/main/dashboard/config_history_view.js
@@ -149,15 +149,9 @@ App.MainConfigHistoryView = App.TableView.extend({
modifiedFilterView: filters.createSelectView({
column: 3,
- triggeredOnSameValue: [
- {
- values: ['Custom', 'Custom2'],
- displayAs: 'Custom'
- }
- ],
appliedEmptyValue: ["", ""],
fieldType: 'filter-input-width,modified-filter',
- content: ['Any', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days', 'Custom', 'Custom2'],
+ content: ['Any', 'Past 1 hour', 'Past 1 Day', 'Past 2 Days', 'Past 7 Days', 'Past 14 Days', 'Past 30 Days'],
valueBinding: "controller.modifiedFilter.optionValue",
startTimeBinding: "controller.modifiedFilter.actualValues.startTime",
endTimeBinding: "controller.modifiedFilter.actualValues.endTime",
[3/3] ambari git commit: AMBARI-8207. Configs: JavaScript error on
save configs for any client-only service (alexantonenko)
Posted by al...@apache.org.
AMBARI-8207. Configs: JavaScript error on save configs for any client-only service (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4aae5e4c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4aae5e4c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4aae5e4c
Branch: refs/heads/trunk
Commit: 4aae5e4c8e4b1f632065b6fbadafc47ef2d30638
Parents: b1c4853
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Nov 7 17:59:21 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Nov 7 19:29:44 2014 +0200
----------------------------------------------------------------------
.../app/views/common/quick_view_link_view.js | 8 +-
.../test/views/common/quick_link_view_test.js | 395 +++++++++++++++++++
2 files changed, 400 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4aae5e4c/ambari-web/app/views/common/quick_view_link_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/quick_view_link_view.js b/ambari-web/app/views/common/quick_view_link_view.js
index 1bb5cb0..4123c8f 100644
--- a/ambari-web/app/views/common/quick_view_link_view.js
+++ b/ambari-web/app/views/common/quick_view_link_view.js
@@ -190,8 +190,8 @@ App.QuickViewLinks = Em.View.extend({
* @method setHost
*/
setHost: function(response, serviceName) {
- if (App.singleNodeInstall) {
- return [App.singleNodeAlias];
+ if (App.get('singleNodeInstall')) {
+ return [App.get('singleNodeAlias')];
}
var hosts = [];
switch (serviceName) {
@@ -281,7 +281,9 @@ App.QuickViewLinks = Em.View.extend({
hosts[0] = this.findComponentHost(response.items, "STORM_UI_SERVER");
break;
default:
- hosts[0] = this.findComponentHost(response.items, this.get('content.hostComponents') && this.get('content.hostComponents').findProperty('isMaster', true).get('componentName'));
+ if (App.StackService.find().findProperty('serviceName', serviceName).get('hasMaster')) {
+ hosts[0] = this.findComponentHost(response.items, this.get('content.hostComponents') && this.get('content.hostComponents').findProperty('isMaster', true).get('componentName'));
+ }
break;
}
return hosts;
http://git-wip-us.apache.org/repos/asf/ambari/blob/4aae5e4c/ambari-web/test/views/common/quick_link_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/quick_link_view_test.js b/ambari-web/test/views/common/quick_link_view_test.js
index f6b621a..fedbd9f 100644
--- a/ambari-web/test/views/common/quick_link_view_test.js
+++ b/ambari-web/test/views/common/quick_link_view_test.js
@@ -115,4 +115,399 @@ describe('App.QuickViewLinks', function () {
})
},this);
});
+
+ describe('#setHost', function () {
+
+ var quickViewLinks = App.QuickViewLinks.create({
+ content: Em.Object.create()
+ }),
+ cases = [
+ {
+ singleNodeInstall: true,
+ hosts: ['host0'],
+ title: 'single node install'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'JOBTRACKER'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host1'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'HISTORYSERVER'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host2'
+ }
+ }
+ ]
+ },
+ serviceName: 'MAPREDUCE',
+ hosts: ['host1', 'host2']
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'STORM_UI_SERVER'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host3'
+ }
+ }
+ ]
+ },
+ serviceName: 'STORM',
+ hosts: ['host3']
+ },
+ {
+ serviceName: 'PIG',
+ hosts: [],
+ title: 'client only service'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'ZOOKEEPER_SERVER'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host4'
+ }
+ }
+ ]
+ },
+ serviceName: 'ZOOKEEPER',
+ hosts: ['host4'],
+ setup: function () {
+ quickViewLinks.set('content', {
+ hostComponents: [
+ Em.Object.create({
+ componentName: 'ZOOKEEPER_SERVER',
+ isMaster: true
+ })
+ ]
+ });
+ },
+ title: 'service with master component, except HDFS, HBase, MapReduce, YARN and Storm'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'NAMENODE'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host5'
+ }
+ }
+ ]
+ },
+ serviceName: 'HDFS',
+ hosts: ['host5'],
+ setup: function () {
+ quickViewLinks.set('content', {
+ snameNode: true
+ });
+ },
+ title: 'HDFS, HA disabled'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'NAMENODE'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host6',
+ public_host_name: 'host6'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'NAMENODE'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host7',
+ public_host_name: 'host7'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'NAMENODE'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host8',
+ public_host_name: 'host8'
+ }
+ }
+ ]
+ },
+ serviceName: 'HDFS',
+ multipleMasters: true,
+ hosts: ['host6', 'host7', 'host8'],
+ setup: function () {
+ quickViewLinks.set('content', {
+ hostComponents: [
+ Em.Object.create({
+ componentName: 'NAMENODE',
+ hostName: 'host6'
+ }),
+ Em.Object.create({
+ componentName: 'NAMENODE',
+ hostName: 'host7'
+ }),
+ Em.Object.create({
+ componentName: 'NAMENODE',
+ hostName: 'host8'
+ })
+ ],
+ activeNameNode: {
+ hostName: 'host6'
+ },
+ standbyNameNode: {
+ hostName: 'host7'
+ },
+ standbyNameNode2: {
+ hostName: 'host8'
+ }
+ });
+ },
+ title: 'HDFS, HA enabled'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'RESOURCEMANAGER'
+ }
+ }
+ ],
+ Hosts: {
+ public_host_name: 'host9'
+ }
+ }
+ ]
+ },
+ serviceName: 'YARN',
+ hosts: ['host9'],
+ title: 'YARN, HA disabled'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'RESOURCEMANAGER'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host10',
+ public_host_name: 'host10'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'RESOURCEMANAGER'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host11',
+ public_host_name: 'host11'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'RESOURCEMANAGER'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host12',
+ public_host_name: 'host12'
+ }
+ }
+ ]
+ },
+ serviceName: 'YARN',
+ multipleMasters: true,
+ hosts: ['host10', 'host11', 'host12'],
+ setup: function () {
+ quickViewLinks.set('content', {
+ hostComponents: [
+ Em.Object.create({
+ componentName: 'RESOURCEMANAGER',
+ hostName: 'host10'
+ }),
+ Em.Object.create({
+ componentName: 'RESOURCEMANAGER',
+ hostName: 'host11'
+ }),
+ Em.Object.create({
+ componentName: 'RESOURCEMANAGER',
+ hostName: 'host12'
+ })
+ ]
+ });
+ },
+ title: 'YARN, HA enabled'
+ },
+ {
+ response: {
+ items: [
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'HBASE_MASTER'
+ },
+ metrics: {
+ hbase: {
+ master: {
+ IsActiveMaster: true
+ }
+ }
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host13',
+ public_host_name: 'host13'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'HBASE_MASTER'
+ },
+ metrics: {
+ hbase: {
+ master: {
+ IsActiveMaster: false
+ }
+ }
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host14',
+ public_host_name: 'host14'
+ }
+ },
+ {
+ host_components: [
+ {
+ HostRoles: {
+ component_name: 'HBASE_MASTER'
+ }
+ }
+ ],
+ Hosts: {
+ host_name: 'host15',
+ public_host_name: 'host15'
+ }
+ }
+ ]
+ },
+ serviceName: 'HBASE',
+ multipleMasters: true,
+ hosts: ['host13', 'host14', 'host15']
+ }
+ ];
+
+ before(function () {
+ sinon.stub(App.StackService, 'find', function () {
+ return [
+ Em.Object.create({
+ serviceName: 'ZOOKEEPER',
+ hasMaster: true
+ }),
+ Em.Object.create({
+ serviceName: 'PIG',
+ hasMaster: false
+ })
+ ];
+ })
+ });
+
+ after(function () {
+ App.StackService.find.restore();
+ });
+
+ afterEach(function () {
+ App.get.restore();
+ });
+
+ cases.forEach(function (item) {
+ it(item.title || item.serviceName, function () {
+ if (item.setup) {
+ item.setup();
+ }
+ sinon.stub(App, 'get').withArgs('singleNodeInstall').returns(item.singleNodeInstall).
+ withArgs('singleNodeAlias').returns('host0').
+ withArgs('isRMHaEnabled').returns(item.multipleMasters);
+ if (item.multipleMasters) {
+ expect(quickViewLinks.setHost(item.response, item.serviceName).mapProperty('publicHostName')).to.eql(item.hosts);
+ } else {
+ expect(quickViewLinks.setHost(item.response, item.serviceName)).to.eql(item.hosts);
+ }
+ });
+ });
+
+ });
+
});