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
6151f1e2
Commit
6151f1e2
authored
Nov 09, 2020
by
Thong Kuah
Committed by
Jose Vargas
Jan 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move setDeployBoard function to core
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47147
parent
d4ed85ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
28 deletions
+19
-28
app/assets/javascripts/environments/stores/environments_store.js
...ets/javascripts/environments/stores/environments_store.js
+1
-1
app/assets/javascripts/environments/stores/helpers.js
app/assets/javascripts/environments/stores/helpers.js
+18
-3
ee/app/assets/javascripts/environments/stores/helpers.js
ee/app/assets/javascripts/environments/stores/helpers.js
+0
-24
No files found.
app/assets/javascripts/environments/stores/environments_store.js
View file @
6151f1e2
import
{
setDeployBoard
}
from
'
ee_else_ce/environments/stores
/helpers
'
;
import
{
setDeployBoard
}
from
'
.
/helpers
'
;
import
{
parseIntPagination
,
normalizeHeaders
}
from
'
~/lib/utils/common_utils
'
;
/**
...
...
app/assets/javascripts/environments/stores/helpers.js
View file @
6151f1e2
/**
* Deploy boards are EE only.
*
* @param {Object} environment
* @returns {Object}
*/
export
const
setDeployBoard
=
(
oldEnvironmentState
,
environment
)
=>
environment
;
export
const
setDeployBoard
=
(
oldEnvironmentState
,
environment
)
=>
{
let
parsedEnvironment
=
environment
;
if
(
environment
.
size
===
1
&&
environment
.
rollout_status
)
{
parsedEnvironment
=
{
...
environment
,
hasDeployBoard
:
true
,
isDeployBoardVisible
:
oldEnvironmentState
.
isDeployBoardVisible
===
false
?
oldEnvironmentState
.
isDeployBoardVisible
:
true
,
deployBoardData
:
environment
.
rollout_status
.
status
===
'
found
'
?
environment
.
rollout_status
:
{},
isLoadingDeployBoard
:
environment
.
rollout_status
.
status
===
'
loading
'
,
isEmptyDeployBoard
:
environment
.
rollout_status
.
status
===
'
not_found
'
,
};
}
return
parsedEnvironment
;
};
ee/app/assets/javascripts/environments/stores/helpers.js
deleted
100644 → 0
View file @
d4ed85ad
/**
* Deploy boards are EE only.
*
* @param {Object} environment
* @returns {Object}
*/
export
const
setDeployBoard
=
(
oldEnvironmentState
,
environment
)
=>
{
let
parsedEnvironment
=
environment
;
if
(
environment
.
size
===
1
&&
environment
.
rollout_status
)
{
parsedEnvironment
=
{
...
environment
,
hasDeployBoard
:
true
,
isDeployBoardVisible
:
oldEnvironmentState
.
isDeployBoardVisible
===
false
?
oldEnvironmentState
.
isDeployBoardVisible
:
true
,
deployBoardData
:
environment
.
rollout_status
.
status
===
'
found
'
?
environment
.
rollout_status
:
{},
isLoadingDeployBoard
:
environment
.
rollout_status
.
status
===
'
loading
'
,
isEmptyDeployBoard
:
environment
.
rollout_status
.
status
===
'
not_found
'
,
};
}
return
parsedEnvironment
;
};
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