This is an automated email from the ASF dual-hosted git repository. ishanbha pushed a commit to branch branch-feature-AMBARI-14714-ui in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714-ui by this push: new c5c58d6 [AMBARI-23087] Upgrade Plan Wizard framework. (#549) c5c58d6 is described below commit c5c58d6a0b4ab5db1c6ef749871f99b9b17fae57 Author: Ishan Bhatt <ishanbhatt.1...@gmail.com> AuthorDate: Tue Mar 6 14:20:00 2018 -0800 [AMBARI-23087] Upgrade Plan Wizard framework. (#549) * [AMBARI-23087] Upgrade Plan Wizard framework. * remove commented out code. --- ambari-web/app/assets/test/tests.js | 7 + ambari-web/app/controllers.js | 7 + .../mpackUpgrade/downloadMpacks_controller.js | 32 +++ .../mpackUpgrade/downloadOptions_controller.js | 32 +++ .../admin/mpackUpgrade/reviewConfigs_controller.js | 32 +++ .../selectUpgradeOptions_controller.js | 32 +++ .../mpackUpgrade/selectUpgradeType_controller.js | 32 +++ .../mpackUpgrade/upgradeSummary_controller.js | 32 +++ .../main/admin/mpack_upgrade_controller.js | 176 ++++++++++++++++ ambari-web/app/messages.js | 9 + ambari-web/app/mixins/wizard/wizard_menu_view.js | 12 +- ambari-web/app/router.js | 11 + ambari-web/app/routes/main.js | 4 +- ambari-web/app/routes/mpack_upgrade_routes.js | 225 +++++++++++++++++++++ .../main/admin/mpackUpgrade/downloadMpacks.hbs | 41 ++++ .../main/admin/mpackUpgrade/downloadOptions.hbs | 35 ++++ .../main/admin/mpackUpgrade/reviewConfigs.hbs | 41 ++++ .../admin/mpackUpgrade/selectUpgradeOptions.hbs | 41 ++++ .../main/admin/mpackUpgrade/selectUpgradeType.hbs | 41 ++++ .../main/admin/mpackUpgrade/upgradeSummary.hbs | 35 ++++ .../app/templates/main/admin/mpack_upgrade.hbs | 34 ++++ ambari-web/app/utils/db.js | 1 + ambari-web/app/views.js | 8 + .../main/admin/mpackUpgrade/downloadMpacks_view.js | 26 +++ .../admin/mpackUpgrade/downloadOptions_view.js | 26 +++ .../main/admin/mpackUpgrade/reviewConfigs_view.js | 26 +++ .../mpackUpgrade/selectUpgradeOptions_view.js | 26 +++ .../admin/mpackUpgrade/selectUpgradeType_view.js | 26 +++ .../main/admin/mpackUpgrade/upgradeSummary_view.js | 26 +++ .../app/views/main/admin/mpack_upgrade_view.js | 26 +++ .../app/views/main/admin/serviceGroups_view.js | 2 +- .../mpackUpgrade/downloadMpacks_controller_test.js | 20 ++ .../downloadOptions_controller_test.js | 20 ++ .../mpackUpgrade/reviewConfigs_controller_test.js | 20 ++ .../selectUpgradeOptions_controller_test.js | 20 ++ .../selectUpgradeType_controller_test.js | 20 ++ .../mpackUpgrade/upgradeSummary_controller_test.js | 20 ++ .../main/admin/mpack_upgrade_controller_test.js | 20 ++ 38 files changed, 1241 insertions(+), 3 deletions(-) diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js index def9cf2..06f78d8 100644 --- a/ambari-web/app/assets/test/tests.js +++ b/ambari-web/app/assets/test/tests.js @@ -97,6 +97,13 @@ var files = [ 'test/controllers/main/admin/highAvailability/journalNode/step8_controller_test', 'test/controllers/main/admin/highAvailability/journalNode/wizard_controller_test', 'test/controllers/main/admin/highAvailability/rangerAdmin/step3_controller_test', + 'test/controllers/main/admin/mpack_upgrade_controller_test', + 'test/controllers/main/admin/mpackUpgrade/downloadOptions_controller_test', + 'test/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller_test', + 'test/controllers/main/admin/mpackUpgrade/downloadMpacks_controller_test', + 'test/controllers/main/admin/mpackUpgrade/reviewConfigs_controller_test', + 'test/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller_test', + 'test/controllers/main/admin/mpackUpgrade/upgradeSummary_controller_test', 'test/controllers/main/dashboard/config_history_controller_test', 'test/controllers/main/charts/heatmap_test', 'test/controllers/main/charts/heatmap_metrics/heatmap_metric_test', diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js index cbe39ad..2598798 100644 --- a/ambari-web/app/controllers.js +++ b/ambari-web/app/controllers.js @@ -101,6 +101,13 @@ require('controllers/main/admin/kerberos/step5_controller'); require('controllers/main/admin/kerberos/step6_controller'); require('controllers/main/admin/kerberos/step7_controller'); require('controllers/main/admin/kerberos/step8_controller'); +require('controllers/main/admin/mpack_upgrade_controller'); +require('controllers/main/admin/mpackUpgrade/downloadOptions_controller'); +require('controllers/main/admin/mpackUpgrade/downloadMpacks_controller'); +require('controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller'); +require('controllers/main/admin/mpackUpgrade/reviewConfigs_controller'); +require('controllers/main/admin/mpackUpgrade/selectUpgradeType_controller'); +require('controllers/main/admin/mpackUpgrade/upgradeSummary_controller'); require('controllers/main/alert_definitions_controller'); require('controllers/main/alerts/alert_definitions_actions_controller'); require('controllers/main/alerts/add_alert_definition/add_alert_definition_controller'); diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadMpacks_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadMpacks_controller.js new file mode 100644 index 0000000..84094dd --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadMpacks_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardDownloadMpacksController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardDownloadMpacksController', + + stepName: 'downloadMpacks', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadOptions_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadOptions_controller.js new file mode 100644 index 0000000..1649e67 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/downloadOptions_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardDownloadOptionsController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardDownloadOptionsController', + + stepName: 'downloadOptions', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/reviewConfigs_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/reviewConfigs_controller.js new file mode 100644 index 0000000..30e0891 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/reviewConfigs_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardReviewConfigsController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardReviewConfigsController', + + stepName: 'reviewConfigs', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller.js new file mode 100644 index 0000000..90c09fd --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardSelectUpgradeOptionsController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardSelectUpgradeOptionsController', + + stepName: 'selectUpgradeOptions', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller.js new file mode 100644 index 0000000..01390d8 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardSelectUpgradeTypeController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardSelectUpgradeTypeController', + + stepName: 'selectUpgradeType', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpackUpgrade/upgradeSummary_controller.js b/ambari-web/app/controllers/main/admin/mpackUpgrade/upgradeSummary_controller.js new file mode 100644 index 0000000..c698737 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpackUpgrade/upgradeSummary_controller.js @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +App.CreateUpgradePlanWizardUpgradeSummaryController = App.WizardStepController.extend({ + + name: 'createUpgradePlanWizardUpgradeSummaryController', + + stepName: 'upgradeSummary', + + submit: function () { + if (App.get('router.nextBtnClickInProgress')) { + return; + } + App.router.send('next'); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/controllers/main/admin/mpack_upgrade_controller.js b/ambari-web/app/controllers/main/admin/mpack_upgrade_controller.js new file mode 100644 index 0000000..9c245a1 --- /dev/null +++ b/ambari-web/app/controllers/main/admin/mpack_upgrade_controller.js @@ -0,0 +1,176 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +var App = require('app'); + +App.CreateUpgradePlanWizardController = App.WizardController.extend({ + + name: 'createUpgradePlanWizardController', + + totalSteps: 6, + + currentStep: '0', + + steps: [ + "downloadOptions", + "selectUpgradeOptions", + "downloadMpacks", + "reviewConfigs", + "selectUpgradeType", + "upgradeSummary" + ], + + displayName: Em.I18n.t('admin.createUpgradePlan.wizard.header'), + + hideBackButton: false, + + //Add shared properties for the steps + content: Em.Object.create({ + controllerName: 'createUpgradePlanWizardController', + }), + + setCurrentStep: function (currentStep, completed) { + this._super(currentStep, completed); + App.clusterStatus.setClusterStatus({ + clusterName: this.get('content.cluster.name'), + clusterState: 'CREATE_UPGRADE_PLAN', + wizardControllerName: 'createUpgradePlanWizardController', + localdb: App.db.data + }); + }, + + //Define type and callback as per each step + loadMap: { + 'downloadOptions': [ + { + type: 'sync', + callback: function () { + + } + } + ], + 'selectUpgradeOptions': [ + { + type: 'sync', + callback: function () { + + } + } + ], + 'downloadMpacks': [ + { + type: 'sync', + callback: function () { + + } + } + ], + 'reviewConfigs': [ + { + type: 'sync', + callback: function () { + + } + } + ], + 'selectUpgradeType': [ + { + type: 'sync', + callback: function () { + + } + } + ], + 'upgradeSummary': [ + { + type: 'sync', + callback: function () { + + } + } + ] + }, + + + gotoDownloadOptions: function () { + this.gotoStep('downloadOptions'); + }, + + gotoSelectUpgradeOptions: function () { + this.gotoStep('selectUpgradeOptions'); + }, + + gotoDownloadMpacks: function () { + this.gotoStep('downloadMpacks'); + }, + + gotoReviewConfigs: function () { + this.gotoStep('reviewConfigs'); + }, + + gotoSelectUpgradeType: function () { + this.gotoStep('selectUpgradeType'); + }, + + gotoUpgradeSummary: function () { + this.gotoStep('upgradeSummary'); + }, + + isDownloadOptions: function () { + return this.get('currentStep') == this.getStepIndex('downloadOptions'); + }.property('currentStep'), + + isSelectUpgradeOptions: function () { + return this.get('currentStep') == this.getStepIndex('selectUpgradeOptions'); + }.property('currentStep'), + + isDownloadMpacks: function () { + return this.get('currentStep') == this.getStepIndex('downloadMpacks'); + }.property('currentStep'), + + isReviewConfigs: function () { + return this.get('currentStep') == this.getStepIndex('reviewConfigs'); + }.property('currentStep'), + + isSelectUpgradeType: function () { + return this.get('currentStep') == this.getStepIndex('selectUpgradeType'); + }.property('currentStep'), + + isSUpgradeSummary: function () { + return this.get('currentStep') == this.getStepIndex('upgradeSummary'); + }.property('currentStep'), + + + setStepsEnable: function () { + + for (var i = 0; i < this.get('steps').length; i++) { + var currentStep = this.get('currentStep'); + var step = this.get('isStepDisabled').findProperty('step', i); + var stepValue = i <= currentStep && App.get('router.clusterController.isLoaded') ? false : true; + step.set('value', stepValue); + } + }.observes('currentStep', 'App.router.clusterController.isLoaded'), + + finish: function () { + App.db.data.Installer = {}; + this.resetDbNamespace(); + App.router.get('updateController').updateAll(); + } + +}); \ No newline at end of file diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index d55cb46..1488fc4 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -2036,6 +2036,15 @@ Em.I18n.translations = { 'admin.stackUpgrade.dialog.notActive': "Waiting to execute the next task...", 'admin.stackUpgrade.dialog.prepareUpgrade.header': "Preparing the Upgrade...", 'admin.stackUpgrade.dialog.skipped.failures':'There were automatically skipped failed steps. Please resolve each failure before continuing with the upgrade.', + + 'admin.createUpgradePlan.wizard.header': 'Create Upgrade Plan', + 'admin.createUpgradePlan.wizard.downloadOptions.header': 'Download Options', + 'admin.createUpgradePlan.wizard.selectUpgradeOptions.header': 'Select Upgrade Options', + 'admin.createUpgradePlan.wizard.downloadMpacks.header': 'Download Mpacks', + 'admin.createUpgradePlan.wizard.reviewConfigs.header': 'Review Configs', + 'admin.createUpgradePlan.wizard.selectUpgradeType.header': 'Select Upgrade Type', + 'admin.createUpgradePlan.wizard.upgradeSummary.header': 'Upgrade Summary', + 'services.service.start':'Start', 'services.service.stop':'Stop', 'services.service.metrics':'Metrics', diff --git a/ambari-web/app/mixins/wizard/wizard_menu_view.js b/ambari-web/app/mixins/wizard/wizard_menu_view.js index e4f4645..52a34dd 100644 --- a/ambari-web/app/mixins/wizard/wizard_menu_view.js +++ b/ambari-web/app/mixins/wizard/wizard_menu_view.js @@ -65,6 +65,11 @@ App.WizardMenuMixin = Em.Mixin.create({ isStep8Disabled: isStepDisabled("step8"), isStep9Disabled: isStepDisabled("step9"), isStep10Disabled: isStepDisabled("step10"), + isDownloadOptionsDisabled: isStepDisabled("downloadOptions"), + isSelectUpgradeOptionsDisabled: isStepDisabled('selectUpgradeOptions'), + isReviewConfigsDisabled: isStepDisabled('reviewConfigs'), + isSelectUpgradeTypeDisabled: isStepDisabled('selectUpgradeType'), + isUpgradeSummaryDisabled: isStepDisabled('upgradeSummary'), isStep0Completed: isStepCompleted("step0"), isStep1Completed: isStepCompleted("step1"), @@ -82,6 +87,11 @@ App.WizardMenuMixin = Em.Mixin.create({ isStep7Completed: isStepCompleted("step7"), isStep8Completed: isStepCompleted("step8"), isStep9Completed: isStepCompleted("step9"), - isStep10Completed: isStepCompleted("step10") + isStep10Completed: isStepCompleted("step10"), + isDownloadOptionsCompleted: isStepCompleted("downloadOptions"), + isSelectUpgradeOptionsCompleted: isStepCompleted("selectUpgradeOptions"), + isReviewConfigsCompleted: isStepCompleted("reviewConfigs"), + isSelectUpgradeTypeCompleted: isStepCompleted("selectUpgradeType"), + isUpgradeSummaryCompleted: isStepCompleted("upgradeSummary") }); diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index 844b750..fc754b7 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -55,6 +55,17 @@ App.WizardRoute = Em.Route.extend({ gotoVerifyProducts: Em.Router.transitionTo('verifyProducts'), + gotoDownloadOptions: Em.Router.transitionTo('downloadOptions'), + + gotoSelectUpgradeOptions: Em.Router.transitionTo('selectUpgradeOptions'), + + gotoReviewConfigs: Em.Router.transitionTo('reviewConfigs'), + + gotoSelectUpgradeType: Em.Router.transitionTo('selectUpgradeType'), + + gotoUpgradeSummary: Em.Router.transitionTo('upgradeSummary'), + + isRoutable: function() { return typeof this.get('route') === 'string' && App.router.get('loggedIn'); }.property('App.router.loggedIn') diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index c0a4e19..20074ce 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -717,7 +717,9 @@ module.exports = Em.Route.extend(App.RouterRedirections, { if(!isDisabled){ router.transitionTo(event.context.url); } - } + }, + + createUpgradePlan: require('routes/mpack_upgrade_routes') }), diff --git a/ambari-web/app/routes/mpack_upgrade_routes.js b/ambari-web/app/routes/mpack_upgrade_routes.js new file mode 100644 index 0000000..ad55e3c --- /dev/null +++ b/ambari-web/app/routes/mpack_upgrade_routes.js @@ -0,0 +1,225 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); + +module.exports = App.WizardRoute.extend(App.RouterRedirections,{ + route: '/createUpgradePlan', + + breadcrumbs: { + label: Em.I18n.t('admin.createUpgradePlan.wizard.header') + }, + + enter: function (router) { + var createUpgradePlanWizardController = router.get('createUpgradePlanWizardController'); + createUpgradePlanWizardController.dataLoading().done(function () { + App.router.get('updateController').set('isWorking', false); + var popup = App.ModalPopup.show({ + classNames: ['wizard-modal-wrapper'], + modalDialogClasses: ['modal-xlg'], + header: Em.I18n.t('admin.createUpgradePlan.wizard.header'), + bodyClass: App.CreateUpgradePlanWizardView.extend({ + controller: createUpgradePlanWizardController + }), + primary: Em.I18n.t('form.cancel'), + showFooter: false, + secondary: null, + //construct cases where close button needs to be hidden. Make it observable on wizard steps + //default --- this.set('showCloseButton', true); + hideCloseButton: function () { + this.set('showCloseButton', true); + }, + //call any cleanup functions here before resetOnClose + onClose: function () { + var controller = App.router.get('createUpgradePlanWizardController'); + controller.resetOnClose(controller, 'main.admin.serviceGroups'); + }, + didInsertElement: function () { + this._super(); + this.fitHeight(); + } + }); + createUpgradePlanWizardController.set('popup', popup); + var currentClusterStatus = App.clusterStatus.get('value'); + if (currentClusterStatus) { + switch (currentClusterStatus.clusterState) { + case 'CREATE_UPGRADE_PLAN' : + createUpgradePlanWizardController.setCurrentStep(currentClusterStatus.localdb.CreateUpgradePlanWizard.currentStep); + break; + default: + var currStep = App.router.get('createUpgradePlanWizardController.currentStep'); + createUpgradePlanWizardController.setCurrentStep(currStep); + break; + } + } + Em.run.next(function () { + App.router.get('wizardWatcherController').setUser(createUpgradePlanWizardController.get('name')); + router.transitionTo(createUpgradePlanWizardController.get('currentStepName')); + }); + }); + }, + + downloadOptions: App.StepRoute.extend({ + route: '/downloadOptions', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardDownloadOptionsController = router.get('createUpgradePlanWizardDownloadOptionsController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('downloadOptions'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardDownloadOptions', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + //call any functions that load data required for the next step + next: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('selectUpgradeOptions'); + } + }), + + selectUpgradeOptions: App.StepRoute.extend({ + route: '/selectUpgradeOptions', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardselectUpgradeOptionsController = router.get('createUpgradePlanWizardselectUpgradeOptionsController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('selectUpgradeOptions'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardSelectUpgradeOptions', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + //call any functions that load data required for the next step + back: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('downloadOptions'); + }, + next: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('downloadMpacks'); + } + }), + + downloadMpacks: App.StepRoute.extend({ + route: '/downloadMpacks', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardDownloadMpacksController = router.get('createUpgradePlanWizardDownloadMpacksController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('downloadMpacks'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardDownloadMpacks', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + back: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('selectUpgradeOptions'); + }, + //call any functions that load data required for the next step + next: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('reviewConfigs'); + } + }), + + reviewConfigs: App.StepRoute.extend({ + route: '/reviewConfigs', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardReviewConfigsController = router.get('createUpgradePlanWizardReviewConfigsController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('reviewConfigs'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardReviewConfigs', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + back: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('downloadMpacks'); + }, + //call any functions that load data required for the next step + next: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('selectUpgradeType'); + } + }), + + selectUpgradeType: App.StepRoute.extend({ + route: '/selectUpgradeType', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardselectUpgradeTypeController = router.get('createUpgradePlanWizardSelectUpgradeTypeController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('selectUpgradeType'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardSelectUpgradeType', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + back: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('reviewConfigs'); + }, + //call any functions that load data required for the next step + next: function (router) { + var controller = router.get('createUpgradePlanWizardController'); + router.transitionTo('upgradeSummary'); + } + }), + + upgradeSummary: App.StepRoute.extend({ + route: '/upgradeSummary', + connectOutlets: function (router) { + var controller = router.get('createUpgradePlanWizardController'), + createUpgradePlanWizardUpgradeSummaryController = router.get('createUpgradePlanWizardUpgradeSummaryController'); + controller.dataLoading().done(function () { + controller.setCurrentStep('upgradeSummary'); + controller.loadAllPriorSteps().done(function () { + controller.connectOutlet('createUpgradePlanWizardUpgradeSummary', controller.get('content')); + }); + }) + }, + unroutePath: function () { + return false; + }, + //call any functions that load data required for the next step + complete: function (router, context) { + var controller = router.get('createUpgradePlanWizardController'); + controller.resetOnClose(controller, 'main.admin.serviceGroups'); + } + }), + +}); diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/downloadMpacks.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/downloadMpacks.hbs new file mode 100644 index 0000000..f335fa5 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/downloadMpacks.hbs @@ -0,0 +1,41 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="download-mpacks" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.downloadMpacks.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}} {{QAAttr "wizard-back"}}> + ← {{t common.back}} + {{#if App.router.backBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + </button> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="view.isSubmitDisabled"}} {{action next}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/downloadOptions.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/downloadOptions.hbs new file mode 100644 index 0000000..61df357 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/downloadOptions.hbs @@ -0,0 +1,35 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="download-options" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.downloadOptions.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="view.isSubmitDisabled"}} {{action next}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/reviewConfigs.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/reviewConfigs.hbs new file mode 100644 index 0000000..49be5ae --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/reviewConfigs.hbs @@ -0,0 +1,41 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="review-configs" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.reviewConfigs.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}} {{QAAttr "wizard-back"}}> + ← {{t common.back}} + {{#if App.router.backBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + </button> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="view.isSubmitDisabled"}} {{action next}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeOptions.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeOptions.hbs new file mode 100644 index 0000000..8e39317 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeOptions.hbs @@ -0,0 +1,41 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="upgrade-options" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.selectUpgradeOptions.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}} {{QAAttr "wizard-back"}}> + ← {{t common.back}} + {{#if App.router.backBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + </button> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="view.isSubmitDisabled"}} {{action next}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeType.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeType.hbs new file mode 100644 index 0000000..7f975c2 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/selectUpgradeType.hbs @@ -0,0 +1,41 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="upgrade-type" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.selectUpgradeType.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-default pull-left installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action back}} {{QAAttr "wizard-back"}}> + ← {{t common.back}} + {{#if App.router.backBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + </button> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="view.isSubmitDisabled"}} {{action next}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.next}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpackUpgrade/upgradeSummary.hbs b/ambari-web/app/templates/main/admin/mpackUpgrade/upgradeSummary.hbs new file mode 100644 index 0000000..248bef1 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpackUpgrade/upgradeSummary.hbs @@ -0,0 +1,35 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div id="upgrade-summary" class="wizard-content col-md-9" {{QAAttr "select-stack-page"}}> + <h4 class="step-title">{{t admin.createUpgradePlan.wizard.upgradeSummary.header}}</h4> + <div class="panel panel-default"> + <div class="panel-body"> + </div> + </div> +</div> + + +<div class="wizard-footer col-md-12"> + <button type="button" class="btn btn-success pull-right" {{bindAttr disabled="App.router.btnClickInProgress"}} {{action complete}} {{QAAttr "wizard-next"}}> + {{#if App.router.nextBtnClickInProgress}} + {{view App.SpinnerView tagName="span" classNames="service-button-spinner"}} + {{/if}} + {{t common.complete}} → + </button> +</div> \ No newline at end of file diff --git a/ambari-web/app/templates/main/admin/mpack_upgrade.hbs b/ambari-web/app/templates/main/admin/mpack_upgrade.hbs new file mode 100644 index 0000000..b53e4f6 --- /dev/null +++ b/ambari-web/app/templates/main/admin/mpack_upgrade.hbs @@ -0,0 +1,34 @@ +{{! +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +}} + +<div class="wizard"> + <div class="wizard-body row"> + <div class="wizard-nav col-md-3"> + <ul class="nav nav-pills nav-stacked"> + <li {{bindAttr class="isDownloadOptions:active view.isDownloadOptionsDisabled:disabled view.isDownloadOptionsCompleted:completed"}}><a href="javascript:void(null);" {{action gotoDownloadOptions target="controller"}}><i class="step-marker"><span class="step-index">1</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.downloadOptions.header}}</p></a></li> + <li {{bindAttr class="isSelectUpgradeOptions:active view.isSelectUpgradeOptionsDisabled:disabled view.isSelectUpgradeOptionsCompleted:completed"}}><a href="javascript:void(null);" {{action gotoSelectUpgradeOptions target="controller"}}><i class="step-marker"><span class="step-index">2</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.selectUpgradeOptions.header}}</p></a></li> + <li {{bindAttr class="isDownloadMpacks:active view.isDownloadMpacksDisabled:disabled view.isDownloadMpacksCompleted:completed isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoDownloadMpacks target="controller"}}><i class="step-marker"><span class="step-index">3</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.downloadMpacks.header}}</p></a></li> + <li {{bindAttr class="isReviewConfigs:active view.isReviewConfigsDisabled:disabled view.isReviewConfigsCompleted:completed"}}><a href="javascript:void(null);" {{action gotoReviewConfigs target="controller"}}><i class="step-marker"><span class="step-index">{{#if isDeleteOnly}}3{{else}}4{{/if}}</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.reviewConfigs.header}}</p></a></li> + <li {{bindAttr class="isSelectUpgradeType:active view.isSelectUpgradeTypeDisabled:disabled view.isSelectUpgradeTypeCompleted:completed isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoSelectUpgradeType target="controller"}}><i class="step-marker"><span class="step-index">5</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.selectUpgradeType.header}}</p></a></li> + <li {{bindAttr class="isUpgradeSummary:active view.isUpgradeSummaryDisabled:disabled view.isUpgradeSummaryCompleted:completed isDeleteOnly:hidden"}}><a href="javascript:void(null);" {{action gotoUpgradeSummary target="controller"}}><i class="step-marker"><span class="step-index">6</span></i><p class="step-name">{{t admin.createUpgradePlan.wizard.upgradeSummary.header}}</p></a></li> + </ul> + </div> + {{outlet}} + </div> +</div> + diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js index 3e0b65a..8940351 100644 --- a/ambari-web/app/utils/db.js +++ b/ambari-web/app/utils/db.js @@ -42,6 +42,7 @@ var InitialData = { content: {} }, 'HighAvailabilityWizard': {}, + 'CreateUpgradePlanWizard': {}, 'RMHighAvailabilityWizard': {}, 'AddHawqStandbyWizard': {}, 'RemoveHawqStandbyWizard': {}, diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index 1aa9b443..9175b6a 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/app/views.js @@ -240,6 +240,14 @@ require('views/main/admin/stack_upgrade/versions_view'); require('views/main/admin/stack_upgrade/menu_view'); require('views/main/admin/stack_upgrade/failed_hosts_modal_view'); require('views/main/admin/stack_and_upgrade_view'); +require('views/main/admin/mpack_upgrade_view'); +require('views/main/admin/mpack_upgrade_view'); +require('views/main/admin/mpackUpgrade/downloadOptions_view'); +require('views/main/admin/mpackUpgrade/downloadMpacks_view'); +require('views/main/admin/mpackUpgrade/selectUpgradeOptions_view'); +require('views/main/admin/mpackUpgrade/reviewConfigs_view'); +require('views/main/admin/mpackUpgrade/selectUpgradeType_view'); +require('views/main/admin/mpackUpgrade/upgradeSummary_view'); require('views/main/admin/kerberos'); require('views/main/admin/kerberos/disable_view'); diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/downloadMpacks_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/downloadMpacks_view.js new file mode 100644 index 0000000..1dd34b8 --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/downloadMpacks_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardDownloadMpacksView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/downloadMpacks') + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/downloadOptions_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/downloadOptions_view.js new file mode 100644 index 0000000..4bda03c --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/downloadOptions_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardDownloadOptionsView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/downloadOptions'), + +}); diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/reviewConfigs_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/reviewConfigs_view.js new file mode 100644 index 0000000..855b64e --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/reviewConfigs_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardReviewConfigsView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/reviewConfigs') + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeOptions_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeOptions_view.js new file mode 100644 index 0000000..f22254d --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeOptions_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardSelectUpgradeOptionsView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/selectUpgradeOptions'), + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeType_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeType_view.js new file mode 100644 index 0000000..93dfdcd --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/selectUpgradeType_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardSelectUpgradeTypeView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/selectUpgradeType'), + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/mpackUpgrade/upgradeSummary_view.js b/ambari-web/app/views/main/admin/mpackUpgrade/upgradeSummary_view.js new file mode 100644 index 0000000..650652b --- /dev/null +++ b/ambari-web/app/views/main/admin/mpackUpgrade/upgradeSummary_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ + +var App = require('app'); + +require('models/repository'); + +App.CreateUpgradePlanWizardUpgradeSummaryView = Em.View.extend({ + + templateName: require('templates/main/admin/mpackUpgrade/upgradeSummary'), + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/mpack_upgrade_view.js b/ambari-web/app/views/main/admin/mpack_upgrade_view.js new file mode 100644 index 0000000..06b3b3b --- /dev/null +++ b/ambari-web/app/views/main/admin/mpack_upgrade_view.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +var App = require('app'); + +App.CreateUpgradePlanWizardView = Em.View.extend(App.WizardMenuMixin, { + + templateName: require('templates/main/admin/mpack_upgrade'), + +}); \ No newline at end of file diff --git a/ambari-web/app/views/main/admin/serviceGroups_view.js b/ambari-web/app/views/main/admin/serviceGroups_view.js index 0e8fd80..8cc4e50 100644 --- a/ambari-web/app/views/main/admin/serviceGroups_view.js +++ b/ambari-web/app/views/main/admin/serviceGroups_view.js @@ -42,7 +42,7 @@ App.MainAdminServiceGroupsView = Ember.View.extend({ }, createUpgradePlan: function () { this.get('parentView').hide(); - App.router.transitionTo(); + App.router.transitionTo('main.admin.createUpgradePlan'); } }) }); diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadMpacks_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadMpacks_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadMpacks_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadOptions_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadOptions_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/downloadOptions_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/reviewConfigs_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/reviewConfigs_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/reviewConfigs_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeOptions_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/selectUpgradeType_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpackUpgrade/upgradeSummary_controller_test.js b/ambari-web/test/controllers/main/admin/mpackUpgrade/upgradeSummary_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpackUpgrade/upgradeSummary_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file diff --git a/ambari-web/test/controllers/main/admin/mpack_upgrade_controller_test.js b/ambari-web/test/controllers/main/admin/mpack_upgrade_controller_test.js new file mode 100644 index 0000000..8b83611 --- /dev/null +++ b/ambari-web/test/controllers/main/admin/mpack_upgrade_controller_test.js @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var App = require('app'); +var testHelpers = require('test/helpers'); \ No newline at end of file -- To stop receiving notification emails like this one, please contact ishan...@apache.org.