[FLINK-5329] Fix metric list being cut off This closes #3109.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/b8c34d45 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/b8c34d45 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/b8c34d45 Branch: refs/heads/master Commit: b8c34d455029907a237230e2f8c49a8b6b651970 Parents: cb05915 Author: zentol <ches...@apache.org> Authored: Thu Jan 12 18:52:56 2017 +0100 Committer: zentol <ches...@apache.org> Committed: Thu Jan 19 23:57:20 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/b8c34d45/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 | 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/b8c34d45/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/b8c34d45/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