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/04/28 18:34:45 UTC

git commit: AMBARI-5595. Flume Summary: message should be appeared if there is no records in the table. (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 287c66a89 -> 8471f06b4


AMBARI-5595. Flume Summary: message should be appeared if there is no records in the table. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 8471f06b4c63f1535d5b0af3ecf1947cacaee6ee
Parents: 287c66a
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Apr 28 19:31:20 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Apr 28 19:31:20 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  1 +
 ambari-web/app/styles/application.less          |  4 ++
 .../templates/main/service/services/flume.hbs   | 54 +++++++++++---------
 3 files changed, 36 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8471f06b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 6a43257..b1f78a7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1094,6 +1094,7 @@ Em.I18n.translations = {
   'services.service.summary.flume.stopAgent': 'Stop Agent',
   'services.service.summary.flume.stop.context': 'Stop Flume Agent {0}',
   'services.service.summary.flume.start.context': 'Start Flume Agent {0}',
+  'services.service.summary.flume.noAgents': 'No Flume Agents to display',
 
   'services.service.info.metrics.flume.channelFillPercent':'Channel Fill Percentage',
   'services.service.info.metrics.flume.channelSize':'Channel Size',

http://git-wip-us.apache.org/repos/asf/ambari/blob/8471f06b/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index c9f3943..206e5bf 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -6340,6 +6340,10 @@ i.icon-asterisks {
     .agent-row {
       cursor: pointer;
     }
+    .empty-label {
+      border-top: 1px solid #dddddd;
+      text-align: center
+    }
   }
   .flume-agents-actions {
     margin: 0 5px 5px 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8471f06b/ambari-web/app/templates/main/service/services/flume.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/flume.hbs b/ambari-web/app/templates/main/service/services/flume.hbs
index ddbb868..f9526ef 100644
--- a/ambari-web/app/templates/main/service/services/flume.hbs
+++ b/ambari-web/app/templates/main/service/services/flume.hbs
@@ -51,30 +51,38 @@
           {{/view}}
           </thead>
           <tbody>
-          {{#each agent in view.pageContent}}
-            {{#view view.agentView contentBinding="agent"}}
-              <td class="agent-status">
-                <span {{bindAttr class="agent.healthClass"}}></span>
+          {{#if view.pageContent}}
+            {{#each agent in view.pageContent}}
+              {{#view view.agentView contentBinding="agent"}}
+                <td class="agent-status">
+                  <span {{bindAttr class="agent.healthClass"}}></span>
+                </td>
+                <td class="agent-name">
+                  {{agent.name}}
+                </td>
+                <td class="agent-host-name">
+                  <a href="javascript:void(null)" {{action showDetails agent.host}}>
+                    {{agent.host.hostName}}
+                  </a>
+                </td>
+                <td>
+                  {{agent.sourcesCount}}
+                </td>
+                <td>
+                  {{agent.channelsCount}}
+                </td>
+                <td>
+                  {{agent.sinksCount}}
+                </td>
+              {{/view}}
+            {{/each}}
+          {{else}}
+            <tr>
+              <td colspan="6" class="empty-label">
+                {{t services.service.summary.flume.noAgents}}
               </td>
-              <td class="agent-name">
-                {{agent.name}}
-              </td>
-              <td class="agent-host-name">
-                <a href="javascript:void(null)" {{action showDetails agent.host}}>
-                  {{agent.host.hostName}}
-                </a>
-              </td>
-              <td>
-                {{agent.sourcesCount}}
-              </td>
-              <td>
-                {{agent.channelsCount}}
-              </td>
-              <td>
-                {{agent.sinksCount}}
-              </td>
-            {{/view}}
-          {{/each}}
+            </tr>
+          {{/if}}
           </tbody>
         </table>
       </div>