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