Skip to content

Commit

Permalink
feat:流水线插件自定义前端框架,支持使用插件私有配置 TencentBlueKing#4600
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyin0801 committed Jul 16, 2021
1 parent 529f1b6 commit 5b055e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,11 @@ class SensitiveConfDao {
val conditions = mutableListOf<Condition>()
conditions.add(STORE_CODE.eq(storeCode))
conditions.add(STORE_TYPE.eq(storeType))
if(!filedTypeList.isNullOrEmpty()) {
if (!filedTypeList.isNullOrEmpty()) {
conditions.add(FIELD_TYPE.`in`(filedTypeList))
}
return dslContext.selectFrom(this)
.where(STORE_CODE.eq(storeCode))
.and(STORE_TYPE.eq(storeType))
.where(conditions)
.fetch()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import com.tencent.devops.common.api.pojo.Result
import com.tencent.devops.common.web.RestResource
import com.tencent.devops.store.api.common.BuildStoreResource
import com.tencent.devops.store.pojo.common.SensitiveConfResp
import com.tencent.devops.store.pojo.common.enums.FieldTypeEnum
import com.tencent.devops.store.pojo.common.enums.StoreTypeEnum
import com.tencent.devops.store.service.common.UserSensitiveConfService
import org.springframework.beans.factory.annotation.Autowired
Expand All @@ -41,6 +42,13 @@ class BuildStoreResourceImpl @Autowired constructor(
) : BuildStoreResource {

override fun getSensitiveConf(storeType: StoreTypeEnum, storeCode: String): Result<List<SensitiveConfResp>?> {
return sensitiveConfService.list("", storeType, storeCode, true)
val types = FieldTypeEnum.BACKEND.name + "," + FieldTypeEnum.ALL.name
return sensitiveConfService.list(
userId = "",
storeType = storeType,
storeCode = storeCode,
isDecrypt = true,
types = types
)
}
}

0 comments on commit 5b055e0

Please sign in to comment.