Skip to content

Commit

Permalink
Merge pull request #10 from nyaruka/failures
Browse files Browse the repository at this point in the history
⚰️ Add support for failure events
  • Loading branch information
rowanseymour authored Aug 14, 2019
2 parents 02f984d + b682f93 commit a339788
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/Timeline.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
font-style: italic;
}

.Event-summary .warn {
font-weight: bold;
color: rgb(245, 229, 159);
}

.Event-summary .err {
font-weight: bold;
color: #A55;
Expand Down
14 changes: 14 additions & 0 deletions src/components/TimelineEvent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ it('renders appropriate summary for different event types', () => {
},
summary: "⚙️ environment refreshed on resume"
},
{
event: {
type: "error",
text: "I'm an error"
},
summary: "⚠️ I'm an error"
},
{
event: {
type: "failure",
text: "I'm a failure"
},
summary: "⚰️ I'm a failure"
},
{
event: {
type: "run_expired"
Expand Down
4 changes: 3 additions & 1 deletion src/components/TimelineEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export class TimelineEvent extends React.Component<Props, State> {
case "environment_refreshed":
return ["⚙️", <>environment refreshed on resume</>];
case "error":
return ["⚠️", <span className="err">{event.text}</span>];
return ["⚠️", <span className="warn">{event.text}</span>];
case "failure":
return ["⚰️", <span className="err">{event.text}</span>];
case "flow_entered":
return ["↪️", <>entered flow <i>{event.flow.name}</i></>];
case "input_labels_added":
Expand Down

0 comments on commit a339788

Please sign in to comment.