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 2015/03/02 23:04:13 UTC

ambari git commit: AMBARI-9844. Alerts. "Ambari Agent Disk Usage" instances don't contain hostname (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 f84775853 -> 639a714bf


AMBARI-9844. Alerts. "Ambari Agent Disk Usage" instances don't contain hostname (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/639a714b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/639a714b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/639a714b

Branch: refs/heads/branch-2.0.0
Commit: 639a714bfbf32dc1de5d674b44eb20f5bc5a4db7
Parents: f847758
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Mar 2 20:09:32 2015 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Mar 3 00:03:59 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/alert_instances_mapper.js             | 1 +
 ambari-web/app/models/alert_instance.js                      | 1 +
 .../app/templates/common/modal_popups/alerts_popup.hbs       | 8 ++------
 ambari-web/app/templates/main/alerts/definition_details.hbs  | 8 ++------
 4 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/639a714b/ambari-web/app/mappers/alert_instances_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/alert_instances_mapper.js b/ambari-web/app/mappers/alert_instances_mapper.js
index 4f49bf9..9014892 100644
--- a/ambari-web/app/mappers/alert_instances_mapper.js
+++ b/ambari-web/app/mappers/alert_instances_mapper.js
@@ -30,6 +30,7 @@ App.alertInstanceMapper = App.QuickDataMapper.create({
     service_name: 'Alert.service_name',
     component_name: 'Alert.component_name',
     host_id: 'Alert.host_name',
+    host_name: 'Alert.host_name',
     scope: 'Alert.scope',
     original_timestamp: 'Alert.original_timestamp',
     latest_timestamp: 'Alert.latest_timestamp',

http://git-wip-us.apache.org/repos/asf/ambari/blob/639a714b/ambari-web/app/models/alert_instance.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert_instance.js b/ambari-web/app/models/alert_instance.js
index ac3b54b..46585b7 100644
--- a/ambari-web/app/models/alert_instance.js
+++ b/ambari-web/app/models/alert_instance.js
@@ -28,6 +28,7 @@ App.AlertInstance = DS.Model.extend({
   serviceName: DS.attr('string'),
   componentName: DS.attr('string'),
   host: DS.belongsTo('App.Host'),
+  hostName: DS.attr('string'),
   scope: DS.attr('string'),
   originalTimestamp: DS.attr('number'),
   latestTimestamp: DS.attr('number'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/639a714b/ambari-web/app/templates/common/modal_popups/alerts_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popups/alerts_popup.hbs b/ambari-web/app/templates/common/modal_popups/alerts_popup.hbs
index 9019597..a0f7808 100644
--- a/ambari-web/app/templates/common/modal_popups/alerts_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popups/alerts_popup.hbs
@@ -32,16 +32,12 @@
               <div class="alert-list-wrap">
                 <div class="alert-list-line-cursor">
                   <div class="service-text"><a href="#" {{action "gotoService" alertInstance.service target="view"}}>{{alertInstance.service.displayName}}</a>
-                    {{#if alertInstance.host.hostName}}
+                    {{#if alertInstance.hostName}}
                       {{#if alertInstance.service.displayName}}
                         &nbsp;/&nbsp;
                       {{/if}}
                       <a {{action "goToHostAlerts" alertInstance.host target="view"}} href="#">
-                        {{#if alertInstance.host.hostName}}
-                          {{alertInstance.host.hostName}}
-                        {{else}}
-                          {{alertInstance.host.id}}
-                        {{/if}}
+                        {{alertInstance.hostName}}
                       </a>
                     {{/if}}
                   </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/639a714b/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 27e579c..960cf04 100644
--- a/ambari-web/app/templates/main/alerts/definition_details.hbs
+++ b/ambari-web/app/templates/main/alerts/definition_details.hbs
@@ -190,16 +190,12 @@
                 <td class="first">
                   <a {{action goToService instance.service target="controller"}}
                       href="#">{{instance.service.displayName}}</a>
-                  {{#if instance.host.hostName}}
+                  {{#if instance.hostName}}
                     {{#if instance.service.displayName}}
                       &nbsp;/&nbsp;
                     {{/if}}
                     <a {{action goToHostAlerts instance.host target="controller"}} href="#">
-                      {{#if instance.host.hostName}}
-                      {{instance.host.hostName}}
-                    {{else}}
-                      {{instance.host.id}}
-                    {{/if}}
+                      {{instance.hostName}}
                     </a>
                   {{/if}}
                 </td>