Browse Source

[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
2.0.7-release
kyoty 3 years ago committed by GitHub
parent
commit
8571461fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js

5
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 * Echo data display
*/ */
Dag.prototype.backfill = function (arg) { Dag.prototype.backfill = function (arg) {
const that = this
if (arg) { if (arg) {
const marginX = 100 const marginX = 100
const g = new dagre.graphlib.Graph() const g = new dagre.graphlib.Graph()
@ -144,7 +145,7 @@ Dag.prototype.backfill = function (arg) {
instance: this.instance, instance: this.instance,
options: { options: {
onRemoveNodes ($id) { onRemoveNodes ($id) {
this.dag.removeEventModelById($id) that.dag.removeEventModelById($id)
} }
} }
}) })
@ -167,7 +168,7 @@ Dag.prototype.backfill = function (arg) {
instance: this.instance, instance: this.instance,
options: { options: {
onRemoveNodes ($id) { onRemoveNodes ($id) {
this.dag.removeEventModelById($id) that.dag.removeEventModelById($id)
} }
} }
}) })

Loading…
Cancel
Save