Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0566317D1B for ; Mon, 21 Sep 2015 11:31:27 +0000 (UTC) Received: (qmail 39813 invoked by uid 500); 21 Sep 2015 11:30:28 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 39727 invoked by uid 500); 21 Sep 2015 11:30:28 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 39646 invoked by uid 99); 21 Sep 2015 11:30:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2015 11:30:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 41771E027B; Mon, 21 Sep 2015 11:30:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sewen@apache.org To: commits@flink.apache.org Date: Mon, 21 Sep 2015 11:30:34 -0000 Message-Id: <3baaa3762e674a77817d4f72ab31e21b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [7/7] flink git commit: [FLINK-2357] [web dashboard] Fixed broken plan on second entry [FLINK-2357] [web dashboard] Fixed broken plan on second entry This closes #1148 Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/1ff8d04c Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/1ff8d04c Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/1ff8d04c Branch: refs/heads/master Commit: 1ff8d04c061670e3f226220f0fc08a6c6d4a1ceb Parents: a338ad0 Author: Piotr Godek Authored: Sat Sep 19 21:01:01 2015 +0200 Committer: Stephan Ewen Committed: Mon Sep 21 11:58:44 2015 +0200 ---------------------------------------------------------------------- .../app/scripts/modules/jobs/jobs.dir.coffee | 12 +- flink-runtime-web/web-dashboard/bower.json | 5 +- flink-runtime-web/web-dashboard/web/js/index.js | 13 +- .../web-dashboard/web/js/vendor.js | 62646 +++++++++-------- 4 files changed, 31343 insertions(+), 31333 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/1ff8d04c/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.dir.coffee ---------------------------------------------------------------------- diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.dir.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.dir.coffee index 11f9012..c9c9581 100644 --- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.dir.coffee +++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.dir.coffee @@ -351,7 +351,7 @@ angular.module('flinkApp') labelType: 'html' class: getNodeType(el, "") - createEdge = (g, data, el, existingNodes, pred) -> + createEdge = (g, data, el, existingNodes, pred, missingNodes) -> unless existingNodes.indexOf(pred.id) is -1 g.setEdge pred.id, el.id, label: createLabelEdge(pred) @@ -360,8 +360,9 @@ angular.module('flinkApp') else missingNode = searchForNode(data, pred.id) - unless !missingNode or missingNode.alreadyAdded is true - missingNode.alreadyAdded = true + + unless !missingNode or missingNodes.indexOf(missingNode.id) > -1 + missingNodes.push(missingNode.id) g.setNode missingNode.id, label: createLabelNode(missingNode, "mirror") labelType: 'html' @@ -373,6 +374,7 @@ angular.module('flinkApp') loadJsonToDagre = (g, data) -> existingNodes = [] + missingNodes = [] if data.nodes? # This is the normal json data @@ -415,7 +417,7 @@ angular.module('flinkApp') # create edges from inputs to current node if el.inputs? for pred in el.inputs - createEdge(g, data, el, existingNodes, pred) + createEdge(g, data, el, existingNodes, pred, missingNodes) g @@ -431,8 +433,6 @@ angular.module('flinkApp') return el.step_function[j] if el.step_function[j].id is nodeID drawGraph = (data) -> - # console.log data - g = new dagreD3.graphlib.Graph({ multigraph: true, compound: true }).setGraph({ nodesep: 70 edgesep: 0 http://git-wip-us.apache.org/repos/asf/flink/blob/1ff8d04c/flink-runtime-web/web-dashboard/bower.json ---------------------------------------------------------------------- diff --git a/flink-runtime-web/web-dashboard/bower.json b/flink-runtime-web/web-dashboard/bower.json index 0e9b557..6aaf4e4 100644 --- a/flink-runtime-web/web-dashboard/bower.json +++ b/flink-runtime-web/web-dashboard/bower.json @@ -14,13 +14,14 @@ "tests" ], "dependencies": { - "bootstrap": "~3.3.5", + "jquery": "~2.1.4", "angular": "~1.3.15", + "angular-moment": "~0.9.2", "angular-ui-router": "~0.2.13", + "bootstrap": "~3.3.5", "d3": "~3.5.5", "dagre-d3": "~0.4.10", "font-awesome": "~4.3.0", - "angular-moment": "~0.9.2", "moment-duration-format": "~1.3.0", "qtip2": "~2.2.1" },