Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cli/src/constructs/status-page-codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface StatusPageCardResource {
export interface StatusPageResource {
id: string
name: string
description?: string
url: string
cards: StatusPageCardResource[]
customDomain?: string
Expand Down Expand Up @@ -42,6 +43,9 @@ export class StatusPageCodegen extends Codegen<StatusPageResource> {
builder.string(logicalId)
builder.object(builder => {
builder.string('name', resource.name)
if (resource.description) {
builder.string('description', resource.description)
}
builder.string('url', resource.url)

builder.array('cards', builder => {
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/constructs/status-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export interface StatusPageProps {
* The name of the status page.
*/
name: string
/**
* An optional description displayed on the status page. Maximum 500 characters.
*/
description?: string
/**
* The URL of the status page.
*/
Expand Down Expand Up @@ -56,6 +60,7 @@ export interface StatusPageProps {
*/
export class StatusPage extends Construct {
name: string
description?: string
cards: StatusPageCardProps[]
url: string
customDomain?: string
Expand All @@ -77,6 +82,7 @@ export class StatusPage extends Construct {
constructor (logicalId: string, props: StatusPageProps) {
super(StatusPage.__checklyType, logicalId)
this.name = props.name
this.description = props.description
this.url = props.url
this.cards = props.cards
this.customDomain = props.customDomain
Expand All @@ -95,6 +101,7 @@ export class StatusPage extends Construct {
synthesize (): any | null {
return {
name: this.name,
description: this.description,
url: this.url,
customDomain: this.customDomain,
logo: this.logo,
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/rest/status-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface StatusPageCard {
export interface StatusPage {
id: string
name: string
description?: string | null
url: string
customDomain: string | null
isPrivate: boolean
Expand Down
Loading