You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2013/05/23 00:36:17 UTC

svn commit: r1485471 - in /incubator/ambari/trunk: ./ ambari-web/app/ ambari-web/app/controllers/ ambari-web/app/controllers/main/admin/ ambari-web/app/routes/ ambari-web/app/views/main/ ambari-web/app/views/main/admin/

Author: srimanth
Date: Wed May 22 22:36:17 2013
New Revision: 1485471

URL: http://svn.apache.org/r1485471
Log:
AMBARI-2187. Hadoop2 Monitoring: Jobs page should be hidden when HDP 2.0.x stack is installed. (srimanth)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/app.js
    incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
    incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
    incubator/ambari/trunk/ambari-web/app/routes/main.js
    incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js
    incubator/ambari/trunk/ambari-web/app/views/main/menu.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed May 22 22:36:17 2013
@@ -306,6 +306,9 @@ Trunk (unreleased changes):
 
  IMPROVEMENTS
 
+ AMBARI-2187. Hadoop2 Monitoring: Jobs page should be hidden when HDP 2.0.x 
+ stack is installed. (srimanth)
+
  AMBARI-2188. Update mock json data for Test mode. (srimanth) 
 
  AMBARI-2169. Going from Hosts page to Host Details page and back should

Modified: incubator/ambari/trunk/ambari-web/app/app.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/app.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/app.js (original)
+++ incubator/ambari/trunk/ambari-web/app/app.js Wed May 22 22:36:17 2013
@@ -51,7 +51,10 @@ module.exports = Em.Application.create({
     return '/stacks2/HDP/versions/' + stackVersion.replace(/HDP-/g, '');
   }.property('currentStackVersion'),
   clusterName: null,
-  currentStackVersion: null
+  currentStackVersion: null,
+  currentStackVersionNumber: function(){
+    return this.get('currentStackVersion').replace(/HDP(Local)?-/, '');
+  }.property('currentStackVersion')
 });
 
 /**

Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/admin/cluster.js Wed May 22 22:36:17 2013
@@ -40,7 +40,7 @@ App.MainAdminClusterController = Em.Cont
     var upgradeVersion = this.get('upgradeVersion') || App.defaultStackVersion;
     var currentStack = {};
     var upgradeStack = {};
-    var currentVersion = App.currentStackVersion.replace(/HDP-/, '');
+    var currentVersion = App.get('currentStackVersionNumber');
     var minUpgradeVersion = currentVersion;
     upgradeVersion = upgradeVersion.replace(/HDP-/, '');
     data.items.mapProperty('Versions.stack_version').forEach(function(version){

Modified: incubator/ambari/trunk/ambari-web/app/controllers/wizard.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/wizard.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/wizard.js Wed May 22 22:36:17 2013
@@ -458,7 +458,7 @@ App.WizardController = Em.Controller.ext
       sender: this,
       data: {
         stackUrl: App.get('stack2VersionURL'),
-        stackVersion: App.currentStackVersion.replace(/HDP(Local)?-/, '')
+        stackVersion: App.get('currentStackVersionNumber')
       },
       success: 'loadServiceComponentsSuccessCallback',
       error: 'loadServiceComponentsErrorCallback'

Modified: incubator/ambari/trunk/ambari-web/app/routes/main.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/main.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/main.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/main.js Wed May 22 22:36:17 2013
@@ -97,9 +97,14 @@ module.exports = Em.Route.extend({
   apps: Em.Route.extend({
     route: '/apps',
     connectOutlets: function (router) {
-      //router.get('clusterController').loadRuns();
-      router.get('mainAppsController').loadRuns();
-      router.get('mainController').connectOutlet('mainApps');
+      if (App.get('currentStackVersionNumber') >= '2.0.0') {
+        Em.run.next(function () {
+          router.transitionTo('main.dashboard');
+        });
+      } else {
+        router.get('mainAppsController').loadRuns();
+        router.get('mainController').connectOutlet('mainApps');
+      }
     }
   }),
 

Modified: incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/admin/cluster.js Wed May 22 22:36:17 2013
@@ -22,6 +22,6 @@ App.MainAdminClusterView = Em.View.exten
   templateName: require('templates/main/admin/cluster'),
 
   isUpgradeAvailable: function(){
-    return this.get('controller.upgradeVersion').replace(/HDP-/, '') > App.currentStackVersion.replace(/HDP-/, '');
+    return this.get('controller.upgradeVersion').replace(/HDP-/, '') > App.get('currentStackVersionNumber');
   }.property('controller.upgradeVersion', 'App.currentStackVersion')
 });
\ No newline at end of file

Modified: incubator/ambari/trunk/ambari-web/app/views/main/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/menu.js?rev=1485471&r1=1485470&r2=1485471&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/menu.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/menu.js Wed May 22 22:36:17 2013
@@ -30,14 +30,17 @@ App.MainMenuView = Em.CollectionView.ext
       { label:Em.I18n.t('menu.item.dashboard'), routing:'dashboard', active:'active'},
       { label:Em.I18n.t('menu.item.heatmaps'), routing:'charts'},
       { label:Em.I18n.t('menu.item.services'), routing:'services'},
-      { label:Em.I18n.t('menu.item.hosts'), routing:'hosts'},
-      { label:Em.I18n.t('menu.item.jobs'), routing:'apps'}
+      { label:Em.I18n.t('menu.item.hosts'), routing:'hosts'}
     ];
 
     if (App.supports.mirroring) {
       result.push({ label:Em.I18n.t('menu.item.mirroring'), routing:'mirroring'});
     }
 
+    if (App.get('currentStackVersionNumber') < '2.0.0') {
+      result.push({ label:Em.I18n.t('menu.item.jobs'), routing:'apps'});
+    }
+
     if (App.get('isAdmin')) {
       result.push({ label:Em.I18n.t('menu.item.admin'), routing:'admin'});
     }