Display information for a problem status.

Since status values are provider-defined, providers must supply display information for their statuses so the platform can render them appropriately.

Example

Implementing getStatus in a provider

class EmailProblemProvider implements ProblemProvider {
private statusInfoMap: Record<string, ProblemStatus> = {
'open': {
id: 'open',
title: 'Open',
icon: 'circle'
},
'pending-retry': {
id: 'pending-retry',
title: 'Pending Retry',
icon: 'clock'
},
'resolved': {
id: 'resolved',
title: 'Resolved',
icon: 'check-circle'
}
};

getStatus(status: string): ProblemStatus | undefined {
return this.statusInfoMap[status];
}

getStatuses(): ProblemStatus[] {
return Object.values(this.statusInfoMap);
}
}

See

Hierarchy

  • ProblemStatus

Properties

Properties

icon?: string | Icon

Icon to display for this status.

Can be either a string referencing an icon name from the platform's icon library, or an Icon object with additional properties like color.

See

Icon

id: string

The status identifier as used in status.

title: string

Human-readable title for the status.