Commit 7ecb38c8 authored by Filipa Lacerda's avatar Filipa Lacerda

Changes after review

parent 0499b49c
...@@ -171,9 +171,9 @@ export default { ...@@ -171,9 +171,9 @@ export default {
dockerInformationText() { dockerInformationText() {
return sprintf( return sprintf(
_.escape(s__('ciReport|Unapproved vulnerabilities (red) can be marked as approved. %{helpLink}')), { s__('ciReport|Unapproved vulnerabilities (red) can be marked as approved. %{helpLink}'), {
helpLink: `<a href="todo" _target="blank" > helpLink: `<a href="todo" target="_blank" rel="noopener noreferrer nofollow">
${_.escape(s__('ciReport|Learn more about whitelisting'))} ${s__('ciReport|Learn more about whitelisting')}
</a>`, </a>`,
}, },
false, false,
...@@ -258,6 +258,13 @@ export default { ...@@ -258,6 +258,13 @@ export default {
this.loadingDockerFailed = true; this.loadingDockerFailed = true;
}); });
}, },
translateText(type) {
return {
error: s__(`ciReport|Failed to load ${type} report`),
loading: s__(`ciReport|Loading ${type} report`),
};
},
}, },
created() { created() {
if (this.shouldRenderCodeQuality) { if (this.shouldRenderCodeQuality) {
...@@ -300,8 +307,8 @@ export default { ...@@ -300,8 +307,8 @@ export default {
v-if="shouldRenderCodeQuality" v-if="shouldRenderCodeQuality"
type="codequality" type="codequality"
:status="codequalityStatus" :status="codequalityStatus"
loading-text="Loading codeclimate report" :loading-text="translateText('codeclimate').loading"
error-text="Failed to load codeclimate report" :error-text="translateText('codeclimate').error"
:success-text="codequalityText" :success-text="codequalityText"
:unresolved-issues="mr.codeclimateMetrics.newIssues" :unresolved-issues="mr.codeclimateMetrics.newIssues"
:resolved-issues="mr.codeclimateMetrics.resolvedIssues" :resolved-issues="mr.codeclimateMetrics.resolvedIssues"
...@@ -311,8 +318,8 @@ export default { ...@@ -311,8 +318,8 @@ export default {
v-if="shouldRenderPerformance" v-if="shouldRenderPerformance"
type="performance" type="performance"
:status="performanceStatus" :status="performanceStatus"
loading-text="Loading performance report" :loading-text="translateText('performance').loading"
error-text="Failed to load performance report" :error-text="translateText('performance').error"
:success-text="performanceText" :success-text="performanceText"
:unresolved-issues="mr.performanceMetrics.degraded" :unresolved-issues="mr.performanceMetrics.degraded"
:resolved-issues="mr.performanceMetrics.improved" :resolved-issues="mr.performanceMetrics.improved"
...@@ -323,8 +330,8 @@ export default { ...@@ -323,8 +330,8 @@ export default {
v-if="shouldRenderSecurityReport" v-if="shouldRenderSecurityReport"
type="security" type="security"
:status="securityStatus" :status="securityStatus"
loading-text="Loading security report" :loading-text="translateText('security').loading"
error-text="Failed to load security report" :error-text="translateText('security').error"
:success-text="securityText" :success-text="securityText"
:unresolved-issues="mr.securityReport" :unresolved-issues="mr.securityReport"
/> />
...@@ -333,8 +340,8 @@ export default { ...@@ -333,8 +340,8 @@ export default {
v-if="shouldRenderDockerReport" v-if="shouldRenderDockerReport"
type="docker" type="docker"
:status="dockerStatus" :status="dockerStatus"
loading-text="Loading clair report" :loading-text="translateText('clair').loading"
error-text="Failed to load clair report" :error-text="translateText('clair').error"
:success-text="dockerText" :success-text="dockerText"
:unresolved-issues="mr.dockerReport.unapproved" :unresolved-issues="mr.dockerReport.unapproved"
:neutral-issues="mr.dockerReport.approved" :neutral-issues="mr.dockerReport.approved"
......
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