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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
9d1ab1e9
Commit
9d1ab1e9
authored
Mar 17, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error state to commits and merge requests pipelines table
parent
01660209
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
app/assets/javascripts/commit/pipelines/pipelines_table.js
app/assets/javascripts/commit/pipelines/pipelines_table.js
+11
-6
app/assets/javascripts/vue_pipelines_index/pipelines.js
app/assets/javascripts/vue_pipelines_index/pipelines.js
+2
-1
No files found.
app/assets/javascripts/commit/pipelines/pipelines_table.js
View file @
9d1ab1e9
...
...
@@ -5,6 +5,7 @@ import PipelinesTableComponent from '../../vue_shared/components/pipelines_table
import
PipelinesService
from
'
../../vue_pipelines_index/services/pipelines_service
'
;
import
PipelineStore
from
'
../../vue_pipelines_index/stores/pipelines_store
'
;
import
eventHub
from
'
../../vue_pipelines_index/event_hub
'
;
import
ErrorState
from
'
../../vue_pipelines_index/components/error_state
'
;
import
'
../../lib/utils/common_utils
'
;
import
'
../../vue_shared/vue_resource_interceptor
'
;
...
...
@@ -22,6 +23,7 @@ import '../../vue_shared/vue_resource_interceptor';
export
default
Vue
.
component
(
'
pipelines-table
'
,
{
components
:
{
'
pipelines-table-component
'
:
PipelinesTableComponent
,
'
error-state
'
:
ErrorState
,
},
/**
...
...
@@ -39,9 +41,16 @@ export default Vue.component('pipelines-table', {
store
,
state
:
store
.
state
,
isLoading
:
false
,
hasError
:
false
,
};
},
computed
:
{
shouldRenderErrorState
()
{
return
this
.
hasError
&&
!
this
.
pageRequest
;
},
},
/**
* When the component is about to be mounted, tell the service to fetch the data
*
...
...
@@ -80,6 +89,7 @@ export default Vue.component('pipelines-table', {
this
.
isLoading
=
false
;
})
.
catch
(()
=>
{
this
.
hasError
=
true
;
this
.
isLoading
=
false
;
new
Flash
(
'
An error occurred while fetching the pipelines, please reload the page again.
'
);
});
...
...
@@ -92,12 +102,7 @@ export default Vue.component('pipelines-table', {
<i class="fa fa-spinner fa-spin"></i>
</div>
<div class="blank-state blank-state-no-icon"
v-if="!isLoading && state.pipelines.length === 0">
<h2 class="blank-state-title js-blank-state-title">
No pipelines to show
</h2>
</div>
<error-state v-if="shouldRenderErrorState" />
<div class="table-holder pipelines"
v-if="!isLoading && state.pipelines.length > 0">
...
...
app/assets/javascripts/vue_pipelines_index/pipelines.js
View file @
9d1ab1e9
...
...
@@ -163,6 +163,7 @@ export default {
this
.
pageRequest
=
false
;
})
.
catch
(()
=>
{
this
.
hasError
=
true
;
this
.
pageRequest
=
false
;
new
Flash
(
'
An error occurred while fetching the pipelines, please reload the page again.
'
);
});
...
...
@@ -196,7 +197,7 @@ export default {
<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
</div>
<empty-state v-if="shouldRenderEmptyState" />
<empty-state v-if="shouldRenderEmptyState"
:helpPagePath="helpPagePath"
/>
<error-state v-if="shouldRenderErrorState" />
...
...
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