@@ -38,6 +41,7 @@
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.scss b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.scss
index 03578f32d9..155083c0fc 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.scss
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.scss
@@ -110,4 +110,18 @@
}
}
}
+
+ .process-online-tag{
+ margin-left: 10px;
+ }
+
+ .search-box{
+ width: 0;
+ overflow: hidden;
+ transition: all 0.5s;
+
+ &.visible{
+ width: 200px;
+ }
+ }
}
diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue
index 4071fd955b..d8f57ad959 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/toolbar.vue
@@ -23,76 +23,111 @@
:content="$t('Copy name')"
placement="bottom"
>
-
+
+ {{ $t("processOnline") }}
-
+ >
-
+ >
diff --git a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
index a78df485ac..fda65d9fd7 100644
--- a/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -18,6 +18,16 @@
import _ from 'lodash'
import io from '@/module/io'
+// Avoid passing in illegal values when users directly call third-party interfaces
+const convertLocations = (locationStr) => {
+ let locations = null
+ if (!locationStr) return locations
+ try {
+ locations = JSON.parse(locationStr)
+ } catch (error) {}
+ return Array.isArray(locations) ? locations : null
+}
+
export default {
/**
* Task status acquisition
@@ -133,12 +143,14 @@ export default {
state.version = res.data.processDefinition.version
// name
state.name = res.data.processDefinition.name
+ // releaseState
+ state.releaseState = res.data.processDefinition.releaseState
// description
state.description = res.data.processDefinition.description
// taskRelationJson
state.connects = res.data.processTaskRelationList
// locations
- state.locations = JSON.parse(res.data.processDefinition.locations)
+ state.locations = convertLocations(res.data.processDefinition.locations)
// global params
state.globalParams = res.data.processDefinition.globalParamList
// timeout
@@ -164,6 +176,7 @@ export default {
'timeout',
'environmentCode'
]))
+
resolve(res.data)
}).catch(res => {
reject(res)
@@ -235,7 +248,7 @@ export default {
// connects
state.connects = processTaskRelationList
// locations
- state.locations = JSON.parse(processDefinition.locations)
+ state.locations = convertLocations(processDefinition.locations)
// global params
state.globalParams = processDefinition.globalParamList
// timeout