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
c8ff0e77
Commit
c8ff0e77
authored
Mar 20, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix css for deploy boards with few instances.
Fix JS to match the correct name Adds tests
parent
080311e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
app/assets/javascripts/environments/stores/environments_store.js
...ets/javascripts/environments/stores/environments_store.js
+1
-1
app/assets/stylesheets/pages/environments.scss
app/assets/stylesheets/pages/environments.scss
+1
-0
spec/javascripts/environments/environments_store_spec.js
spec/javascripts/environments/environments_store_spec.js
+10
-0
spec/javascripts/environments/mock_data.js
spec/javascripts/environments/mock_data.js
+17
-0
No files found.
app/assets/javascripts/environments/stores/environments_store.js
View file @
c8ff0e77
...
@@ -56,7 +56,7 @@ export default class EnvironmentsStore {
...
@@ -56,7 +56,7 @@ export default class EnvironmentsStore {
if
(
filtered
.
size
>
1
)
{
if
(
filtered
.
size
>
1
)
{
filtered
=
Object
.
assign
(
filtered
,
env
,
{
isFolder
:
true
,
folderName
:
env
.
name
});
filtered
=
Object
.
assign
(
filtered
,
env
,
{
isFolder
:
true
,
folderName
:
env
.
name
});
}
else
if
(
filtered
.
size
===
1
&&
filtered
.
rollout_status_path
)
{
}
else
if
(
filtered
.
size
===
1
&&
filtered
.
rollout_status_path
)
{
filtered
=
Object
.
assign
(
filtered
,
env
,
{
filtered
=
Object
.
assign
(
{},
env
,
filtered
,
{
hasDeployBoard
:
true
,
hasDeployBoard
:
true
,
isDeployBoardVisible
:
false
,
isDeployBoardVisible
:
false
,
deployBoardData
:
{},
deployBoardData
:
{},
...
...
app/assets/stylesheets/pages/environments.scss
View file @
c8ff0e77
...
@@ -184,6 +184,7 @@
...
@@ -184,6 +184,7 @@
.deploy-board-instances
{
.deploy-board-instances
{
order
:
2
;
order
:
2
;
margin-left
:
20px
;
margin-left
:
20px
;
width
:
100%
;
.text
{
.text
{
color
:
$gl-text-color-secondary
;
color
:
$gl-text-color-secondary
;
...
...
spec/javascripts/environments/environments_store_spec.js
View file @
c8ff0e77
...
@@ -63,6 +63,16 @@ import { serverData, deployBoardMockData } from './mock_data';
...
@@ -63,6 +63,16 @@ import { serverData, deployBoardMockData } from './mock_data';
expect
(
store
.
state
.
environments
[
0
].
last_deployment
).
toEqual
({});
expect
(
store
.
state
.
environments
[
0
].
last_deployment
).
toEqual
({});
expect
(
store
.
state
.
environments
[
0
].
isStoppable
).
toEqual
(
true
);
expect
(
store
.
state
.
environments
[
0
].
isStoppable
).
toEqual
(
true
);
});
});
it
(
'
should store latest.name when the environment is not a folder
'
,
()
=>
{
store
.
storeEnvironments
(
serverData
);
expect
(
store
.
state
.
environments
[
2
].
name
).
toEqual
(
serverData
[
2
].
latest
.
name
);
});
it
(
'
should store root level name when environment is a folder
'
,
()
=>
{
store
.
storeEnvironments
(
serverData
);
expect
(
store
.
state
.
environments
[
1
].
name
).
toEqual
(
serverData
[
1
].
name
);
});
});
});
it
(
'
should store available count
'
,
()
=>
{
it
(
'
should store available count
'
,
()
=>
{
...
...
spec/javascripts/environments/mock_data.js
View file @
c8ff0e77
...
@@ -66,6 +66,23 @@ export const serverData = [
...
@@ -66,6 +66,23 @@ export const serverData = [
updated_at
:
'
2017-02-01T19:42:18.400Z
'
,
updated_at
:
'
2017-02-01T19:42:18.400Z
'
,
},
},
},
},
{
name
:
'
build
'
,
size
:
1
,
latest
:
{
id
:
12
,
name
:
'
build/update-README
'
,
state
:
'
available
'
,
external_url
:
null
,
environment_type
:
'
build
'
,
last_deployment
:
null
,
'
stop_action?
'
:
false
,
environment_path
:
'
/root/review-app/environments/12
'
,
stop_path
:
'
/root/review-app/environments/12/stop
'
,
created_at
:
'
2017-02-01T19:42:18.400Z
'
,
updated_at
:
'
2017-02-01T19:42:18.400Z
'
,
},
},
];
];
export
const
environment
=
{
export
const
environment
=
{
...
...
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