You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/12/18 17:09:57 UTC
ambari git commit: AMBARI-8792. Alert Definition > Instance table
should also show Last Checked timestamp. (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk aa3cc9402 -> 0e91ecb83
AMBARI-8792. Alert Definition > Instance table should also show Last Checked timestamp. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0e91ecb8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0e91ecb8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0e91ecb8
Branch: refs/heads/trunk
Commit: 0e91ecb834fa8ad3274aaaa01ad75cee7f5151a7
Parents: aa3cc94
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Dec 18 18:05:56 2014 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Thu Dec 18 18:05:56 2014 +0200
----------------------------------------------------------------------
.../app/templates/main/alerts/definition_details.hbs | 10 +++++-----
.../app/views/main/alerts/definition_details_view.js | 14 ++++++++++++--
2 files changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e91ecb8/ambari-web/app/templates/main/alerts/definition_details.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/alerts/definition_details.hbs b/ambari-web/app/templates/main/alerts/definition_details.hbs
index 37beff2..fd04486 100644
--- a/ambari-web/app/templates/main/alerts/definition_details.hbs
+++ b/ambari-web/app/templates/main/alerts/definition_details.hbs
@@ -177,7 +177,7 @@
<tbody>
{{#if view.pageContent}}
{{#each instance in view.pageContent}}
- <tr>
+ {{#view view.instanceTableRow}}
<td class="first">
<a {{action goToService instance.service target="controller"}} href="#">{{instance.service.displayName}}</a>
{{#if instance.host.hostName}}
@@ -187,10 +187,10 @@
<a {{action goToHostAlerts instance.host target="controller"}} href="#">{{instance.host.hostName}}</a>
{{/if}}
</td>
- <td>{{{instance.status}}} <time class="timeago" {{bindAttr data-original-title="instance.lastTriggeredFormatted"}}>{{instance.lastTriggeredForFormatted}}</time></td>
- <td>{{view view.lastDayCount hostBinding="instance.host"}}</td>
- <td><span class="alert-text" {{bindAttr data-original-title="instance.text"}} class="alert-text">{{instance.text}}</span></td>
- </tr>
+ <td>{{{instance.status}}} <time class="timeago" rel="tooltip" {{bindAttr data-original-title="instance.statusChangedAndLastCheckedFormatted"}}>{{instance.lastTriggeredForFormatted}}</time></td>
+ <td>{{view view.parentView.lastDayCount hostBinding="instance.host"}}</td>
+ <td><span class="alert-text" rel="tooltip" {{bindAttr data-original-title="instance.text"}} class="alert-text">{{instance.text}}</span></td>
+ {{/view}}
{{/each}}
{{else}}
<tr>
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e91ecb8/ambari-web/app/views/main/alerts/definition_details_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/alerts/definition_details_view.js b/ambari-web/app/views/main/alerts/definition_details_view.js
index e064f05..1a9a13f 100644
--- a/ambari-web/app/views/main/alerts/definition_details_view.js
+++ b/ambari-web/app/views/main/alerts/definition_details_view.js
@@ -75,9 +75,9 @@ App.MainAlertDefinitionDetailsView = App.TableView.extend({
*/
tooltipsUpdater: function () {
Em.run.next(function () {
- App.tooltip($(".timeago, .alert-text, .enable-disable-button"));
+ App.tooltip($(".enable-disable-button"));
});
- }.observes('pageContent.@each.text', 'controller.content.enabled'),
+ }.observes('controller.content.enabled'),
/**
* View calculates and represents count of alerts on appropriate host during last day
@@ -88,6 +88,16 @@ App.MainAlertDefinitionDetailsView = App.TableView.extend({
var lastDayAlertsCount = this.get('parentView.controller.lastDayAlertsCount');
return lastDayAlertsCount ? lastDayAlertsCount[this.get('host.hostName')] || 0 : Em.I18n.t('app.loadingPlaceholder');
}.property('parentView.controller.lastDayAlertsCount', 'host')
+ }),
+
+ /**
+ * View represents each row of instances table
+ */
+ instanceTableRow: Em.View.extend({
+ tagName: 'tr',
+ didInsertElement: function () {
+ App.tooltip($("[rel=tooltip]"));
+ }
})
});