Commit 930596aa authored by Sarah GP's avatar Sarah GP

Lint and prettify

parent d82880b2
<script> <script>
import { isEmpty } from 'lodash';
import { GlAlert } from '@gitlab/ui'; import { GlAlert } from '@gitlab/ui';
import { isEmpty } from 'lodash';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { import {
PIPELINES_DETAIL_LINKS_MARK_CALCULATE_START, PIPELINES_DETAIL_LINKS_MARK_CALCULATE_START,
...@@ -12,9 +12,9 @@ import { ...@@ -12,9 +12,9 @@ import {
} from '~/performance/constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance/utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import { reportToSentry } from '../graph/utils'; import { reportToSentry } from '../graph/utils';
import LinksInner from './links_inner.vue';
import { parseData } from '../parsing_utils'; import { parseData } from '../parsing_utils';
import { reportPerformance } from './api'; import { reportPerformance } from './api';
import LinksInner from './links_inner.vue';
export default { export default {
name: 'LinksLayer', name: 'LinksLayer',
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
neverShowLinks: { neverShowLinks: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false,
}, },
}, },
data() { data() {
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
needing to remove the component entirely for iteration or based on graph type. needing to remove the component entirely for iteration or based on graph type.
*/ */
if (this.neverShowLinks) { if (this.neverShowLinks) {
return false; return false;
} }
return !this.containerZero && !this.showLinkedLayers && !this.alertDismissed; return !this.containerZero && !this.showLinkedLayers && !this.alertDismissed;
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
errorCaptured(err, _vm, info) { errorCaptured(err, _vm, info) {
reportToSentry(this.$options.name, `error: ${err}, info: ${info}`); reportToSentry(this.$options.name, `error: ${err}, info: ${info}`);
}, },
mounted(){ mounted() {
/* /*
This is code to get metrics for the graph (to observe links performance). This is code to get metrics for the graph (to observe links performance).
It is currently here because we want values for links without drawing them. It is currently here because we want values for links without drawing them.
...@@ -106,9 +106,8 @@ export default { ...@@ -106,9 +106,8 @@ export default {
if (this.neverShowLinks && !isEmpty(this.pipelineData)) { if (this.neverShowLinks && !isEmpty(this.pipelineData)) {
window.requestAnimationFrame(() => { window.requestAnimationFrame(() => {
this.prepareLinkData(); this.prepareLinkData();
}) });
} }
}, },
methods: { methods: {
beginPerfMeasure() { beginPerfMeasure() {
...@@ -117,7 +116,6 @@ export default { ...@@ -117,7 +116,6 @@ export default {
} }
}, },
finishPerfMeasureAndSend(numLinks) { finishPerfMeasureAndSend(numLinks) {
if (this.shouldCollectMetrics) { if (this.shouldCollectMetrics) {
performanceMarkAndMeasure({ performanceMarkAndMeasure({
mark: PIPELINES_DETAIL_LINKS_MARK_CALCULATE_END, mark: PIPELINES_DETAIL_LINKS_MARK_CALCULATE_END,
......
...@@ -284,7 +284,7 @@ describe('Links Inner component', () => { ...@@ -284,7 +284,7 @@ describe('Links Inner component', () => {
const numLinks = 1; const numLinks = 1;
const metricsData = { const metricsData = {
histograms: [ histograms: [
{ name: PIPELINES_DETAIL_LINK_DURATION, value: duration }, { name: PIPELINES_DETAIL_LINK_DURATION, value: duration / 1000 },
{ name: PIPELINES_DETAIL_LINKS_TOTAL, value: numLinks }, { name: PIPELINES_DETAIL_LINKS_TOTAL, value: numLinks },
{ {
name: PIPELINES_DETAIL_LINKS_JOB_RATIO, name: PIPELINES_DETAIL_LINKS_JOB_RATIO,
......
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