Get DNS records for all completed deployments
This commit is contained in:
parent
dd12369cb2
commit
6d2b341d48
@ -17,7 +17,7 @@ import { DatabaseConfig } from './config';
|
|||||||
import { User } from './entity/User';
|
import { User } from './entity/User';
|
||||||
import { Organization } from './entity/Organization';
|
import { Organization } from './entity/Organization';
|
||||||
import { Project } from './entity/Project';
|
import { Project } from './entity/Project';
|
||||||
import { Deployment } from './entity/Deployment';
|
import { Deployment, DeploymentStatus } from './entity/Deployment';
|
||||||
import { ProjectMember } from './entity/ProjectMember';
|
import { ProjectMember } from './entity/ProjectMember';
|
||||||
import { EnvironmentVariable } from './entity/EnvironmentVariable';
|
import { EnvironmentVariable } from './entity/EnvironmentVariable';
|
||||||
import { Domain } from './entity/Domain';
|
import { Domain } from './entity/Domain';
|
||||||
@ -630,8 +630,9 @@ export class Database {
|
|||||||
const deployment = await deploymentRepository.findOne({
|
const deployment = await deploymentRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
project: {
|
project: {
|
||||||
id: projectId
|
id: projectId,
|
||||||
},
|
},
|
||||||
|
status: DeploymentStatus.Ready
|
||||||
}, order: {
|
}, order: {
|
||||||
createdAt: "DESC",
|
createdAt: "DESC",
|
||||||
},
|
},
|
||||||
|
@ -76,11 +76,11 @@ const Config = () => {
|
|||||||
|
|
||||||
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
const dnsData = await client.getLatestDNSDataByProjectId(id);
|
||||||
|
|
||||||
setIPAddress(dnsData.value);
|
|
||||||
|
|
||||||
if (!dnsData || !dnsData.value) {
|
if (!dnsData || !dnsData.value) {
|
||||||
setIPAddress("Not Configured")
|
setIPAddress("Not Configured")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setIPAddress(dnsData.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchDNSData();
|
fetchDNSData();
|
||||||
|
Loading…
Reference in New Issue
Block a user