Updated Branches: refs/heads/branch-1.4.1 9fe6817fb -> 90d28b9d9
AMBARI-3466. Revert 1.4.1 changes to job history. (yusaku) Fixing routes that got reverted accidentally. Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/90d28b9d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/90d28b9d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/90d28b9d Branch: refs/heads/branch-1.4.1 Commit: 90d28b9d9ceb3c87b29e10d84514f3acac51fbbc Parents: 9fe6817 Author: Yusaku Sako <[email protected]> Authored: Sun Oct 6 11:54:37 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Sun Oct 6 11:58:50 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/routes/main.js | 78 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/90d28b9d/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index c911b30..6e5802b 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -474,6 +474,8 @@ module.exports = Em.Route.extend({ index: Ember.Route.extend({ route: '/', connectOutlets: function (router, context) { + router.set('mainHostController.clearFilters', !router.get('mainHostController.comeWithFilter')); + router.set('mainHostController.comeWithFilter', false); router.get('mainController').connectOutlet('mainHost'); } }), @@ -526,6 +528,7 @@ module.exports = Em.Route.extend({ }), back: function (router, event) { + router.get('mainHostController').set('comeWithFilter', true); window.history.back(); }, @@ -647,6 +650,78 @@ module.exports = Em.Route.extend({ } }), + adminHighAvailability: Em.Route.extend({ + route: '/highAvailability', + enter: function (router) { + Em.run.next(function () { + router.transitionTo('adminHighAvailability.index'); + }); + }, + index: Ember.Route.extend({ + route: '/', + connectOutlets: function (router, context) { + router.set('mainAdminController.category', "highAvailability"); + router.get('mainAdminController').connectOutlet('mainAdminHighAvailability'); + } + }) + }), + + highAvailabilityRollback: Ember.Route.extend({ + route: '/highAvailability/rollback', + enter: function (router) { + //after refresh check if the wizard is open then restore it + Ember.run.next(function () { + App.router.get('updateController').set('isWorking', false); + + var highAvailabilityWizardController = router.get('highAvailabilityWizardController'); + if(highAvailabilityWizardController.get('popup')){ + highAvailabilityWizardController.finish(); + highAvailabilityWizardController.get('popup').hide(); + } + highAvailabilityWizardController.loadTasksStatuses(); + highAvailabilityWizardController.loadRequestIds(); + highAvailabilityWizardController.loadLogs(); + var popup = App.ModalPopup.show({ + classNames: ['full-width-modal'], + header: Em.I18n.t('admin.highAvailability.rollback.header'), + bodyClass: App.HighAvailabilityRollbackView.extend({ + controllerBinding: 'App.router.highAvailabilityRollbackController' + }), + showCloseButton: false, + primary: Em.I18n.t('form.cancel'), + secondary: null, + showFooter: false, + + proceedOnClose: function () { + var controller = router.get('highAvailabilityWizardController'); + controller.clearTasksData(); + controller.clearStorageData(); + App.router.get('updateController').set('isWorking', true); + App.clusterStatus.setClusterStatus({ + clusterName: router.get('content.cluster.name'), + clusterState: 'HIGH_AVAILABILITY_DISABLED', + wizardControllerName: router.get('highAvailabilityRollbackController.name'), + localdb: App.db.data + }); + this.hide(); + router.transitionTo('main.admin.index'); + location.reload(); + }, + didInsertElement: function () { + this.fitHeight(); + } + }); + router.set('highAvailabilityRollbackController.popup', popup); + }); + + }, + + unroutePath: function () { + return false; + } + }), + + enableHighAvailability: require('routes/high_availability_routes'), adminSecurity: Em.Route.extend({ route: '/security', @@ -662,7 +737,9 @@ module.exports = Em.Route.extend({ controller.setAddSecurityWizardStatus(currentClusterStatus.localdb.status); App.db.setSecureConfigProperties(currentClusterStatus.localdb.secureConfigProperties); App.db.setWizardCurrentStep('AddSecurity', currentClusterStatus.localdb.currentStep); + App.db.setIsNameNodeHa(currentClusterStatus.localdb.haStatus); App.db.setDisableSecurityStatus(currentClusterStatus.localdb.disableSecurityStatus); + App.db.setSecureUserInfo(currentClusterStatus.localdb.secureUserInfo); } } if (!(controller.getAddSecurityWizardStatus() === 'RUNNING') && !(controller.getDisableSecurityStatus() === 'RUNNING')) { @@ -914,6 +991,7 @@ module.exports = Em.Route.extend({ router.transitionTo('hosts.hostDetails.index', event.context); }, filterHosts: function (router, component) { + router.get('mainHostController').set('comeWithFilter', true); router.get('mainHostController').filterByComponent(component.context); router.transitionTo('hosts.index'); }
