From aa1c8b54627ea73eaff5204ddcfb7194058e3ac8 Mon Sep 17 00:00:00 2001 From: zqburde Date: Thu, 8 Jun 2023 15:42:43 +0800 Subject: [PATCH 001/180] Fix bug. --- .../publish/job/CommonUpdateConvertJobStatus.java | 7 +++++-- .../orchestrator/common/entity/OrchestratorPublishJob.java | 6 ++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java b/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java index 8780e725bd..f0ee73481a 100644 --- a/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java +++ b/dss-framework/framework-plugins/dss-framework-orchestrator-publish/src/main/java/com/webank/wedatasphere/dss/orchestrator/publish/job/CommonUpdateConvertJobStatus.java @@ -36,8 +36,11 @@ public void toSuccessStatus(OrchestratorPublishJob orchestratorPublishJob) { public void toFailedStatus(OrchestratorPublishJob orchestratorPublishJob, String errorMsg) { orchestratorPublishJob.setStatus(JobStatus.Failed.getStatus()); - orchestratorPublishJob.setErrorMsg(errorMsg); + if (errorMsg.length() > 2048) { + orchestratorPublishJob.setErrorMsg(errorMsg.substring(0, 2048)); + } else { + orchestratorPublishJob.setErrorMsg(errorMsg); + } updateConvertJobStatus(orchestratorPublishJob); } - } diff --git a/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java b/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java index d852b45b7d..abae42b27c 100644 --- a/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java +++ b/dss-orchestrator/dss-orchestrator-common/src/main/java/com/webank/wedatasphere/dss/orchestrator/common/entity/OrchestratorPublishJob.java @@ -41,18 +41,16 @@ public String getJobId() { return jobId; } - public OrchestratorPublishJob setJobId(String jobId) { + public void setJobId(String jobId) { this.jobId = jobId; - return this; } public String getConversionJobJson() { return conversionJobJson; } - public OrchestratorPublishJob setConversionJobJson(String conversionJobJson) { + public void setConversionJobJson(String conversionJobJson) { this.conversionJobJson = conversionJobJson; - return this; } public Date getCreateTime() { From 2a51f5481c675cfb2d9c89fc0504b450c4d6c760 Mon Sep 17 00:00:00 2001 From: ryanlei Date: Sat, 10 Jun 2023 01:12:08 +0800 Subject: [PATCH 002/180] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=8F=90=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/packages/apiServices/i18n/en.json | 5 + web/packages/apiServices/i18n/zh.json | 5 + .../module/apiServices/apiCard.vue | 45 +- .../apiServices/module/apiServices/index.vue | 24 +- .../component/APIVersions.vue | 11 +- .../component/TokenAuthorization.vue | 16 + .../module/servicesMangement/index.vue | 11 +- web/packages/apiServices/router.js | 8 + .../apiServices/view/servicesSubmit/index.vue | 393 ++++++++++++++++++ .../open-source/scriptis/apiPublish/index.vue | 176 +++----- .../components/consoleComponent/result.vue | 2 +- 11 files changed, 555 insertions(+), 141 deletions(-) create mode 100644 web/packages/apiServices/view/servicesSubmit/index.vue diff --git a/web/packages/apiServices/i18n/en.json b/web/packages/apiServices/i18n/en.json index ea3eceb9d0..ea6c18c296 100644 --- a/web/packages/apiServices/i18n/en.json +++ b/web/packages/apiServices/i18n/en.json @@ -69,6 +69,7 @@ "applicant": "Applicant:", "status": "Status", "find": "Find", + "approve": "Submit Approval", "path": "API Path:", "submitter": "Submitter", "scriptsPath": "Scripts Path:" @@ -93,6 +94,8 @@ "reason": "Reason", "ip_whitelist": "Ip Whitelist", "apply_time": "Apply Time", + "applySource": "Apply Source", + "proxyExecuteUser": "Execute User", "caller": "Caller", "access": "Access", "version": "Version", @@ -133,6 +136,8 @@ "disable": "Stop", "normal": "Normal", "expired": "Expired", + "submited": "已提单", + "unsubmit": "未提单", "all": "All", "updateApiModal": { "modalTitle": "Update API", diff --git a/web/packages/apiServices/i18n/zh.json b/web/packages/apiServices/i18n/zh.json index 3ed8a18b80..96998a7b82 100644 --- a/web/packages/apiServices/i18n/zh.json +++ b/web/packages/apiServices/i18n/zh.json @@ -71,6 +71,7 @@ "path": "API路径:", "submitter": "提交人", "find": "查询", + "approve": "批量提交审批", "scriptsPath": "脚本路径:" }, "buttonText": { @@ -102,6 +103,8 @@ "reason": "申请原因", "ip_whitelist": "白名单IP", "apply_time": "申请起始时间", + "applySource": "审批单号", + "executeUser": "代理执行用户", "caller": "调用方", "access": "限流情况", "version": "版本号", @@ -133,6 +136,8 @@ "disable": "已禁用", "normal": "正常", "expired": "已过期", + "submited": "已提单", + "unsubmit": "未提单", "all": "全部", "updateApiModal": { "modalTitle": "数据服务API更新", diff --git a/web/packages/apiServices/module/apiServices/apiCard.vue b/web/packages/apiServices/module/apiServices/apiCard.vue index d8d90176f3..d035bc2dec 100644 --- a/web/packages/apiServices/module/apiServices/apiCard.vue +++ b/web/packages/apiServices/module/apiServices/apiCard.vue @@ -24,7 +24,8 @@ -
{{ desc }}
+
描述:{{ desc ? desc : '--' }}
+
当前运行中版本:{{title.versionVos && title.versionVos[0] && title.versionVos[0].version ? title.versionVos[0].version : '--'}} 有新版本
@@ -159,16 +160,42 @@ export default { } } .desc { - text-indent: 2em; - overflow: hidden; - text-overflow: ellipsis; + width: 100%; + // font-size: 0.65rem; + // margin: 8px 0; + // word-break: break-all; /* 单词内部也可断行 */ + // word-wrap: break-word; /* 允许单词内部断行,并自动溢出,即换行 */ + // text-indent: 2em; + + // 最多两行 多的在第二行最后显示... + // white-space: nowrap; + // overflow: hidden; + // text-overflow: ellipsis; + // display: -webkit-box; + // -webkit-line-clamp: 2; + // -webkit-box-orient: vertical; + display: -webkit-box; - // margin-bottom: 10px; - line-height: 1.5; - font-size: 0.8rem; - height: 2.4rem; - -webkit-line-clamp: 2; -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + text-overflow: ellipsis; + overflow: hidden; + margin-bottom: 4px; + margin-top: 4px; + height: 36px; + word-wrap: break-word; /* 在需要时断开字符 */ + word-break: break-all; /* 在需要时断开单词 */ + } + .version { + font-size: 0.65rem; + padding: 0px 0 8px 0; + height: 34px; + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + word-break: break-all; /* 单词内部也可断行 */ + word-wrap: break-word; /* 允许单词内部断行,并自动溢出,即换行 */ } .floor { text-align: center; diff --git a/web/packages/apiServices/module/apiServices/index.vue b/web/packages/apiServices/module/apiServices/index.vue index ba7baa6856..5e4d08bf93 100644 --- a/web/packages/apiServices/module/apiServices/index.vue +++ b/web/packages/apiServices/module/apiServices/index.vue @@ -2,7 +2,10 @@

- + {{$t('message.apiServices.title')}}

@@ -24,6 +27,7 @@ +
@@ -411,6 +415,13 @@ export default { this.getTagList(); this.username = this.getUserName(); }, + mounted() { + // 切到非第一页,进入 管理页,再返回数据服务首页,要保留进管理页之前的分页 + if (sessionStorage.getItem('apiservicesCurrentPage') && sessionStorage.getItem('apiservicesCurrentPage') !== 'null' && sessionStorage.getItem('apiservicesCurrentPage') !== 'undefined') { + this.page.pageNow = Number(sessionStorage.getItem('apiservicesCurrentPage')); + sessionStorage.removeItem('apiservicesCurrentPage') + } + }, computed: { pageDatalist() {// 展示的数据 let list = this.apiData; @@ -504,6 +515,9 @@ export default { } }) }, + gotoSubmit() { + this.$router.push({ name: 'ServicesSubmit', query: { workspaceId: this.$route.query.workspaceId} }) + }, changeVisual(type) { this.visual = type; }, @@ -517,6 +531,7 @@ export default { commonAction(row, arg) { // 更多操作的id const id = arg[0]; if (id === 1) { // 跳到管理页 + sessionStorage.setItem('apiservicesCurrentPage', this.page.pageNow) this.$router.push({path: '/servicesMangement',query: {apiId: arg[0], workspaceId: this.$route.query.workspaceId, id: row.id, scriptPath: row.scriptPath }}) } else if(id === 2) { // 禁用、启用 // 发起请求 @@ -653,6 +668,7 @@ export default { height: $percent-all; display: flex; flex-direction: column; + overflow: auto; .title, .search-bar, .workspace-header-right, .page-bar { flex: none; } @@ -719,9 +735,9 @@ export default { display: flex; align-items: $align-center; justify-content: space-between; - // .tabs-content { - // flex: 1; - // } + .tabs-content { + max-width: calc(100% - 150px); + } .showAll { margin: 0 10px; color: $primary-color; diff --git a/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue b/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue index d6ae30a3e4..8b51b3a0f8 100644 --- a/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue +++ b/web/packages/apiServices/module/servicesMangement/component/APIVersions.vue @@ -120,12 +120,14 @@ export default { key: "status", align: "center", render: (h, scope) => { + const colors = ['red','rgb(18, 150, 219)','#0F1222','#F29360'] + const list = [this.$t('message.apiServices.disable'),this.$t('message.apiServices.enable'),this.$t('message.apiServices.unsubmit'),this.$t('message.apiServices.submited')] return h( "span", { - style: { color: scope.row.status === 1 ? 'rgb(18, 150, 219)': 'red'} + style: { color: colors[scope.row.status]} }, - scope.row.status === 1 ? this.$t('message.apiServices.enable') : this.$t('message.apiServices.disable') + list[scope.row.status] ); } }, @@ -139,6 +141,11 @@ export default { key: "creator", align: "center" }, + { + title: this.$t('message.apiServices.apiTable.executeUser'), + key: "executeUser", + align: "center" + }, { title: this.$t('message.apiServices.apiTable.publishDateStr'), key: "createTime", diff --git a/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue b/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue index d12307ab83..e1f566fb0b 100644 --- a/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue +++ b/web/packages/apiServices/module/servicesMangement/component/TokenAuthorization.vue @@ -16,6 +16,9 @@ + + + + + +
-
+
-
- - - - - - - - - -
- + - + - @@ -157,75 +143,46 @@ :model="updateApiData" :label-width="120" > - - + + + + + + + + + + + + + {{$t('message.scripts.apiPublish.updateApiModal.paramConfirm')}} + + +
- - -