Skip to content
Permalink
Browse files

reformat all (#393)

  • Loading branch information...
eryshev committed Apr 30, 2019
1 parent a93b76d commit 25ed774c7b6552af744c8f760e163972b5b6dacc
@@ -214,6 +214,7 @@ const mapDispatchToProps = dispatch => ({
}
});

export default connect(mapStateToProps, mapDispatchToProps)(
injectSheet(styles)(App)
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(injectSheet(styles)(App));
@@ -42,13 +42,13 @@ export class PostEventSource {
.then(data => data.json())
.then(
data => {
if(this._polling) {
if (this._polling) {
this._observers.forEach(o => o({ data }));
this._poller = setTimeout(() => poll(), 5000);
}
},
err => {
if(this._polling) {
if (this._polling) {
this._poller = setTimeout(() => poll(), 15000);
}
}
@@ -141,14 +141,13 @@ class JobSelector extends React.Component<Props, State> {
<JobIcon className={classes.optionIcon} />
)}
{label}
{others &&
others.length > 0 && (
<em className={classes.more}>
{`${kind != "tag" ? "+" : ""}${others.length} job${
others.length > 1 ? "s" : ""
}`}
</em>
)}
{others && others.length > 0 && (
<em className={classes.more}>
{`${kind != "tag" ? "+" : ""}${others.length} job${
others.length > 1 ? "s" : ""
}`}
</em>
)}
</span>
);

@@ -55,6 +55,7 @@ const styles = {
}
};

export default connect(mapStateToProps, mapDispatchToProps)(
injectSheet(styles)(Link)
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(injectSheet(styles)(Link));
@@ -76,4 +76,7 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
}
});

export default connect(null, mapDispatchToProps)(injectSheet(styles)(Window));
export default connect(
null,
mapDispatchToProps
)(injectSheet(styles)(Window));
@@ -404,6 +404,9 @@ const mapDispatchToProps = dispatch => ({

export default compose(
injectSheet(styles),
connect(mapStateToProps, mapDispatchToProps),
connect(
mapStateToProps,
mapDispatchToProps
),
reduxForm({ form: "backfillForm" })
)(BackfillCreate);
@@ -319,5 +319,8 @@ const mapDispatchToProps = dispatch => ({

export default compose(
injectSheet(styles),
connect(mapStateToProps, mapDispatchToProps)
connect(
mapStateToProps,
mapDispatchToProps
)
)(Backfills);
@@ -109,10 +109,10 @@ class Calendar extends React.Component<Props, State> {
stuck
? "stuck"
: completion == 1
? "done"
: completion == 0
? "todo"
: `progress-${completion.toString().substring(2, 3)}`
? "done"
: completion == 0
? "todo"
: `progress-${completion.toString().substring(2, 3)}`
].concat(backfill ? ["backfill"] : []),
component: ["day"]
};
@@ -289,6 +289,7 @@ const mapDispatchToProps = dispatch => ({
}
});

export default connect(mapStateToProps, mapDispatchToProps)(
injectSheet(styles)(Calendar)
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(injectSheet(styles)(Calendar));
@@ -110,14 +110,13 @@ let tickFormat = date =>
(d3.utcHour(date) < date
? d3.utcFormat("")
: d3.utcDay(date) < date
? d3.utcFormat("%H:00")
: d3.utcFormat("%Y-%m-%d"))(date);
? d3.utcFormat("%H:00")
: d3.utcFormat("%Y-%m-%d"))(date);

let getMaxLabelWidth = (jobNames, svg, jobNameClass) => {
let g = svg.append("g").attr("id", "widthHack");
_.forEach(jobNames, job => {
g
.append("text")
g.append("text")
.attr("class", jobNameClass)
.text(job);
});
@@ -163,14 +162,14 @@ const jobPeriodsHelper = (x1, x2, showExecutions, drillDown) => ({
status == "failed"
? "#e91e63"
: status == "successful"
? "#62cc64"
: status == "waiting"
? "#ffbc5a"
: status == "running"
? "#49d3e4"
: status == "paused"
? "#ffaaff"
: "#ecf1f5",
? "#62cc64"
: status == "waiting"
? "#ffbc5a"
: status == "running"
? "#49d3e4"
: status == "paused"
? "#ffaaff"
: "#ecf1f5",
// For aggregated periods, we want to zoom on click
click: ({ period, jobId, aggregated }) =>
aggregated
@@ -219,9 +218,8 @@ const drawJobPeriods = (
const newPeriodSlot = enterPeriodNode
.append("g")
.attr("class", classNames("periodSlot", periodClass))
.attr(
"data-tip",
d => (d.aggregated || summary ? aggregatedHelper.tip(d) : helper.tip(d))
.attr("data-tip", d =>
d.aggregated || summary ? aggregatedHelper.tip(d) : helper.tip(d)
)
.attr("transform", helper.translate);

@@ -255,14 +253,12 @@ const drawJobPeriods = (
"width",
d => adjustedWidth(d) - (d.aggregated || summary ? strokeWidth : 0)
)
.attr(
"fill",
d => (d.aggregated || summary ? aggregatedHelper.fill(d) : helper.fill(d))
.attr("fill", d =>
d.aggregated || summary ? aggregatedHelper.fill(d) : helper.fill(d)
)
.attr("stroke-width", d => (d.aggregated || summary ? strokeWidth : 0))
.attr(
"stroke",
d => (d.aggregated || summary ? helper.stroke(d) : "transparent")
.attr("stroke", d =>
d.aggregated || summary ? helper.stroke(d) : "transparent"
)
.style("cursor", cursor);

@@ -478,9 +474,8 @@ class CalendarFocus extends React.Component<Props, State> {

// display legend for every distinct project version
const versions = Object.keys(jobs).map(k =>
jobs[k].map(
periodSlot =>
!periodSlot.aggregated ? periodSlot.version : undefined
jobs[k].map(periodSlot =>
!periodSlot.aggregated ? periodSlot.version : undefined
)
);
const distinctVersions = [...new Set([].concat(...versions))].filter(
@@ -824,6 +819,7 @@ const mapDispatchToProps = dispatch => ({
}
});

export default connect(mapStateToProps, mapDispatchToProps)(
injectSheet(styles)(CalendarFocus)
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(injectSheet(styles)(CalendarFocus));
@@ -55,7 +55,7 @@ const ProgressBarComponent = ({
const height = 8;
const barWidth =
totalTimeSeconds !== 0
? waitingTimeSeconds / totalTimeSeconds * totalWidth
? (waitingTimeSeconds / totalTimeSeconds) * totalWidth
: 0;

const tooltip =
@@ -442,7 +442,10 @@ const mapDispatchToProps = dispatch => ({
}
});

export const Finished = connect(mapStateToProps, mapDispatchToProps)(
export const Finished = connect(
mapStateToProps,
mapDispatchToProps
)(
injectSheet(styles)(
({
classes,
@@ -483,7 +486,10 @@ export const Finished = connect(mapStateToProps, mapDispatchToProps)(
)
);

export const Started = connect(mapStateToProps, mapDispatchToProps)(
export const Started = connect(
mapStateToProps,
mapDispatchToProps
)(
injectSheet(styles)(
({
classes,
@@ -524,7 +530,10 @@ export const Started = connect(mapStateToProps, mapDispatchToProps)(
)
);

export const Stuck = connect(mapStateToProps, mapDispatchToProps)(
export const Stuck = connect(
mapStateToProps,
mapDispatchToProps
)(
injectSheet(styles)(
({
classes,
@@ -590,7 +599,10 @@ export const Stuck = connect(mapStateToProps, mapDispatchToProps)(
)
);

export const BackfillsExecutions = connect(mapStateToProps, mapDispatchToProps)(
export const BackfillsExecutions = connect(
mapStateToProps,
mapDispatchToProps
)(
injectSheet(styles)(
({
classes,
@@ -430,5 +430,8 @@ const mapDispatchToProps = dispatch => ({

export const Jobs = compose(
injectSheet(styles),
connect(mapStateToProps, mapDispatchToProps)
connect(
mapStateToProps,
mapDispatchToProps
)
)(JobsComp);
@@ -373,6 +373,7 @@ const mapStateToProps = ({ app: { project } }) => ({
});
const mapDispatchToProps = () => ({});

export default connect(mapStateToProps, mapDispatchToProps)(
injectSheet(styles)(TimeSeriesExecutions)
);
export default connect(
mapStateToProps,
mapDispatchToProps
)(injectSheet(styles)(TimeSeriesExecutions));
@@ -567,6 +567,9 @@ const mapStateToProps = ({
}
}) => ({ showDetail, refPath });

export default connect(mapStateToProps, dispatch => ({
navTo: link => dispatch(navigate(link))
}))(injectSheet(styles)(WorkflowComponent));
export default connect(
mapStateToProps,
dispatch => ({
navTo: link => dispatch(navigate(link))
})
)(injectSheet(styles)(WorkflowComponent));
@@ -13,8 +13,7 @@ const dagger = buildDagger(overallGraph, {
setup: minimap => {
minimap.nodes().on("mouseover", event => {
const target = event.cyTarget;
d3
.select("#minimap-hover-node")
d3.select("#minimap-hover-node")
.style("opacity", 0)
.text(target.id())
.style("opacity", 1);
@@ -39,9 +39,8 @@ const computeDijkstraPath = (minimap, start) => {
const path = minimap.elements().dijkstra(minimap.getElementById(start));
return end =>
compact(
map(
path.pathTo(minimap.getElementById(end)),
n => (n.isNode() ? n.id() : null)
map(path.pathTo(minimap.getElementById(end)), n =>
n.isNode() ? n.id() : null
)
);
};
@@ -283,9 +283,8 @@ const tagBulletVerticalOffset = ({ height }) => {

// join words by whitespace, unless it's delimited by -_
const joinWords = (words: Array<string>): string =>
reduce(
words,
(acc, word) => (/[-_]$/.test(acc) ? acc + word : acc + " " + word)
reduce(words, (acc, word) =>
/[-_]$/.test(acc) ? acc + word : acc + " " + word
);

export const drawNode = (

0 comments on commit 25ed774

Please sign in to comment.
You can’t perform that action at this time.