Commit 216f795b authored by Lukas Eipert's avatar Lukas Eipert

Run prettier on 31 files - 24 of 73

Part of our prettier migration; changing the arrow-parens style.
parent b1f29131
......@@ -9,7 +9,7 @@ export default class PerformanceBarService {
}
static registerInterceptor(peekUrl, callback) {
PerformanceBarService.interceptor = response => {
PerformanceBarService.interceptor = (response) => {
const [fireCallback, requestId, requestUrl] = PerformanceBarService.callbackParams(
response,
peekUrl,
......
......@@ -20,7 +20,7 @@ export default class PerformanceBarStore {
}
findRequest(requestId) {
return this.requests.find(request => request.id === requestId);
return this.requests.find((request) => request.id === requestId);
}
addRequestDetails(requestId, requestDetails) {
......@@ -43,13 +43,13 @@ export default class PerformanceBarStore {
}
requestsWithDetails() {
return this.requests.filter(request => request.details);
return this.requests.filter((request) => request.details);
}
canTrackRequest(requestUrl) {
return (
requestUrl.endsWith('/api/graphql') ||
this.requests.filter(request => request.url === requestUrl).length < 2
this.requests.filter((request) => request.url === requestUrl).length < 2
);
}
......
......@@ -28,10 +28,10 @@ export default class PersistentUserCallout {
}
handleCloseButtonCallout(closeButton) {
closeButton.addEventListener('click', event => this.dismiss(event));
closeButton.addEventListener('click', (event) => this.dismiss(event));
if (this.deferLinks) {
this.container.addEventListener('click', event => {
this.container.addEventListener('click', (event) => {
const isDeferredLink = event.target.classList.contains(DEFERRED_LINK_CLASS);
if (isDeferredLink) {
const { href, target } = event.target;
......@@ -43,7 +43,7 @@ export default class PersistentUserCallout {
}
handleFollowLinkCallout(followLink) {
followLink.addEventListener('click', event => this.registerCalloutWithLink(event));
followLink.addEventListener('click', (event) => this.registerCalloutWithLink(event));
}
dismiss(event, deferredLinkOptions = null) {
......
......@@ -11,7 +11,7 @@ const PERSISTENT_USER_CALLOUTS = [
];
const initCallouts = () => {
PERSISTENT_USER_CALLOUTS.forEach(calloutContainer =>
PERSISTENT_USER_CALLOUTS.forEach((calloutContainer) =>
PersistentUserCallout.factory(document.querySelector(calloutContainer)),
);
};
......
......@@ -18,7 +18,7 @@ export const resolvers = {
valid: data.valid,
errors: data.errors,
warnings: data.warnings,
jobs: data.jobs.map(job => {
jobs: data.jobs.map((job) => {
const only = job.only ? { refs: job.only.refs, __typename: 'CiLintJobOnlyPolicy' } : null;
return {
......
......@@ -121,12 +121,12 @@ export default {
return this.searchTerm.toLowerCase();
},
filteredBranches() {
return this.branches.filter(branch =>
return this.branches.filter((branch) =>
branch.shortName.toLowerCase().includes(this.lowerCasedSearchTerm),
);
},
filteredTags() {
return this.tags.filter(tag =>
return this.tags.filter((tag) =>
tag.shortName.toLowerCase().includes(this.lowerCasedSearchTerm),
);
},
......@@ -187,7 +187,7 @@ export default {
setVariable(refValue, type, key, value) {
const { variables } = this.form[refValue];
const variable = variables.find(v => v.key === key);
const variable = variables.find((v) => v.key === key);
if (variable) {
variable.type = type;
variable.value = value;
......@@ -270,11 +270,11 @@ export default {
stop(data);
}
})
.catch(error => {
.catch((error) => {
stop(error);
});
}, CONFIG_VARIABLES_TIMEOUT)
.then(data => {
.then((data) => {
const params = {};
const descriptions = {};
......@@ -287,7 +287,7 @@ export default {
return { params, descriptions };
})
.catch(error => {
.catch((error) => {
this.isLoading = false;
Sentry.captureException(error);
......@@ -314,7 +314,7 @@ export default {
.then(({ data }) => {
redirectTo(`${this.pipelinesPath}/${data.id}`);
})
.catch(err => {
.catch((err) => {
const { errors, warnings, total_warnings: totalWarnings } = err.response.data;
const [error] = errors;
this.error = error;
......
......@@ -3,7 +3,7 @@ import { BRANCH_REF_TYPE, TAG_REF_TYPE } from '../constants';
export default (refs, type) => {
let fullName;
return refs.map(ref => {
return refs.map((ref) => {
if (type === BRANCH_REF_TYPE) {
fullName = `refs/heads/${ref}`;
} else if (type === TAG_REF_TYPE) {
......
......@@ -56,15 +56,15 @@ export default {
const unwrappedGroups = stages
.map(({ name, groups: { nodes: groups } }) => {
return groups.map(group => {
return groups.map((group) => {
return { category: name, ...group };
});
})
.flat(2);
const nodes = unwrappedGroups.map(group => {
const nodes = unwrappedGroups.map((group) => {
const jobs = group.jobs.nodes.map(({ name, needs }) => {
return { name, needs: needs.nodes.map(need => need.name) };
return { name, needs: needs.nodes.map((need) => need.name) };
});
return { ...group, jobs };
......
......@@ -173,7 +173,7 @@ export default {
createClip(link) {
return link
.append('clipPath')
.attr('id', d => {
.attr('id', (d) => {
return this.createAndAssignId(d, 'clipId', 'dag-clip');
})
.append('path')
......@@ -183,7 +183,7 @@ export default {
createGradient(link) {
const gradient = link
.append('linearGradient')
.attr('id', d => {
.attr('id', (d) => {
return this.createAndAssignId(d, 'gradId', 'dag-grad');
})
.attr('gradientUnits', 'userSpaceOnUse')
......@@ -251,7 +251,7 @@ export default {
.data(linksData)
.enter()
.append('g')
.attr('id', d => {
.attr('id', (d) => {
return this.createAndAssignId(d, 'uid', LINK_SELECTOR);
})
.classed(
......@@ -273,10 +273,10 @@ export default {
`${NODE_SELECTOR} gl-transition-property-stroke ${this.$options.viewOptions.hoverFadeClasses}`,
true,
)
.attr('id', d => {
.attr('id', (d) => {
return this.createAndAssignId(d, 'uid', NODE_SELECTOR);
})
.attr('stroke', d => {
.attr('stroke', (d) => {
const color = this.color(d);
/* eslint-disable-next-line no-param-reassign */
d.color = color;
......@@ -284,10 +284,10 @@ export default {
})
.attr('stroke-width', nodeWidth)
.attr('stroke-linecap', 'round')
.attr('x1', d => Math.floor((d.x1 + d.x0) / 2))
.attr('x2', d => Math.floor((d.x1 + d.x0) / 2))
.attr('y1', d => d.y0 + 4)
.attr('y2', d => d.y1 - 4);
.attr('x1', (d) => Math.floor((d.x1 + d.x0) / 2))
.attr('x2', (d) => Math.floor((d.x1 + d.x0) / 2))
.attr('y1', (d) => d.y0 + 4)
.attr('y2', (d) => d.y1 - 4);
},
initColors() {
......
......@@ -92,8 +92,8 @@ export const createSankey = ({
]);
return ({ nodes, links }) =>
sankeyGenerator({
nodes: nodes.map(d => ({ ...d })),
links: links.map(d => ({ ...d })),
nodes: nodes.map((d) => ({ ...d })),
links: links.map((d) => ({ ...d })),
});
};
......
......@@ -13,22 +13,22 @@ export const getLiveLinksAsDict = () => {
return Object.fromEntries(
getLiveLinks()
.data()
.map(d => [d.uid, d]),
.map((d) => [d.uid, d]),
);
};
export const currentIsLive = (idx, collection) =>
getCurrent(idx, collection).classed(IS_HIGHLIGHTED);
const backgroundLinks = selection => selection.style('stroke-opacity', highlightOut);
const backgroundNodes = selection => selection.attr('stroke', '#f2f2f2');
const foregroundLinks = selection => selection.style('stroke-opacity', highlightIn);
const foregroundNodes = selection => selection.attr('stroke', d => d.color);
const backgroundLinks = (selection) => selection.style('stroke-opacity', highlightOut);
const backgroundNodes = (selection) => selection.attr('stroke', '#f2f2f2');
const foregroundLinks = (selection) => selection.style('stroke-opacity', highlightIn);
const foregroundNodes = (selection) => selection.attr('stroke', (d) => d.color);
const renewLinks = (selection, baseOpacity) => selection.style('stroke-opacity', baseOpacity);
const renewNodes = selection => selection.attr('stroke', d => d.color);
const renewNodes = (selection) => selection.attr('stroke', (d) => d.color);
export const getAllLinkAncestors = node => {
export const getAllLinkAncestors = (node) => {
if (node.targetLinks) {
return node.targetLinks.flatMap(n => {
return node.targetLinks.flatMap((n) => {
return [n, ...getAllLinkAncestors(n.source)];
});
}
......@@ -36,11 +36,11 @@ export const getAllLinkAncestors = node => {
return [];
};
const getAllNodeAncestors = node => {
const getAllNodeAncestors = (node) => {
let allNodes = [];
if (node.targetLinks) {
allNodes = node.targetLinks.flatMap(n => {
allNodes = node.targetLinks.flatMap((n) => {
return getAllNodeAncestors(n.source);
});
}
......@@ -74,7 +74,7 @@ const highlightPath = (parentLinks, parentNodes) => {
});
/* highlight correct nodes */
parentNodes.forEach(id => {
parentNodes.forEach((id) => {
foregroundNodes(d3.select(`#${id}`)).classed(IS_HIGHLIGHTED, true);
});
};
......@@ -86,7 +86,7 @@ const restoreNodes = () => {
rehighlights their nodes.
*/
getLiveLinks().each(d => {
getLiveLinks().each((d) => {
foregroundNodes(d3.select(`#${d.source.uid}`)).classed(IS_HIGHLIGHTED, true);
foregroundNodes(d3.select(`#${d.target.uid}`)).classed(IS_HIGHLIGHTED, true);
});
......@@ -97,7 +97,7 @@ const restorePath = (parentLinks, parentNodes, baseOpacity) => {
renewLinks(d3.select(`#${uid}`), baseOpacity).classed(IS_HIGHLIGHTED, false);
});
parentNodes.forEach(id => {
parentNodes.forEach((id) => {
d3.select(`#${id}`).classed(IS_HIGHLIGHTED, false);
});
......@@ -112,7 +112,7 @@ const restorePath = (parentLinks, parentNodes, baseOpacity) => {
restoreNodes();
};
export const restoreLinks = baseOpacity => {
export const restoreLinks = (baseOpacity) => {
/*
if there exist live links, reset to highlight out / pale
otherwise, reset to base
......
......@@ -78,11 +78,11 @@ export default {
return (
this.pipeline.triggered_by &&
Array.isArray(this.pipeline.triggered_by) &&
this.pipeline.triggered_by.find(el => el.isExpanded)
this.pipeline.triggered_by.find((el) => el.isExpanded)
);
},
expandedDownstream() {
return this.pipeline.triggered && this.pipeline.triggered.find(el => el.isExpanded);
return this.pipeline.triggered && this.pipeline.triggered.find((el) => el.isExpanded);
},
pipelineTypeUpstream() {
return this.type !== this.$options.downstream && this.expandedUpstream;
......
......@@ -9,7 +9,7 @@ const addMulti = (mainPipelineProjectPath, linkedPipeline) => {
};
};
const transformId = linkedPipeline => {
const transformId = (linkedPipeline) => {
return { ...linkedPipeline, id: getIdFromGraphQLId(linkedPipeline.id) };
};
......@@ -42,7 +42,7 @@ const unwrapPipelineData = (mainPipelineProjectPath, data) => {
};
const toggleQueryPollingByVisibility = (queryRef, interval = 10000) => {
const stopStartQuery = query => {
const stopStartQuery = (query) => {
if (!Visibility.hidden()) {
query.startPolling(interval);
} else {
......
......@@ -54,7 +54,7 @@ export default {
iid: this.pipelineIid,
};
},
update: data => data.project.pipeline,
update: (data) => data.project.pipeline,
error() {
this.reportFailure(LOAD_FAILURE);
},
......
......@@ -33,15 +33,15 @@ import { uniqWith, isEqual } from 'lodash';
10 -> value (constant)
*/
export const createNodeDict = nodes => {
export const createNodeDict = (nodes) => {
return nodes.reduce((acc, node) => {
const newNode = {
...node,
needs: node.jobs.map(job => job.needs || []).flat(),
needs: node.jobs.map((job) => job.needs || []).flat(),
};
if (node.size > 1) {
node.jobs.forEach(job => {
node.jobs.forEach((job) => {
acc[job.name] = newNode;
});
}
......@@ -54,13 +54,13 @@ export const createNodeDict = nodes => {
export const makeLinksFromNodes = (nodes, nodeDict) => {
const constantLinkValue = 10; // all links are the same weight
return nodes
.map(group => {
return group.jobs.map(job => {
.map((group) => {
return group.jobs.map((job) => {
if (!job.needs) {
return [];
}
return job.needs.map(needed => {
return job.needs.map((needed) => {
return {
source: nodeDict[needed]?.name,
target: group.name,
......@@ -74,7 +74,7 @@ export const makeLinksFromNodes = (nodes, nodeDict) => {
export const getAllAncestors = (nodes, nodeDict) => {
const needs = nodes
.map(node => {
.map((node) => {
return nodeDict[node].needs || '';
})
.flat()
......@@ -102,13 +102,13 @@ export const filterByAncestors = (links, nodeDict) =>
*/
const targetNode = target;
const targetNodeNeeds = nodeDict[targetNode].needs;
const targetNodeNeedsMinusSource = targetNodeNeeds.filter(need => need !== source);
const targetNodeNeedsMinusSource = targetNodeNeeds.filter((need) => need !== source);
const allAncestors = getAllAncestors(targetNodeNeedsMinusSource, nodeDict);
return !allAncestors.includes(source);
});
export const parseData = nodes => {
export const parseData = (nodes) => {
const nodeDict = createNodeDict(nodes);
const allLinks = makeLinksFromNodes(nodes, nodeDict);
const filteredLinks = filterByAncestors(allLinks, nodeDict);
......@@ -121,7 +121,7 @@ export const parseData = nodes => {
The number of nodes in the most populous generation drives the height of the graph.
*/
export const getMaxNodes = nodes => {
export const getMaxNodes = (nodes) => {
const counts = nodes.reduce((acc, { layer }) => {
if (!acc[layer]) {
acc[layer] = 0;
......@@ -141,6 +141,6 @@ export const getMaxNodes = nodes => {
to find nodes that have no relations.
*/
export const removeOrphanNodes = sankeyfiedNodes => {
return sankeyfiedNodes.filter(node => node.sourceLinks.length || node.targetLinks.length);
export const removeOrphanNodes = (sankeyfiedNodes) => {
return sankeyfiedNodes.filter((node) => node.sourceLinks.length || node.targetLinks.length);
};
......@@ -14,7 +14,7 @@ import { createUniqueLinkId } from '../../utils';
export const generateLinksData = ({ links }, containerID) => {
const containerEl = document.getElementById(containerID);
return links.map(link => {
return links.map((link) => {
const path = d3.path();
const sourceId = link.source;
......
......@@ -111,13 +111,13 @@ export default {
// If you are hovering on a job, then the links we want to highlight are:
// All the links whose `source` and `target` are highlighted jobs.
if (this.hasHighlightedJob) {
const filteredLinks = this.links.filter(link => {
const filteredLinks = this.links.filter((link) => {
return (
this.highlightedJobs.includes(link.source) && this.highlightedJobs.includes(link.target)
);
});
return filteredLinks.map(link => link.ref);
return filteredLinks.map((link) => link.ref);
}
return [];
......
......@@ -246,7 +246,7 @@ export default {
filterPipelines(filters) {
this.resetRequestData();
filters.forEach(filter => {
filters.forEach((filter) => {
// do not add Any for username query param, so we
// can fetch all trigger authors
if (
......
......@@ -33,7 +33,7 @@ export default {
},
computed: {
selectedTypes() {
return this.value.map(i => i.type);
return this.value.map((i) => i.type);
},
tokens() {
return [
......
......@@ -124,7 +124,7 @@ export default {
$(
'.js-builds-dropdown-list button, .js-builds-dropdown-list a.mini-pipeline-graph-dropdown-item',
this.$el,
).on('click', e => {
).on('click', (e) => {
e.stopPropagation();
});
},
......
......@@ -34,10 +34,10 @@ export default {
fetchBranches(searchterm) {
Api.branches(this.config.projectId, searchterm)
.then(({ data }) => {
this.branches = data.map(branch => branch.name);
this.branches = data.map((branch) => branch.name);
this.loading = false;
})
.catch(err => {
.catch((err) => {
createFlash(FETCH_BRANCH_ERROR_MESSAGE);
this.loading = false;
throw err;
......
......@@ -72,7 +72,7 @@ export default {
];
},
findActiveStatus() {
return this.statuses.find(status => status.value === this.value.data);
return this.statuses.find((status) => status.value === this.value.data);
},
},
};
......
......@@ -34,10 +34,10 @@ export default {
fetchTags(searchTerm) {
Api.tags(this.config.projectId, searchTerm)
.then(({ data }) => {
this.tags = data.map(tag => tag.name);
this.tags = data.map((tag) => tag.name);
this.loading = false;
})
.catch(err => {
.catch((err) => {
createFlash(FETCH_TAG_ERROR_MESSAGE);
this.loading = false;
throw err;
......
......@@ -45,7 +45,7 @@ export default {
return this.value.data.toLowerCase();
},
activeUser() {
return this.users.find(user => {
return this.users.find((user) => {
return user.username.toLowerCase() === this.currentValue;
});
},
......@@ -56,11 +56,11 @@ export default {
methods: {
fetchProjectUsers(searchTerm) {
Api.projectUsers(this.config.projectId, searchTerm)
.then(users => {
.then((users) => {
this.users = users;
this.loading = false;
})
.catch(err => {
.catch((err) => {
createFlash(FETCH_AUTHOR_ERROR_MESSAGE);
this.loading = false;
throw err;
......
......@@ -8,15 +8,15 @@
export const unwrapArrayOfJobs = (stages = []) => {
return stages
.map(({ name, groups }) => {
return groups.map(group => {
return groups.map((group) => {
return { category: name, ...group };
});
})
.flat(2);
};
const unwrapGroups = stages => {
return stages.map(stage => {
const unwrapGroups = (stages) => {
return stages.map((stage) => {
const {
groups: { nodes: groups },
} = stage;
......@@ -25,21 +25,21 @@ const unwrapGroups = stages => {
};
const unwrapNodesWithName = (jobArray, prop, field = 'name') => {
return jobArray.map(job => {
return { ...job, [prop]: job[prop].nodes.map(item => item[field]) };
return jobArray.map((job) => {
return { ...job, [prop]: job[prop].nodes.map((item) => item[field]) };
});
};
const unwrapJobWithNeeds = denodedJobArray => {
const unwrapJobWithNeeds = (denodedJobArray) => {
return unwrapNodesWithName(denodedJobArray, 'needs');
};
const unwrapStagesWithNeeds = denodedStages => {
const unwrapStagesWithNeeds = (denodedStages) => {
const unwrappedNestedGroups = unwrapGroups(denodedStages);
const nodes = unwrappedNestedGroups.map(node => {
const nodes = unwrappedNestedGroups.map((node) => {
const { groups } = node;
const groupsWithJobs = groups.map(group => {
const groupsWithJobs = groups.map((group) => {
const jobs = unwrapJobWithNeeds(group.jobs.nodes);
return { ...group, jobs };
});
......
......@@ -6,7 +6,7 @@ export default {
getExpandedPipelines(pipeline) {
this.mediator.service
.getPipeline(this.mediator.getExpandedParameters())
.then(response => {
.then((response) => {
this.mediator.store.toggleLoading(pipeline);
this.mediator.store.storePipeline(response.data);
this.mediator.poll.enable({ data: this.mediator.getExpandedParameters() });
......
......@@ -90,7 +90,7 @@ export default {
// fetch new data
return this.service
.getPipelines(this.requestData)
.then(response => {
.then((response) => {
this.isLoading = false;
this.successCallback(response);
......@@ -124,8 +124,8 @@ export default {
getPipelines() {
return this.service
.getPipelines(this.requestData)
.then(response => this.successCallback(response))
.catch(error => this.errorCallback(error));
.then((response) => this.successCallback(response))
.catch((error) => this.errorCallback(error));
},
setCommonData(pipelines) {
this.store.storePipelines(pipelines);
......
......@@ -20,7 +20,7 @@ const SELECTORS = {
PIPELINE_TESTS: '#js-pipeline-tests-detail',
};
const createLegacyPipelinesDetailApp = mediator => {
const createLegacyPipelinesDetailApp = (mediator) => {
if (!document.querySelector(SELECTORS.PIPELINE_GRAPH)) {
return;
}
......@@ -47,15 +47,15 @@ const createLegacyPipelinesDetailApp = mediator => {
refreshPipelineGraph: this.requestRefreshPipelineGraph,
onResetDownstream: (parentPipeline, pipeline) =>
this.resetDownstreamPipelines(parentPipeline, pipeline),
onClickUpstreamPipeline: pipeline => this.clickUpstreamPipeline(pipeline),
onClickDownstreamPipeline: pipeline => this.clickDownstreamPipeline(pipeline),
onClickUpstreamPipeline: (pipeline) => this.clickUpstreamPipeline(pipeline),
onClickDownstreamPipeline: (pipeline) => this.clickDownstreamPipeline(pipeline),
},
});
},
});
};
const createLegacyPipelineHeaderApp = mediator => {
const createLegacyPipelineHeaderApp = (mediator) => {
if (!document.querySelector(SELECTORS.PIPELINE_HEADER)) {
return;
}
......
......@@ -9,7 +9,7 @@ const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export const createPipelineHeaderApp = elSelector => {
export const createPipelineHeaderApp = (elSelector) => {
const el = document.querySelector(elSelector);
if (!el) {
......
......@@ -55,7 +55,7 @@ export default class pipelinesMediator {
return this.service
.getPipeline()
.then(response => this.successCallback(response))
.then((response) => this.successCallback(response))
.catch(() => this.errorCallback())
.finally(() =>
this.poll.restart(
......
......@@ -29,11 +29,11 @@ export default class PipelineStore {
}
if (pipelineCopy.triggered && pipelineCopy.triggered.length) {
pipelineCopy.triggered.forEach(el => {
pipelineCopy.triggered.forEach((el) => {
const oldPipeline =
this.state.pipeline &&
this.state.pipeline.triggered &&
this.state.pipeline.triggered.find(element => element.id === el.id);
this.state.pipeline.triggered.find((element) => element.id === el.id);
this.parseTriggeredPipelines(oldPipeline, el);
});
......@@ -67,8 +67,8 @@ export default class PipelineStore {
}
if (newPipeline.triggered_by?.length > 0) {
newPipeline.triggered_by.forEach(el => {
const oldTriggeredBy = oldPipeline.triggered_by?.find(element => element.id === el.id);
newPipeline.triggered_by.forEach((el) => {
const oldTriggeredBy = oldPipeline.triggered_by?.find((element) => element.id === el.id);
this.parseTriggeredPipelines(oldTriggeredBy, el);
});
}
......@@ -88,9 +88,9 @@ export default class PipelineStore {
Vue.set(newPipeline, 'isLoading', false);
if (newPipeline.triggered && newPipeline.triggered.length > 0) {
newPipeline.triggered.forEach(el => {
newPipeline.triggered.forEach((el) => {
const oldTriggered =
oldPipeline.triggered && oldPipeline.triggered.find(element => element.id === el.id);
oldPipeline.triggered && oldPipeline.triggered.find((element) => element.id === el.id);
this.parseTriggeredPipelines(oldTriggered, el);
});
}
......@@ -102,7 +102,7 @@ export default class PipelineStore {
* @param {Object} pipeline
*/
resetTriggeredByPipeline(parentPipeline, pipeline) {
parentPipeline.triggered_by.forEach(el => this.closePipeline(el));
parentPipeline.triggered_by.forEach((el) => this.closePipeline(el));
if (pipeline.triggered_by && pipeline.triggered_by) {
this.resetTriggeredByPipeline(pipeline, pipeline.triggered_by);
......@@ -129,7 +129,7 @@ export default class PipelineStore {
this.closePipeline(pipeline);
if (pipeline.triggered_by && pipeline.triggered_by.length) {
pipeline.triggered_by.forEach(triggeredBy => this.closeTriggeredByPipeline(triggeredBy));
pipeline.triggered_by.forEach((triggeredBy) => this.closeTriggeredByPipeline(triggeredBy));
}
}
......@@ -139,10 +139,10 @@ export default class PipelineStore {
* @param {Object} pipeline
*/
resetTriggeredPipelines(parentPipeline, pipeline) {
parentPipeline.triggered.forEach(el => this.closePipeline(el));
parentPipeline.triggered.forEach((el) => this.closePipeline(el));
if (pipeline.triggered && pipeline.triggered.length) {
pipeline.triggered.forEach(el => this.resetTriggeredPipelines(pipeline, el));
pipeline.triggered.forEach((el) => this.resetTriggeredPipelines(pipeline, el));
}
}
......@@ -165,7 +165,7 @@ export default class PipelineStore {
this.closePipeline(pipeline);
if (pipeline.triggered && pipeline.triggered.length) {
pipeline.triggered.forEach(triggered => this.closeTriggeredPipeline(triggered));
pipeline.triggered.forEach((triggered) => this.closeTriggeredPipeline(triggered));
}
}
......@@ -199,7 +199,7 @@ export default class PipelineStore {
removeExpandedPipelineToRequestData(id) {
this.state.expandedPipelines.splice(
this.state.expandedPipelines.findIndex(el => el === id),
this.state.expandedPipelines.findIndex((el) => el === id),
1,
);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment