Skip to content

Commit

Permalink
fix control plane api use case display error
Browse files Browse the repository at this point in the history
  • Loading branch information
kuangxiang20240501 committed Nov 15, 2024
1 parent 0a89c2d commit 70680e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
import com.consoleconnect.kraken.operator.core.event.IngestionDataResult;
import com.consoleconnect.kraken.operator.core.exception.KrakenException;
import com.consoleconnect.kraken.operator.core.ingestion.DataIngestionJob;
import com.consoleconnect.kraken.operator.core.model.AssetLink;
import com.consoleconnect.kraken.operator.core.model.Metadata;
import com.consoleconnect.kraken.operator.core.model.SyncMetadata;
import com.consoleconnect.kraken.operator.core.model.UnifiedAsset;
import com.consoleconnect.kraken.operator.core.model.*;
import com.consoleconnect.kraken.operator.core.model.facet.ComponentAPITargetFacets;
import com.consoleconnect.kraken.operator.core.repo.UnifiedAssetRepository;
import com.consoleconnect.kraken.operator.core.service.CompatibilityCheckService;
Expand Down Expand Up @@ -73,6 +70,7 @@ public class TemplateUpgradeService {
private final TransactionService transactionService;
private final CompatibilityCheckService compatibilityCheckService;
private final EventSinkService eventSinkService;
private final AppProperty appProperty;

protected String deployProduction(
String templateUpgradeId, String stageEnvId, String productionEnvId, String userId) {
Expand Down Expand Up @@ -332,6 +330,7 @@ public Paging<TemplateUpgradeDeploymentVO> listTemplateDeployment(
public List<MapperTagVO> templateDeploymentDetailsFromControlDeployment(
UnifiedAssetDto templateDeployment) {
Map<String, List<Tuple2>> apiUseCases = apiComponentService.findApiUseCase();
log.info("apiUseCases : {}", JsonToolkit.toJson(apiUseCases));
ControlDeploymentFacet controlDeploymentFacet =
UnifiedAsset.getFacets(templateDeployment, ControlDeploymentFacet.class);
UpgradeTuple upgradeTuple = controlDeploymentFacet.getUpgradeTuple();
Expand All @@ -347,6 +346,7 @@ public List<MapperTagVO> templateDeploymentDetailsFromControlDeployment(
.filter(Optional::isPresent)
.map(Optional::get)
.map(ApiUseCaseDto::getMapperKey)
.filter(t -> !appProperty.getQueryExcludeAssetKeys().contains(t))
.distinct()
.map(this::getMapperTagVOFromDraft)
.toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ void givenBuyer_whenInit_thenReturnData() {
.issuedAt(Instant.now().minusSeconds(60))
.claim("env", "stage")
.build();
;

Instant instant = jwt.getIssuedAt();
unifiedAsset
.getMetadata()
Expand Down

0 comments on commit 70680e5

Please sign in to comment.