diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json
index 8d423aba..89bb7e63 100644
--- a/packages/ui/certd-client/package.json
+++ b/packages/ui/certd-client/package.json
@@ -55,7 +55,7 @@
"vue-cropperjs": "^5.0.0",
"vue-i18n": "^9.10.2",
"vue-router": "^4.3.0",
- "vuedraggable": "^2.24.3"
+ "vuedraggable": "^4.1.0"
},
"devDependencies": {
"@certd/pipeline": "^1.24.1",
diff --git a/packages/ui/certd-client/src/style/common.less b/packages/ui/certd-client/src/style/common.less
index fc950097..df082cf3 100644
--- a/packages/ui/certd-client/src/style/common.less
+++ b/packages/ui/certd-client/src/style/common.less
@@ -74,6 +74,9 @@ h1, h2, h3, h4, h5, h6 {
.ml-5{
margin-left:5px;
}
+.ml-10{
+ margin-left:10px;
+}
.ml-20{
margin-left:20px;
}
@@ -84,6 +87,9 @@ h1, h2, h3, h4, h5, h6 {
.mr-5{
margin-right: 5px;
}
+.mr-10{
+ margin-right: 10px;
+}
.mr-20{
margin-right: 20px;
}
diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue
index 1e2341f6..a477463c 100644
--- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue
+++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/task-form/index.vue
@@ -43,25 +43,22 @@
添加步骤
-
-
-
-
- 编辑
- 复制
+
+
+
+
+
+
{{ element.title }}
+
+
+
编辑
+
复制
删除
-
-
-
- {{ item.title }}
-
-
-
-
-
-
+
+
+
-
+
@@ -85,10 +82,10 @@ import { nanoid } from "nanoid";
import PiStepForm from "../step-form/index.vue";
import { Modal } from "ant-design-vue";
import { CopyOutlined } from "@ant-design/icons-vue";
-
+import VDraggable from "vuedraggable";
export default {
name: "PiTaskForm",
- components: { CopyOutlined, PiStepForm },
+ components: { CopyOutlined, PiStepForm, VDraggable },
props: {
editMode: {
type: Boolean,
@@ -268,5 +265,42 @@ export default {
.ant-list .ant-list-item .ant-list-item-meta .ant-list-item-meta-title {
margin: 0;
}
+ .ant-list .ant-list-item .ant-list-item-action {
+ display: flex;
+ > li {
+ display: flex;
+ align-items: center;
+ }
+ }
+ .step-list {
+ padding: 10px;
+ .icon-button {
+ font-size: 18px;
+ color: #1677ff;
+ cursor: pointer;
+ }
+
+ .step-row {
+ padding: 10px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .text {
+ display: flex;
+ > * {
+ margin: 0px;
+ margin-right: 15px;
+ }
+ }
+ .action {
+ display: flex;
+ align-items: center;
+ > * {
+ margin-right: 15px;
+ font-size: 14px;
+ }
+ }
+ }
+ }
}
diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue
index ad73f89f..a4c0d1c8 100644
--- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue
+++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/index.vue
@@ -67,59 +67,68 @@
-
-
-
-
-
-
-
-
-
-
{{ index + 1 }}. {{ item.title }}
-
-
-
-
-
- {{ task.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 并行任务
+
+
+
+
+
+
+
+
+
+
+
{{ index + 1 }}. {{ item.title }}
+
+
+
+
+
+ {{ task.title }}
+
+
+
-
+
+
+
-
-
+
+
+
+
+
@@ -235,6 +244,7 @@ import PiTriggerForm from "./component/trigger-form/index.vue";
import PiNotificationForm from "./component/notification-form/index.vue";
import PiTaskView from "./component/task-view/index.vue";
import PiStatusShow from "./component/status-show.vue";
+import VDraggable from "vuedraggable";
import _ from "lodash-es";
import { message, Modal, notification } from "ant-design-vue";
import { nanoid } from "nanoid";
@@ -245,7 +255,7 @@ import { FsIcon } from "@fast-crud/fast-crud";
export default defineComponent({
name: "PipelineEdit",
// eslint-disable-next-line vue/no-unused-components
- components: { FsIcon, PiHistoryTimelineItem, PiTaskForm, PiTriggerForm, PiTaskView, PiStatusShow, PiNotificationForm },
+ components: { FsIcon, PiHistoryTimelineItem, PiTaskForm, PiTriggerForm, PiTaskView, PiStatusShow, PiNotificationForm, VDraggable },
props: {
pipelineId: {
type: [Number, String],
@@ -785,14 +795,28 @@ export default defineComponent({
height: 100%;
z-index: 2;
- .copy {
+ .task-title {
+ &.in-edit {
+ margin-right: 28px;
+ }
+ }
+
+ .action {
position: absolute;
right: 60px;
top: 18px;
+ //font-size: 18px;
cursor: pointer;
+ z-index: 10;
&:hover {
color: #1890ff;
}
+ &.copy {
+ right: 80px;
+ }
+ &.drag {
+ right: 60px;
+ }
}
.ant-btn {
diff --git a/packages/ui/certd-server/src/plugins/plugin-host/lib/ssh.ts b/packages/ui/certd-server/src/plugins/plugin-host/lib/ssh.ts
index 6f09fba8..38420908 100644
--- a/packages/ui/certd-server/src/plugins/plugin-host/lib/ssh.ts
+++ b/packages/ui/certd-server/src/plugins/plugin-host/lib/ssh.ts
@@ -195,8 +195,8 @@ export class SshClient {
this.logger.info('请注意:windows下,文件目录分隔应该写成\\而不是/');
this.logger.info('--------------------------');
}
- const spec = await conn.exec('echo %COMSPEC%');
- if (spec.toString().trim() === '%COMSPEC%') {
+ const isCmd = await this.isCmd(conn);
+ if (!isCmd) {
mkdirCmd = `New-Item -ItemType Directory -Path "${filePath}" -Force`;
} else {
mkdirCmd = `if not exist "${filePath}" mkdir "${filePath}"`;