-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): Added Last run status and error messages to check, tasks, and notification rules #16325
Changes from all commits
1c0174e
d5e119f
b7c41e9
bd34881
793a024
ed1f403
5f71219
c535103
72a05b6
8afa48f
fca72be
a2f70cd
4f13d19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,9 @@ import { | |
GetState, | ||
RemoteDataState, | ||
CheckViewProperties, | ||
Label, | ||
PostCheck, | ||
} from 'src/types' | ||
import {Label} from 'src/client' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you're for serious about this, it'd be easier to just import the Label definition into 'src/types' instead |
||
import {createView} from 'src/shared/utils/view' | ||
|
||
export type Action = | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import {withRouter, WithRouterProps} from 'react-router' | |
import {SlideToggle, ComponentSize, ResourceCard} from '@influxdata/clockface' | ||
import CheckCardContext from 'src/alerting/components/CheckCardContext' | ||
import InlineLabels from 'src/shared/components/inlineLabels/InlineLabels' | ||
import LastRunTaskStatus from 'src/shared/components/lastRunTaskStatus/LastRunTaskStatus' | ||
|
||
// Constants | ||
import {DEFAULT_CHECK_NAME} from 'src/alerting/constants' | ||
|
@@ -26,8 +27,8 @@ import {notify} from 'src/shared/actions/notifications' | |
import {updateCheckFailed} from 'src/shared/copy/notifications' | ||
|
||
// Types | ||
import {Check, Label, AppState} from 'src/types' | ||
|
||
import {Check, AppState} from 'src/types' | ||
import {Label, Labels} from 'src/client' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Labels are going to be such a mess as we switch from |
||
// Utilities | ||
import {relativeTimestampFormatter} from 'src/shared/utils/relativeTimestampFormatter' | ||
|
||
|
@@ -42,7 +43,7 @@ interface DispatchProps { | |
} | ||
|
||
interface StateProps { | ||
labels: Label[] | ||
labels: Labels | ||
} | ||
|
||
interface OwnProps { | ||
|
@@ -154,7 +155,7 @@ const CheckCard: FunctionComponent<Props> = ({ | |
} | ||
labels={ | ||
<InlineLabels | ||
selectedLabels={check.labels as Label[]} | ||
selectedLabels={check.labels} | ||
labels={labels} | ||
onAddLabel={handleAddCheckLabel} | ||
onRemoveLabel={handleRemoveCheckLabel} | ||
|
@@ -170,7 +171,13 @@ const CheckCard: FunctionComponent<Props> = ({ | |
/> | ||
} | ||
metaData={[ | ||
<>Last completed at {check.latestCompleted}</>, | ||
<>{relativeTimestampFormatter(check.updatedAt, 'Last updated ')}</>, | ||
<LastRunTaskStatus | ||
key={2} | ||
asalem1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
lastRunError={check.lastRunError} | ||
lastRunStatus={check.lastRunStatus} | ||
/>, | ||
]} | ||
/> | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure- but would this not also include LastRunStatus and LastRunError ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completely agree in that we need to test out the
LastRunStatus
andLastRunError
. They should be included for tests that result in an error