Skip to content

Commit

Permalink
feat: 红线支持指定到具体的步骤插件 TencentBlueKing#5405.
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiKX1 committed Feb 16, 2022
1 parent eb083aa commit 99af864
Showing 1 changed file with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,18 @@ class QualityIndicatorService @Autowired constructor(
enNameSet: Collection<String>,
projectId: String? = null
): List<QualityIndicator> {
return if (enNameSet.isNotEmpty()) {
val tempProjectId = if (elementType == RunElementType.RUN.elementType) projectId else null
val indicatorRecords = indicatorDao.listByElementType(
dslContext = dslContext,
elementType = elementType,
type = null,
enNameSet = enNameSet,
projectId = tempProjectId
)
serviceListIndicatorRecord(indicatorRecords)
} else {
val indicatorRecords = indicatorDao.listByElementType(
dslContext = dslContext,
elementType = elementType,
type = null,
enNameSet = enNameSet
)
serviceListIndicatorRecord(indicatorRecords)
val tempProjectId = if (elementType == RunElementType.RUN.elementType) projectId else null
val indicatorRecords = indicatorDao.listByElementType(
dslContext = dslContext,
elementType = elementType,
type = null,
enNameSet = enNameSet,
projectId = tempProjectId
)?.associateBy { it.enName }
val allIndicatorRecords = enNameSet.map {
indicatorRecords?.get(it) ?: throw OperationException("indicator id $it is not exist")
}
return serviceListIndicatorRecord(allIndicatorRecords)
}

fun serviceListFilterBash(elementType: String, enNameSet: Collection<String>): List<QualityIndicator> {
Expand Down

0 comments on commit 99af864

Please sign in to comment.