[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 <ches...@apache.org> Authored: Thu Jan 12 18:52:56 2017 +0100 Committer: zentol <ches...@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 | 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