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
749527e2
Commit
749527e2
authored
Dec 05, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
differentiate neutral performance line items (neither improved nor degraded)
parent
d521db62
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
6 deletions
+40
-6
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+4
-0
ee/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_report_collapsible_section.vue
...idget/components/mr_widget_report_collapsible_section.vue
+13
-0
ee/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_report_issues.vue
...rge_request_widget/components/mr_widget_report_issues.vue
+6
-2
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+1
-0
ee/app/assets/javascripts/vue_merge_request_widget/services/mr_widget_service.js
...ts/vue_merge_request_widget/services/mr_widget_service.js
+9
-0
ee/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+7
-4
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
749527e2
...
...
@@ -811,6 +811,10 @@
.failed
{
color
:
$red-500
;
}
.neutral
{
color
:
$gl-gray-light
;
}
}
}
}
...
...
ee/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_report_collapsible_section.vue
View file @
749527e2
...
...
@@ -39,6 +39,11 @@ export default {
required
:
false
,
default
:
()
=>
[],
},
neutralIssues
:
{
type
:
Array
,
required
:
false
,
default
:
()
=>
[],
},
},
components
:
{
...
...
@@ -131,6 +136,14 @@ export default {
:issues=
"resolvedIssues"
/>
<issues-block
class=
"js-mr-code-non-issues"
v-if=
"neutralIssues.length"
:type=
"type"
status=
"neutral"
:issues=
"neutralIssues"
/>
<issues-block
class=
"js-mr-code-new-issues"
v-if=
"unresolvedIssues.length"
...
...
ee/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_report_issues.vue
View file @
749527e2
...
...
@@ -21,7 +21,7 @@
},
computed
:
{
icon
()
{
return
this
.
isStatus
Failed
?
spriteIcon
(
'
cut
'
)
:
spriteIcon
(
'
plus
'
);
return
this
.
isStatus
Success
?
spriteIcon
(
'
plus
'
)
:
spriteIcon
(
'
cut
'
);
},
isStatusFailed
()
{
return
this
.
status
===
'
failed
'
;
...
...
@@ -29,6 +29,9 @@
isStatusSuccess
()
{
return
this
.
status
===
'
success
'
;
},
isStatusNeutral
()
{
return
this
.
status
===
'
neutral
'
;
},
isTypeQuality
()
{
return
this
.
type
===
'
codequality
'
;
},
...
...
@@ -46,7 +49,8 @@
<li
:class=
"
{
failed: isStatusFailed,
success: isStatusSuccess
success: isStatusSuccess,
neutral: isStatusNeutral
}
"v-for="issue in issues">
...
...
ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
View file @
749527e2
...
...
@@ -248,6 +248,7 @@ export default {
:success-text="performanceText"
:unresolvedIssues="mr.performanceMetrics.degraded"
:resolvedIssues="mr.performanceMetrics.improved"
:neutralIssues="mr.performanceMetrics.neutral"
/>
<collapsible-section
class="js-sast-widget"
...
...
ee/app/assets/javascripts/vue_merge_request_widget/services/mr_widget_service.js
View file @
749527e2
...
...
@@ -50,6 +50,15 @@ export default class MRWidgetService extends CEWidgetService {
},
{
subject
:
'
/some/other/path
'
,
metrics
:
[
{
name
:
'
Sitespeed Score
'
,
value
:
79
,
},
],
},
{
subject
:
'
/yet/another/path
'
,
metrics
:
[
{
name
:
'
Sitespeed Score
'
,
...
...
ee/app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
749527e2
...
...
@@ -102,6 +102,7 @@ export default class MergeRequestStore extends CEMergeRequestStore {
const
improved
=
[];
const
degraded
=
[];
const
neutral
=
[];
Object
.
keys
(
headMetricsIndexed
).
forEach
((
subject
)
=>
{
const
subjectMetrics
=
headMetricsIndexed
[
subject
];
...
...
@@ -117,13 +118,15 @@ export default class MergeRequestStore extends CEMergeRequestStore {
delta
:
headMetricData
.
value
-
baseMetricData
.
value
,
};
if
(
headMetricData
.
value
>
=
baseMetricData
.
value
)
{
if
(
headMetricData
.
value
>
baseMetricData
.
value
)
{
improved
.
push
(
metricData
);
}
else
{
}
else
if
(
headMetricData
.
value
<
baseMetricData
.
value
)
{
degraded
.
push
(
metricData
);
}
else
{
neutral
.
push
(
metricData
);
}
}
else
{
improved
.
push
({
neutral
.
push
({
name
:
metric
,
path
:
subject
,
score
:
headMetricData
.
value
,
...
...
@@ -132,7 +135,7 @@ export default class MergeRequestStore extends CEMergeRequestStore {
});
});
this
.
performanceMetrics
=
{
improved
,
degraded
};
this
.
performanceMetrics
=
{
improved
,
degraded
,
neutral
};
}
/**
...
...
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