Skip to content

Commit

Permalink
Merge pull request #6117 from carlyin0801/issue_6111_old_atom_use_1.7
Browse files Browse the repository at this point in the history
feat:支持老插件的前端使用新插件的渲染方式 #6111
  • Loading branch information
irwinsun authored Feb 10, 2022
2 parents 8b6b4c2 + 79c53c2 commit 3b2cd2a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import com.tencent.devops.common.api.exception.ErrorCodeException
import com.tencent.devops.common.api.pojo.Result
import com.tencent.devops.common.api.util.JsonUtil
import com.tencent.devops.common.api.util.timestampmilli
import com.tencent.devops.common.pipeline.pojo.element.market.MarketBuildAtomElement
import com.tencent.devops.common.pipeline.pojo.element.market.MarketBuildLessAtomElement
import com.tencent.devops.common.redis.RedisOperation
import com.tencent.devops.common.service.utils.MessageCodeUtil
import com.tencent.devops.store.constant.StoreMessageCode
Expand Down Expand Up @@ -318,7 +320,10 @@ class MarketAtomEnvServiceImpl @Autowired constructor(
return Result(atomResult.status, atomResult.message ?: "")
}
val atom = atomResult.data ?: return Result(data = null)
if (atom.htmlTemplateVersion == FrontendTypeEnum.HISTORY.typeVersion) {
val classType = atom.classType
if (atom.htmlTemplateVersion == FrontendTypeEnum.HISTORY.typeVersion ||
(classType != MarketBuildAtomElement.classType && classType != MarketBuildLessAtomElement.classType)
) {
// 如果是历史老插件则直接返回环境信息
return Result(
AtomEnv(
Expand Down

0 comments on commit 3b2cd2a

Please sign in to comment.