Commit e8a2e02a authored by Dave Pisek's avatar Dave Pisek

Add vulnerable projects to instance dashboard

This commit injects an endpoint into the instance security
dashboard component, so it renders the vulnerable projects widget.
parent 064696e1
......@@ -18,6 +18,7 @@ if (gon.features && gon.features.securityDashboard) {
vulnerabilitiesEndpoint,
vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
} = el.dataset;
const router = createRouter();
const store = createStore({ plugins: [projectSelector, syncWithRouter(router)] });
......@@ -41,6 +42,7 @@ if (gon.features && gon.features.securityDashboard) {
vulnerabilitiesEndpoint,
vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
},
});
},
......
......@@ -52,6 +52,11 @@ export default {
type: String,
required: true,
},
vulnerableProjectsEndpoint: {
type: String,
required: false,
default: '',
},
},
data() {
return {
......@@ -143,6 +148,7 @@ export default {
:vulnerabilities-count-endpoint="vulnerabilitiesCountEndpoint"
:vulnerabilities-history-endpoint="vulnerabilitiesHistoryEndpoint"
:vulnerability-feedback-help-path="vulnerabilityFeedbackHelpPath"
:vulnerable-projects-endpoint="vulnerableProjectsEndpoint"
/>
</template>
</template>
......
......@@ -17,6 +17,7 @@ const vulnerabilitiesEndpoint = '/vulnerabilities';
const vulnerabilitiesCountEndpoint = '/vulnerabilities_summary';
const vulnerabilitiesHistoryEndpoint = '/vulnerabilities_history';
const vulnerabilityFeedbackHelpPath = '/vulnerabilities_feedback_help';
const vulnerableProjectsEndpoint = '/vulnerable_projects_endpoint';
describe('Instance Security Dashboard component', () => {
let store;
......@@ -60,6 +61,7 @@ describe('Instance Security Dashboard component', () => {
vulnerabilitiesCountEndpoint,
vulnerabilitiesHistoryEndpoint,
vulnerabilityFeedbackHelpPath,
vulnerableProjectsEndpoint,
},
});
};
......@@ -164,6 +166,7 @@ describe('Instance Security Dashboard component', () => {
vulnerabilitiesCountEndpoint,
vulnerabilitiesHistoryEndpoint,
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