This is an automated email from the ASF dual-hosted git repository.
ababiichuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new dcf5b84 AMBARI-23602 NN Federation Lower priority changes.
(ababiichuk)
dcf5b84 is described below
commit dcf5b849e3845d7b161791db31908b9d1bb7cadf
Author: ababiichuk <[email protected]>
AuthorDate: Tue Apr 17 19:07:21 2018 +0300
AMBARI-23602 NN Federation Lower priority changes. (ababiichuk)
---
ambari-web/app/messages.js | 1 +
.../app/mixins/wizard/assign_master_components.js | 11 +++++---
ambari-web/app/styles/dashboard.less | 30 ++++++++++++++--------
.../app/styles/enhanced_service_dashboard.less | 3 +--
.../templates/common/assign_master_components.hbs | 1 +
.../app/templates/main/dashboard/widgets.hbs | 6 ++---
.../service/widgets/create/step2_add_metric.hbs | 11 ++------
.../widgets/create/step2_component_dropdown.hbs | 3 +--
.../main/service/widgets/create/expression_view.js | 7 ++---
.../main/service/widgets/create/step2_view.js | 4 ++-
10 files changed, 43 insertions(+), 34 deletions(-)
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index b827d45..91dcdee 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -3312,6 +3312,7 @@ Em.I18n.translations = {
'dashboard.widgets.wizard.step2.threshold.warning.tooltip': 'This is the
threshold value at which the widget color changes from orange (Warning) to red
(Critical)',
'dashboard.widgets.wizard.onClose.popup.body': 'You have unsaved changes.
Your changes will not be saved if you exit the wizard at this step.',
'dashboard.widgets.wizard.onClose.popup.discardAndExit': 'Discard and Exit',
+ 'dashboard.widgets.wizard.step2.nameSpaceDropDownItem': '{0} (Active)',
'restart.service.all': 'Restart All',
'restart.service.all.affected': 'Restart All Affected',
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js
b/ambari-web/app/mixins/wizard/assign_master_components.js
index 06ed3b9..79ed6f9 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -746,15 +746,18 @@ App.AssignMasterComponents =
Em.Mixin.create(App.HostComponentValidationMixin, A
* @return {Object}
*/
createComponentInstallationObject: function(fullComponent, hostName,
savedComponent) {
- var componentName = fullComponent.get('componentName');
-
- var componentObj = {};
+ const componentName = fullComponent.get('componentName'),
+ resultingHostName = savedComponent ? savedComponent.hostName : hostName;
+ let componentObj = {};
componentObj.component_name = componentName;
componentObj.display_name =
App.format.role(fullComponent.get('componentName'), false);
componentObj.serviceId = fullComponent.get('serviceName');
componentObj.isServiceCoHost =
App.StackServiceComponent.find().findProperty('componentName',
componentName).get('isCoHostedComponent') &&
!this.get('mastersToMove').contains(componentName);
- componentObj.selectedHost = savedComponent ? savedComponent.hostName :
hostName;
+ componentObj.selectedHost = resultingHostName;
componentObj.isInstalled = savedComponent ? savedComponent.isInstalled ||
(this.get('markSavedComponentsAsInstalled') &&
!this.get('mastersToCreate').contains(fullComponent.get('componentName'))) :
false;
+ if (this.get('content.controllerName') === 'reassignMasterController' &&
componentName === 'NAMENODE' && App.get('hasNameNodeFederation')) {
+ componentObj.nameSpace =
App.HostComponent.find(`${componentName}_${resultingHostName}`).get('haNameSpace');
+ }
return componentObj;
},
diff --git a/ambari-web/app/styles/dashboard.less
b/ambari-web/app/styles/dashboard.less
index 62aae1c..c875bf2 100644
--- a/ambari-web/app/styles/dashboard.less
+++ b/ambari-web/app/styles/dashboard.less
@@ -34,17 +34,27 @@
float: left;
width: 100%;
}
- .add-widgets-apply-button {
- margin: 0px 20px 20px 0px;
- }
}
- #widgets-options-menu {
- .add-widgets-text.pull-left .dropdown-menu {
- overflow: auto;
- width: 210px;
- left: -210px;
- .add-widgets-dropdown-list ul {
- list-style: none;
+ .widgets-options-menu {
+ .add-widgets-text {
+ .dropdown-menu {
+ .add-widgets-dropdown-list {
+ ul {
+ list-style: none;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ }
+ }
+ .add-widgets-apply-button {
+ margin: 0 20px 40px 0;
+ }
+ }
+ &.pull-left {
+ .dropdown-menu {
+ overflow: auto;
+ width: 210px;
+ left: -210px;
+ }
}
}
.reset-all-widgets.pull-left .dropdown-menu {
diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less
b/ambari-web/app/styles/enhanced_service_dashboard.less
index d212925..533ef3d 100644
--- a/ambari-web/app/styles/enhanced_service_dashboard.less
+++ b/ambari-web/app/styles/enhanced_service_dashboard.less
@@ -735,7 +735,7 @@ select.form-control + .chosen-container {
font-weight: normal;
line-height: 1.428571429;
color: #333;
- white-space: nowrap;
+ white-space: normal;
background-image:none;
}
li:hover, li.active-result:hover, li.highlighted {
@@ -743,7 +743,6 @@ select.form-control + .chosen-container {
text-decoration: none;
background-color: #428BCA;
background-image:none;
- white-space: normal;
}
li.disabled-result{
background-color: #fff !important;
diff --git a/ambari-web/app/templates/common/assign_master_components.hbs
b/ambari-web/app/templates/common/assign_master_components.hbs
index f8db6e5..a1a1451 100644
--- a/ambari-web/app/templates/common/assign_master_components.hbs
+++ b/ambari-web/app/templates/common/assign_master_components.hbs
@@ -70,6 +70,7 @@
{{#if showAdditionalPrefix}}
{{t common.additional}}
{{/if}}
+ {{nameSpace}}
{{display_name}}:
</label>
</div>
diff --git a/ambari-web/app/templates/main/dashboard/widgets.hbs
b/ambari-web/app/templates/main/dashboard/widgets.hbs
index 62d1c89..f77c3dd 100644
--- a/ambari-web/app/templates/main/dashboard/widgets.hbs
+++ b/ambari-web/app/templates/main/dashboard/widgets.hbs
@@ -18,7 +18,7 @@
{{#if view.isDataLoaded}}
<div class="btn-toolbar" role="toolbar">
- <div id="widgets-options-menu" class="dropdown btn-group pull-left">
+ <div id="widgets-options-menu" class="widgets-options-menu dropdown
btn-group pull-left">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"
href="#">
<span>{{t dashboard.widgets.actions.title}}</span>
<span class="caret"></span>
@@ -81,8 +81,8 @@
</div>
{{/if}}
</div>
- <div class="col-md-6">
- <div class="dropdown btn-group pull-right">
+ <div class="widgets-options-menu col-md-6">
+ <div class="add-widgets-text dropdown btn-group pull-right">
<button class="btn btn-default dropdown-toggle"
data-toggle="dropdown" href="#">
<span>{{t common.add}}</span>
<span class="caret"></span>
diff --git
a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
index 2ae091a..bce3a01 100644
--- a/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
+++ b/ambari-web/app/templates/main/service/widgets/create/step2_add_metric.hbs
@@ -32,19 +32,12 @@
<a href="javascript:void(null);">{{comp.displayName}}</a>
<ul class="dropdown-menu">
{{#each group in comp.components}}
- <li class="dropdown-submenu">
- <a
href="javascript:void(null);">{{group.displayName}}</a>
- <ul class="dropdown-menu">
- {{#each groupComponent in group.components}}
- {{view App.WidgetWizardComponentDropdownView
componentBinding="groupComponent"}}
- {{/each}}
- </ul>
- </li>
+ {{view App.WidgetWizardComponentDropdownView
componentBinding="group.component" displayNameBinding="group.displayName"}}
{{/each}}
</ul>
</li>
{{else}}
- {{view App.WidgetWizardComponentDropdownView
componentBinding="comp"}}
+ {{view App.WidgetWizardComponentDropdownView
componentBinding="comp" displayNameBinding="comp.displayName"}}
{{/if}}
{{/each}}
</ul>
diff --git
a/ambari-web/app/templates/main/service/widgets/create/step2_component_dropdown.hbs
b/ambari-web/app/templates/main/service/widgets/create/step2_component_dropdown.hbs
index 319aef0..7189003 100644
---
a/ambari-web/app/templates/main/service/widgets/create/step2_component_dropdown.hbs
+++
b/ambari-web/app/templates/main/service/widgets/create/step2_component_dropdown.hbs
@@ -15,8 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
}}
-<a href="javascript:void(null);">{{view.component.displayName}}</a>
-{{view.component.isGroup}}
+<a href="javascript:void(null);">{{view.displayName}}</a>
<ul class="dropdown-menu select-options-dropdown">
<!--metrics level-->
<li class="keep-open metric-select" {{action selectComponents view.component
target="view.parentView"}}>
diff --git
a/ambari-web/app/views/main/service/widgets/create/expression_view.js
b/ambari-web/app/views/main/service/widgets/create/expression_view.js
index c8f708d..9260551 100644
--- a/ambari-web/app/views/main/service/widgets/create/expression_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/expression_view.js
@@ -352,8 +352,9 @@ App.AddMetricExpressionView = Em.View.extend({
if (hasNameNodeFederation) {
App.HDFSService.find().objectAt(0).get('masterComponentGroups').forEach(function(group)
{
nameServiceGroups.push({
- displayName: group.name,
- components: []
+ tag: group.name,
+ displayName:
Em.I18n.t('dashboard.widgets.wizard.step2.nameSpaceDropDownItem').format(group.name),
+ component: null
});
});
}
@@ -366,7 +367,7 @@ App.AddMetricExpressionView = Em.View.extend({
if (App.HostComponent.getCount(componentName, 'totalCount') === 0)
continue;
if (hasNameNodeFederation && componentName === 'NAMENODE') {
nameServiceGroups.forEach(function(group) {
-
group.components.push(this.createComponentItem(servicesMap[serviceName],
serviceName, componentId, expressionId, group.displayName));
+ group.component =
this.createComponentItem(servicesMap[serviceName], serviceName, componentId,
expressionId, group.tag);
}, this);
} else {
components.push(this.createComponentItem(servicesMap[serviceName],
serviceName, componentId, expressionId));
diff --git a/ambari-web/app/views/main/service/widgets/create/step2_view.js
b/ambari-web/app/views/main/service/widgets/create/step2_view.js
index d43130f..68cab03 100644
--- a/ambari-web/app/views/main/service/widgets/create/step2_view.js
+++ b/ambari-web/app/views/main/service/widgets/create/step2_view.js
@@ -99,7 +99,9 @@ App.WidgetWizardComponentDropdownView = Em.View.extend({
tagName: 'li',
- classNames: ['dropdown-submenu']
+ classNames: ['dropdown-submenu'],
+
+ displayName: ''
});
--
To stop receiving notification emails like this one, please contact
[email protected].