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
Show 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 = {
type: Number,
required: true,
},
endpoint: {
type: String,
required: true,
},
},
data() {
...
...
@@ -66,7 +71,7 @@ module.exports = {
// If the response is 204, we make 3 more requests.
gl.utils.backOff((next, stop) => {
this.service.getDeployBoard(this.en
vironmentID
)
this.service.getDeployBoard(this.en
dpoint
)
.then((resp) => {
if (resp.status === statusCodes.NO_CONTENT) {
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', {
:store="store"
:service="service"
:environmentID="model.id"
:deployBoardData="model.deployBoardData">
:deployBoardData="model.deployBoardData"
:endpoint="model.rollout_status_path">
</deploy-board>
</td>
</tr>
...
...
app/assets/javascripts/environments/services/environments_service.js.es6
View file @
21c6cc68
/* eslint-disable class-methods-use-this*/
const Vue = require('vue');
class EnvironmentsService {
constructor(endpoint) {
this.environments = Vue.resource(endpoint);
this.deployBoard = Vue.resource('environments/{id}/status.json');
}
get() {
return this.environments.get();
}
getDeployBoard(en
vironmentID
) {
return
this.deployBoard.get({ id: environmentID }
);
getDeployBoard(en
dpoint
) {
return
Vue.http.get(endpoint
);
}
}
...
...
spec/javascripts/environments/deploy_board_component_spec.js.es6
View file @
21c6cc68
...
...
@@ -30,6 +30,7 @@ describe('Deploy Board', () => {
service: this.service,
deployBoardData: deployBoardMockData,
environmentID: 1,
endpoint: 'endpoint',
},
}).$mount();
});
...
...
@@ -96,6 +97,7 @@ describe('Deploy Board', () => {
service: this.service,
deployBoardData: {},
environmentID: 1,
endpoint: 'endpoint',
},
}).$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