Display deployment build logs #8

Merged
nabarun merged 10 commits from display-build-logs into main 2024-10-22 09:13:00 +00:00
5 changed files with 25 additions and 6 deletions
Showing only changes of commit 94a6c66c36 - Show all commits

View File

@ -216,7 +216,8 @@ export class Database {
relations: { relations: {
project: true, project: true,
domain: true, domain: true,
createdBy: true createdBy: true,
deployer: true,
}, },
where: { where: {
project: { project: {

View File

@ -104,7 +104,8 @@ type Deployment {
commitMessage: String! commitMessage: String!
url: String url: String
environment: Environment! environment: Environment!
deployerId: String deployer: Deployer
applicationDeploymentRequestId: String
isCurrent: Boolean! isCurrent: Boolean!
baseDomain: String baseDomain: String
status: DeploymentStatus! status: DeploymentStatus!

View File

@ -72,6 +72,11 @@ const DeploymentDetailsCard = ({
leftIcon={getIconByDeploymentStatus(deployment.status)} leftIcon={getIconByDeploymentStatus(deployment.status)}
size="xs" size="xs"
type={STATUS_COLORS[deployment.status] ?? 'neutral'} type={STATUS_COLORS[deployment.status] ?? 'neutral'}
onClick={async()=> {
let url = `${deployment.deployer.deployerApiUrl}/log/${deployment.applicationDeploymentRequestId}`
const res = await fetch(url);
console.log(">>>>RESPONSE",await res.text())
}}
> >
{deployment.status} {deployment.status}
</Tag> </Tag>
@ -96,9 +101,9 @@ const DeploymentDetailsCard = ({
</OverflownText> </OverflownText>
</Heading> </Heading>
)} )}
{deployment.deployerLrn && ( {deployment.deployer.deployerLrn && (
<span className="text-sm text-elements-low-em tracking-tight block mt-2"> <span className="text-sm text-elements-low-em tracking-tight block mt-2">
Deployer LRN: {deployment.deployerLrn} Deployer LRN: {deployment.deployer.deployerLrn}
</span> </span>
)} )}
<span className="text-sm text-elements-low-em tracking-tight block"> <span className="text-sm text-elements-low-em tracking-tight block">

View File

@ -136,7 +136,11 @@ query ($projectId: String!) {
commitHash commitHash
commitMessage commitMessage
url url
deployerLrn deployer {
deployerId
deployerLrn,
deployerApiUrl,
}
environment environment
isCurrent isCurrent
baseDomain baseDomain
@ -148,6 +152,7 @@ query ($projectId: String!) {
name name
email email
} }
applicationDeploymentRequestId
} }
} }
`; `;

View File

@ -105,7 +105,7 @@ export type Deployment = {
commitHash: string; commitHash: string;
commitMessage: string; commitMessage: string;
url?: string; url?: string;
deployerLrn: string; deployer: Deployer;
environment: Environment; environment: Environment;
isCurrent: boolean; isCurrent: boolean;
baseDomain?: string; baseDomain?: string;
@ -113,8 +113,15 @@ export type Deployment = {
createdBy: User; createdBy: User;
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
applicationDeploymentRequestId: string;
}; };
export type Deployer = {
deployerApiUrl: string;
deployerId: string;
deployerLrn: string;
}
export type OrganizationMember = { export type OrganizationMember = {
id: string; id: string;
member: User; member: User;