flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [35/51] [abbrv] flink git commit: [FLINK-2357] [web dashboard] New node organization
Date Thu, 17 Sep 2015 18:20:07 GMT
[FLINK-2357] [web dashboard] New node organization


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

Branch: refs/heads/master
Commit: 46d82177fd511de044c06b4fb876e0d1bf2eaa3c
Parents: 6d873e6
Author: Piotr Godek <piotr.godek@gmail.com>
Authored: Tue Sep 1 00:01:34 2015 +0200
Committer: Stephan Ewen <sewen@apache.org>
Committed: Thu Sep 17 14:21:52 2015 +0200

----------------------------------------------------------------------
 .../app/partials/jobs/job.exceptions.jade       |  4 +-
 .../app/partials/jobs/job.plan.jade             |  2 +-
 .../app/partials/jobs/job.plan.node-list.jade   | 51 +++++++++++++++
 .../app/partials/jobs/job.plan.node-tabs.jade   | 10 +++
 .../jobs/job.plan.node.accumulators.jade        |  2 +-
 .../app/partials/jobs/job.plan.node.jade        |  3 -
 .../partials/jobs/job.plan.node.properties.jade |  1 -
 .../web-dashboard/app/scripts/index.coffee      | 58 +++++++++++++----
 .../app/scripts/modules/jobs/jobs.ctrl.coffee   | 48 ++++++++++++--
 .../app/scripts/modules/jobs/jobs.svc.coffee    |  8 +--
 .../web-dashboard/app/styles/graph.styl         |  7 +--
 .../web-dashboard/app/styles/job.styl           |  6 ++
 .../web-dashboard/web/css/index.css             |  8 ++-
 flink-runtime-web/web-dashboard/web/js/index.js | 66 ++++++++++++--------
 .../web/partials/jobs/job.plan.html             |  2 +-
 .../web/partials/jobs/job.plan.node-list.html   | 57 +++++++++++++++++
 .../web/partials/jobs/job.plan.node-nav.html    |  0
 .../web/partials/jobs/job.plan.node-tabs.html   | 10 +++
 .../jobs/job.plan.node.accumulators.html        |  2 +-
 .../partials/jobs/job.plan.node.properties.html |  1 -
 20 files changed, 281 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
index 0ea4c7f..66606e6 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.exceptions.jade
@@ -22,7 +22,7 @@
 
   .panel-body
     pre.exception
-      {{ exceptions['root-exception'] }}
+      | {{ exceptions['root-exception'] }}
 
 .panel.panel-default.panel-multi(ng-repeat="exception in exceptions['all-exceptions']" )
   .panel-heading.clearfix
@@ -35,4 +35,4 @@
 
   .panel-body
     pre.exception
-      {{ exception.exception }}
+      | {{ exception.exception }}

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/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 ea0c1b2..582d7e6 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
@@ -18,4 +18,4 @@
 .canvas-wrapper
   div.main-canvas(job-plan, plan="plan", jobid="{{jobid}}")
 
-div(ui-view="node")
+div(ui-view="node-tabs")

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.jade
new file mode 100644
index 0000000..5621336
--- /dev/null
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.jade
@@ -0,0 +1,51 @@
+//
+  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-hover.table-clickable.table-activable
+  thead
+    tr
+      th Start Time
+      th End Time
+      th Duration
+      th Name
+      th Bytes read
+      th Records read
+      th Bytes written
+      th Records written
+      th Tasks
+      th Status
+
+  tbody
+    //- tr(ng-repeat="v in job.vertices" ng-class="{ active: job.currentNode && v.id
== job.currentNode.id }" id="vertex-row-{{v.id}}" ng-click="changeNode(v.id)")
+    tr(ng-repeat="v in job.vertices" ng-class="{ active: job.currentNode && v.id
== job.currentNode.id }" id="vertex-row-{{v.id}}" ui-sref="{nodeid: v.id}")
+      td
+        | {{ v['start-time'] | amDateFormat:'YYYY-MM-DD, H:mm:ss' }}
+        div(ui-view="node")
+
+      td {{ v['end-time'] | amDateFormat:'YYYY-MM-DD, H:mm:ss' }}
+      td {{ v.duration }} ms
+      td {{ v.name | humanizeTaskName }}
+      td {{ v.metrics['read-bytes'] }}
+      td {{ v.metrics['read-records'] }}
+      td {{ v.metrics['write-bytes'] }}
+      td {{ v.metrics['write-records'] }}
+      td
+        .label-group
+          bs-label(status="{{status}}" ng-repeat="(index, status) in stateList") {{v.tasks[status]}}
+
+      td 
+        bs-label(status="{{v.status}}") {{v.status}}

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-tabs.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-tabs.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-tabs.jade
new file mode 100644
index 0000000..57b7d24
--- /dev/null
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-tabs.jade
@@ -0,0 +1,10 @@
+.panel.panel-default.panel-multi(ng-if="node")
+  nav.navbar.navbar-default.navbar-secondary-additional(ng-if="job.currentNode")
+    ul.nav.nav-tabs
+      li(ui-sref-active='active')
+        a(ui-sref=".generic({nodeid: nodeid})") Subtasks
+
+      li(ui-sref-active='active')
+        a(ui-sref=".properties({nodeid: nodeid})") Properties
+
+  div.panel-body.clean(ui-view="node-details")

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.accumulators.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.accumulators.jade
b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.accumulators.jade
index a50b134..67d0921 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.accumulators.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.accumulators.jade
@@ -15,4 +15,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
-h1 Accumulators
+h3 Accumulators

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.jade b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.jade
index f72f412..3c5ed0f 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.jade
@@ -45,6 +45,3 @@
 
   .panel-body.clean
     div(ui-view="nodeTab")
-
-
-

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.properties.jade
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.properties.jade
b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.properties.jade
index 19d5c0d..6427ab3 100644
--- a/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.properties.jade
+++ b/flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node.properties.jade
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
-
 .row(ng-if="node")
  .col-sm-6.col-md-4
    table.table.table-properties(ng-if="node.optimizer_properties.global_properties")

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/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 63b5bf2..806a2a1 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/index.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/index.coffee
@@ -49,6 +49,11 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
 
 # --------------------------------------
 
+.config ($uiViewScrollProvider) ->
+  $uiViewScrollProvider.useAnchorScroll()
+
+# --------------------------------------
+
 .config ($stateProvider, $urlRouterProvider) ->
   $stateProvider.state "overview",
     url: "/overview"
@@ -90,27 +95,56 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
     url: "/vertex/{nodeid}"
     abstract: true
     views:
-      node:
-        templateUrl: "partials/jobs/job.plan.node.html"
-        controller: 'JobPlanNodeController'
+      'node-tabs':
+        templateUrl: "partials/jobs/job.plan.node-tabs.html"
+        controller: 'JobPlanNodeTabsController'
 
-  .state "single-job.plan.node.subtasks",
+  .state "single-job.plan.node.generic",
     url: ""
     views:
-      nodeTab:
-        templateUrl: "partials/jobs/job.plan.node.subtasks.html"
+      'node-details':
+        controller: 'JobPlanNodeListController' 
+        templateUrl: "partials/jobs/job.plan.node-list.html"
 
   .state "single-job.plan.node.properties",
     url: "/properties"
     views:
-      nodeTab:
+      'node-details':
+        controller: 'JobPlanNodePropertiesController'
         templateUrl: "partials/jobs/job.plan.node.properties.html"
 
-  .state "single-job.plan.node.accumulators",
-    url: "/properties"
-    views:
-      nodeTab:
-        templateUrl: "partials/jobs/job.plan.node.accumulators.html"
+  # .state "single-job.plan.node.accumulators",
+  #   url: "/accumulators"
+  #   views:
+  #     'node-contents':
+  #       controller: 'JobPlanNodeAccumulatorsController'
+  #       templateUrl: "partials/jobs/job.plan.node.accumulators.html"
+
+  # .state "single-job.plan.node",
+  #   url: "/vertex/{nodeid}"
+  #   abstract: true
+  #   views:
+  #     node:
+  #       templateUrl: "partials/jobs/job.plan.node.html"
+  #       controller: 'JobPlanNodeController'
+
+  # .state "single-job.plan.node.subtasks",
+  #   url: ""
+  #   views:
+  #     nodeTab:
+  #       templateUrl: "partials/jobs/job.plan.node.subtasks.html"
+
+  # .state "single-job.plan.node.properties",
+  #   url: "/properties"
+  #   views:
+  #     nodeTab:
+  #       templateUrl: "partials/jobs/job.plan.node.properties.html"
+
+  # .state "single-job.plan.node.accumulators",
+  #   url: "/properties"
+  #   views:
+  #     nodeTab:
+  #       templateUrl: "partials/jobs/job.plan.node.accumulators.html"
 
   .state "single-job.timeline",
     url: "/timeline"

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/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 d74f781..127cec1 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
@@ -45,30 +45,68 @@ angular.module('flinkApp')
 .controller 'SingleJobController', ($scope, $state, $stateParams, JobsService, $rootScope)
->
   $scope.jobid = $stateParams.jobid
   $rootScope.job = null
+  $rootScope.plan = null
 
   JobsService.loadJob($stateParams.jobid).then (data) ->
     $rootScope.job = data
+    $rootScope.plan = data.plan
 
   $scope.$on '$destroy', ->
     $rootScope.job = null
+    $rootScope.plan = null
 
 # --------------------------------------
 
 .controller 'JobPlanController', ($scope, $state, $stateParams, JobsService) ->
-  JobsService.loadPlan($stateParams.jobid).then (data) ->
-    $scope.plan = data
+  console.log 'JobPlanController'
+
+  $scope.stateList = JobsService.stateList()
 
 # --------------------------------------
 
-.controller 'JobPlanNodeController', ($scope, $state, $stateParams, JobsService) ->
+.controller 'JobPlanNodeController', ($scope, $state, $stateParams, JobsService, $anchorScroll)
->
+  console.log 'JobPlanNodeController'
+
   $scope.nodeid = $stateParams.nodeid
+
   $scope.stateList = JobsService.stateList()
 
   JobsService.getNode($scope.nodeid).then (data) ->
     $scope.node = data
+    $scope.job.currentNode = data
 
-  JobsService.getVertex($scope.nodeid).then (data) ->
-    $scope.vertex = data
+    # anchor = "vertex-row-" + data.id
+    # console.log anchor
+    # $anchorScroll(anchor)
+
+# --------------------------------------
+
+.controller 'JobPlanNodeTabsController', ($scope, $stateParams, JobsService) ->
+  console.log 'JobPlanNodeTabsController'
+
+  $scope.nodeid = $stateParams.nodeid
+
+  JobsService.getNode($scope.nodeid).then (data) ->
+    $scope.node = data
+    $scope.job.currentNode = data
+
+# --------------------------------------
+
+.controller 'JobPlanNodeListController', ($scope, $stateParams, JobsService) ->
+  console.log 'JobPlanNodeListController'
+
+  # $scope.nodeid = $stateParams.nodeid
+  $scope.stateList = JobsService.stateList()
+
+# --------------------------------------
+
+.controller 'JobPlanNodePropertiesController', ($scope, $state, $stateParams, JobsService)
->
+  console.log 'JobPlanNodePropertiesController'
+
+# --------------------------------------
+
+.controller 'JobPlanNodeAccumulatorsController', ($scope, $state, $stateParams, JobsService)
->
+  console.log 'JobPlanNodeAccumulatorsController'
 
 # --------------------------------------
 

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
index 2290261..f1a2e95 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
@@ -146,10 +146,10 @@ angular.module('flinkApp')
 
     deferred = $q.defer()
 
-    $q.all([deferreds.plan.promise, deferreds.job.promise]).then (data) =>
-      foundNode = seekNode(nodeid, currentPlan.nodes)
-
-      # $http.get flinkConfig.jobServer + "/jobsInfo?get=groupvertex&job=" + currentJob.jid
+ "&groupvertex=" + nodeid
+    # $q.all([deferreds.plan.promise, deferreds.job.promise]).then (data) =>
+    $q.all([deferreds.job.promise]).then (data) =>
+      # foundNode = seekNode(nodeid, currentPlan.nodes)
+      foundNode = seekNode(nodeid, currentJob.plan.nodes)
 
       foundNode.vertex = @seekVertex(nodeid)
 

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/styles/graph.styl
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/styles/graph.styl b/flink-runtime-web/web-dashboard/app/styles/graph.styl
index 54e290c..3753f69 100644
--- a/flink-runtime-web/web-dashboard/app/styles/graph.styl
+++ b/flink-runtime-web/web-dashboard/app/styles/graph.styl
@@ -34,6 +34,7 @@ svg.graph
       stroke-width 5px
       fill #fff
       margin: 0
+      padding: 0
       
     &[active]
       > rect
@@ -79,14 +80,10 @@ svg.graph
     margin: 0
 
   .edge-label
-    padding: 5px
+    // padding: 5px
     font-size: 14px
-    // border: 2px solid
     
   .node-label
     display: block
-    // border-width: 4px
-    // border-style: solid
-    // padding: 10px
     margin: 0
     text-decoration: none

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/app/styles/job.styl
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/styles/job.styl b/flink-runtime-web/web-dashboard/app/styles/job.styl
index 4c16ee9..4259824 100644
--- a/flink-runtime-web/web-dashboard/app/styles/job.styl
+++ b/flink-runtime-web/web-dashboard/app/styles/job.styl
@@ -39,6 +39,12 @@
       white-space: nowrap
       overflow: hidden
       text-overflow: ellipsis
+      
+  &.table-activable
+    tr
+      border-left: 2px solid transparent
+      &.active
+        border-left: 2px solid #000000
 
 
 .label-group

http://git-wip-us.apache.org/repos/asf/flink/blob/46d82177/flink-runtime-web/web-dashboard/web/css/index.css
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/web/css/index.css b/flink-runtime-web/web-dashboard/web/css/index.css
index 8d4f45c..eca32cd 100644
--- a/flink-runtime-web/web-dashboard/web/css/index.css
+++ b/flink-runtime-web/web-dashboard/web/css/index.css
@@ -349,6 +349,12 @@ pre.exception {
   -o-text-overflow: ellipsis;
   text-overflow: ellipsis;
 }
+.table.table-activable tr {
+  border-left: 2px solid transparent;
+}
+.table.table-activable tr.active {
+  border-left: 2px solid #000;
+}
 .label-group .label {
   display: inline-block;
   width: 2em;
@@ -377,6 +383,7 @@ svg.graph .node > rect {
   stroke-width: 5px;
   fill: #fff;
   margin: 0;
+  padding: 0;
 }
 svg.graph .node[active] > rect {
   fill: #eee;
@@ -415,7 +422,6 @@ svg.graph .label {
   margin: 0;
 }
 svg.graph .edge-label {
-  padding: 5px;
   font-size: 14px;
 }
 svg.graph .node-label {


Mime
View raw message