ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-22148 Style changes for service summary. (atkach)
Date Fri, 06 Oct 2017 09:55:01 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0f32765dc -> 3f0025253


AMBARI-22148 Style changes for service summary. (atkach)


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

Branch: refs/heads/trunk
Commit: 3f00252534e2dd4b08bd5d308757070fe849cba2
Parents: 0f32765
Author: Andrii Tkach <atkach@apache.org>
Authored: Thu Oct 5 17:56:44 2017 +0300
Committer: Andrii Tkach <atkach@apache.org>
Committed: Fri Oct 6 12:50:49 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                      |  6 ++--
 ambari-web/app/styles/application.less          |  2 +-
 .../app/templates/main/service/info/summary.hbs | 16 ++++++++-
 .../templates/main/service/services/hdfs.hbs    | 38 ++++++++++++--------
 .../app/views/main/service/info/summary.js      |  8 +++++
 .../app/views/main/service/services/hdfs.js     |  2 --
 6 files changed, 51 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index d0c7e39..7cde3d1 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -357,6 +357,7 @@ Em.I18n.translations = {
   'common.repositoryType': 'Repository Type',
   'common.rolling.downgrade': 'Rolling Downgrade',
   'common.express.downgrade': 'Express Downgrade',
+  'common.views': 'Views',
 
   'models.alert_instance.tiggered.verbose': "Occurred on {0} <br> Checked on {1}",
   'models.alert_definition.triggered.verbose': "Occurred on {0}",
@@ -2961,8 +2962,9 @@ Em.I18n.translations = {
   'dashboard.services.hdfs.nodes.heapUsed':'{0} / {1}',
 
   'dashboard.services.hdfs.chart.label':'Capacity (Used/Total)',
-  'dashboard.services.hdfs.blockErrors':'{0} / {1} / {2}',
-  'dashboard.services.hdfs.blockErrorsDesc':'corrupt replica / missing / under replicated',
+  'dashboard.services.hdfs.blockErrors.corrupt': 'corrupt replica',
+  'dashboard.services.hdfs.blockErrors.replicated': 'under replicated',
+  'dashboard.services.hdfs.blockErrors.missing': 'missing',
   'dashboard.services.hdfs.datanode.status.tooltip.live': 'This is the number of DataNodes
that are live as reported from ' +
     'the NameNode. Even if a DataNode process is up, NameNode might see the status as dead
' +
     'if the DataNode is not communicating with the NameNode as expected. This can be due
situations ' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 8181996..7c9cc8e 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -1083,7 +1083,7 @@ a:focus {
   .col-md-3 {
     min-height: 100px;
     margin-left: 2px;
-    min-width: 150px;
+    min-width: 180px;
   }
   .summary-label {
     font-size: 12px;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/templates/main/service/info/summary.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/info/summary.hbs b/ambari-web/app/templates/main/service/info/summary.hbs
index b1b0a42..075cae0 100644
--- a/ambari-web/app/templates/main/service/info/summary.hbs
+++ b/ambari-web/app/templates/main/service/info/summary.hbs
@@ -57,8 +57,8 @@
           <div class="col-md-4 col-lg-4 service-alerts">
             {{#if view.hasAlertDefinitions}}
               <span {{action "showServiceAlertsPopup" controller.content target="controller"}}
class="pull-right">
-                <i class="glyphicon glyphicon-bell"></i>
                 {{#if view.alertsCount}}
+                  <i class="glyphicon glyphicon-bell"></i>
                   <span {{bindAttr class=":label view.hasCriticalAlerts:alerts-crit-count:alerts-warn-count"}}>
                     {{view.alertsCount}}
                   </span>
@@ -118,6 +118,20 @@
           {{/if}}
         </div>
       {{/view}}
+      <div class="panel-heading">
+         <div class="row col-md-8 col-lg-12">
+           <h4 class="panel-title">{{t common.views}}</h4>
+         </div>
+      </div>
+      <div class="panel-body">
+       {{#if view.views.length}}
+         {{#each item in view.views}}
+           <a href="#" {{action "setView" item target="App.router.mainViewsController"}}>{{item.label}}</a>
+         {{/each}}
+       {{else}}
+         <span>{{t menu.item.views.noViews}}</span>
+       {{/if}}
+      </div>
     </div>
   </div>
   {{! widgets in the metrics panel are loaded seperately from summary page text information

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/templates/main/service/services/hdfs.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/service/services/hdfs.hbs b/ambari-web/app/templates/main/service/services/hdfs.hbs
index 967239d..fec5bac 100644
--- a/ambari-web/app/templates/main/service/services/hdfs.hbs
+++ b/ambari-web/app/templates/main/service/services/hdfs.hbs
@@ -64,17 +64,18 @@
             </div>
           {{else}}
             <div class="main-info">
-              <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live"
}}
-                      rel="tooltip">{{view.service.liveDataNodes.length}} </span>
/
-              <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead"
}}
-                      rel="tooltip">{{view.service.deadDataNodes.length}} </span>
/
-              <span {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission"
}}
-                      rel="tooltip">{{view.service.decommissionDataNodes.length}} </span>
-            </div>
-            <div class="info-desc">
-              <span {{t dashboard.services.hdfs.nodes.live}} </span> /
-              <span {{t dashboard.services.hdfs.nodes.dead}} </span> /
-              <span {{t dashboard.services.hdfs.nodes.decom}} </span>
+              <p {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.live"
}}
+                      rel="tooltip">
+                 {{view.service.liveDataNodes.length}}&nbsp;{{t dashboard.services.hdfs.nodes.live}}
+              </p>
+              <p {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.dead"
}}
+                      rel="tooltip">
+                 {{view.service.deadDataNodes.length}}&nbsp;{{t dashboard.services.hdfs.nodes.dead}}
+              </p>
+              <p {{translateAttr data-original-title="dashboard.services.hdfs.datanode.status.tooltip.decommission"
}}
+                      rel="tooltip">
+                {{view.service.decommissionDataNodes.length}}&nbsp;{{t dashboard.services.hdfs.nodes.decom}}
+              </p>
             </div>
           {{/if}}
         </div>
@@ -156,10 +157,17 @@
         <div class="summary-label">{{t services.service.summary.blocksTotal}}</div>
       </div>
       {{! Block Errors }}
-      <div class="row block-errors col-md-3">
-        <div class="summary-value">
-          <div class="main-info">{{view.blockErrorsMessage}}</div>
-          <div class="info-desc">{{t dashboard.services.hdfs.blockErrorsDesc}}</div>
+      <div class="row block-errors col-md-3 summary-value">
+        <div class="main-info">
+          <p>
+            {{view.dfsCorruptBlocks}}&nbsp;{{t dashboard.services.hdfs.blockErrors.corrupt}}
+          </p>
+          <p>
+            {{view.dfsMissingBlocks}}&nbsp;{{t dashboard.services.hdfs.blockErrors.missing}}
+          </p>
+          <p>
+            {{view.dfsUnderReplicatedBlocks}}&nbsp;{{t dashboard.services.hdfs.blockErrors.replicated}}
+          </p>
         </div>
         <div class="summary-label">{{t services.service.summary.blockErrors}}</div>
       </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 69e339a..91b2ca3 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -61,6 +61,14 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.Persist, App.TimeRangeMixin,
    *  <code>loadServiceSummary()</code>
    */
   serviceSummaryView: null,
+
+  /**
+   * @type {App.ViewInstance}
+   */
+  views: function () {
+    return App.router.get('loggedIn') ? App.router.get('mainViewsController.visibleAmbariViews')
: [];
+  }.property('App.router.mainViewsController.visibleAmbariViews.[]', 'App.router.loggedIn'),
+
   /**
    * @property {Object} serviceCustomViewsMap - custom views to embed
    *

http://git-wip-us.apache.org/repos/asf/ambari/blob/3f002525/ambari-web/app/views/main/service/services/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js
index e0580f1..8f6ba6f 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -111,8 +111,6 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
 
   dfsUnderReplicatedBlocks: Em.computed.formatUnavailable('service.dfsUnderReplicatedBlocks'),
 
-  blockErrorsMessage: Em.computed.i18nFormat('dashboard.services.hdfs.blockErrors', 'dfsCorruptBlocks',
'dfsMissingBlocks', 'dfsUnderReplicatedBlocks'),
-
   nodeUptime: function () {
     var uptime = this.get('service.nameNodeStartTime');
     if (uptime && uptime > 0){


Mime
View raw message