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
9b59ffeb
Commit
9b59ffeb
authored
Apr 21, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port of 31189-pipelines-error-state to 9-1-stable
parent
a318c04a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
app/assets/javascripts/commit/pipelines/pipelines_table.js
app/assets/javascripts/commit/pipelines/pipelines_table.js
+18
-5
app/assets/javascripts/vue_pipelines_index/components/empty_state.js
...javascripts/vue_pipelines_index/components/empty_state.js
+1
-1
spec/javascripts/commit/pipelines/pipelines_spec.js
spec/javascripts/commit/pipelines/pipelines_spec.js
+5
-0
No files found.
app/assets/javascripts/commit/pipelines/pipelines_table.js
View file @
9b59ffeb
...
...
@@ -55,7 +55,15 @@ export default Vue.component('pipelines-table', {
},
shouldRenderEmptyState
()
{
return
!
this
.
state
.
pipelines
.
length
&&
!
this
.
isLoading
;
return
!
this
.
state
.
pipelines
.
length
&&
!
this
.
isLoading
&&
!
this
.
hasError
;
},
shouldRenderTable
()
{
return
!
this
.
isLoading
&&
this
.
state
.
pipelines
.
length
>
0
&&
!
this
.
hasError
;
},
},
...
...
@@ -145,8 +153,12 @@ export default Vue.component('pipelines-table', {
template
:
`
<div class="content-list pipelines">
<div class="realtime-loading" v-if="isLoading">
<i class="fa fa-spinner fa-spin"></i>
<div
class="realtime-loading"
v-if="isLoading">
<i
class="fa fa-spinner fa-spin"
aria-hidden="true" />
</div>
<empty-state
...
...
@@ -155,8 +167,9 @@ export default Vue.component('pipelines-table', {
<error-state v-if="shouldRenderErrorState" />
<div class="table-holder"
v-if="!isLoading && state.pipelines.length > 0">
<div
class="table-holder"
v-if="shouldRenderTable">
<pipelines-table-component
:pipelines="state.pipelines"
:service="service" />
...
...
app/assets/javascripts/vue_pipelines_index/components/empty_state.js
View file @
9b59ffeb
...
...
@@ -9,7 +9,7 @@ export default {
},
template
:
`
<div class="row empty-state">
<div class="row empty-state
js-empty-state
">
<div class="col-xs-12">
<div class="svg-content">
${
pipelinesEmptyStateSVG
}
...
...
spec/javascripts/commit/pipelines/pipelines_spec.js
View file @
9b59ffeb
...
...
@@ -36,6 +36,7 @@ describe('Pipelines table in Commits and Merge requests', () => {
setTimeout
(()
=>
{
expect
(
this
.
component
.
$el
.
querySelector
(
'
.empty-state
'
)).
toBeDefined
();
expect
(
this
.
component
.
$el
.
querySelector
(
'
.realtime-loading
'
)).
toBe
(
null
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
.js-pipelines-error-state
'
)).
toBe
(
null
);
done
();
},
1
);
});
...
...
@@ -67,6 +68,8 @@ describe('Pipelines table in Commits and Merge requests', () => {
setTimeout
(()
=>
{
expect
(
this
.
component
.
$el
.
querySelectorAll
(
'
table > tbody > tr
'
).
length
).
toEqual
(
1
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
.realtime-loading
'
)).
toBe
(
null
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
.empty-state
'
)).
toBe
(
null
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
.js-pipelines-error-state
'
)).
toBe
(
null
);
done
();
},
0
);
});
...
...
@@ -99,6 +102,8 @@ describe('Pipelines table in Commits and Merge requests', () => {
setTimeout
(()
=>
{
expect
(
this
.
component
.
$el
.
querySelector
(
'
.js-pipelines-error-state
'
)).
toBeDefined
();
expect
(
this
.
component
.
$el
.
querySelector
(
'
.realtime-loading
'
)).
toBe
(
null
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
.js-empty-state
'
)).
toBe
(
null
);
expect
(
this
.
component
.
$el
.
querySelector
(
'
table
'
)).
toBe
(
null
);
done
();
},
0
);
});
...
...
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