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
43e4f9d6
Commit
43e4f9d6
authored
Apr 27, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
ee20371c
068b13ed
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
25 deletions
+67
-25
app/assets/javascripts/pages/admin/application_settings/integrations/index.js
...ts/pages/admin/application_settings/integrations/index.js
+6
-4
app/assets/javascripts/pipelines/components/test_reports/test_reports.vue
...cripts/pipelines/components/test_reports/test_reports.vue
+1
-8
changelogs/unreleased/329206-fix-test-report.yml
changelogs/unreleased/329206-fix-test-report.yml
+5
-0
changelogs/unreleased/fix-admin-integrations-foss.yml
changelogs/unreleased/fix-admin-integrations-foss.yml
+5
-0
ee/app/assets/javascripts/security_dashboard/components/pipeline_security_dashboard.vue
...rity_dashboard/components/pipeline_security_dashboard.vue
+6
-0
ee/app/controllers/ee/projects/pipelines_controller.rb
ee/app/controllers/ee/projects/pipelines_controller.rb
+1
-0
ee/config/feature_flags/development/pipeline_security_dashboard_graphql.yml
...flags/development/pipeline_security_dashboard_graphql.yml
+8
-0
ee/spec/features/projects/pipelines/pipeline_spec.rb
ee/spec/features/projects/pipelines/pipeline_spec.rb
+1
-0
ee/spec/frontend/security_dashboard/components/pipeline_security_dashboard_spec.js
..._dashboard/components/pipeline_security_dashboard_spec.js
+29
-3
spec/features/admin/admin_settings_spec.rb
spec/features/admin/admin_settings_spec.rb
+4
-0
spec/frontend/pipelines/test_reports/test_reports_spec.js
spec/frontend/pipelines/test_reports/test_reports_spec.js
+1
-10
No files found.
app/assets/javascripts/pages/admin/application_settings/integrations/index.js
View file @
43e4f9d6
import
initIntegrationsList
from
'
~/integrations/index
'
;
import
PersistentUserCallout
from
'
~/persistent_user_callout
'
;
import
PersistentUserCallout
from
'
~/persistent_user_callout
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
callout
=
document
.
querySelector
(
'
.js-admin-integrations-moved
'
);
const
callout
=
document
.
querySelector
(
'
.js-admin-integrations-moved
'
);
PersistentUserCallout
.
factory
(
callout
);
PersistentUserCallout
.
factory
(
callout
);
});
initIntegrationsList
();
app/assets/javascripts/pipelines/components/test_reports/test_reports.vue
View file @
43e4f9d6
...
@@ -15,11 +15,6 @@ export default {
...
@@ -15,11 +15,6 @@ export default {
TestSummary
,
TestSummary
,
TestSummaryTable
,
TestSummaryTable
,
},
},
inject
:
{
hasTestReport
:
{
default
:
false
,
},
},
computed
:
{
computed
:
{
...
mapState
([
'
isLoading
'
,
'
selectedSuiteIndex
'
,
'
testReports
'
]),
...
mapState
([
'
isLoading
'
,
'
selectedSuiteIndex
'
,
'
testReports
'
]),
...
mapGetters
([
'
getSelectedSuite
'
]),
...
mapGetters
([
'
getSelectedSuite
'
]),
...
@@ -32,9 +27,7 @@ export default {
...
@@ -32,9 +27,7 @@ export default {
},
},
},
},
created
()
{
created
()
{
if
(
this
.
hasTestReport
)
{
this
.
fetchSummary
();
this
.
fetchSummary
();
}
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
...
...
changelogs/unreleased/329206-fix-test-report.yml
0 → 100644
View file @
43e4f9d6
---
title
:
Fix bug where test report was not showing while pipeline was running
merge_request
:
60416
author
:
type
:
fixed
changelogs/unreleased/fix-admin-integrations-foss.yml
0 → 100644
View file @
43e4f9d6
---
title
:
Fix Instance-level Project Integration Management page for GitLab FOSS
merge_request
:
60354
author
:
type
:
fixed
ee/app/assets/javascripts/security_dashboard/components/pipeline_security_dashboard.vue
View file @
43e4f9d6
...
@@ -3,6 +3,7 @@ import { GlEmptyState } from '@gitlab/ui';
...
@@ -3,6 +3,7 @@ import { GlEmptyState } from '@gitlab/ui';
import
{
mapActions
}
from
'
vuex
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
{
fetchPolicies
}
from
'
~/lib/graphql
'
;
import
{
fetchPolicies
}
from
'
~/lib/graphql
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
pipelineSecurityReportSummaryQuery
from
'
../graphql/queries/pipeline_security_report_summary.query.graphql
'
;
import
pipelineSecurityReportSummaryQuery
from
'
../graphql/queries/pipeline_security_report_summary.query.graphql
'
;
import
SecurityDashboard
from
'
./security_dashboard_vuex.vue
'
;
import
SecurityDashboard
from
'
./security_dashboard_vuex.vue
'
;
import
SecurityReportsSummary
from
'
./security_reports_summary.vue
'
;
import
SecurityReportsSummary
from
'
./security_reports_summary.vue
'
;
...
@@ -14,6 +15,7 @@ export default {
...
@@ -14,6 +15,7 @@ export default {
SecurityReportsSummary
,
SecurityReportsSummary
,
SecurityDashboard
,
SecurityDashboard
,
},
},
mixins
:
[
glFeatureFlagMixin
()],
apollo
:
{
apollo
:
{
securityReportSummary
:
{
securityReportSummary
:
{
query
:
pipelineSecurityReportSummaryQuery
,
query
:
pipelineSecurityReportSummaryQuery
,
...
@@ -75,6 +77,9 @@ export default {
...
@@ -75,6 +77,9 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
shouldShowGraphqlVulnerabilityReport
()
{
return
this
.
glFeatures
.
pipelineSecurityDashboardGraphql
;
},
emptyStateProps
()
{
emptyStateProps
()
{
return
{
return
{
svgPath
:
this
.
emptyStateSvgPath
,
svgPath
:
this
.
emptyStateSvgPath
,
...
@@ -107,6 +112,7 @@ export default {
...
@@ -107,6 +112,7 @@ export default {
class=
"gl-my-5"
class=
"gl-my-5"
/>
/>
<security-dashboard
<security-dashboard
v-if=
"!shouldShowGraphqlVulnerabilityReport"
:vulnerabilities-endpoint=
"vulnerabilitiesEndpoint"
:vulnerabilities-endpoint=
"vulnerabilitiesEndpoint"
:lock-to-project=
"
{ id: projectId }"
:lock-to-project=
"
{ id: projectId }"
:pipeline-id="pipelineId"
:pipeline-id="pipelineId"
...
...
ee/app/controllers/ee/projects/pipelines_controller.rb
View file @
43e4f9d6
...
@@ -10,6 +10,7 @@ module EE
...
@@ -10,6 +10,7 @@ module EE
before_action
:authorize_read_licenses!
,
only:
[
:licenses
]
before_action
:authorize_read_licenses!
,
only:
[
:licenses
]
before_action
do
before_action
do
push_frontend_feature_flag
(
:usage_data_i_testing_full_code_quality_report_total
,
project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:usage_data_i_testing_full_code_quality_report_total
,
project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:pipeline_security_dashboard_graphql
,
project
,
type: :development
,
default_enabled: :yaml
)
end
end
end
end
...
...
ee/config/feature_flags/development/pipeline_security_dashboard_graphql.yml
0 → 100644
View file @
43e4f9d6
---
name
:
pipeline_security_dashboard_graphql
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60138
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/328818
milestone
:
'
13.12'
type
:
development
group
:
group::threat insights
default_enabled
:
false
ee/spec/features/projects/pipelines/pipeline_spec.rb
View file @
43e4f9d6
...
@@ -153,6 +153,7 @@ RSpec.describe 'Pipeline', :js do
...
@@ -153,6 +153,7 @@ RSpec.describe 'Pipeline', :js do
before
do
before
do
stub_licensed_features
(
sast:
true
,
security_dashboard:
true
)
stub_licensed_features
(
sast:
true
,
security_dashboard:
true
)
stub_feature_flags
(
pipeline_security_dashboard_graphql:
false
)
end
end
context
'with a sast artifact'
do
context
'with a sast artifact'
do
...
...
ee/spec/frontend/security_dashboard/components/pipeline_security_dashboard_spec.js
View file @
43e4f9d6
...
@@ -24,6 +24,8 @@ describe('Pipeline Security Dashboard component', () => {
...
@@ -24,6 +24,8 @@ describe('Pipeline Security Dashboard component', () => {
let
store
;
let
store
;
let
wrapper
;
let
wrapper
;
const
findSecurityDashboard
=
()
=>
wrapper
.
findComponent
(
SecurityDashboard
);
const
factory
=
(
options
)
=>
{
const
factory
=
(
options
)
=>
{
store
=
new
Vuex
.
Store
({
store
=
new
Vuex
.
Store
({
modules
:
{
modules
:
{
...
@@ -85,15 +87,39 @@ describe('Pipeline Security Dashboard component', () => {
...
@@ -85,15 +87,39 @@ describe('Pipeline Security Dashboard component', () => {
});
});
it
(
'
renders the security dashboard
'
,
()
=>
{
it
(
'
renders the security dashboard
'
,
()
=>
{
const
dashboard
=
wrapper
.
find
(
SecurityDashboard
);
expect
(
findSecurityDashboard
().
props
()).
toMatchObject
({
expect
(
dashboard
.
exists
()).
toBe
(
true
);
expect
(
dashboard
.
props
()).
toMatchObject
({
pipelineId
,
pipelineId
,
vulnerabilitiesEndpoint
,
vulnerabilitiesEndpoint
,
});
});
});
});
});
});
describe
(
'
:pipeline_security_dashboard_graphql feature flag
'
,
()
=>
{
it
(
'
does not show the security layout when the feature flag is on
'
,
()
=>
{
factory
({
provide
:
{
glFeatures
:
{
pipelineSecurityDashboardGraphql
:
true
,
},
},
});
expect
(
findSecurityDashboard
().
exists
()).
toBe
(
false
);
});
it
(
'
shows the security layout when the feature flag is off
'
,
()
=>
{
factory
({
provide
:
{
glFeatures
:
{
pipelineSecurityDashboardGraphql
:
false
,
},
},
});
expect
(
findSecurityDashboard
().
exists
()).
toBe
(
true
);
});
});
describe
(
'
with a stubbed dashboard for slot testing
'
,
()
=>
{
describe
(
'
with a stubbed dashboard for slot testing
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
factory
({
factory
({
...
...
spec/features/admin/admin_settings_spec.rb
View file @
43e4f9d6
...
@@ -305,6 +305,10 @@ RSpec.describe 'Admin updates settings' do
...
@@ -305,6 +305,10 @@ RSpec.describe 'Admin updates settings' do
expect
(
page
).
not_to
have_content
(
'Some settings have moved'
)
expect
(
page
).
not_to
have_content
(
'Some settings have moved'
)
end
end
it
'shows integrations table'
do
expect
(
page
).
to
have_selector
'[data-testid="inactive-integrations-table"]'
end
end
end
context
'CI/CD page'
do
context
'CI/CD page'
do
...
...
spec/frontend/pipelines/test_reports/test_reports_spec.js
View file @
43e4f9d6
...
@@ -31,7 +31,7 @@ describe('Test reports app', () => {
...
@@ -31,7 +31,7 @@ describe('Test reports app', () => {
removeSelectedSuiteIndex
:
jest
.
fn
(),
removeSelectedSuiteIndex
:
jest
.
fn
(),
};
};
const
createComponent
=
({
state
=
{}
,
hasTestReport
=
true
}
=
{})
=>
{
const
createComponent
=
({
state
=
{}
}
=
{})
=>
{
store
=
new
Vuex
.
Store
({
store
=
new
Vuex
.
Store
({
state
:
{
state
:
{
isLoading
:
false
,
isLoading
:
false
,
...
@@ -47,9 +47,6 @@ describe('Test reports app', () => {
...
@@ -47,9 +47,6 @@ describe('Test reports app', () => {
shallowMount
(
TestReports
,
{
shallowMount
(
TestReports
,
{
store
,
store
,
localVue
,
localVue
,
provide
:
{
hasTestReport
,
},
}),
}),
);
);
};
};
...
@@ -64,12 +61,6 @@ describe('Test reports app', () => {
...
@@ -64,12 +61,6 @@ describe('Test reports app', () => {
expect
(
actionSpies
.
fetchSummary
).
toHaveBeenCalled
();
expect
(
actionSpies
.
fetchSummary
).
toHaveBeenCalled
();
});
});
it
(
'
should not call fetchSummary when pipeline does not have test report
'
,
()
=>
{
createComponent
({
state
:
{},
hasTestReport
:
false
});
expect
(
actionSpies
.
fetchSummary
).
not
.
toHaveBeenCalled
();
});
});
});
describe
(
'
when loading
'
,
()
=>
{
describe
(
'
when loading
'
,
()
=>
{
...
...
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