Update deployments only if valid request Id exists
This commit is contained in:
parent
9ede75a5a2
commit
0341e41c63
@ -473,7 +473,8 @@ export class Registry {
|
||||
}
|
||||
|
||||
async getAuctionData(auctionId: string): Promise<any> {
|
||||
const auction = this.registry.getAuctionsByIds([auctionId]);
|
||||
const auction = await this.registry.getAuctionsByIds([auctionId]);
|
||||
log({auction})
|
||||
return auction;
|
||||
}
|
||||
|
||||
|
@ -23,10 +23,10 @@ enum DeploymentStatus {
|
||||
}
|
||||
|
||||
enum AuctionStatus {
|
||||
AuctionStatusCommitPhase
|
||||
AuctionStatusRevealPhase
|
||||
AuctionStatusExpired
|
||||
AuctionStatusCompleted
|
||||
completed
|
||||
reveal
|
||||
commit
|
||||
expired
|
||||
}
|
||||
|
||||
enum DomainStatus {
|
||||
|
@ -173,9 +173,13 @@ export class Service {
|
||||
createdAt: 'DESC',
|
||||
},
|
||||
});
|
||||
const requestRecordIds = new Set(records.map((record) => record.attributes.request).filter(Boolean));
|
||||
const filteredDeployments = deployments.filter((deployment) =>
|
||||
deployment.applicationDeploymentRequestId && requestRecordIds.has(deployment.applicationDeploymentRequestId)
|
||||
);
|
||||
|
||||
// Get project IDs of deployments that are in production environment
|
||||
const productionDeploymentProjectIds = deployments.reduce(
|
||||
const productionDeploymentProjectIds = filteredDeployments.reduce(
|
||||
(acc, deployment): Set<string> => {
|
||||
if (deployment.environment === Environment.Production) {
|
||||
acc.add(deployment.projectId);
|
||||
|
@ -12,7 +12,7 @@ export const AuctionData = ({
|
||||
}: {
|
||||
project: Project
|
||||
}) => {
|
||||
const [isAuctionCompleted, setIsAuctionCompleted] = useState<boolean>(true);
|
||||
const [isAuctionCompleted, setIsAuctionCompleted] = useState<boolean>(false);
|
||||
const client = useGQLClient();
|
||||
const getIconByAuctionStatus = (isCompleted: Boolean) => {
|
||||
return isCompleted ? <CheckRoundFilledIcon /> : <LoadingIcon className="animate-spin" />
|
||||
@ -76,7 +76,7 @@ export const AuctionData = ({
|
||||
Auction Id: {project.auctionId}
|
||||
</p>
|
||||
|
||||
<p className="text-elements-low-em text-sm mt-2">
|
||||
<p className="text-elements-low-em text-sm">
|
||||
Deployer LRNs:
|
||||
</p>
|
||||
|
||||
|
@ -206,7 +206,7 @@ const OverviewTabPanel = () => {
|
||||
No current deployment found.
|
||||
</p>
|
||||
)}
|
||||
<AuctionData project={project}/>
|
||||
{project.auctionId && <AuctionData project={project}/>}
|
||||
</div>
|
||||
<Activity activities={activities} isLoading={fetchingActivities} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user