diff --git a/webfe/package_vue/src/language/lang/en.js b/webfe/package_vue/src/language/lang/en.js
index 0c1e7dca7a..c01a63d64e 100644
--- a/webfe/package_vue/src/language/lang/en.js
+++ b/webfe/package_vue/src/language/lang/en.js
@@ -2767,7 +2767,7 @@ export default {
申请灰度发布: 'Apply for Gray Release',
扩大灰度范围: 'Expand Gray Release Scope',
申请全量发布: 'Apply for Full Release',
- 重新申请: 'Reapply',
+ 申请扩大灰度范围: 'Apply to expand the gray range',
已测试版本: 'Tested Version',
最小范围可以选择中心: 'Minimum Scope Can Select Center',
'灰度发布审批中,请耐心等待': 'Gray release approval in progress, please wait patiently',
@@ -2776,4 +2776,7 @@ export default {
'灰度发布需由工具管理员进行审批;若选择了灰度组织范围,还需要由工具发布者的组长同时进行审批。': 'Gray release needs to be approved by the tool administrator; if a gray organization scope is selected, it also needs to be approved by the team leader of the tool publisher.',
已终止当前的发布版本: 'The current release version has been terminated',
扩大灰度范围不允许删除已经灰度过的组织: 'Expanding the gray range does not allow deleting organizations that have already been grayed out',
+ 测试号: 'Test number',
+ 已终止: 'Terminated',
+ '主版本号、次版本号、修正版本号': 'Major version number, minor version number, patch version number',
};
diff --git a/webfe/package_vue/src/language/lang/zh.js b/webfe/package_vue/src/language/lang/zh.js
index e138ccb980..2c5f2af8a5 100644
--- a/webfe/package_vue/src/language/lang/zh.js
+++ b/webfe/package_vue/src/language/lang/zh.js
@@ -2904,7 +2904,7 @@ export default {
申请灰度发布: '申请灰度发布',
扩大灰度范围: '扩大灰度范围',
申请全量发布: '申请全量发布',
- 重新申请: '重新申请',
+ 申请扩大灰度范围: '申请扩大灰度范围',
已测试版本: '已测试版本',
最小范围可以选择中心: '最小范围可以选择中心',
'灰度发布审批中,请耐心等待': '灰度发布审批中,请耐心等待',
@@ -2913,4 +2913,7 @@ export default {
'灰度发布需由工具管理员进行审批;若选择了灰度组织范围,还需要由工具发布者的组长同时进行审批。': '灰度发布需由工具管理员进行审批;若选择了灰度组织范围,还需要由工具发布者的组长同时进行审批。',
已终止当前的发布版本: '已终止当前的发布版本',
扩大灰度范围不允许删除已经灰度过的组织: '扩大灰度范围不允许删除已经灰度过的组织',
+ 测试号: '测试号',
+ 已终止: '已终止',
+ '主版本号、次版本号、修正版本号': '主版本号、次版本号、修正版本号',
};
diff --git a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-content.vue b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-content.vue
index 5ae102722d..f3338f2b14 100644
--- a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-content.vue
+++ b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-content.vue
@@ -184,14 +184,14 @@ export default {
version: [
{
required: true,
- message: '必填项',
+ message: this.$t('必填项'),
trigger: 'blur',
},
],
comment: [
{
required: true,
- message: '必填项',
+ message: this.$t('必填项'),
trigger: 'blur',
},
],
@@ -220,7 +220,7 @@ export default {
deep: true,
},
'releaseContent.version'(newVal) {
- this.releaseContent.versionDisplay = `${newVal} (主版本号、次版本号、修正版本号)`;
+ this.releaseContent.versionDisplay = `${newVal} (${this.$t('主版本号、次版本号、修正版本号')})`;
},
'releaseContent.source_versions'() {
this.releaseContent.comment = this.curVersionData.message;
@@ -259,16 +259,16 @@ export default {
'self-fill': '',
};
this.releaseContent.version = versionMapping[data.version_no] || '';
- // 重新申请默认值
+ // 重新发布默认值
if (this.versionId) {
this.setVersionDefaultValue(data);
}
},
- // 重新申请设置默认值
+ // 重新发布设置默认值
setVersionDefaultValue() {
const { source_version_name, semver_type, comment } = this.versionData;
const version = this.versionTypes.find(v => v.key === semver_type).value;
- const versionDisplay = `${version} (主版本号、次版本号、修正版本号)`;
+ const versionDisplay = `${version} (${this.$t('主版本号、次版本号、修正版本号')})`;
this.releaseContent = {
...this.releaseContent,
source_versions: source_version_name,
diff --git a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-strategy.vue b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-strategy.vue
index d32242a8db..8a6d49dece 100644
--- a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-strategy.vue
+++ b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/create-version/new-version/release-strategy.vue
@@ -19,7 +19,7 @@
:error-display-type="'normal'"
:rules="rules.strategy"
>
-
+
v.id === id) !== -1;
},
+ handleChange(value) {
+ this.$emit('strategy-change', value);
+ },
},
};
diff --git a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/index.vue b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/index.vue
index 14a8781499..faf4d9b728 100644
--- a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/index.vue
+++ b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/index.vue
@@ -508,6 +508,7 @@ export default {
this.curVersionType = this.$route.query.type || 'test';
}
this.getVersionList();
+ this.getReleasedVersion();
if (this.isCodecc) {
this.getRollbackVersion();
}
@@ -580,6 +581,25 @@ export default {
return statusParams;
},
+ // 获取指定状态版本,判断是否有版本正在灰度或者发布中
+ async getReleasedVersion() {
+ if (!this.isOfficialVersion) return;
+ try {
+ const res = await this.$store.dispatch('plugin/getVersionsManagerList', {
+ data: {
+ pdId: this.pdId,
+ pluginId: this.pluginId,
+ },
+ pageParams: { type: 'prod' },
+ statusParams: 'status=pending&status=initial',
+ });
+ // 当前是否已有任务进行中
+ this.curIsPending = !!res.results.length;
+ } catch (e) {
+ console.error(e);
+ }
+ },
+
// 获取版本列表
async getVersionList(page = 1) {
this.isTableLoading = true;
@@ -597,8 +617,6 @@ export default {
});
this.versionList = res.results;
this.pagination.count = res.count;
- // 当前是否已有任务进行中
- this.curIsPending = this.versionList.find(item => item.status === 'pending');
this.updateTableEmptyConfig();
this.tableEmptyConf.isAbnormal = false;
} catch (e) {
@@ -933,6 +951,7 @@ export default {
message: this.$t('已终止当前的发布版本'),
});
this.getVersionList();
+ this.getReleasedVersion();
} catch (e) {
this.$bkMessage({
theme: 'error',
diff --git a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/version-details/index.vue b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/version-details/index.vue
index 61f2233836..8f53aad114 100644
--- a/webfe/package_vue/src/views/plugin-center/plugin/version-manager/version-details/index.vue
+++ b/webfe/package_vue/src/views/plugin-center/plugin/version-manager/version-details/index.vue
@@ -80,6 +80,7 @@
:mode="releaseStrategyMode"
:data="versionData"
step="release"
+ @strategy-change="handleStrategyChange"
/>
@@ -98,7 +99,7 @@
class="mr8"
@click="handleReapply"
>
- {{ $t('重新申请') }}
+ {{ $t('重新发布') }}
- {{ $t('申请扩大灰度范围') }}
+ {{ $t(submitText) }}