You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/11/27 00:57:41 UTC
ambari git commit: AMBARI-8121. Admin->Service Accounts page should
automatically display user and groups properties for newly added service.
(jaimin)
Repository: ambari
Updated Branches:
refs/heads/trunk 058dc168e -> a80dc9ac9
AMBARI-8121. Admin->Service Accounts page should automatically display user and groups properties for newly added service. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a80dc9ac
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a80dc9ac
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a80dc9ac
Branch: refs/heads/trunk
Commit: a80dc9ac93dee273f8f995f4e6bdd2f22d05dcc5
Parents: 058dc16
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Nov 26 15:57:08 2014 -0800
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Nov 26 15:57:16 2014 -0800
----------------------------------------------------------------------
.../app/controllers/wizard/step7_controller.js | 2 --
ambari-web/app/data/service_configs.js | 19 +---------
ambari-web/app/utils/config.js | 10 ++++++
ambari-web/test/utils/config_test.js | 38 ++++++++++++++++++++
4 files changed, 49 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a80dc9ac/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 0e5b7dc..aecaa9c 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -124,8 +124,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, {
*/
serviceConfigTags: [],
- serviceConfigsData: require('data/service_configs'),
-
/**
* Are advanced configs loaded
* @type {bool}
http://git-wip-us.apache.org/repos/asf/ambari/blob/a80dc9ac/ambari-web/app/data/service_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_configs.js b/ambari-web/app/data/service_configs.js
index 1f0cbb5..32d68dd 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -32,24 +32,7 @@ module.exports = [
App.ServiceConfigCategory.create({ name: 'Users and Groups', displayName : 'Users and Groups'})
],
configTypes: {
- "cluster-env": {supports: {final: false}},
- "hadoop-env": {supports: {final: false}},
- "mapred-env": {supports: {final: false}},
- "yarn-env": {supports: {final: false}},
- "hbase-env": {supports: {final: false}},
- "ganglia-env": {supports: {final: false}},
- "nagios-env": {supports: {final: false}},
- "oozie-env": {supports: {final: false}},
- "zookeeper-env": {supports: {final: false}},
- "hive-env": {supports: {final: false}},
- "tez-env": {supports: {final: false}},
- "storm-env": {supports: {final: false}},
- "falcon-env": {supports: {final: false}},
- "webhcat-env": {supports: {final: false}},
- "pig-env": {supports: {final: false}},
- "sqoop-env": {supports: {final: false}},
- "knox-env" : {supports: {final: false}},
- "kafka-env": {supports: {final: false}}
+ "cluster-env": {supports: {final: false}}
},
configs: []
})
http://git-wip-us.apache.org/repos/asf/ambari/blob/a80dc9ac/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 7ac70cf..0ca14d8 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -85,6 +85,16 @@ App.config = Em.Object.create({
var allTabs;
if (isMiscTabToBeAdded) {
var nonServiceTab = require('data/service_configs');
+ var miscService = nonServiceTab.findProperty('serviceName', 'MISC');
+ var tagTypes = {};
+ servicesWithConfigTypes.mapProperty('configTypes').forEach(function(configTypes) {
+ for (var fileName in configTypes) {
+ if (fileName.endsWith('-env') && !miscService.get('configTypes')[fileName]) {
+ tagTypes[fileName] = configTypes[fileName];
+ }
+ }
+ });
+ miscService.set('configTypes', $.extend(miscService.get('configTypes'), tagTypes));
allTabs = servicesWithConfigTypes.concat(nonServiceTab);
} else {
allTabs = servicesWithConfigTypes;
http://git-wip-us.apache.org/repos/asf/ambari/blob/a80dc9ac/ambari-web/test/utils/config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/config_test.js b/ambari-web/test/utils/config_test.js
index 7020f93..bb652c1 100644
--- a/ambari-web/test/utils/config_test.js
+++ b/ambari-web/test/utils/config_test.js
@@ -587,6 +587,44 @@ describe('App.config', function () {
});
+ describe('#setPreDefinedServiceConfigs', function() {
+ beforeEach(function() {
+ sinon.stub(App.StackService, 'find', function() {
+ return [
+ Em.Object.create({
+ id: 'HDFS',
+ serviceName: 'HDFS',
+ configTypes: {
+ 'hadoop-env': {},
+ 'hdfs-site': {}
+ }
+ }),
+ Em.Object.create({
+ id: 'OOZIE',
+ serviceName: 'OOZIE',
+ configTypes: {
+ 'oozie-env': {},
+ 'oozie-site': {}
+ }
+ })
+ ];
+ });
+ App.config.setPreDefinedServiceConfigs(true);
+ });
+ afterEach(function() {
+ App.StackService.find.restore();
+ });
+
+ it('should include service MISC', function() {
+ expect(App.config.get('preDefinedServiceConfigs').findProperty('serviceName', 'MISC')).to.be.ok;
+ });
+
+ it('should include -env config types according to stack services', function() {
+ var miscCategory = App.config.get('preDefinedServiceConfigs').findProperty('serviceName', 'MISC');
+ expect(Em.keys(miscCategory.get('configTypes'))).to.eql(['cluster-env', 'hadoop-env', 'oozie-env']);
+ });
+ });
+
describe('#isManagedMySQLForHiveAllowed', function () {
var cases = [