You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2016/04/12 14:06:16 UTC
[1/3] ambari git commit: AMBARI-15800. Infinite spinner on the graph
popup with no data (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 407c63f82 -> 0da68672a
AMBARI-15800. Infinite spinner on the graph popup with no data (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c3ea7ef1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3ea7ef1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3ea7ef1
Branch: refs/heads/trunk
Commit: c3ea7ef1cf69e10e067b7a70b0f0187212713730
Parents: 407c63f
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Apr 11 13:32:11 2016 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Apr 12 11:08:43 2016 +0300
----------------------------------------------------------------------
ambari-web/app/views/common/chart/linear_time.js | 1 +
.../controllers/main/admin/kerberos/step4_controller_test.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3ea7ef1/ambari-web/app/views/common/chart/linear_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js
index bc00bb2..821e004 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -608,6 +608,7 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin, {
}
}
else {
+ this.set('isPopupReady', true);
this.set('isReady', true);
//if Axis X time interval is default(60 minutes)
if (this.get('timeUnitSeconds') === 3600) {
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3ea7ef1/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
index 75507f0..1d69a29 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
@@ -360,8 +360,8 @@ describe('App.KerberosWizardStep4Controller', function() {
var genConfigType = function(fileName, properties) {
var configTypeObj = {};
configTypeObj.type = fileName;
- configTypeObj.properties = properties.reduce(function(p,c) {
- p[c[0]] = c[1];
+ configTypeObj.properties = properties.reduce(function(p, _c) {
+ p[_c[0]] = _c[1];
return p;
}, {});
return configTypeObj;
[3/3] ambari git commit: AMBARI-15824. Too long username breaks
markup (onechiporenko)
Posted by on...@apache.org.
AMBARI-15824. Too long username breaks markup (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0da68672
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0da68672
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0da68672
Branch: refs/heads/trunk
Commit: 0da68672a25d0f920f358f0e4b40465121db9326
Parents: 2619eee
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Tue Apr 12 11:36:09 2016 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Apr 12 11:36:09 2016 +0300
----------------------------------------------------------------------
ambari-web/app/models/configs/service_config_version.js | 2 +-
ambari-web/app/router.js | 2 ++
ambari-web/app/templates/application.hbs | 2 +-
.../app/templates/common/configs/config_history_flow.hbs | 8 ++++----
.../app/templates/common/configs/service_version_box.hbs | 4 ++--
ambari-web/app/templates/main/host/host_alerts.hbs | 4 ++--
.../app/views/common/configs/config_history_flow.js | 11 +++++++++--
.../test/models/configs/service_config_version_test.js | 2 +-
8 files changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/models/configs/service_config_version.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/service_config_version.js b/ambari-web/app/models/configs/service_config_version.js
index bbd944d..9c83df8 100644
--- a/ambari-web/app/models/configs/service_config_version.js
+++ b/ambari-web/app/models/configs/service_config_version.js
@@ -53,7 +53,7 @@ App.ServiceConfigVersion = DS.Model.extend({
/**
* @type {string}
*/
- authorFormatted: Em.computed.truncate('author', 20, 20),
+ authorFormatted: Em.computed.truncate('author', 15, 15),
/**
* @type {string}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 602bec7..b723275 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -147,6 +147,8 @@ App.Router = Em.Router.extend({
return this.getLoginName();
}.property('loggedIn'),
+ displayLoginName: Em.computed.truncate('loginName', 10, 10),
+
getAuthenticated: function () {
var dfd = $.Deferred();
var self = this;
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index f06861e..9518b24 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -57,7 +57,7 @@
{{#if App.router.loggedIn}}
<div class="top-nav-user btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown">
- <i class="icon-user"></i> {{App.router.loginName}} <span class="caret"></span>
+ <i class="icon-user"></i> {{App.router.displayLoginName}} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="" id="about" {{action showAboutPopup target="controller"}}>{{t app.aboutAmbari}}</a></li>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/templates/common/configs/config_history_flow.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index 027bb5f..a099a6c 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -44,7 +44,7 @@
{{#if view.compareServiceVersion.isCurrent}}
<span class="label label-success">{{t common.current}}</span>
{{/if}}
- <strong>{{view.compareServiceVersion.author}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}}
+ <strong>{{view.compareServiceVersion.authorFormatted}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}}
<strong>{{view.compareServiceVersion.createdDate}}</strong>
</div>
<div class="pull-right operations-button">
@@ -66,7 +66,7 @@
<div class="row-fluid version-in-dropdown " {{action doAction serviceVersion view.actionTypes.SWITCH target="view"}}>
<div class="span2">{{serviceVersion.versionText}}</div>
<div class="span6">{{serviceVersion.createdDate}}</div>
- <div class="span3">{{serviceVersion.author}}</div>
+ <div class="span3">{{serviceVersion.authorFormatted}}</div>
<div class="pull-right"><i class="icon-caret-right"></i></div>
</div>
<ul class="dropdown-menu version-info-operations">
@@ -74,7 +74,7 @@
<span class="label label-info">{{serviceVersion.versionText}}</span>
<span class="stack">{{serviceVersion.stackVersion}}</span>
<div class="group"><strong>{{serviceVersion.configGroupName}}</strong></div>
- <div class="date"><strong>{{serviceVersion.author}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{serviceVersion.createdDate}}</strong></div>
+ <div class="date"><strong>{{serviceVersion.authorFormatted}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{serviceVersion.createdDate}}</strong></div>
<div class="notes">{{serviceVersion.fullNotes}}</div>
</div>
<div class="version-operations-buttons">
@@ -105,7 +105,7 @@
<span class="label-current label label-success icon-ok" data-toggle="tooltip" {{translateAttr title="common.current"}}></span>
{{/if}}
{{#if view.displayedServiceVersion.author}}
- <strong>{{view.displayedServiceVersion.author}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{view.displayedServiceVersion.createdDate}}</strong>
+ <strong>{{view.displayedServiceVersion.authorFormatted}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{view.displayedServiceVersion.createdDate}}</strong>
{{/if}}
</div>
{{#isAuthorized "SERVICE.MODIFY_CONFIGS"}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/templates/common/configs/service_version_box.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_version_box.hbs b/ambari-web/app/templates/common/configs/service_version_box.hbs
index fe5b8b4..65d7f48 100644
--- a/ambari-web/app/templates/common/configs/service_version_box.hbs
+++ b/ambari-web/app/templates/common/configs/service_version_box.hbs
@@ -22,7 +22,7 @@
<div {{bindAttr class=":version-info :box :pull-right view.serviceVersion.isDisplayed:displayed view.serviceVersion.isDisabled:grayedOut"}} {{action doAction view.serviceVersion view.actionTypes.SWITCH target="view.parentView"}}>
<div class="top-label">
<span class="label label-info">{{view.serviceVersion.versionText}}</span>
- <span class="author pull-right">{{view.serviceVersion.author}}</span>
+ <span class="author pull-right">{{view.serviceVersion.authorFormatted}}</span>
</div>
<div class="content">{{view.serviceVersion.timeSinceCreated}}</div>
<div class="stack-label">{{view.serviceVersion.stackVersion}}</div>
@@ -39,7 +39,7 @@
<div class="content">
<span class="label label-info">{{view.serviceVersion.versionText}}</span> <span class="pull-right"><strong>{{view.serviceVersion.configGroupName}}</strong></span>
<span class="stack">{{view.serviceVersion.stackVersion}}</span>
- <div class="date"><strong>{{view.serviceVersion.author}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{view.serviceVersion.createdDate}}</strong></div>
+ <div class="date"><strong>{{view.serviceVersion.authorFormatted}}</strong> {{t dashboard.configHistory.info-bar.authoredOn}} <strong>{{view.serviceVersion.createdDate}}</strong></div>
<div class="notes">{{view.serviceVersion.fullNotes}}</div>
</div>
<div class="version-operations-buttons">
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/templates/main/host/host_alerts.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/host/host_alerts.hbs b/ambari-web/app/templates/main/host/host_alerts.hbs
index 42029e4..658f1b0 100644
--- a/ambari-web/app/templates/main/host/host_alerts.hbs
+++ b/ambari-web/app/templates/main/host/host_alerts.hbs
@@ -51,8 +51,8 @@
<td>
<a href="#" {{action routeToAlertDefinition instance.definitionId target="controller"}}>{{instance.label}}</a>
</td>
- <td>{{template "templates/main/alerts/alert_instance/status"}}
- <time class="timeago" {{bindAttr data-original-title="instance.statusChangedAndLastCheckedFormatted"}}>{{instance.lastTriggeredForFormatted}}</time>
+ <td>
+ {{template "templates/main/alerts/alert_instance/status"}}
</td>
<td><span
class="alert-text" {{bindAttr data-original-title="instance.escapeSpecialCharactersFromTooltip"}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/app/views/common/configs/config_history_flow.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js b/ambari-web/app/views/common/configs/config_history_flow.js
index ba49e49..1c19a60 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -182,7 +182,8 @@ App.ConfigHistoryFlowView = Em.View.extend({
Em.get(this.get('serviceVersionsReferences'), key).destroy();
}, this);
this.$('.version-info-bar-wrapper').trigger('sticky_kit:detach').off();
- this.$('[data-toggle=tooltip], [data-toggle=arrow-tooltip]').remove();
+ this.$('[data-toggle=tooltip]').tooltip('destroy');
+ this.$('[data-toggle=arrow-tooltip]').tooltip('destroy');
},
willInsertElement: function () {
@@ -521,6 +522,11 @@ App.ConfigHistoryFlowView = Em.View.extend({
App.ConfigsServiceVersionBoxView = Em.View.extend({
+ /**
+ * bound from template
+ */
+ serviceVersion: null,
+
actionTypesBinding: 'parentView.actionTypes',
disabledActionAttr: Em.computed.alias('serviceVersion.disabledActionAttr'),
@@ -548,6 +554,7 @@ App.ConfigsServiceVersionBoxView = Em.View.extend({
willDestroyElement: function() {
this.$('.version-box').off();
- this.$('[data-toggle=tooltip], [data-toggle=arrow-tooltip]').remove();
+ this.$('[data-toggle=tooltip]').tooltip('destroy');
+ this.$('[data-toggle=arrow-tooltip]').tooltip('destroy');
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/0da68672/ambari-web/test/models/configs/service_config_version_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/configs/service_config_version_test.js b/ambari-web/test/models/configs/service_config_version_test.js
index 1998262..721354d 100644
--- a/ambari-web/test/models/configs/service_config_version_test.js
+++ b/ambari-web/test/models/configs/service_config_version_test.js
@@ -33,7 +33,7 @@ describe('App.ServiceConfigVersion', function () {
App.TestAliases.testAsComputedAnd(getModel(), 'canBeMadeCurrent', ['isCompatible', '!isCurrent']);
- App.TestAliases.testAsComputedTruncate(getModel(), 'authorFormatted', 'author', 20, 20);
+ App.TestAliases.testAsComputedTruncate(getModel(), 'authorFormatted', 'author', 15, 15);
App.TestAliases.testAsComputedTruncate(getModel(), 'briefNotes', 'fullNotes', 81, 81, '');
[2/3] ambari git commit: AMBARI-15823. JS error after fast closing
version box popup (onechiporenko)
Posted by on...@apache.org.
AMBARI-15823. JS error after fast closing version box popup (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2619eee1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2619eee1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2619eee1
Branch: refs/heads/trunk
Commit: 2619eee168d6ef099117b196585a35fa8e5c2e6c
Parents: c3ea7ef
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Tue Apr 12 11:34:34 2016 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Apr 12 11:34:34 2016 +0300
----------------------------------------------------------------------
.../admin/stack_upgrade/upgrade_version_box_view.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2619eee1/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index ccee6bf..88bfec2 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -69,6 +69,8 @@ App.UpgradeVersionBoxView = Em.View.extend({
return this.get('content.status') === 'CURRENT' ? 'current-version-box' : '';
}.property('content.status'),
+ isPatch: Em.computed.equal('content.type', 'PATCH'),
+
/**
* @type {boolean}
*/
@@ -240,6 +242,9 @@ App.UpgradeVersionBoxView = Em.View.extend({
App.tooltip($('.hosts-tooltip'));
App.tooltip($('.out-of-sync-badge'), {title: Em.I18n.t('hosts.host.stackVersions.status.out_of_sync')});
Em.run.later(this, function () {
+ if (this.get('state') !== 'inDOM') {
+ return;
+ }
if (this.get('maintenanceHosts').length + this.get('notRequiredHosts').length) {
App.tooltip(this.$('.hosts-section'), {placement: 'bottom', title: Em.I18n.t('admin.stackVersions.version.hostsInfoTooltip').format(
this.get('maintenanceHosts').length + this.get('notRequiredHosts').length, this.get('maintenanceHosts').length, this.get('notRequiredHosts').length
@@ -248,9 +253,11 @@ App.UpgradeVersionBoxView = Em.View.extend({
}, 1000);
},
- isPatch: function() {
- return this.get('content.type') == "PATCH";
- }.property('content.type'),
+ willDestroyElement: function () {
+ $('.link-tooltip').tooltip('destroy');
+ $('.hosts-tooltip').tooltip('destroy');
+ $('.out-of-sync-badge').tooltip('destroy');
+ },
/**
* run custom action of controller