diff --git a/orion-ops-vue/src/lib/api.js b/orion-ops-vue/src/lib/api.js index d25a9c5e..2a8def75 100644 --- a/orion-ops-vue/src/lib/api.js +++ b/orion-ops-vue/src/lib/api.js @@ -391,14 +391,16 @@ const $api = { * sftp 检查文件是否存在 */ sftpCheckFilePresent: param => { - return $http.$post('/sftp/check-present', param) + return $http.$post('/sftp/check-present', param, { + timeout: 18000000 + }) }, /** - * sftp 获取上传文件fileToken + * sftp 获取上传文件 accessToken */ getSftpUploadToken: param => { - return $http.$post(`/sftp/upload/${param.sessionToken}/token`, param) + return $http.$post('/sftp/upload/token', param) }, /** @@ -752,7 +754,7 @@ const $api = { * 执行提交 */ submitExecTask: param => { - return $http.$post('/exec/submit', param, { + return $http.$post('/batch-exec/submit', param, { timeout: 600000, loading: '正在提交...' }) @@ -762,28 +764,28 @@ const $api = { * 执行列表 */ getExecList: param => { - return $http.$post('/exec/list', param) + return $http.$post('/batch-exec/list', param) }, /** * 执行详情 */ getExecDetail: param => { - return $http.$post('/exec/detail', param) + return $http.$post('/batch-exec/detail', param) }, /** * 执行输入 */ writeExecTask: param => { - return $http.$post('/exec/write', param) + return $http.$post('/batch-exec/write', param) }, /** * 执行停止 */ terminateExecTask: param => { - return $http.$post('/exec/terminate', param, { + return $http.$post('/batch-exec/terminate', param, { loading: '正在停止...' }) }, @@ -792,7 +794,7 @@ const $api = { * 删除执行任务 */ deleteExecTask: param => { - return $http.$post('/exec/delete', param, { + return $http.$post('/batch-exec/delete', param, { loading: '正在删除...' }) }, @@ -801,11 +803,38 @@ const $api = { * 获取执行状态 */ getExecTaskStatus: param => { - return $http.$post('/exec/list-status', param, { + return $http.$post('/batch-exec/list-status', param, { skipErrorMessage: true }) }, + /** + * 批量上传检查机器以及文件 + */ + checkBatchUploadFiles: param => { + return $http.$post('/batch-upload/check', param, { + timeout: 18000000 + }) + }, + + /** + * 获取批量上传 token + */ + getBatchUploadToken: param => { + return $http.$post('/batch-upload/token', param, { + timeout: 18000000 + }) + }, + + /** + * 执行批量上传 + */ + execBatchUpload: param => { + return $http.$post('/batch-upload/exec', param, { + timeout: 18000000 + }) + }, + /** * 新增模板 */ @@ -1272,6 +1301,13 @@ const $api = { }) }, + /** + * 应用构建输入命令 + */ + writeAppBuild: param => { + return $http.$post('/app-build/write', param) + }, + /** * 删除应用构建 */ @@ -1437,6 +1473,13 @@ const $api = { }) }, + /** + * 应用发布机器输入命令 + */ + writeAppReleaseMachine: param => { + return $http.$post('/app-release/write-machine', param) + }, + /** * 应用发布列表状态 */ diff --git a/orion-ops-vue/src/lib/enum.js b/orion-ops-vue/src/lib/enum.js index 9eb90649..55640ce1 100644 --- a/orion-ops-vue/src/lib/enum.js +++ b/orion-ops-vue/src/lib/enum.js @@ -2016,6 +2016,75 @@ const $enum = { value: 60, label: '跳过' } + }, + + /** + * 批量上传状态 + */ + BATCH_UPLOAD_STATUS: { + WAIT: { + value: 10, + loading: false, + mask: false, + checked: false, + visibleTransfer: false, + message: '点击上传按钮开始上传', + type: 'info' + }, + CHECKING: { + value: 20, + loading: true, + mask: true, + checked: false, + visibleTransfer: false, + message: '正在检查文件...', + type: 'info' + }, + REQUESTING: { + value: 30, + loading: true, + mask: true, + checked: false, + visibleTransfer: false, + message: '正在请求上传...', + type: 'info' + }, + WAIT_UPLOAD: { + value: 40, + loading: true, + mask: false, + checked: true, + visibleTransfer: false, + message: '等待上传中...', + type: 'info' + }, + UPLOADING: { + value: 50, + loading: true, + mask: false, + checked: false, + visibleTransfer: true, + message: '文件上传中... 清空或页面关闭则在后台继续上传', + type: 'info' + }, + ERROR: { + value: 60, + loading: false, + mask: false, + checked: false, + visibleTransfer: false, + message: '文件上传失败, 请重试', + type: 'error' + }, + NO_AVAILABLE: { + value: 70, + loading: false, + mask: false, + checked: false, + visibleTransfer: false, + message: '无可用上传机器, 请重新选择后重试', + type: 'error' + } } } diff --git a/orion-ops-vue/src/router/index.js b/orion-ops-vue/src/router/index.js index fb07a024..6a195277 100644 --- a/orion-ops-vue/src/router/index.js +++ b/orion-ops-vue/src/router/index.js @@ -204,6 +204,11 @@ const routes = [ name: 'BatchExecAdd', component: () => import('../views/exec/AddBatchExecTask') }, + { + path: '/batch/upload', + name: 'BatchUploadFile', + component: () => import('../views/exec/BatchUploadFile') + }, { path: '/log/list', name: 'loggerList', diff --git a/orion-ops-vue/src/views/exec/BatchUploadFile.vue b/orion-ops-vue/src/views/exec/BatchUploadFile.vue new file mode 100644 index 00000000..1d0cda1c --- /dev/null +++ b/orion-ops-vue/src/views/exec/BatchUploadFile.vue @@ -0,0 +1,588 @@ + + + + + + + + + + + + 上传机器 + + + + 已选择 {{ machineIdList.length }} 台机器 + + + 确定 + + + + + + + 上传路径 + + + + + + + + + + + + + 单击或拖动文件到此区域进行上传 + + + + + 上传 + 清空 + + + + + + + + + + + + + + + {{ status.message }} + + + 清空 + + + + + + 无法连接的机器 + + + {{ notConnectedMachine.name }} + {{ `(${notConnectedMachine.host})` }} + + + + + 重复文件的机器 + + + + {{ machinePresentFile.name }} + {{ `(${machinePresentFile.host})` }} + + + + + {{ file }} + + + + + + + + 放弃上传 + + + 继续上传 + + + 继续上传 + + + + + + + + + + + + + {{ item.remoteFile }} + + + + {{ formatMachine(item.machineId) }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 开始 + + + 暂停 + + + 重试 + + + 删除 + + + + + + + + + + + + +
+ +
单击或拖动文件到此区域进行上传
无法连接的机器
+ + {{ notConnectedMachine.name }} + {{ `(${notConnectedMachine.host})` }} +
重复文件的机器
+ {{ file }} +