You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/01/20 05:39:27 UTC

[06/17] flink git commit: [FLINK-5329] Fix metric list being cut off

[FLINK-5329] Fix metric list being cut off


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8cdbe44a
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8cdbe44a
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8cdbe44a

Branch: refs/heads/release-1.2
Commit: 8cdbe44aea1f7e544e4a2907e5274012b1481c57
Parents: 792f7e4
Author: zentol <ch...@apache.org>
Authored: Thu Jan 12 18:52:56 2017 +0100
Committer: zentol <ch...@apache.org>
Committed: Thu Jan 19 21:42:00 2017 +0100

----------------------------------------------------------------------
 .../app/partials/jobs/job.plan.node-list.metrics.jade          | 6 +++---
 .../web-dashboard/app/scripts/common/filters.coffee            | 6 ++++++
 flink-runtime-web/web-dashboard/app/styles/metric.styl         | 2 ++
 3 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8cdbe44a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
index 18efbe9..fd7382f 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.metrics.jade
@@ -22,16 +22,16 @@ nav.navbar.navbar-default.navbar-secondary-additional.navbar-secondary-additiona
   .navbar-info {{ vertex.name }}
   .navbar-info {{ nodeid }}
 
-  .dropup.add-metrics(ng-if="availableMetrics.length")
+  .dropdown.add-metrics(ng-if="availableMetrics.length")
     button.btn.btn-default.navbar-btn.dropdown-toggle(type='button', data-toggle='dropdown')
       | Add metric
       | &nbsp;
       span.caret
     ul.dropdown-menu.dropdown-menu-right.metric-menu
       li(ng-repeat="metric in availableMetrics track by $index")
-        a(ng-click="addMetric(metric)") {{ metric.id }}
+        a(ng-click="addMetric(metric)") {{ metric.id | limit }}
 
-  .dropup.add-metrics(ng-if="!availableMetrics.length")
+  .dropdown.add-metrics(ng-if="!availableMetrics.length")
     button.btn.btn-default.navbar-btn.dropdown-toggle(type='button', data-toggle='dropdown', disabled='disabled')
       i No metrics available
 

http://git-wip-us.apache.org/repos/asf/flink/blob/8cdbe44a/flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee b/flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
index e7e831c..67b02e3 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
@@ -54,6 +54,12 @@ angular.module('flinkApp')
     else
       if short then return days + "d " + hours + "h" else return days + "d " + hours + "h " + minutes + "m " + seconds + "s"
 
+.filter "limit", ->
+  (text) ->
+    if (text.length > 73)
+      text = text.substring(0, 35) + "..." + text.substring(text.length - 35, text.length)
+    text
+
 .filter "humanizeText", ->
   (text) ->
     # TODO: extend... a lot

http://git-wip-us.apache.org/repos/asf/flink/blob/8cdbe44a/flink-runtime-web/web-dashboard/app/styles/metric.styl
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/styles/metric.styl b/flink-runtime-web/web-dashboard/app/styles/metric.styl
index 049c1b7..972352f 100644
--- a/flink-runtime-web/web-dashboard/app/styles/metric.styl
+++ b/flink-runtime-web/web-dashboard/app/styles/metric.styl
@@ -38,7 +38,9 @@
 
       .metric-menu
         max-height: 300px
+        max-width: 900px
         overflow-y: scroll
+        text-align: right
 
 $metric-row-height = 180px + 85px