Commit 3d4407f0 authored by Mark Florian's avatar Mark Florian

Merge branch...

Merge branch '17969-add-affected-projects-feature-to-instance-security-dashboard-frontend' into 'master'

Add vulnerable projects widget to instance security dashboard - frontend

See merge request gitlab-org/gitlab!24557
parents d880633f e8a2e02a
...@@ -18,6 +18,7 @@ if (gon.features && gon.features.securityDashboard) { ...@@ -18,6 +18,7 @@ if (gon.features && gon.features.securityDashboard) {
vulnerabilitiesEndpoint, vulnerabilitiesEndpoint,
vulnerabilitiesHistoryEndpoint, vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath, vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
} = el.dataset; } = el.dataset;
const router = createRouter(); const router = createRouter();
const store = createStore({ plugins: [projectSelector, syncWithRouter(router)] }); const store = createStore({ plugins: [projectSelector, syncWithRouter(router)] });
...@@ -41,6 +42,7 @@ if (gon.features && gon.features.securityDashboard) { ...@@ -41,6 +42,7 @@ if (gon.features && gon.features.securityDashboard) {
vulnerabilitiesEndpoint, vulnerabilitiesEndpoint,
vulnerabilitiesHistoryEndpoint, vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath, vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
}, },
}); });
}, },
......
...@@ -52,6 +52,11 @@ export default { ...@@ -52,6 +52,11 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
vulnerableProjectsEndpoint: {
type: String,
required: false,
default: '',
},
}, },
data() { data() {
return { return {
...@@ -143,6 +148,7 @@ export default { ...@@ -143,6 +148,7 @@ export default {
:vulnerabilities-count-endpoint="vulnerabilitiesCountEndpoint" :vulnerabilities-count-endpoint="vulnerabilitiesCountEndpoint"
:vulnerabilities-history-endpoint="vulnerabilitiesHistoryEndpoint" :vulnerabilities-history-endpoint="vulnerabilitiesHistoryEndpoint"
:vulnerability-feedback-help-path="vulnerabilityFeedbackHelpPath" :vulnerability-feedback-help-path="vulnerabilityFeedbackHelpPath"
:vulnerable-projects-endpoint="vulnerableProjectsEndpoint"
/> />
</template> </template>
</template> </template>
......
...@@ -17,6 +17,7 @@ const vulnerabilitiesEndpoint = '/vulnerabilities'; ...@@ -17,6 +17,7 @@ const vulnerabilitiesEndpoint = '/vulnerabilities';
const vulnerabilitiesCountEndpoint = '/vulnerabilities_summary'; const vulnerabilitiesCountEndpoint = '/vulnerabilities_summary';
const vulnerabilitiesHistoryEndpoint = '/vulnerabilities_history'; const vulnerabilitiesHistoryEndpoint = '/vulnerabilities_history';
const vulnerabilityFeedbackHelpPath = '/vulnerabilities_feedback_help'; const vulnerabilityFeedbackHelpPath = '/vulnerabilities_feedback_help';
const vulnerableProjectsEndpoint = '/vulnerable_projects_endpoint';
describe('Instance Security Dashboard component', () => { describe('Instance Security Dashboard component', () => {
let store; let store;
...@@ -60,6 +61,7 @@ describe('Instance Security Dashboard component', () => { ...@@ -60,6 +61,7 @@ describe('Instance Security Dashboard component', () => {
vulnerabilitiesCountEndpoint, vulnerabilitiesCountEndpoint,
vulnerabilitiesHistoryEndpoint, vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath, vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
}, },
}); });
}; };
...@@ -164,6 +166,7 @@ describe('Instance Security Dashboard component', () => { ...@@ -164,6 +166,7 @@ describe('Instance Security Dashboard component', () => {
vulnerabilitiesCountEndpoint, vulnerabilitiesCountEndpoint,
vulnerabilitiesHistoryEndpoint, vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath, vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
}); });
}); });
......
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