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
21c6cc68
Commit
21c6cc68
authored
Feb 28, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use rollout_status_path provided in environment to fetch the data instead of hardcoded endpoint
parent
97437e88
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
app/assets/javascripts/environments/components/deploy_board_component.js.es6
...pts/environments/components/deploy_board_component.js.es6
+6
-1
app/assets/javascripts/environments/components/environments_table.js.es6
...scripts/environments/components/environments_table.js.es6
+2
-1
app/assets/javascripts/environments/services/environments_service.js.es6
...scripts/environments/services/environments_service.js.es6
+3
-4
spec/javascripts/environments/deploy_board_component_spec.js.es6
...vascripts/environments/deploy_board_component_spec.js.es6
+2
-0
No files found.
app/assets/javascripts/environments/components/deploy_board_component.js.es6
View file @
21c6cc68
...
@@ -49,6 +49,11 @@ module.exports = {
...
@@ -49,6 +49,11 @@ module.exports = {
type: Number,
type: Number,
required: true,
required: true,
},
},
endpoint: {
type: String,
required: true,
},
},
},
data() {
data() {
...
@@ -66,7 +71,7 @@ module.exports = {
...
@@ -66,7 +71,7 @@ module.exports = {
// If the response is 204, we make 3 more requests.
// If the response is 204, we make 3 more requests.
gl.utils.backOff((next, stop) => {
gl.utils.backOff((next, stop) => {
this.service.getDeployBoard(this.en
vironmentID
)
this.service.getDeployBoard(this.en
dpoint
)
.then((resp) => {
.then((resp) => {
if (resp.status === statusCodes.NO_CONTENT) {
if (resp.status === statusCodes.NO_CONTENT) {
this.backOffRequestCounter = this.backOffRequestCounter += 1;
this.backOffRequestCounter = this.backOffRequestCounter += 1;
...
...
app/assets/javascripts/environments/components/environments_table.js.es6
View file @
21c6cc68
...
@@ -99,7 +99,8 @@ module.exports = Vue.component('environment-table-component', {
...
@@ -99,7 +99,8 @@ module.exports = Vue.component('environment-table-component', {
:store="store"
:store="store"
:service="service"
:service="service"
:environmentID="model.id"
:environmentID="model.id"
:deployBoardData="model.deployBoardData">
:deployBoardData="model.deployBoardData"
:endpoint="model.rollout_status_path">
</deploy-board>
</deploy-board>
</td>
</td>
</tr>
</tr>
...
...
app/assets/javascripts/environments/services/environments_service.js.es6
View file @
21c6cc68
/* eslint-disable class-methods-use-this*/
const Vue = require('vue');
const Vue = require('vue');
class EnvironmentsService {
class EnvironmentsService {
constructor(endpoint) {
constructor(endpoint) {
this.environments = Vue.resource(endpoint);
this.environments = Vue.resource(endpoint);
this.deployBoard = Vue.resource('environments/{id}/status.json');
}
}
get() {
get() {
return this.environments.get();
return this.environments.get();
}
}
getDeployBoard(en
vironmentID
) {
getDeployBoard(en
dpoint
) {
return
this.deployBoard.get({ id: environmentID }
);
return
Vue.http.get(endpoint
);
}
}
}
}
...
...
spec/javascripts/environments/deploy_board_component_spec.js.es6
View file @
21c6cc68
...
@@ -30,6 +30,7 @@ describe('Deploy Board', () => {
...
@@ -30,6 +30,7 @@ describe('Deploy Board', () => {
service: this.service,
service: this.service,
deployBoardData: deployBoardMockData,
deployBoardData: deployBoardMockData,
environmentID: 1,
environmentID: 1,
endpoint: 'endpoint',
},
},
}).$mount();
}).$mount();
});
});
...
@@ -96,6 +97,7 @@ describe('Deploy Board', () => {
...
@@ -96,6 +97,7 @@ describe('Deploy Board', () => {
service: this.service,
service: this.service,
deployBoardData: {},
deployBoardData: {},
environmentID: 1,
environmentID: 1,
endpoint: 'endpoint',
},
},
}).$mount();
}).$mount();
});
});
...
...
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