Updated Branches: refs/heads/trunk c0e318b20 -> a0dd6770e
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js index 5b837e9..0325d14 100644 --- a/ambari-web/app/views.js +++ b/ambari-web/app/views.js @@ -186,6 +186,12 @@ require('views/main/service/info/metrics/flume/jvm_threads_runnable'); require('views/main/service/info/metrics/flume/cpu_user'); require('views/main/service/add_view'); require('views/main/service/reassign_view'); +require('views/main/service/reassign/step1_view'); +require('views/main/service/reassign/step2_view'); +require('views/main/service/reassign/step3_view'); +require('views/main/service/reassign/step4_view'); +require('views/main/service/reassign/step5_view'); +require('views/main/service/reassign/step6_view'); require('views/main/charts/menu'); require('views/main/charts/heatmap'); require('views/main/charts/heatmap/heatmap_rack'); @@ -217,11 +223,6 @@ require('views/wizard/step7_view'); require('views/wizard/step8_view'); require('views/wizard/step9_view'); require('views/wizard/step10_view'); -require('views/wizard/step11_view'); -require('views/wizard/step12_view'); -require('views/wizard/step13_view'); -require('views/wizard/step14_view'); -require('views/wizard/step15_view'); require('views/wizard/stack_upgrade/step1_view'); require('views/wizard/stack_upgrade/step2_view'); require('views/wizard/stack_upgrade/step3_view'); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/item.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js index b20926b..1db8c5e 100644 --- a/ambari-web/app/views/main/service/item.js +++ b/ambari-web/app/views/main/service/item.js @@ -23,7 +23,9 @@ App.MainServiceItemView = Em.View.extend({ maintenance: function(){ var options = []; var service = this.get('controller.content'); - switch(service.get('serviceName')) { + var allMasters = this.get('controller.content.hostComponents').filterProperty('isMaster').mapProperty('componentName').uniq(); + var reassignableMasters = ['NAMENODE', 'SECONDARY_NAMENODE', 'JOBTRACKER', 'RESOURCEMANAGER']; + switch (service.get('serviceName')) { case 'GANGLIA': case 'NAGIOS': break; @@ -31,8 +33,11 @@ App.MainServiceItemView = Em.View.extend({ case 'HDFS': case 'MAPREDUCE': if (App.supports.reassignMaster) { - this.get('controller.content.hostComponents').filterProperty('isMaster').forEach (function (hostComponent){ - options.push({action: 'reassignMaster', context: hostComponent, 'label': Em.I18n.t('services.service.actions.reassign.master').format(hostComponent.get('displayName'))}); + allMasters.forEach(function (hostComponent) { + if (reassignableMasters.contains(hostComponent)) { + options.push({action: 'reassignMaster', context: hostComponent, + 'label': Em.I18n.t('services.service.actions.reassign.master').format(App.format.role(hostComponent))}); + } }) } default: http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step1_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step1_view.js b/ambari-web/app/views/main/service/reassign/step1_view.js new file mode 100644 index 0000000..d0f82de --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step1_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.ReassignMasterWizardStep1View = Em.View.extend({ + + templateName: require('templates/main/service/reassign/step1') + +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step2_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step2_view.js b/ambari-web/app/views/main/service/reassign/step2_view.js new file mode 100644 index 0000000..1e07497 --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step2_view.js @@ -0,0 +1,22 @@ +/** + * 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.ReassignMasterWizardStep2View = App.WizardStep5View.extend(); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step3_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step3_view.js b/ambari-web/app/views/main/service/reassign/step3_view.js new file mode 100644 index 0000000..20b8323 --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step3_view.js @@ -0,0 +1,37 @@ +/** + * 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.ReassignMasterWizardStep3View = Em.View.extend({ + + templateName: require('templates/main/service/reassign/step3'), + + sourceHost: function(){ + return this.get('controller.content.reassignHosts.source'); + }.property('controller.content.reassignHosts.source'), + + targetHost: function(){ + return this.get('controller.content.reassignHosts.target'); + }.property('controller.content.reassignHosts.target'), + + printReview: function () { + $("#step8-info").jqprint(); + } +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step4_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step4_view.js b/ambari-web/app/views/main/service/reassign/step4_view.js new file mode 100644 index 0000000..b3eaad7 --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step4_view.js @@ -0,0 +1,51 @@ +/** + * 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.ReassignMasterWizardStep4View = App.HighAvailabilityProgressPageView.extend({ + + headerTitle: Em.I18n.t('services.reassign.step4.header'), + + noticeInProgress: function () { + return Em.I18n.t('services.reassign.step4.status.info').format(App.format.role(this.get('controller.content.reassign.component_name'))) + }.property('controller.content.reassign.component_name'), + + noticeFailed: function () { + return Em.I18n.t('services.reassign.step4.status.failed').format(App.format.role(this.get('controller.content.reassign.component_name'))) + }.property('controller.content.reassign.component_name'), + + noticeCompleted: function () { + if (this.get('controller.content.hasManualSteps')) { + return Em.I18n.t('services.reassign.step4.status.success.withManualSteps').format(App.format.role(this.get('controller.content.reassign.component_name'))); + } else { + return Em.I18n.t('services.reassign.step4.status.success').format(App.format.role(this.get('controller.content.reassign.component_name'))); + } + }.property('controller.content.reassign.component_name'), + + submitButtonText: function () { + if (this.get('controller.content.hasManualSteps')) { + return Em.I18n.t('common.next') + ' →'; + } else { + return Em.I18n.t('common.complete'); + } + }.property('controller.content.hasManualSteps'), + + templateName: require('templates/main/service/reassign/step4') +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step5_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step5_view.js b/ambari-web/app/views/main/service/reassign/step5_view.js new file mode 100644 index 0000000..2c84741 --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step5_view.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. + */ + + +var App = require('app'); + +App.ReassignMasterWizardStep5View = Em.View.extend({ + + bodyText: function () { + var componentDir = this.get('controller.content.componentDir'); + var sourceHost = this.get('controller.content.reassignHosts.source'); + var targetHost = this.get('controller.content.reassignHosts.target'); + return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase()).format(componentDir, sourceHost, targetHost); + }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id'), + + templateName: require('templates/main/service/reassign/step5') +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/main/service/reassign/step6_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step6_view.js b/ambari-web/app/views/main/service/reassign/step6_view.js new file mode 100644 index 0000000..02aa506 --- /dev/null +++ b/ambari-web/app/views/main/service/reassign/step6_view.js @@ -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. + */ + + +var App = require('app'); + +App.ReassignMasterWizardStep6View = App.HighAvailabilityProgressPageView.extend({ + + headerTitle: Em.I18n.t('services.reassign.step6.header'), + + noticeInProgress: function () { + return Em.I18n.t('services.reassign.step6.status.info').format(App.format.role(this.get('controller.content.reassign.component_name'))) + }.property('controller.content.reassign.component_name'), + + noticeFailed: function () { + return Em.I18n.t('services.reassign.step6.status.failed').format(App.format.role(this.get('controller.content.reassign.component_name'))) + }.property('controller.content.reassign.component_name'), + + noticeCompleted: function () { + return Em.I18n.t('services.reassign.step6.status.success').format(App.format.role(this.get('controller.content.reassign.component_name'))) + }.property('controller.content.reassign.component_name'), + + submitButtonText: Em.I18n.t('common.complete'), + + templateName: require('templates/main/service/reassign/step6') +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/wizard/step11_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step11_view.js b/ambari-web/app/views/wizard/step11_view.js deleted file mode 100644 index fd3714b..0000000 --- a/ambari-web/app/views/wizard/step11_view.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * 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.WizardStep11View = Em.View.extend({ - - templateName: require('templates/wizard/step11') - -}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/wizard/step12_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step12_view.js b/ambari-web/app/views/wizard/step12_view.js deleted file mode 100644 index 64885ae..0000000 --- a/ambari-web/app/views/wizard/step12_view.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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.WizardStep12View = Em.View.extend({ - - templateName: require('templates/wizard/step12'), - - sourceHost: function () { - return this.get('controller.content.reassign.host_id') - }.property('controller.content.reassign.host_id'), - targetHost: function () { - return this.get('controller.content.masterComponentHosts').findProperty('component', this.get('controller.content.reassign.component_name')).hostName; - }.property('controller.content.masterComponentHosts'), - - printReview: function() { - $("#step8-info").jqprint(); - } -}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/wizard/step13_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step13_view.js b/ambari-web/app/views/wizard/step13_view.js deleted file mode 100644 index c6ef8cf..0000000 --- a/ambari-web/app/views/wizard/step13_view.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 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.WizardStep13View = App.HighAvailabilityProgressPageView.extend({ - - headerTitle: Em.I18n.t('installer.step13.header'), - - noticeInProgress: function () { - return Em.I18n.t('installer.step13.status.info').format(App.format.role(this.get('controller.content.reassign.component_name'))) - }.property('controller.content.reassign.component_name'), - - noticeFailed: function () { - return Em.I18n.t('installer.step13.status.failed').format(App.format.role(this.get('controller.content.reassign.component_name'))) - }.property('controller.content.reassign.component_name'), - - noticeCompleted: function () { - if (this.get('controller.content.hasManualSteps')) { - return Em.I18n.t('installer.step13.status.success.withManualSteps').format(App.format.role(this.get('controller.content.reassign.component_name'))); - } else { - return Em.I18n.t('installer.step13.status.success').format(App.format.role(this.get('controller.content.reassign.component_name'))); - } - }.property('controller.content.reassign.component_name'), - - submitButtonText: function () { - if (this.get('controller.content.hasManualSteps')) { - return Em.I18n.t('common.next') + ' →'; - } else { - return Em.I18n.t('common.complete'); - } - }.property('controller.content.hasManualSteps'), - - templateName: require('templates/wizard/step13') -}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/wizard/step14_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step14_view.js b/ambari-web/app/views/wizard/step14_view.js deleted file mode 100644 index 68bb56b..0000000 --- a/ambari-web/app/views/wizard/step14_view.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 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.WizardStep14View = Em.View.extend({ - - bodyText: function () { - var componentDir = this.get('controller.content.componentDir'); - var sourceHost = this.get('controller.content.reassign.host_id'); - var targetHost = this.get('controller.content.masterComponentHosts').findProperty('component', this.get('controller.content.reassign.component_name')).hostName; - return Em.I18n.t('installer.step14.body.' + this.get('controller.content.reassign.component_name').toLowerCase()).format(componentDir, sourceHost, targetHost); - }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id'), - - templateName: require('templates/wizard/step14') -}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a0dd6770/ambari-web/app/views/wizard/step15_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step15_view.js b/ambari-web/app/views/wizard/step15_view.js deleted file mode 100644 index a618c96..0000000 --- a/ambari-web/app/views/wizard/step15_view.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * 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.WizardStep15View = App.HighAvailabilityProgressPageView.extend({ - - headerTitle: Em.I18n.t('installer.step15.header'), - - noticeInProgress: function () { - return Em.I18n.t('installer.step15.status.info').format(App.format.role(this.get('controller.content.reassign.component_name'))) - }.property('controller.content.reassign.component_name'), - - noticeFailed: function () { - return Em.I18n.t('installer.step15.status.failed').format(App.format.role(this.get('controller.content.reassign.component_name'))) - }.property('controller.content.reassign.component_name'), - - noticeCompleted: function () { - return Em.I18n.t('installer.step15.status.success').format(App.format.role(this.get('controller.content.reassign.component_name'))) - }.property('controller.content.reassign.component_name'), - - submitButtonText: Em.I18n.t('common.complete'), - - templateName: require('templates/wizard/step15') -});
