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
1d30feef
Commit
1d30feef
authored
Feb 24, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
parent
e89b6eea
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
16 deletions
+25
-16
app/assets/javascripts/environments/components/deploy_board_component.js.es6
...pts/environments/components/deploy_board_component.js.es6
+10
-11
app/assets/javascripts/environments/components/deploy_board_instance_component.js.es6
...onments/components/deploy_board_instance_component.js.es6
+2
-2
app/assets/javascripts/environments/components/environment.js.es6
...ts/javascripts/environments/components/environment.js.es6
+1
-1
app/assets/javascripts/environments/folder/environments_folder_view.js.es6
...ripts/environments/folder/environments_folder_view.js.es6
+1
-1
app/assets/javascripts/environments/services/environments_service.js.es6
...scripts/environments/services/environments_service.js.es6
+1
-1
app/assets/javascripts/lib/utils/http_status.js
app/assets/javascripts/lib/utils/http_status.js
+10
-0
No files found.
app/assets/javascripts/environments/components/deploy_board_component.js.es6
View file @
1d30feef
/* eslint-disable no-new */
/* eslint-disable no-new
, import/first
*/
/**
* Renders a deploy board.
*
...
...
@@ -18,12 +18,12 @@
* for more information
*/
const Vue = require('vue')
;
const instanceComponent = require('./deploy_board_instance_component')
;
require('~/lib/utils/common_utils')
;
const Flash = require('~/flash')
;
import instanceComponent from './deploy_board_instance_component.js.es6'
;
import statusCodes from '~/lib/utils/http_status'
;
import Flash from '~/flash'
;
import '~/lib/utils/common_utils.js.es6'
;
module.exports =
Vue.component('deploy_boards_components',
{
module.exports = {
components: {
instanceComponent,
...
...
@@ -63,13 +63,12 @@ module.exports = Vue.component('deploy_boards_components', {
this.isLoading = true;
const maxNumberOfRequests = 3;
const noContentStatus = 204;
// If the response is 204, we make 3 more requests.
gl.utils.backOff((next, stop) => {
this.service.getDeployBoard(this.environmentID)
.then((resp) => {
if (resp.status ===
noContentStatus
) {
if (resp.status ===
statusCodes.NO_CONTENT
) {
this.backOffRequestCounter = this.backOffRequestCounter += 1;
if (this.backOffRequestCounter < maxNumberOfRequests) {
...
...
@@ -84,7 +83,7 @@ module.exports = Vue.component('deploy_boards_components', {
.catch(stop);
})
.then((resp) => {
if (resp.status ===
noContentStatus
) {
if (resp.status ===
statusCodes.NO_CONTENT
) {
this.hasError = true;
return resp;
}
...
...
@@ -126,7 +125,7 @@ module.exports = Vue.component('deploy_boards_components', {
<div class="js-deploy-board deploy-board">
<div v-if="isLoading">
<i class="fa fa-spinner fa-spin"></i>
<i class="fa fa-spinner fa-spin"
aria-hidden="true"
></i>
</div>
<div v-if="canRenderDeployBoard">
...
...
@@ -175,4 +174,4 @@ module.exports = Vue.component('deploy_boards_components', {
</div>
</div>
`,
}
)
;
};
app/assets/javascripts/environments/components/deploy_board_instance_component.js.es6
View file @
1d30feef
...
...
@@ -10,7 +10,7 @@
const Vue = require('vue');
module.exports =
Vue.component('deploy_board_instance_component',
{
module.exports = {
props: {
...
...
@@ -48,4 +48,4 @@ module.exports = Vue.component('deploy_board_instance_component', {
data-placement="top">
</div>
`,
}
)
;
};
app/assets/javascripts/environments/components/environment.js.es6
View file @
1d30feef
...
...
@@ -89,7 +89,7 @@ module.exports = Vue.component('environment-component', {
this.isLoading = true;
return this.service.
all
()
return this.service.
get
()
.then(resp => ({
headers: resp.headers,
body: resp.json(),
...
...
app/assets/javascripts/environments/folder/environments_folder_view.js.es6
View file @
1d30feef
...
...
@@ -93,7 +93,7 @@ module.exports = Vue.component('environment-folder-view', {
this.isLoading = true;
return this.service.
all
()
return this.service.
get
()
.then(resp => ({
headers: resp.headers,
body: resp.json(),
...
...
app/assets/javascripts/environments/services/environments_service.js.es6
View file @
1d30feef
...
...
@@ -7,7 +7,7 @@ class EnvironmentsService {
this.deployBoard = Vue.resource('environments/{id}/status.json');
}
all
() {
get
() {
return this.environments.get();
}
...
...
app/assets/javascripts/lib/utils/http_status.js
0 → 100644
View file @
1d30feef
/**
* exports HTTP status codes
*/
const
statusCodes
=
{
NO_CONTENT
:
204
,
OK
:
200
,
};
export
default
statusCodes
;
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