Skip to content
Merged
20 changes: 11 additions & 9 deletions ambari-web/app/controllers/main/admin/service_auto_start.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,21 @@ App.MainAdminServiceAutoStartController = Em.Controller.extend({
},

load: function() {
const self = this;
const dfd = $.Deferred();
const clusterConfigController = App.router.get('configurationController');
clusterConfigController.updateConfigTags().always(function () {
clusterConfigController.updateConfigTags().always(() => {
clusterConfigController.getCurrentConfigsBySites(['cluster-env']).done((data) => {
self.set('clusterConfigs', data[0].properties);
self.set('isGeneralRecoveryEnabled', data[0].properties.recovery_enabled === 'true');
self.set('isGeneralRecoveryEnabledCached', self.get('isGeneralRecoveryEnabled'));
self.loadComponentsConfigs().then(() => {
self.set('isLoaded', true);
});
this.set('clusterConfigs', data[0].properties);
this.set('isGeneralRecoveryEnabled', data[0].properties.recovery_enabled === 'true');
this.set('isGeneralRecoveryEnabledCached', this.get('isGeneralRecoveryEnabled'));
this.loadComponentsConfigs().then(() => {
this.set('isLoaded', true);
dfd.resolve();
}, () => dfd.reject());
});
});


return dfd;
},

loadComponentsConfigs: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
this.runPreUpgradeCheckOnly({
id: version.get('id'),
label: version.get('displayName'),
id: version.get('id'),
type: method.get('type')
});
} else {
Expand Down Expand Up @@ -1087,7 +1088,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
this.set('isUpgradeTypesLoaded', true);
}

return App.ModalPopup.show({
const modal = App.ModalPopup.show({
encodeBody: false,
primary: function() {
if ( preUpgradeShow ) return false;
Expand Down Expand Up @@ -1156,6 +1157,7 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
self.runPreUpgradeCheckOnly({
id: version.get('id'),
label: version.get('displayName'),
id: version.get('id'),
type: event.context.get('type')
});
},
Expand Down Expand Up @@ -1192,8 +1194,12 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
self.runPreUpgradeCheckOnly.call(self, {
id: version.get('id'),
label: version.get('displayName'),
id: version.get('id'),
type: event.context.get('type')
});
},
closeParent: function() {
modal.onClose();
}
}, configs);
},
Expand Down Expand Up @@ -1253,6 +1259,8 @@ App.MainAdminStackAndUpgradeController = Em.Controller.extend(App.LocalStorage,
}
}
});

return modal;
},

/**
Expand Down
11 changes: 10 additions & 1 deletion ambari-web/app/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,17 @@ Em.I18n.translations = {
'popup.clusterCheck.failedOn': 'Failed on: ',
'popup.clusterCheck.reason': 'Reason: ',
'popup.clusterCheck.Upgrade.header': 'Upgrade to {0}',
'popup.clusterCheck.Upgrade.fail.title': 'Requirements',
'popup.clusterCheck.Upgrade.fail.title': 'Critical Requirements',
'popup.clusterCheck.Upgrade.fail.alert': 'You <strong>must</strong> meet these requirements before you can proceed.',
'popup.clusterCheck.Upgrade.fail.auto_start_disabled': 'Auto Start must be disabled before performing an Upgrade.',
'popup.clusterCheck.Upgrade.fail.auto_start_disabled.action_btn': 'Disable autostart',
'popup.clusterCheck.Upgrade.fail.services_up': 'The following services should be started:',
'popup.clusterCheck.Upgrade.fail.services_up.action_btn': 'Start Services',
'popup.clusterCheck.Upgrade.fail.maintanance': 'The following hosts must not be in in Maintenance Mode since they host Master components:',
'popup.clusterCheck.Upgrade.fail.maintanance.action_btn': 'Turn off MM',
'popup.clusterCheck.Upgrade.fail.atlasInstalled.action_btn': 'Remove Atlas',
'popup.clusterCheck.Upgrade.fail.atlasInstalled': 'Atlas should be removed.',
'popup.clusterCheck.Upgrade.services.checks' : 'Services Checks',
'popup.clusterCheck.Upgrade.bypassed-failures.title': 'Errors that can be bypassed',
'popup.clusterCheck.Upgrade.bypassed-failures.alert': 'Errors are allowed to be bypassed since config stack.upgrade.bypass.prechecks is set to true. It is strongly encouraged to look into these failures.',
'popup.clusterCheck.Upgrade.warning.title': 'Warnings',
Expand Down
10 changes: 10 additions & 0 deletions ambari-web/app/styles/application.less
Original file line number Diff line number Diff line change
Expand Up @@ -2476,6 +2476,16 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox {
.open-in-new-window {
margin-top: 10px;
}
.description {
color: #999999;
}
.checks-list {
padding-left: 25px;
margin-top: 20px;
li {
margin-top: 15px;
}
}
}
}
}
Expand Down
32 changes: 32 additions & 0 deletions ambari-web/app/styles/stack_versions.less
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,38 @@
}
}

.custom-cluster-check{
min-height: 34px;
&.custom-cluster-check-warning{
white-space: normal;
}
.btn{
margin-right: 10px;
&:first-child{
margin-right: 0;
}
}
}

.checks{
list-style: none;
li{
min-height: 40px;
line-height: 34px;
}
}

#notifications-dropdown.notifications-dropdown.notifications-checks{
display: block;
position: static;
width: 100%;
max-width: 100%;
box-shadow: none;
.notifications-body{
max-height: 10000px;
}
}

.upgrade-wizard-modal {
.modal-body {
position: static;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,25 @@
{{/if}}
{{#if view.fails.length}}
{{#if view.failTitle}}
<h4>{{view.failTitle}}</h4>
<h4><i class="glyphicon glyphicon-exclamation-sign"></i> {{view.failTitle}} ({{view.fails.length}})</h4>
{{/if}}
{{#if view.failAlert}}
<p>
<div class="description">
{{view.failAlert}}
</p>
</div>
{{/if}}
<div class="limited-height-2">
{{#each item in view.fails}}
<i class="glyphicon glyphicon-remove"></i>&nbsp;<span>{{item.check}}</span>
<pre>{{t popup.clusterCheck.reason}}{{item.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.failed_on}}</pre>
{{/each}}
<ol class="checks-list">
{{#each item in view.fails}}
<li>
{{#if item.customView}}
{{view item.customView}}
{{else}}
{{item.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.failed_on}}
{{/if}}
</li>
{{/each}}
</ol>
</div>
{{/if}}

Expand Down Expand Up @@ -66,14 +73,18 @@
<div class="limited-height-2">
{{#each item in view.warnings}}
<i class="glyphicon glyphicon-warning-sign"></i>&nbsp;<span>{{item.check}}</span>
<pre>{{t popup.clusterCheck.reason}}{{item.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.failed_on}}</pre>
{{#if item.customView}}
{{view item.customView}}
{{else}}
<pre>{{t popup.clusterCheck.reason}}{{item.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.failed_on}}</pre>
{{/if}}
{{/each}}
</div>
{{/if}}
{{#if view.hasConfigsMergeConflicts}}
{{view view.configsMergeTable}}
{{/if}}
{{#if view.hasConfigsRecommendations}}
{{view view.configsRecommendTable}}
{{view view.configsRecommendTable}}
{{/if}}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{!
* 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.
}}

{{item.reason}}
<ul class="checks">
{{#each hostName in view.hostNames}}
<li>
{{hostName}}
<button class="pull-right btn" {{action startRemoveHost hostName}}>{{t hosts.host.details.deleteHost}}</button>
</li>
{{/each}}
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{!
* 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.
}}

{{ t popup.clusterCheck.Upgrade.fail.maintanance }}
<ul>
{{#each host in view.hosts}}
<li class="custom-cluster-check">
{{ host.name }}
<button class="pull-right btn" {{bindAttr disabled="host.processing"}} {{action maintananceOff host target="view"}}>
{{ t popup.clusterCheck.Upgrade.fail.maintanance.action_btn }}
</button>
</li>
{{/each}}
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{!
* 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.
}}

{{#if view.showResumeButton }}
<button class="pull-right btn" {{action resumeUpgrade}}>{{ t common.resume }}</button>
{{/if}}
{{#if view.showAbortButton }}
<button class="pull-right btn" {{action abortUpgrade}}>{{ t common.abort }}</button>
{{/if}}
{{# if view.showFinalizeUpgradeButton}}
<button class="pull-right btn" {{action abortUpgrade}}>{{ t common.finalize }}</button>
{{/if}}
{{item.reason}}<br/>{{t popup.clusterCheck.failedOn}}{{item.failed_on}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{!
* 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.
}}

{{item.reason}}
<ul class="checks">
{{#each service in view.services}}
<li>
{{service.serviceName}}
<button class="pull-right btn" {{action goToConfigs service}}>{{t services.service.actions.run.smoke}}</button>
</li>
{{/each}}
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{!
* 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.
}}

{{item.reason}}
<ul class="checks">
{{#each service in view.services}}
<li>
{{service.serviceName}}
<button class="pull-right btn" {{bindAttr disabled="service.isSmokeTestDisabled"}} {{action runSmokeTest service}}>{{t services.service.actions.run.smoke}}</button>
</li>
{{/each}}
</ul>

Loading