You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/07/21 10:50:40 UTC

[dolphinscheduler] branch dev updated: [Improvement][Fix-5769][UI]When we try to delete the existing dag, the console in web browser would shows exception (#5770)

This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 8571461  [Improvement][Fix-5769][UI]When we try to delete the existing dag, the console in web browser would shows exception (#5770)
8571461 is described below

commit 8571461fe8c0eea9cdb9738be87e43f827f8e00f
Author: kyoty <ec...@gmail.com>
AuthorDate: Wed Jul 21 18:50:32 2021 +0800

    [Improvement][Fix-5769][UI]When we try to delete the existing dag, the console in web browser would shows exception (#5770)
    
    * fix bug
    
    * cache the this variable
    
    * Avoid self name
    
    * fix code style compile error
---
 dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
index e98cda2..66509a6 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js
@@ -110,6 +110,7 @@ Dag.prototype.toolbarEvent = function ({ item, code, is }) {
  * Echo data display
  */
 Dag.prototype.backfill = function (arg) {
+  const that = this
   if (arg) {
     const marginX = 100
     const g = new dagre.graphlib.Graph()
@@ -144,7 +145,7 @@ Dag.prototype.backfill = function (arg) {
         instance: this.instance,
         options: {
           onRemoveNodes ($id) {
-            this.dag.removeEventModelById($id)
+            that.dag.removeEventModelById($id)
           }
         }
       })
@@ -167,7 +168,7 @@ Dag.prototype.backfill = function (arg) {
         instance: this.instance,
         options: {
           onRemoveNodes ($id) {
-            this.dag.removeEventModelById($id)
+            that.dag.removeEventModelById($id)
           }
         }
       })