diff --git a/src/frontend/devops-repository/src/images/conan.svg b/src/frontend/devops-repository/src/images/conan.svg
new file mode 100644
index 0000000000..d73def2412
--- /dev/null
+++ b/src/frontend/devops-repository/src/images/conan.svg
@@ -0,0 +1,10 @@
+
+
diff --git a/src/frontend/devops-repository/src/store/actions/repoCommon.js b/src/frontend/devops-repository/src/store/actions/repoCommon.js
index 9ea863cc9c..7ac5134e0d 100644
--- a/src/frontend/devops-repository/src/store/actions/repoCommon.js
+++ b/src/frontend/devops-repository/src/store/actions/repoCommon.js
@@ -168,7 +168,8 @@ export default {
const urlMap = {
docker: 'docker/ext/addr',
npm: 'npm/ext/address',
- helm: 'helm/ext/address'
+ helm: 'helm/ext/address',
+ conan: 'conan/ext/address'
}
if (!urlMap[repoType] || state.domain[repoType]) return
Vue.prototype.$ajax.get(
diff --git a/src/frontend/devops-repository/src/store/index.js b/src/frontend/devops-repository/src/store/index.js
index 44764804b3..4fb49da252 100644
--- a/src/frontend/devops-repository/src/store/index.js
+++ b/src/frontend/devops-repository/src/store/index.js
@@ -44,7 +44,8 @@ const storeObject = {
domain: {
docker: '',
npm: '',
- helm: ''
+ helm: '',
+ conan: ''
},
clusterList: [],
dependAccessTokenValue: '', // 依赖源仓库的使用指引中用户输入的访问令牌的值
diff --git a/src/frontend/devops-repository/src/store/publicEnum.js b/src/frontend/devops-repository/src/store/publicEnum.js
index c576bc722e..17fbe26c1e 100644
--- a/src/frontend/devops-repository/src/store/publicEnum.js
+++ b/src/frontend/devops-repository/src/store/publicEnum.js
@@ -6,7 +6,8 @@ export const repoEnum = MODE_CONFIG === 'ci'
{ label: 'Helm', value: 'helm' },
{ label: 'Docker', value: 'docker' },
// { label: 'Rds', value: 'rds' },
- { label: 'Nuget', value: 'nuget' }
+ { label: 'Nuget', value: 'nuget' },
+ { label: 'Conan', value: 'conan' }
]
: [
{ label: 'Generic', value: 'generic' },
@@ -20,7 +21,8 @@ export const repoEnum = MODE_CONFIG === 'ci'
{ label: 'Composer', value: 'composer' },
{ label: 'Rpm', value: 'rpm' },
{ label: 'Git', value: 'git' },
- { label: 'Nuget', value: 'nuget' }
+ { label: 'Nuget', value: 'nuget' },
+ { label: 'Conan', value: 'conan' }
]
// 文件类型
diff --git a/src/frontend/devops-repository/src/views/repoCommon/repoGuideMixin.js b/src/frontend/devops-repository/src/views/repoCommon/repoGuideMixin.js
index 892e610b94..70b3a88b0a 100644
--- a/src/frontend/devops-repository/src/views/repoCommon/repoGuideMixin.js
+++ b/src/frontend/devops-repository/src/views/repoCommon/repoGuideMixin.js
@@ -184,7 +184,7 @@ export default {
title: this.$t('npmCreditGuideSubTitle1'),
optionType: 'setCredentials',
main: [
-
+
{
subTitle: this.$t('npmCreditGuideSubTitle3'),
codeList: [
@@ -761,7 +761,7 @@ export default {
{
subTitle: this.$t('helmInstallGuideSubTitle2'),
codeList: [
- 'helm repo update'
+ 'helm repo update '
]
},
{
@@ -873,7 +873,6 @@ export default {
},
pypiGuide () {
return [
-
{
title: this.$t('pypiCreditGuideSubTitle1'),
optionType: 'setCredentials',
@@ -1160,6 +1159,126 @@ export default {
]
}]
},
+ conanGuide () {
+ return [
+ {
+ title: this.$t('setCredentials'),
+ optionType: 'setCredentials',
+ main: [
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle1'),
+ codeList: [
+ `conan remote add ${this.repoName} ${this.domain.conan}/${this.projectId}/${this.repoName}`
+
+ ]
+ },
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle2'),
+ codeList: [
+ `conan user add -p ${this.accessToken} -r ${this.repoName} ${this.userName}`
+ ]
+ },
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle3'),
+ codeList: [
+ `conan remote login -p ${this.accessToken} ${this.repoName} ${this.userName}`
+ ]
+ }
+ ]
+ },
+ {
+ title: this.$t('push'),
+ optionType: 'push',
+ inputBoxList: [
+ {
+ key: 'dependInputValue1', // vux中存储的变量名
+ label: this.$t('artifactName'), // 输入框左侧label文案
+ placeholder: this.$t('artifactNamePlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE1' // vuex中mutations中的方法名
+ },
+ {
+ key: 'dependInputValue2', // vux中存储的变量名
+ label: this.$t('artifactVersion'), // 输入框左侧label文案
+ placeholder: this.$t('packageVersionPlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE2' // vuex中mutations中的方法名
+ }
+ ],
+ main: [
+ {
+ subTitle: this.$t('pushGuideSubTitle'),
+ codeList: [
+ `conan upload ${this.dependInputValue1 || this.packageName}/${this.dependInputValue2 || this.versionLabel} -r=${this.repoName}`
+ ]
+ }
+ ]
+ },
+ {
+ title: this.$t('pull'),
+ optionType: 'pull',
+ inputBoxList: [
+ {
+ key: 'dependInputValue1', // vux中存储的变量名
+ label: this.$t('artifactName'), // 输入框左侧label文案
+ placeholder: this.$t('artifactNamePlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE1' // vuex中mutations中的方法名
+ },
+ {
+ key: 'dependInputValue2', // vux中存储的变量名
+ label: this.$t('artifactVersion'), // 输入框左侧label文案
+ placeholder: this.$t('packageVersionPlaceholder'), // 输入框提示文案
+ methodFunctionName: 'SET_DEPEND_INPUT_VALUE2' // vuex中mutations中的方法名
+ }
+ ],
+ main: [
+ {
+ subTitle: this.$t('helmPullGuideSubTitle'),
+ codeList: [
+ `conan install ${this.dependInputValue1 || this.packageName}/${this.dependInputValue2 || this.versionLabel}@ -r ${this.repoName}`
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ conanInstall () {
+ return [
+ {
+ main: [
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle1'),
+ codeList: [
+ `conan remote add ${this.repoName} ${this.domain.conan}/${this.projectId}/${this.repoName}`
+
+ ]
+ },
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle2'),
+ codeList: [
+ `conan user add -p -r ${this.repoName} ${this.userName}`
+ ]
+ },
+ {
+ subTitle: this.$t('conanCreditGuideSubTitle3'),
+ codeList: [
+ `conan remote login -p ${this.repoName} ${this.userName}`
+ ]
+ },
+ {
+ subTitle: this.$t('helmPullGuideSubTitle'),
+ codeList: [
+ `conan install ${this.packageName}/${this.versionLabel}@ -r ${this.repoName}`
+ ]
+ },
+ {
+ subTitle: this.$t('pushGuideSubTitle'),
+ codeList: [
+ `conan upload ${this.packageName}/${this.versionLabel} -r=${this.repoName}`
+ ]
+ }
+ ]
+ }
+ ]
+ },
articleGuide () {
return this[`${guideMap[this.repoType] || this.repoType}Guide`]
},
diff --git a/src/frontend/locale/repository/en-US.json b/src/frontend/locale/repository/en-US.json
index 3961f9b484..6cff0c1fc2 100644
--- a/src/frontend/locale/repository/en-US.json
+++ b/src/frontend/locale/repository/en-US.json
@@ -778,8 +778,6 @@
"relatedUsers":"Related Users",
"assetUserTip": "Please start with g_",
"createGroupToken": "Create Token",
- "inFolderSearchPlaceholder":"Please enter a file/folder name to search",
- "folderDirectory":"Folder directory",
"batchDownload":"Batch download",
"noFilenameErrorInfo":"Sorry, the server got the file name abnormally, please try again later",
"batchDownloadBackTypeErrorInfo":"Batch download of files failed, please try again later",
@@ -893,5 +891,8 @@
"changeSelectAllTip": "Select full data",
"selectAllTip": "{0} pieces of total data have been selected,",
"clearSelectTip":"Clear selection",
- "previewErrorTip": "File Preview Fail"
+ "previewErrorTip": "File Preview Fail",
+ "conanCreditGuideSubTitle1":"1. Execute the following command on the command line to configure remote artifact repository",
+ "conanCreditGuideSubTitle2":"2、Execute the following command on the command line to configure artifact repository credentials(conan1.x)",
+ "conanCreditGuideSubTitle3":"2、Execute the following command on the command line to configure artifact repository credentials(conan2.x)"
}
diff --git a/src/frontend/locale/repository/zh-CN.json b/src/frontend/locale/repository/zh-CN.json
index 2770b9b588..ce80362fe5 100644
--- a/src/frontend/locale/repository/zh-CN.json
+++ b/src/frontend/locale/repository/zh-CN.json
@@ -894,5 +894,8 @@
"changeSelectAllTip": "选择全量数据",
"selectAllTip": "已选择全量数据{0}条,",
"clearSelectTip":"清除选择",
- "previewErrorTip": "文件预览失败"
+ "previewErrorTip": "文件预览失败",
+ "conanCreditGuideSubTitle1":"1、在命令行执行以下命令配置远程仓库",
+ "conanCreditGuideSubTitle2":"2、在命令行执行以下命令配置制品仓库凭据(conan1.x)",
+ "conanCreditGuideSubTitle3":"2、在命令行执行以下命令配置制品仓库凭据(conan2.x)"
}