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
61517b8e
Commit
61517b8e
authored
Feb 24, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjustments to received API response to use rollout_status_path key
parent
01d5a4dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/assets/javascripts/environments/stores/environments_store.js.es6
...javascripts/environments/stores/environments_store.js.es6
+2
-2
spec/javascripts/environments/environment_table_spec.js.es6
spec/javascripts/environments/environment_table_spec.js.es6
+2
-2
spec/javascripts/environments/environments_store_spec.js.es6
spec/javascripts/environments/environments_store_spec.js.es6
+2
-2
No files found.
app/assets/javascripts/environments/stores/environments_store.js.es6
View file @
61517b8e
...
@@ -30,7 +30,7 @@ class EnvironmentsStore {
...
@@ -30,7 +30,7 @@ class EnvironmentsStore {
* If the `size` is bigger than 1, it means it should be rendered as a folder.
* If the `size` is bigger than 1, it means it should be rendered as a folder.
* In those cases we add `isFolder` key in order to render it properly.
* In those cases we add `isFolder` key in order to render it properly.
*
*
* Top level environments - when the size is 1 - with `rollout_status`
* Top level environments - when the size is 1 - with `rollout_status
_path
`
* can render a deploy board. We add `isDeployBoardVisible` and `deployBoardData`
* can render a deploy board. We add `isDeployBoardVisible` and `deployBoardData`
* keys to those environments.
* keys to those environments.
* The first key will let's us know if we should or not render the deploy board.
* The first key will let's us know if we should or not render the deploy board.
...
@@ -54,7 +54,7 @@ class EnvironmentsStore {
...
@@ -54,7 +54,7 @@ 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) {
} else if (filtered.size === 1 && filtered.rollout_status
_path
) {
filtered = Object.assign(filtered, env, {
filtered = Object.assign(filtered, env, {
hasDeployBoard: true,
hasDeployBoard: true,
isDeployBoardVisible: false,
isDeployBoardVisible: false,
...
...
spec/javascripts/environments/environment_table_spec.js.es6
View file @
61517b8e
...
@@ -36,7 +36,7 @@ describe('Environment item', () => {
...
@@ -36,7 +36,7 @@ describe('Environment item', () => {
size: 1,
size: 1,
environment_path: 'url',
environment_path: 'url',
id: 1,
id: 1,
rollout_status: 'url',
rollout_status
_path
: 'url',
hasDeployBoard: true,
hasDeployBoard: true,
deployBoardData: {
deployBoardData: {
instances: [
instances: [
...
@@ -74,7 +74,7 @@ describe('Environment item', () => {
...
@@ -74,7 +74,7 @@ describe('Environment item', () => {
size: 1,
size: 1,
environment_path: 'url',
environment_path: 'url',
id: 1,
id: 1,
rollout_status: 'url',
rollout_status
_path
: 'url',
hasDeployBoard: true,
hasDeployBoard: true,
deployBoardData: {
deployBoardData: {
instances: [
instances: [
...
...
spec/javascripts/environments/environments_store_spec.js.es6
View file @
61517b8e
...
@@ -22,12 +22,12 @@ const { serverData, deployBoardMockData } = require('./mock_data');
...
@@ -22,12 +22,12 @@ const { serverData, deployBoardMockData } = require('./mock_data');
expect(store.state.environments.length).toEqual(serverData.length);
expect(store.state.environments.length).toEqual(serverData.length);
});
});
it('should store a non folder environment with deploy board if rollout_status key is provided', () => {
it('should store a non folder environment with deploy board if rollout_status
_path
key is provided', () => {
const environment = {
const environment = {
name: 'foo',
name: 'foo',
size: 1,
size: 1,
id: 1,
id: 1,
rollout_status: 'url',
rollout_status
_path
: 'url',
};
};
store.storeEnvironments([environment]);
store.storeEnvironments([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