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/06/07 09:36:03 UTC
[4/4] flink git commit: [FLINK-6661][web] Merge "Subtasks" and
"Taskmanagers" view
[FLINK-6661][web] Merge "Subtasks" and "Taskmanagers" view
This closes #3998.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c5955021
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c5955021
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c5955021
Branch: refs/heads/master
Commit: c595502148de7dc02a407480570f9e51df81b268
Parents: 762141e
Author: zentol <ch...@apache.org>
Authored: Fri May 26 13:41:03 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Wed Jun 7 11:33:30 2017 +0200
----------------------------------------------------------------------
.../app/partials/jobs/job.plan.jade | 3 -
.../jobs/job.plan.node-list.subtasks.jade | 8 ++-
.../jobs/job.plan.node-list.taskmanagers.jade | 56 ------------------
.../web-dashboard/app/scripts/index.coffee | 7 ---
.../app/scripts/modules/jobs/jobs.ctrl.coffee | 23 +++-----
.../web-dashboard/web/js/hs/index.js | 4 +-
flink-runtime-web/web-dashboard/web/js/index.js | 4 +-
.../web/partials/jobs/job.plan.html | 1 -
.../jobs/job.plan.node-list.subtasks.html | 7 ++-
.../jobs/job.plan.node-list.taskmanagers.html | 62 --------------------
10 files changed, 25 insertions(+), 150 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/c5955021/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
index c7d3142..25a5a25 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
@@ -28,9 +28,6 @@ split
a(ui-sref=".subtasks({nodeid: nodeid})") Subtasks
li(ui-sref-active='active')
- a(ui-sref=".taskmanagers({nodeid: nodeid})") Subtasks by TaskManager
-
- li(ui-sref-active='active')
a(ui-sref=".metrics({nodeid: nodeid})") Task Metrics
li(ui-sref-active='active')
http://git-wip-us.apache.org/repos/asf/flink/blob/c5955021/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.subtasks.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.subtasks.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.subtasks.jade
index 2067256..3bf6f1b 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.subtasks.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.subtasks.jade
@@ -15,6 +15,11 @@
See the License for the specific language governing permissions and
limitations under the License.
+
+label.checkbox-inline
+ input.checkbox-inline(type="checkbox", ng-model="aggregate", ngChange="getSubtasks()")
+ | Aggregate task statistics by TaskManager
+
table.table.table-body-hover.table-clickable.table-activable
thead
tr
@@ -53,4 +58,5 @@ table.table.table-body-hover.table-clickable.table-activable
bs-label(status="{{v.status}}") {{v.status}}
tr(ng-if="nodeid && v.id == nodeid")
td(colspan="11")
- div(ng-include=" 'partials/jobs/job.plan.node.subtasks.html' ")
+ div(ng-if="!aggregate" ng-include=" 'partials/jobs/job.plan.node.subtasks.html' ")
+ div(ng-if="aggregate" ng-include=" 'partials/jobs/job.plan.node.taskmanagers.html' ")
http://git-wip-us.apache.org/repos/asf/flink/blob/c5955021/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.taskmanagers.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.taskmanagers.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.taskmanagers.jade
deleted file mode 100644
index 86e5898..0000000
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.taskmanagers.jade
+++ /dev/null
@@ -1,56 +0,0 @@
-//
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-table.table.table-body-hover.table-clickable.table-activable
- thead
- tr
- th Start Time
- th End Time
- th Duration
- th Name
- th Bytes received
- th Records received
- th Bytes sent
- th Records sent
- th Parallelism
- th Tasks
- th Status
-
- tbody(ng-repeat="v in job.vertices" ng-class="{ active: v.id == nodeid }" ng-click="changeNode(v.id)")
- tr(ng-if="v.type == 'regular'")
- td
- span(ng-if="v['start-time'] > -1") {{ v['start-time'] | amDateFormat:'YYYY-MM-DD, H:mm:ss' }}
- td
- span(ng-if="v['end-time'] > -1") {{ v['end-time'] | amDateFormat:'YYYY-MM-DD, H:mm:ss' }}
- td
- span(ng-if="v.duration > -1" title="{{v.duration | humanizeDuration:false}}") {{v.duration | humanizeDuration:true}}
-
- td.td-long {{ v.name | humanizeText }}
- td(title="{{v.metrics['read-bytes']}} bytes") {{ v.metrics['read-bytes'] | humanizeBytes }}
- td {{ v.metrics['read-records'] | number }}
- td(title="{{v.metrics['write-bytes']}} bytes") {{ v.metrics['write-bytes'] | humanizeBytes }}
- td {{ v.metrics['write-records'] | number }}
- td {{ v.parallelism }}
- td
- .label-group
- bs-label(status="{{status}}" ng-repeat="(index, status) in stateList") {{v.tasks[status]}}
-
- td
- bs-label(status="{{v.status}}") {{v.status}}
- tr(ng-if="nodeid && v.id == nodeid")
- td(colspan="11")
- div(ng-include=" 'partials/jobs/job.plan.node.taskmanagers.html' ")
http://git-wip-us.apache.org/repos/asf/flink/blob/c5955021/flink-runtime-web/web-dashboard/app/scripts/index.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/index.coffee b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
index 52bb075..2331abb 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/index.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
@@ -128,13 +128,6 @@ angular.module('flinkApp', ['ui.router', 'angularMoment', 'dndLists'])
'node-details':
templateUrl: "partials/jobs/job.plan.node-list.watermarks.html"
- .state "single-job.plan.taskmanagers",
- url: "/taskmanagers"
- views:
- 'node-details':
- templateUrl: "partials/jobs/job.plan.node-list.taskmanagers.html"
- controller: 'JobPlanTaskManagersController'
-
.state "single-job.plan.accumulators",
url: "/accumulators"
views:
http://git-wip-us.apache.org/repos/asf/flink/blob/c5955021/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
index ebe8e98..517b00c 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
@@ -197,9 +197,15 @@ angular.module('flinkApp')
# --------------------------------------
.controller 'JobPlanSubtasksController', ($scope, JobsService) ->
+ $scope.aggregate = false
+
getSubtasks = ->
- JobsService.getSubtasks($scope.nodeid).then (data) ->
- $scope.subtasks = data
+ if $scope.aggregate
+ JobsService.getTaskManagers($scope.nodeid).then (data) ->
+ $scope.taskmanagers = data
+ else
+ JobsService.getSubtasks($scope.nodeid).then (data) ->
+ $scope.subtasks = data
if $scope.nodeid and (!$scope.vertex or !$scope.vertex.st)
getSubtasks()
@@ -209,19 +215,6 @@ angular.module('flinkApp')
# --------------------------------------
-.controller 'JobPlanTaskManagersController', ($scope, JobsService) ->
- getTaskManagers = ->
- JobsService.getTaskManagers($scope.nodeid).then (data) ->
- $scope.taskmanagers = data
-
- if $scope.nodeid and (!$scope.vertex or !$scope.vertex.st)
- getTaskManagers()
-
- $scope.$on 'reload', (event) ->
- getTaskManagers() if $scope.nodeid
-
-# --------------------------------------
-
.controller 'JobPlanAccumulatorsController', ($scope, JobsService) ->
getAccumulators = ->
JobsService.getAccumulators($scope.nodeid).then (data) ->