Skip to content

Commit

Permalink
Adds a backfill badge to timeseries executions (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
dufrannea authored Aug 22, 2017
1 parent bb2264d commit 9f82dd1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
10 changes: 9 additions & 1 deletion core/src/main/javascript/app/pages/Execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Spinner from "../components/Spinner";
import Clock from "../components/Clock";
import Link from "../components/Link";
import JobStatus from "../components/JobStatus";
import { Badge } from "../components/Badge";
import { listenEvents } from "../../Utils";
import type { ExecutionLog } from "../../datamodel";
import { highlightURLs } from "../utils/URLHighlighter";
Expand Down Expand Up @@ -237,7 +238,14 @@ class Execution extends React.Component {
<dt key="context">Context:</dt>
<dd key="context_"><Context context={data.context} /></dd>
<dt key="status">Status:</dt>
<dd key="status_"><JobStatus status={data.status} /></dd>
<dd key="status_"><JobStatus status={data.status} />{
data.context.backfill ?
<span style={{ marginLeft : "10px" }}>
<Link href={`/timeseries/backfills/${data.context.backfill.id}`}>
<Badge label="BACKFILL" kind="alt" />
</Link>
</span> : null}
</dd>
{data.startTime
? [
<dt key="startTime">Start time:</dt>,
Expand Down
14 changes: 12 additions & 2 deletions core/src/main/javascript/app/pages/TimeSeriesExecutions.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Spinner from "../components/Spinner";
import Link from "../components/Link";
import Clock from "../components/Clock";
import JobStatus from "../components/JobStatus";
import { Badge } from "../components/Badge";
import { listenEvents } from "../../Utils";
import type { ExecutionLog, Job } from "../../datamodel";

Expand Down Expand Up @@ -188,10 +189,19 @@ class TimeSeriesExecutions extends React.Component {
onSortBy={this.sortBy.bind(this)}
sort={sort}
data={sortedData}
render={(column, { id, startTime, endTime, status }) => {
render={(
column,
{ id, startTime, endTime, status, context }
) => {
switch (column) {
case "backfill":
return <span className={classes.missing}>no</span>;
return context.backfill
? <Link
href={`/timeseries/backfills/${context.backfill.id}`}
>
<Badge label="BACKFILL" kind="alt" width={75} />
</Link>
: <span className={classes.missing}>no</span>;
case "startTime":
return startTime
? <Clock
Expand Down

0 comments on commit 9f82dd1

Please sign in to comment.