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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
ea75b727
Commit
ea75b727
authored
Oct 11, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update environments empty state
parent
9642a472
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
20 deletions
+26
-20
app/assets/javascripts/environments/components/empty_state.vue
...ssets/javascripts/environments/components/empty_state.vue
+15
-14
changelogs/unreleased/gt-update-environments-empty-state.yml
changelogs/unreleased/gt-update-environments-empty-state.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+1
-1
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+1
-1
spec/javascripts/environments/emtpy_state_spec.js
spec/javascripts/environments/emtpy_state_spec.js
+2
-2
spec/javascripts/environments/environments_app_spec.js
spec/javascripts/environments/environments_app_spec.js
+2
-2
No files found.
app/assets/javascripts/environments/components/empty_state.vue
View file @
ea75b727
...
@@ -18,27 +18,28 @@ export default {
...
@@ -18,27 +18,28 @@ export default {
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"
blank-state-row
"
>
<div
class=
"
empty-state
"
>
<div
class=
"
blank-state-center
"
>
<div
class=
"
text-content
"
>
<h
2
class=
"blank-state-title js-blank-state-title"
>
<h
4
class=
"blank-state-title js-blank-state-title"
>
{{
s__
(
"
Environments|You don't have any environments right now
.
"
)
}}
{{
s__
(
"
Environments|You don't have any environments right now
"
)
}}
</h
2
>
</h
4
>
<p
class=
"blank-state-text"
>
<p
class=
"blank-state-text"
>
{{
s__
(
`Environments|Environments are places where
{{
s__
(
`Environments|Environments are places where
code gets deployed, such as staging or production.`
)
}}
code gets deployed, such as staging or production.`
)
}}
<br
/>
<a
:href=
"helpPath"
>
<a
:href=
"helpPath"
>
{{
s__
(
"
Environments|Read more about environments
"
)
}}
{{
s__
(
"
Environments|Read more about environments
"
)
}}
</a>
</a>
</p>
</p>
<a
<div
class=
"text-center"
>
v-if=
"canCreateEnvironment"
<a
:href=
"newPath"
v-if=
"canCreateEnvironment"
class=
"btn btn-success js-new-environment-button"
:href=
"newPath"
>
class=
"btn btn-success js-new-environment-button"
{{
s__
(
"
Environments|New environment
"
)
}}
>
</a>
{{
s__
(
"
Environments|New environment
"
)
}}
</a>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
changelogs/unreleased/gt-update-environments-empty-state.yml
0 → 100644
View file @
ea75b727
---
title
:
Update environments empty state
merge_request
:
22297
author
:
George Tsiolis
type
:
other
locale/gitlab.pot
View file @
ea75b727
...
@@ -2597,7 +2597,7 @@ msgstr ""
...
@@ -2597,7 +2597,7 @@ msgstr ""
msgid "Environments|Updated"
msgid "Environments|Updated"
msgstr ""
msgstr ""
msgid "Environments|You don't have any environments right now
.
"
msgid "Environments|You don't have any environments right now"
msgstr ""
msgstr ""
msgid "Epic"
msgid "Epic"
...
...
spec/features/projects/environments/environments_spec.rb
View file @
ea75b727
...
@@ -95,7 +95,7 @@ describe 'Environments page', :js do
...
@@ -95,7 +95,7 @@ describe 'Environments page', :js do
end
end
it
'does not show environments and counters are set to zero'
do
it
'does not show environments and counters are set to zero'
do
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now
.
'
)
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now'
)
expect
(
page
.
find
(
'.js-environments-tab-available .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-available .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-stopped .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-stopped .badge'
).
text
).
to
eq
(
'0'
)
...
...
spec/javascripts/environments/emtpy_state_spec.js
View file @
ea75b727
...
@@ -27,7 +27,7 @@ describe('environments empty state', () => {
...
@@ -27,7 +27,7 @@ describe('environments empty state', () => {
it
(
'
renders empty state and new environment button
'
,
()
=>
{
it
(
'
renders empty state and new environment button
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
).
toEqual
(
'
You don
\'
t have any environments right now
.
'
);
).
toEqual
(
'
You don
\'
t have any environments right now
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
).
getAttribute
(
'
href
'
),
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
).
getAttribute
(
'
href
'
),
...
@@ -47,7 +47,7 @@ describe('environments empty state', () => {
...
@@ -47,7 +47,7 @@ describe('environments empty state', () => {
it
(
'
renders empty state without new button
'
,
()
=>
{
it
(
'
renders empty state without new button
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
).
toEqual
(
'
You don
\'
t have any environments right now
.
'
);
).
toEqual
(
'
You don
\'
t have any environments right now
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
),
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
),
...
...
spec/javascripts/environments/environments_app_spec.js
View file @
ea75b727
...
@@ -50,7 +50,7 @@ describe('Environment', () => {
...
@@ -50,7 +50,7 @@ describe('Environment', () => {
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
).
toContain
(
'
You don
\'
t have any environments right now
.
'
);
).
toContain
(
'
You don
\'
t have any environments right now
'
);
});
});
});
});
...
@@ -127,7 +127,7 @@ describe('Environment', () => {
...
@@ -127,7 +127,7 @@ describe('Environment', () => {
it
(
'
should render empty state
'
,
()
=>
{
it
(
'
should render empty state
'
,
()
=>
{
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
).
toContain
(
'
You don
\'
t have any environments right now
.
'
);
).
toContain
(
'
You don
\'
t have any environments right now
'
);
});
});
});
});
...
...
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