You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/12/05 20:23:13 UTC
[04/14] ambari git commit: AMBARI-19081. JS error on "User RedHat
Satellite" click on step1 installer (onechiporenko)
AMBARI-19081. JS error on "User RedHat Satellite" click on step1 installer (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7f6ca9d0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f6ca9d0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f6ca9d0
Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 7f6ca9d07b2f2e389d9e887853238ca3969d99ce
Parents: 8ad494e
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Dec 5 13:29:05 2016 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Dec 5 13:29:05 2016 +0200
----------------------------------------------------------------------
ambari-web/app/styles/wizard.less | 6 ++++-
ambari-web/app/templates/wizard/step1.hbs | 2 +-
ambari-web/app/views/wizard/step1_view.js | 21 +++++++++---------
.../widgets/slider_config_widget_view_test.js | 23 --------------------
.../test/views/main/dashboard/widgets_test.js | 2 +-
5 files changed, 18 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/styles/wizard.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/wizard.less b/ambari-web/app/styles/wizard.less
index a4dac8c..57dae45 100644
--- a/ambari-web/app/styles/wizard.less
+++ b/ambari-web/app/styles/wizard.less
@@ -554,6 +554,11 @@
}
}
}
+ .inner-table {
+ td {
+ vertical-align: middle;
+ }
+ }
.repos-panel {
.remove-icon {
color: red;
@@ -567,7 +572,6 @@
}
.repo-url input {
width: 90%;
- height: 24px;
}
#skip-validation, #use-redhat {
span.disabled {
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/templates/wizard/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step1.hbs b/ambari-web/app/templates/wizard/step1.hbs
index 5297d12..8179b41 100644
--- a/ambari-web/app/templates/wizard/step1.hbs
+++ b/ambari-web/app/templates/wizard/step1.hbs
@@ -144,7 +144,7 @@
{{view view.popoverView repositoryBinding="repository"}}
</td>
<td class="col-sm-8">
- <div {{bindAttr class=":repo-url repository.invalidFormatError:textfield-error repository.invalidError:textfield-error"}}>
+ <div {{bindAttr class=":repo-url repository.invalidFormatError:has-error repository.invalidError:has-error"}}>
{{view Ember.TextField placeholderBinding="repository.placeholder" valueBinding="repository.baseUrl" disabledBinding="controller.selectedStack.useRedhatSatellite" classNames="form-control"}}
{{#if controller.selectedStack.usePublicRepo}}
<i {{bindAttr class="repository.undo::invisible :icon-undo"}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js b/ambari-web/app/views/wizard/step1_view.js
index d5cbbb5..161d794 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -226,17 +226,18 @@ App.WizardStep1View = Em.View.extend({
checkedBinding: 'controller.selectedStack.useRedhatSatellite',
disabledBinding: 'controller.selectedStack.usePublicRepo',
click: function () {
- // click triggered before value is toggled, so if-statement is inverted
- if (this.get('disabled')) return;
- if (!this.get('controller.selectedStack.useRedhatSatellite')) {
- App.ModalPopup.show({
- header: Em.I18n.t('common.important'),
- secondary: false,
- bodyClass: Ember.View.extend({
- template: Ember.Handlebars.compile(Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning'))
- })
- });
+ if (!this.get('disabled')) {
+ this.toggleProperty('controller.selectedStack.useRedhatSatellite');
+ if (this.get('controller.selectedStack.useRedhatSatellite')) {
+ App.ModalPopup.show({
+ header: Em.I18n.t('common.important'),
+ encodeBody: false,
+ secondary: false,
+ body: Em.I18n.t('installer.step1.advancedRepo.useRedhatSatellite.warning')
+ });
+ }
}
+ return false;
}
}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
index a6b25ce..5cc055c 100644
--- a/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
+++ b/ambari-web/test/views/common/configs/widgets/slider_config_widget_view_test.js
@@ -636,29 +636,6 @@ describe('App.SliderConfigWidgetView', function () {
expect(viewInt.get('issueMessage')).to.equal('');
});
- describe('llap_queue_capacity property', function() {
- beforeEach(function() {
- viewInt.set('config.name', 'llap_queue_capacity');
- });
- it('should validate and warn about llap issue when value is 100%', function() {
- viewInt.set('config.stackConfigProperty.valueAttributes.maximum', 100);
- viewInt.set('config.value', '100');
- viewInt.set('config.errorMessage', '');
- viewInt.set('config.warnMessage', '');
- viewInt.set('config.widgetType', 'slider');
- assert.isTrue(viewInt.isValueCompatibleWithWidget(), 'value should be compatible with widget');
- assert.equal(viewInt.get('config.warnMessage'), Em.I18n.t('config.warnMessage.llap_queue_capacity.max'), 'warn message validation');
- });
-
- it('should pass validation because llap < 100', function() {
- viewInt.set('config.stackConfigProperty.valueAttributes.maximum', 100);
- viewInt.set('config.value', '99');
- viewInt.set('config.errorMessage', '');
- viewInt.set('config.warnMessage', '');
- assert.isTrue(viewInt.isValueCompatibleWithWidget(), 'value should be compatible with widget');
- assert.equal(viewInt.get('config.warnMessage'), '', 'warn message validation');
- });
- });
});
describe('#formatTickLabel', function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f6ca9d0/ambari-web/test/views/main/dashboard/widgets_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/dashboard/widgets_test.js b/ambari-web/test/views/main/dashboard/widgets_test.js
index 707087a..b2d154b 100644
--- a/ambari-web/test/views/main/dashboard/widgets_test.js
+++ b/ambari-web/test/views/main/dashboard/widgets_test.js
@@ -223,7 +223,7 @@ describe('App.MainDashboardWidgetsView', function () {
expect(view.get('visibleWidgets')).to.be.eql([Em.Object.create({
id: 1,
threshold: [],
- viewClass: App['NameNodeHeapPieChartView'],
+ viewClass: App.NameNodeHeapPieChartView,
sourceName: 'HDFS',
title: Em.I18n.t('dashboard.widgets.NameNodeHeap')
})]);