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
01c624c4
Commit
01c624c4
authored
Aug 04, 2021
by
Anna Vovchenko
Committed by
Miguel Rincon
Aug 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Terraform view empty state copy and docs link
parent
7a4e3eef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
31 deletions
+24
-31
app/assets/javascripts/terraform/components/empty_state.vue
app/assets/javascripts/terraform/components/empty_state.vue
+11
-19
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/frontend/terraform/components/empty_state_spec.js
spec/frontend/terraform/components/empty_state_spec.js
+10
-9
No files found.
app/assets/javascripts/terraform/components/empty_state.vue
View file @
01c624c4
<
script
>
<
script
>
import
{
GlEmptyState
,
GlIcon
,
GlLink
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
GlIcon
,
GlLink
}
from
'
@gitlab/ui
'
;
import
{
helpPagePath
}
from
'
~/helpers/help_page_helper
'
;
export
default
{
export
default
{
components
:
{
components
:
{
GlEmptyState
,
GlEmptyState
,
GlIcon
,
GlIcon
,
GlLink
,
GlLink
,
GlSprintf
,
},
},
props
:
{
props
:
{
image
:
{
image
:
{
...
@@ -14,6 +14,11 @@ export default {
...
@@ -14,6 +14,11 @@ export default {
required
:
true
,
required
:
true
,
},
},
},
},
computed
:
{
docsUrl
()
{
return
helpPagePath
(
'
user/infrastructure/terraform_state
'
);
},
},
};
};
</
script
>
</
script
>
...
@@ -21,23 +26,10 @@ export default {
...
@@ -21,23 +26,10 @@ export default {
<gl-empty-state
:svg-path=
"image"
:title=
"s__('Terraform|Get started with Terraform')"
>
<gl-empty-state
:svg-path=
"image"
:title=
"s__('Terraform|Get started with Terraform')"
>
<template
#description
>
<template
#description
>
<p>
<p>
<gl-sprintf
<gl-link
:href=
"docsUrl"
target=
"_blank"
:message=
"
>
{{
s__
(
'
Terraform|How to use GitLab-managed Terraform State?
'
)
}}
s__(
<gl-icon
name=
"external-link"
'Terraform|Find out how to use the %
{linkStart}GitLab managed Terraform State%{linkEnd}',
/></gl-link>
)
"
>
<template
#link
="
{ content }">
<gl-link
href=
"https://docs.gitlab.com/ee/user/infrastructure/index.html"
target=
"_blank"
>
{{
content
}}
<gl-icon
name=
"external-link"
/>
</gl-link>
</
template
>
</gl-sprintf>
</p>
</p>
</
template
>
</
template
>
</gl-empty-state>
</gl-empty-state>
...
...
locale/gitlab.pot
View file @
01c624c4
...
@@ -32513,15 +32513,15 @@ msgstr ""
...
@@ -32513,15 +32513,15 @@ msgstr ""
msgid "Terraform|Download JSON"
msgid "Terraform|Download JSON"
msgstr ""
msgstr ""
msgid "Terraform|Find out how to use the %{linkStart}GitLab managed Terraform State%{linkEnd}"
msgstr ""
msgid "Terraform|Generating the report caused an error."
msgid "Terraform|Generating the report caused an error."
msgstr ""
msgstr ""
msgid "Terraform|Get started with Terraform"
msgid "Terraform|Get started with Terraform"
msgstr ""
msgstr ""
msgid "Terraform|How to use GitLab-managed Terraform State?"
msgstr ""
msgid "Terraform|Job status"
msgid "Terraform|Job status"
msgstr ""
msgstr ""
...
...
spec/frontend/terraform/components/empty_state_spec.js
View file @
01c624c4
import
{
GlEmptyState
,
Gl
Sprintf
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
Gl
Link
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
EmptyState
from
'
~/terraform/components/empty_state.vue
'
;
import
EmptyState
from
'
~/terraform/components/empty_state.vue
'
;
...
@@ -8,19 +8,20 @@ describe('EmptyStateComponent', () => {
...
@@ -8,19 +8,20 @@ describe('EmptyStateComponent', () => {
const
propsData
=
{
const
propsData
=
{
image
:
'
/image/path
'
,
image
:
'
/image/path
'
,
};
};
const
docsUrl
=
'
/help/user/infrastructure/terraform_state
'
;
const
findEmptyState
=
()
=>
wrapper
.
findComponent
(
GlEmptyState
);
const
findLink
=
()
=>
wrapper
.
findComponent
(
GlLink
);
beforeEach
(()
=>
{
beforeEach
(()
=>
{
wrapper
=
shallowMount
(
EmptyState
,
{
propsData
,
stubs
:
{
GlEmptyState
,
GlSprintf
}
});
wrapper
=
shallowMount
(
EmptyState
,
{
propsData
,
stubs
:
{
GlEmptyState
,
GlLink
}
});
return
wrapper
.
vm
.
$nextTick
();
});
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
});
it
(
'
should render content
'
,
()
=>
{
it
(
'
should render content
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlEmptyState
).
exists
()).
toBe
(
true
);
expect
(
findEmptyState
(
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
text
()).
toContain
(
'
Get started with Terraform
'
);
expect
(
wrapper
.
text
()).
toContain
(
'
Get started with Terraform
'
);
});
});
it
(
'
should have a link to the GitLab managed Terraform States docs
'
,
()
=>
{
expect
(
findLink
().
attributes
(
'
href
'
)).
toBe
(
docsUrl
);
});
});
});
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