Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fdc13baf
Commit
fdc13baf
authored
Jul 12, 2021
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nullish coalesce checks, touch up specs
parent
1f829bfb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
app/assets/javascripts/jobs/store/utils.js
app/assets/javascripts/jobs/store/utils.js
+4
-6
spec/frontend/jobs/components/log/log_spec.js
spec/frontend/jobs/components/log/log_spec.js
+1
-1
spec/frontend/jobs/store/mutations_spec.js
spec/frontend/jobs/store/mutations_spec.js
+2
-2
No files found.
app/assets/javascripts/jobs/store/utils.js
View file @
fdc13baf
...
@@ -132,13 +132,11 @@ export const logLinesParserLegacy = (lines = [], accumulator = []) =>
...
@@ -132,13 +132,11 @@ export const logLinesParserLegacy = (lines = [], accumulator = []) =>
);
);
export
const
logLinesParser
=
(
lines
=
[],
previousTraceState
=
{},
prevParsedLines
=
[])
=>
{
export
const
logLinesParser
=
(
lines
=
[],
previousTraceState
=
{},
prevParsedLines
=
[])
=>
{
let
currentLine
=
previousTraceState
?.
prevLineCount
?
previousTraceState
.
prevLineCount
:
0
;
let
currentLine
=
previousTraceState
?.
prevLineCount
??
0
;
let
currentHeader
=
previousTraceState
?.
currentHeader
?
previousTraceState
.
currentHeader
:
null
;
let
currentHeader
=
previousTraceState
?.
currentHeader
;
let
isPreviousLineHeader
=
previousTraceState
?.
isPreviousLineHeader
let
isPreviousLineHeader
=
previousTraceState
?.
isPreviousLineHeader
??
false
;
?
previousTraceState
.
isPreviousLineHeader
:
false
;
const
parsedLines
=
prevParsedLines
.
length
>
0
?
prevParsedLines
:
[];
const
parsedLines
=
prevParsedLines
.
length
>
0
?
prevParsedLines
:
[];
const
sectionsQueue
=
previousTraceState
?.
sectionsQueue
?
previousTraceState
.
sectionsQueue
:
[];
const
sectionsQueue
=
previousTraceState
?.
sectionsQueue
?
?
[];
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
+=
1
)
{
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
+=
1
)
{
const
line
=
lines
[
i
];
const
line
=
lines
[
i
];
...
...
spec/frontend/jobs/components/log/log_spec.js
View file @
fdc13baf
...
@@ -84,7 +84,7 @@ describe('Job Log', () => {
...
@@ -84,7 +84,7 @@ describe('Job Log', () => {
});
});
});
});
describe
(
'
Job Log, feature flag enabled
'
,
()
=>
{
describe
(
'
Job Log,
infinitelyCollapsibleSections
feature flag enabled
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
let
actions
;
let
actions
;
let
state
;
let
state
;
...
...
spec/frontend/jobs/store/mutations_spec.js
View file @
fdc13baf
...
@@ -323,7 +323,7 @@ describe('Job Store mutations, feature flag ON', () => {
...
@@ -323,7 +323,7 @@ describe('Job Store mutations, feature flag ON', () => {
});
});
});
});
describe
(
'
when
it is
defined
'
,
()
=>
{
describe
(
'
when
lines are
defined
'
,
()
=>
{
it
(
'
sets the parsed log
'
,
()
=>
{
it
(
'
sets the parsed log
'
,
()
=>
{
mutations
[
types
.
RECEIVE_TRACE_SUCCESS
](
stateCopy
,
{
mutations
[
types
.
RECEIVE_TRACE_SUCCESS
](
stateCopy
,
{
append
:
false
,
append
:
false
,
...
@@ -344,7 +344,7 @@ describe('Job Store mutations, feature flag ON', () => {
...
@@ -344,7 +344,7 @@ describe('Job Store mutations, feature flag ON', () => {
});
});
});
});
describe
(
'
when
it is
null
'
,
()
=>
{
describe
(
'
when
lines are
null
'
,
()
=>
{
it
(
'
sets the default value
'
,
()
=>
{
it
(
'
sets the default value
'
,
()
=>
{
mutations
[
types
.
RECEIVE_TRACE_SUCCESS
](
stateCopy
,
{
mutations
[
types
.
RECEIVE_TRACE_SUCCESS
](
stateCopy
,
{
append
:
true
,
append
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment