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
3b856b2e
Commit
3b856b2e
authored
Jan 21, 2021
by
Emily Ring
Committed by
Jose Ivan Vargas
Jan 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant MR widget text
parent
50b64375
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
16 deletions
+29
-16
app/assets/javascripts/vue_merge_request_widget/components/terraform/terraform_plan.vue
...ge_request_widget/components/terraform/terraform_plan.vue
+16
-8
changelogs/unreleased/283912-remove-redundant-text.yml
changelogs/unreleased/283912-remove-redundant-text.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+4
-4
spec/frontend/vue_mr_widget/components/terraform/terraform_plan_spec.js
...vue_mr_widget/components/terraform/terraform_plan_spec.js
+4
-4
No files found.
app/assets/javascripts/vue_merge_request_widget/components/terraform/terraform_plan.vue
View file @
3b856b2e
...
...
@@ -15,6 +15,16 @@ export default {
type
:
Object
,
},
},
i18n
:
{
changes
:
s__
(
'
Terraform|Reported Resource Changes: %{addNum} to add, %{changeNum} to change, %{deleteNum} to delete
'
,
),
generationErrored
:
s__
(
'
Terraform|Generating the report caused an error.
'
),
namedReportFailed
:
s__
(
'
Terraform|The report %{name} failed to generate.
'
),
namedReportGenerated
:
s__
(
'
Terraform|The report %{name} was generated in your pipelines.
'
),
reportFailed
:
s__
(
'
Terraform|A report failed to generate.
'
),
reportGenerated
:
s__
(
'
Terraform|A report was generated in your pipelines.
'
),
},
computed
:
{
addNum
()
{
return
Number
(
this
.
plan
.
create
);
...
...
@@ -30,23 +40,21 @@ export default {
},
reportChangeText
()
{
if
(
this
.
validPlanValues
)
{
return
s__
(
'
Terraform|Reported Resource Changes: %{addNum} to add, %{changeNum} to change, %{deleteNum} to delete
'
,
);
return
this
.
$options
.
i18n
.
changes
;
}
return
s__
(
'
Terraform|Generating the report caused an error.
'
)
;
return
this
.
$options
.
i18n
.
generationErrored
;
},
reportHeaderText
()
{
if
(
this
.
validPlanValues
)
{
return
this
.
plan
.
job_name
?
s__
(
'
Terraform|The Terraform report %{name} was generated in your pipelines.
'
)
:
s__
(
'
Terraform|A Terraform report was generated in your pipelines.
'
)
;
?
this
.
$options
.
i18n
.
namedReportGenerated
:
this
.
$options
.
i18n
.
reportGenerated
;
}
return
this
.
plan
.
job_name
?
s__
(
'
Terraform|The Terraform report %{name} failed to generate.
'
)
:
s__
(
'
Terraform|A Terraform report failed to generate.
'
)
;
?
this
.
$options
.
i18n
.
namedReportFailed
:
this
.
$options
.
i18n
.
reportFailed
;
},
validPlanValues
()
{
return
this
.
addNum
+
this
.
changeNum
+
this
.
deleteNum
>=
0
;
...
...
changelogs/unreleased/283912-remove-redundant-text.yml
0 → 100644
View file @
3b856b2e
---
title
:
Remove redundant text in Terraform Widget
merge_request
:
52013
author
:
type
:
changed
locale/gitlab.pot
View file @
3b856b2e
...
...
@@ -27752,10 +27752,10 @@ msgstr[1] ""
msgid "Terraform|%{user} updated %{timeAgo}"
msgstr ""
msgid "Terraform|A
Terraform
report failed to generate."
msgid "Terraform|A report failed to generate."
msgstr ""
msgid "Terraform|A
Terraform
report was generated in your pipelines."
msgid "Terraform|A report was generated in your pipelines."
msgstr ""
msgid "Terraform|Actions"
...
...
@@ -27815,10 +27815,10 @@ msgstr ""
msgid "Terraform|States"
msgstr ""
msgid "Terraform|The
Terraform
report %{name} failed to generate."
msgid "Terraform|The report %{name} failed to generate."
msgstr ""
msgid "Terraform|The
Terraform
report %{name} was generated in your pipelines."
msgid "Terraform|The report %{name} was generated in your pipelines."
msgstr ""
msgid "Terraform|To remove the State file and its versions, type %{name} to confirm:"
...
...
spec/frontend/vue_mr_widget/components/terraform/terraform_plan_spec.js
View file @
3b856b2e
...
...
@@ -33,7 +33,7 @@ describe('TerraformPlan', () => {
it
(
'
diplays the header text with a name
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
`The
Terraform
report
${
validPlanWithName
.
job_name
}
was generated in your pipelines.`
,
`The report
${
validPlanWithName
.
job_name
}
was generated in your pipelines.`
,
);
});
...
...
@@ -55,7 +55,7 @@ describe('TerraformPlan', () => {
});
it
(
'
diplays the header text without a name
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
'
A
Terraform
report was generated in your pipelines.
'
);
expect
(
wrapper
.
text
()).
toContain
(
'
A report was generated in your pipelines.
'
);
});
});
...
...
@@ -70,7 +70,7 @@ describe('TerraformPlan', () => {
it
(
'
diplays the header text with a name
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
`The
Terraform
report
${
invalidPlanWithName
.
job_name
}
failed to generate.`
,
`The report
${
invalidPlanWithName
.
job_name
}
failed to generate.`
,
);
});
...
...
@@ -85,7 +85,7 @@ describe('TerraformPlan', () => {
});
it
(
'
diplays the header text without a name
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
'
A
Terraform
report failed to generate.
'
);
expect
(
wrapper
.
text
()).
toContain
(
'
A report failed to generate.
'
);
});
it
(
'
does not render button because url is missing
'
,
()
=>
{
...
...
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