ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-6068 Ambari web client should use stacks API instead of stacks2 API. (Buzhor Denys via atkach)
Date Tue, 10 Jun 2014 16:01:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b4dd29baf -> ba99194f5


AMBARI-6068 Ambari web client should use stacks API instead of stacks2 API. (Buzhor Denys
via atkach)


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

Branch: refs/heads/trunk
Commit: ba99194f5513355f1ef9b5787522277b2698d5e0
Parents: b4dd29b
Author: atkach <atkach@hortonworks.com>
Authored: Tue Jun 10 18:58:11 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Tue Jun 10 18:58:11 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/app.js                             |  6 +++---
 .../app/controllers/global/cluster_controller.js  |  2 +-
 ambari-web/app/controllers/main/service.js        |  2 +-
 ambari-web/app/controllers/wizard.js              |  2 +-
 .../app/controllers/wizard/step8_controller.js    |  2 +-
 ambari-web/app/utils/ajax/ajax.js                 | 18 +++++++++---------
 ambari-web/app/utils/config.js                    |  2 +-
 .../test/views/wizard/controls_view_test.js       |  6 ++----
 8 files changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index 3d88541..81ee5d5 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -37,9 +37,9 @@ module.exports = Em.Application.create({
   stackVersionURL: function () {
     var stackVersion = this.get('currentStackVersion') || this.get('defaultStackVersion');
     if (stackVersion.indexOf('HDPLocal') !== -1) {
-      return '/stacks/HDPLocal/version/' + stackVersion.replace(/HDPLocal-/g, '');
+      return '/stacks/HDPLocal/versions/' + stackVersion.replace(/HDPLocal-/g, '');
     }
-    return '/stacks/HDP/version/' + stackVersion.replace(/HDP-/g, '');
+    return '/stacks/HDP/versions/' + stackVersion.replace(/HDP-/g, '');
   }.property('currentStackVersion'),
 
   /**
@@ -286,4 +286,4 @@ module.exports = Em.Application.create({
       return App.StackServiceComponent.find().filterProperty('isClient', true).mapProperty('componentName')
     }.property('App.router.clusterController.isLoaded')
   })
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index a9368b4..0ee2e9c 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -388,7 +388,7 @@ App.ClusterController = Em.Controller.extend({
     App.ajax.send({
       name: 'wizard.service_components',
       data: {
-        stackUrl: App.get('stack2VersionURL'),
+        stackUrl: App.get('stackVersionURL'),
         stackVersion: App.get('currentStackVersionNumber'),
         async: true
       },

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/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 05884ac..414ad40 100644
--- a/ambari-web/app/controllers/main/service.js
+++ b/ambari-web/app/controllers/main/service.js
@@ -52,7 +52,7 @@ App.MainServiceController = Em.ArrayController.extend({
       name: 'wizard.service_components',
       sender: this,
       data: {
-        stackUrl: App.get('stack2VersionURL'),
+        stackUrl: App.get('stackVersionURL'),
         stackVersion: App.get('currentStackVersionNumber')
       },
       success: 'loadAvailableServicesSuccessCallback'

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 34e9587..f5e9748 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -505,7 +505,7 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, {
       name: 'wizard.service_components',
       sender: this,
       data: {
-        stackUrl: App.get('stack2VersionURL'),
+        stackUrl: App.get('stackVersionURL'),
         stackVersion: App.get('currentStackVersionNumber'),
         async: false
       },

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/controllers/wizard/step8_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js
index 46367d4..e1d74fa 100644
--- a/ambari-web/app/controllers/wizard/step8_controller.js
+++ b/ambari-web/app/controllers/wizard/step8_controller.js
@@ -983,7 +983,7 @@ App.WizardStep8Controller = Em.Controller.extend({
           data: {
             osType: os.osType,
             repoId: os.repoId,
-            stack2VersionURL: App.get('stack2VersionURL'),
+            stackVersionURL: App.get('stackVersionURL'),
             data: JSON.stringify({
               "Repositories": {
                 "base_url": os.baseUrl,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index eedc4f6..d98fde8 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -323,7 +323,7 @@ var urls = {
   },
 
   'config.advanced': {
-    'real': '{stack2VersionUrl}/stackServices/{serviceName}/configurations?fields=*',
+    'real': '{stackVersionUrl}/services/{serviceName}/configurations?fields=*',
     'mock': '/data/wizard/stack/hdp/version{stackVersion}/{serviceName}.json',
     'format': function (data) {
       return {
@@ -332,7 +332,7 @@ var urls = {
     }
   },
   'config.advanced.global': {
-    'real': '{stack2VersionUrl}/stackServices?fields=configurations/StackConfigurations/type',
+    'real': '{stackVersionUrl}/services?fields=configurations/StackConfigurations/type',
     'mock': '/data/wizard/stack/hdp/version1.3.0/global.json',
     'format': function() {
       return {
@@ -984,7 +984,7 @@ var urls = {
     }
   },
   'cluster.update_upgrade_version': {
-    'real': '/stacks2/HDP/versions?fields=stackServices/StackServices,Versions',
+    'real': '/stacks/HDP/versions?fields=stackServices/StackServices,Versions',
     'mock': '/data/wizard/stack/stacks.json',
     'format': function() {
       return {
@@ -993,7 +993,7 @@ var urls = {
     }
   },
   'cluster.load_repositories': {
-    'real': '/stacks2/{stackName}/versions/{stackVersion}/operatingSystems?fields=repositories/*',
+    'real': '/stacks/{stackName}/versions/{stackVersion}/operating_systems?fields=repositories/*',
     'mock': '',
     'type': 'GET',
     'format': function (data) {
@@ -1332,7 +1332,7 @@ var urls = {
     'mock': '/data/wizard/{mock}'
   },
   'wizard.advanced_repositories.valid_url': {
-    'real': '/stacks2/{stackName}/versions/{stackVersion}/operatingSystems/{osType}/repositories/{repoId}',
+    'real': '/stacks/{stackName}/versions/{stackVersion}/operating_systems/{osType}/repositories/{repoId}',
     'mock': '',
     'type': 'PUT',
     'format': function (data) {
@@ -1396,7 +1396,7 @@ var urls = {
     }
   },
   'wizard.service_components': {
-    'real': '{stackUrl}/stackServices?fields=StackServices/comments,StackServices/service_version,serviceComponents/*',
+    'real': '{stackUrl}/services?fields=StackServices/comments,StackServices/service_version,serviceComponents/*',
     'mock': '/data/stacks/HDP-2.1/service_components.json',
     'format': function(data) {
       return {
@@ -1580,7 +1580,7 @@ var urls = {
   },
 
   'wizard.step8.set_local_repos': {
-    'real':'{stack2VersionURL}/operatingSystems/{osType}/repositories/{repoId}',
+    'real':'{stackVersionURL}/operating_systems/{osType}/repositories/{repoId}',
     'mock':'',
     'format': function(data) {
       return {
@@ -1666,7 +1666,7 @@ var urls = {
     'mock': '/data/wizard/bootstrap/single_host_registration.json'
   },
   'wizard.stacks': {
-    'real': '/stacks2',
+    'real': '/stacks',
     'mock': '/data/wizard/stack/stacks2.json',
     'format': function() {
       return {
@@ -1675,7 +1675,7 @@ var urls = {
     }
   },
   'wizard.stacks_versions': {
-    'real': '/stacks2/{stackName}/versions?fields=Versions,operatingSystems/repositories/Repositories',
+    'real': '/stacks/{stackName}/versions?fields=Versions,operatingSystems/repositories/Repositories',
     'mock': '/data/wizard/stack/{stackName}_versions.json',
     'format': function() {
       return {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index 3e885e9..d57bcb2 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -791,7 +791,7 @@ App.config = Em.Object.create({
       sender: this,
       data: {
         serviceName: serviceName,
-        stack2VersionUrl: App.get('stack2VersionURL'),
+        stackVersionUrl: App.get('stackVersionURL'),
         stackVersion: App.get('currentStackVersionNumber'),
         callback: callback,
         sync: sync

http://git-wip-us.apache.org/repos/asf/ambari/blob/ba99194f/ambari-web/test/views/wizard/controls_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/controls_view_test.js b/ambari-web/test/views/wizard/controls_view_test.js
index bfec1e2..58a342f 100644
--- a/ambari-web/test/views/wizard/controls_view_test.js
+++ b/ambari-web/test/views/wizard/controls_view_test.js
@@ -125,8 +125,7 @@ describe('views/wizard/control_views', function() {
         var tests = [
           generateTypeValueProp('user_name', 'hive_user'),
           generateTypeValueProp('user_passwd', 'hive_pass'),
-          generateTypeValueProp('db_connection_url', 'hive_c_url'),
-          generateTypeValueProp('db_name', 'hive_scheme')
+          generateTypeValueProp('db_connection_url', 'hive_c_url')
         ];
         var testMessage = 'property `{0}` should have `{1}`';
         tests.forEach(function(test) {
@@ -141,8 +140,7 @@ describe('views/wizard/control_views', function() {
         var tests = [
           generateTypeValueProp('javax.jdo.option.ConnectionUserName', 'hive_user'),
           generateTypeValueProp('javax.jdo.option.ConnectionPassword', 'hive_pass'),
-          generateTypeValueProp('javax.jdo.option.ConnectionURL', 'hive_c_url'),
-          generateTypeValueProp('ambari.hive.db.schema.name', 'hive_scheme')
+          generateTypeValueProp('javax.jdo.option.ConnectionURL', 'hive_c_url')
         ];
         var testMessage = 'property `{1}` should have `{0}`';
         tests.forEach(function(test) {


Mime
View raw message