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
e8eac643
Commit
e8eac643
authored
Mar 13, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds empty state for pipelines table
parent
1585608b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
app/assets/javascripts/vue_pipelines_index/pipelines.js
app/assets/javascripts/vue_pipelines_index/pipelines.js
+41
-4
app/assets/javascripts/vue_pipelines_index/store.js
app/assets/javascripts/vue_pipelines_index/store.js
+1
-0
app/views/shared/empty_states/icons/_pipelines_empty.svg
app/views/shared/empty_states/icons/_pipelines_empty.svg
+1
-0
app/views/shared/empty_states/icons/_pipelines_failed.svg
app/views/shared/empty_states/icons/_pipelines_failed.svg
+1
-0
No files found.
app/assets/javascripts/vue_pipelines_index/pipelines.js
View file @
e8eac643
/* global Vue, gl */
/* eslint-disable no-param-reassign */
import
pipelinesEmptyStateSVG
from
'
empty_states/icons/_pipelines_empty.svg
'
;
import
pipelinesErrorStateSVG
from
'
empty_states/icons/_pipelines_failed.svg
'
;
window
.
Vue
=
require
(
'
vue
'
);
require
(
'
../vue_shared/components/table_pagination
'
);
...
...
@@ -25,6 +27,9 @@ const CommitPipelinesStoreWithTimeAgo = require('../commit/pipelines/pipelines_s
pagenum
:
1
,
count
:
{},
pageRequest
:
false
,
hasError
:
false
,
pipelinesEmptyStateSVG
,
pipelinesErrorStateSVG
,
};
},
props
:
[
'
scope
'
,
'
store
'
],
...
...
@@ -43,6 +48,16 @@ const CommitPipelinesStoreWithTimeAgo = require('../commit/pipelines/pipelines_s
}
},
computed
:
{
shouldRenderErrorState
()
{
return
this
.
hasError
&&
!
this
.
pageRequest
;
},
shouldRenderEmptyState
()
{
return
!
this
.
hasError
&&
!
this
.
pageRequest
&&
!
this
.
pipelines
.
length
;
},
},
methods
:
{
/**
* Will change the page number and update the URL.
...
...
@@ -62,11 +77,33 @@ const CommitPipelinesStoreWithTimeAgo = require('../commit/pipelines/pipelines_s
<i class="fa fa-spinner fa-spin"></i>
</div>
<div v-if="shouldRenderEmptyState"
class="row empty-state">
<div class="col-xs-12 pull-right">
<div class="svg-content">
${
pipelinesEmptyStateSVG
}
</div>
</div>
<div class="col-xs-12 center">
<div class="text-content">
<h4>Build with confidence</h4>
<p>
Continous Integration can help catch bugs by running your tests automatically,
while Continuous Deployment can help you deliver code to your product environment.
<a href="" class="btn btn-info">
Get started with Pipelines
</a>
</p>
</div>
</div>
</div>
<div class="blank-state blank-state-no-icon"
v-if="!pageRequest && pipelines.length === 0">
<h2 class="blank-state-title js-blank-state-title">
No pipelines to show
</h2>
v-if="shouldRenderErrorState">
${
pipelinesErrorStateSVG
}
</div>
<div class="table-holder" v-if='!pageRequest && pipelines.length'>
...
...
app/assets/javascripts/vue_pipelines_index/store.js
View file @
e8eac643
...
...
@@ -24,6 +24,7 @@
this
.
pageRequest
=
false
;
},
()
=>
{
this
.
pageRequest
=
false
;
this
.
hasError
=
true
;
return
new
Flash
(
'
An error occurred while fetching the pipelines, please reload the page again.
'
);
});
}
...
...
app/views/shared/empty_states/icons/_pipelines_empty.svg
0 → 100644
View file @
e8eac643
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 250 150"
><g
fill=
"none"
fill-rule=
"evenodd"
transform=
"translate(0-3)"
><g
transform=
"translate(0 105)"
><g
fill=
"#e5e5e5"
><rect
width=
"78"
height=
"4"
x=
"34"
y=
"21"
opacity=
".5"
rx=
"2"
/><path
d=
"m152 23c0-1.105.887-2 1.998-2h4c1.104 0 1.998.888 1.998 2 0 1.105-.887 2-1.998 2h-4c-1.104 0-1.998-.888-1.998-2m14 0c0-1.105.887-2 1.998-2h4c1.104 0 1.998.888 1.998 2 0 1.105-.887 2-1.998 2h-4c-1.104 0-1.998-.888-1.998-2m14 0c0-1.105.887-2 1.998-2h4c1.104 0 1.998.888 1.998 2 0 1.105-.887 2-1.998 2h-4c-1.104 0-1.998-.888-1.998-2m14 0c0-1.105.887-2 1.998-2h4c1.104 0 1.998.888 1.998 2 0 1.105-.887 2-1.998 2h-4c-1.104 0-1.998-.888-1.998-2m14 0c0-1.105.887-2 1.998-2h4c1.104 0 1.998.888 1.998 2 0 1.105-.887 2-1.998 2h-4c-1.104 0-1.998-.888-1.998-2"
/></g><g
transform=
"translate(0 4)"
><path
fill=
"#98d7b2"
fill-rule=
"nonzero"
d=
"m19 38c-10.493 0-19-8.507-19-19 0-10.493 8.507-19 19-19 10.493 0 19 8.507 19 19 0 10.493-8.507 19-19 19m0-4c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15-8.284 0-15 6.716-15 15 0 8.284 6.716 15 15 15"
/><path
fill=
"#31af64"
d=
"m17.07 21.02l-2.829-2.829c-.786-.786-2.047-.781-2.828 0-.786.786-.781 2.047 0 2.828l4.243 4.243c.392.392.902.587 1.412.588.512.002 1.021-.193 1.41-.582l7.79-7.79c.777-.777.775-2.042-.006-2.823-.786-.786-2.045-.784-2.823-.006l-6.37 6.37"
/></g><g
fill=
"#e52c5a"
transform=
"translate(102)"
><path
fill-rule=
"nonzero"
d=
"m24 47.5c-12.979 0-23.5-10.521-23.5-23.5 0-12.979 10.521-23.5 23.5-23.5 12.979 0 23.5 10.521 23.5 23.5 0 12.979-10.521 23.5-23.5 23.5m0-5c10.217 0 18.5-8.283 18.5-18.5 0-10.217-8.283-18.5-18.5-18.5-10.217 0-18.5 8.283-18.5 18.5 0 10.217 8.283 18.5 18.5 18.5"
/><path
d=
"m28.24 24l2.833-2.833c1.167-1.167 1.167-3.067-.004-4.239-1.169-1.169-3.069-1.173-4.239-.004l-2.833 2.833-2.833-2.833c-1.167-1.167-3.067-1.167-4.239.004-1.169 1.169-1.173 3.069-.004 4.239l2.833 2.833-2.833 2.833c-1.167 1.167-1.167 3.067.004 4.239 1.169 1.169 3.069 1.173 4.239.004l2.833-2.833 2.833 2.833c1.167 1.167 3.067 1.167 4.239-.004 1.169-1.169 1.173-3.069.004-4.239l-2.833-2.833"
/></g><path
fill=
"#e5e5e5"
fill-rule=
"nonzero"
d=
"m236 37c-7.732 0-14-6.268-14-14 0-7.732 6.268-14 14-14 7.732 0 14 6.268 14 14 0 7.732-6.268 14-14 14m0-4c5.523 0 10-4.477 10-10 0-5.523-4.477-10-10-10-5.523 0-10 4.477-10 10 0 5.523 4.477 10 10 10"
/></g><g
transform=
"translate(69 3)"
><path
fill=
"#e5e5e5"
fill-rule=
"nonzero"
d=
"m4 11.99v60.02c0 4.413 3.583 7.99 8 7.99h89.991c4.419 0 8-3.579 8-7.99v-60.02c0-4.413-3.583-7.99-8-7.99h-89.991c-4.419 0-8 3.579-8 7.99m-4 0c0-6.622 5.378-11.99 12-11.99h89.991c6.629 0 12 5.367 12 11.99v60.02c0 6.622-5.378 11.99-12 11.99h-89.991c-6.629 0-12-5.367-12-11.99v-60.02m52.874 80.3l-13.253-15.292h34.76l-13.253 15.292c-2.237 2.582-6.01 2.585-8.253 0m3.02-2.62c.644.743 1.564.743 2.207 0l7.516-8.673h-17.24l7.516 8.673"
/><rect
width=
"18"
height=
"6"
x=
"15"
y=
"23"
fill=
"#fc8a51"
rx=
"3"
/><rect
width=
"18"
height=
"6"
x=
"39"
y=
"39"
fill=
"#e52c5a"
rx=
"3"
/><rect
width=
"18"
height=
"6"
x=
"33"
y=
"55"
fill=
"#e5e5e5"
rx=
"3"
/><rect
width=
"12"
height=
"6"
x=
"39"
y=
"23"
fill=
"#fde5d8"
rx=
"3"
/><rect
width=
"12"
height=
"6"
x=
"57"
y=
"55"
fill=
"#e52c5a"
rx=
"3"
/><rect
width=
"12"
height=
"6"
x=
"15"
y=
"55"
fill=
"#b5a7dd"
rx=
"3"
/><rect
width=
"18"
height=
"6"
x=
"81"
y=
"23"
fill=
"#fc8a51"
rx=
"3"
/><rect
width=
"18"
height=
"6"
x=
"15"
y=
"39"
fill=
"#fde5d8"
rx=
"3"
/><rect
width=
"6"
height=
"6"
x=
"57"
y=
"23"
fill=
"#e52c5a"
rx=
"3"
/><g
fill=
"#fde5d8"
><rect
width=
"6"
height=
"6"
x=
"69"
y=
"23"
rx=
"3"
/><rect
width=
"6"
height=
"6"
x=
"75"
y=
"39"
rx=
"3"
/></g><rect
width=
"6"
height=
"6"
x=
"63"
y=
"39"
fill=
"#e52c5a"
rx=
"3"
/></g><g
transform=
"matrix(.70711-.70711.70711.70711 84.34 52.5)"
><path
fill=
"#6b4fbb"
fill-rule=
"nonzero"
d=
"m28.02 67.48c-15.927-2.825-28.02-16.738-28.02-33.476 0-18.778 15.222-34 34-34 18.778 0 34 15.222 34 34 0 16.738-12.1 30.652-28.02 33.476.015.173.023.347.023.524v21.999c0 3.314-2.693 6-6 6-3.314 0-6-2.682-6-6v-21.999c0-.177.008-.351.023-.524m5.977-7.476c14.359 0 26-11.641 26-26 0-14.359-11.641-26-26-26-14.359 0-26 11.641-26 26 0 14.359 11.641 26 26 26"
/><path
fill=
"#fff"
fill-opacity=
".3"
stroke=
"#6b4fbb"
stroke-width=
"8"
d=
"m31 71c16.569 0 30-13.431 30-30 0-16.569-13.431-30-30-30"
transform=
"matrix(.86603.5-.5.86603 26.663-17.507)"
/></g></g></svg>
\ No newline at end of file
app/views/shared/empty_states/icons/_pipelines_failed.svg
0 → 100644
View file @
e8eac643
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 446 249"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
><defs><path
id=
"0"
d=
"m260.03 114h23.972v-.013c19.972-.53 36-16.887 36-36.987 0-20.435-16.565-37-37-37-.993 0-1.977.039-2.95.116-4.95-14.605-18.773-25.12-35.05-25.12-5.464 0-10.652 1.185-15.32 3.311-6.649-9.841-17.909-16.311-30.68-16.311-20.435 0-37 16.565-37 37 0 .701.019 1.397.058 2.088-16.11 3.999-28.06 18.561-28.06 35.912 0 20.435 16.565 37 37 37 .324 0 .646-.004.968-.012"
/><ellipse
id=
"2"
cx=
"41"
cy=
"41"
rx=
"41"
ry=
"41"
/><mask
id=
"1"
width=
"186"
height=
"112"
x=
"0"
y=
"0"
fill=
"#fff"
><use
xlink:href=
"#0"
/></mask><mask
id=
"3"
width=
"82"
height=
"82"
x=
"0"
y=
"0"
fill=
"#fff"
><use
xlink:href=
"#2"
/></mask></defs><g
fill=
"none"
fill-rule=
"evenodd"
><g
transform=
"matrix(.86603.5-.5.86603 228.11 137.43)"
><path
stroke=
"#b5a7dd"
stroke-width=
"4"
d=
"m.445.161c15.89 10.636 34.998 16.839 55.55 16.839"
/><g
transform=
"translate(56 4)"
><path
fill=
"#fb722e"
d=
"m16 8c0-1.105.902-2 2.01-2h7.983c1.109 0 2.01.888 2.01 2 0 1.105-.902 2-2.01 2h-7.983c-1.109 0-2.01-.888-2.01-2m0 10c0-1.105.902-2 2.01-2h7.983c1.109 0 2.01.888 2.01 2 0 1.105-.902 2-2.01 2h-7.983c-1.109 0-2.01-.888-2.01-2"
/><path
fill=
"#fde5d8"
fill-rule=
"nonzero"
d=
"m4 22h6c3.315 0 6-2.685 6-5.997v-6.01c0-3.315-2.684-5.997-6-5.997h-6v18m-4-18.992c0-1.661 1.343-3.01 2.994-3.01h7.01c5.523 0 10 4.47 10 9.997v6.01c0 5.521-4.476 9.997-10 9.997h-7.01c-1.654 0-2.994-1.343-2.994-3.01v-19.984"
/></g></g><g
fill-rule=
"nonzero"
transform=
"translate(257)"
><path
fill=
"#e5e5e5"
d=
"m3.597 18.747c5.611-9.09 15.519-14.747 26.403-14.747 17.12 0 31 13.879 31 31 0 7.02-2.34 13.685-6.58 19.1l3.149 2.466c4.786-6.111 7.431-13.639 7.431-21.565 0-19.33-15.67-35-35-35-12.286 0-23.476 6.384-29.808 16.647l3.404 2.1"
/><g
transform=
"matrix(.96593.25882-.25882.96593 15.98 9.578)"
><path
fill=
"#b5a7dd"
d=
"m12.426 11.592l-2.142 1.768-3.664-2.116c-.186-.107-.43-.042-.543.154l-1.229 2.129c-.116.2-.052.438.138.547l3.658 2.112-.455 2.735c-.109.657-.165 1.327-.165 2.01 0 .678.055 1.348.165 2.01l.455 2.735-3.658 2.112c-.186.107-.251.351-.138.547l1.229 2.129c.116.2.353.264.543.154l3.664-2.116 2.142 1.768c1.036.855 2.205 1.533 3.462 2l2.6.972v4.225c0 .215.179.393.405.393h2.458c.231 0 .405-.174.405-.393v-4.225l2.6-.972c1.257-.47 2.426-1.147 3.462-2l2.142-1.768 3.664 2.116c.186.107.43.042.543-.154l1.229-2.129c.116-.2.052-.438-.138-.547l-3.658-2.112.455-2.735c.109-.657.165-1.327.165-2.01 0-.678-.055-1.348-.165-2.01l-.455-2.735 3.658-2.112c.186-.107.251-.351.138-.547l-1.229-2.129c-.116-.2-.353-.264-.543-.154l-3.664 2.116-2.142-1.768c-1.036-.855-2.205-1.533-3.462-2l-2.6-.972v-4.225c0-.215-.179-.393-.405-.393h-2.458c-.231 0-.405.174-.405.393v4.225l-2.6.972c-1.257.47-2.426 1.147-3.462 2m2.062-5.749v-1.45c0-2.426 1.963-4.393 4.405-4.393h2.458c2.433 0 4.405 1.967 4.405 4.393v1.45c1.689.631 3.243 1.538 4.608 2.665l1.259-.727c2.101-1.213 4.786-.497 6.01 1.618l1.229 2.129c1.216 2.107.499 4.798-1.602 6.01l-1.257.726c.144.866.219 1.755.219 2.662 0 .907-.075 1.796-.219 2.662l1.257.726c2.101 1.213 2.823 3.896 1.602 6.01l-1.229 2.129c-1.216 2.107-3.906 2.832-6.01 1.618l-1.259-.727c-1.365 1.127-2.92 2.034-4.608 2.665v1.45c0 2.426-1.963 4.393-4.405 4.393h-2.458c-2.433 0-4.405-1.967-4.405-4.393v-1.45c-1.689-.631-3.243-1.538-4.608-2.665l-1.259.727c-2.101 1.213-4.786.497-6.01-1.618l-1.229-2.129c-1.216-2.107-.499-4.798 1.602-6.01l1.257-.726c-.144-.866-.219-1.755-.219-2.662 0-.907.075-1.796.219-2.662l-1.257-.726c-2.101-1.213-2.823-3.896-1.602-6.01l1.229-2.129c1.216-2.107 3.906-2.832 6.01-1.618l1.259.727c1.365-1.127 2.92-2.034 4.608-2.665"
/><path
fill=
"#6b4fbb"
d=
"m20.12 23.366c1.347 0 2.439-1.092 2.439-2.439 0-1.347-1.092-2.439-2.439-2.439-1.347 0-2.439 1.092-2.439 2.439 0 1.347 1.092 2.439 2.439 2.439m0 4c-3.556 0-6.439-2.883-6.439-6.439 0-3.556 2.883-6.439 6.439-6.439 3.556 0 6.439 2.883 6.439 6.439 0 3.556-2.883 6.439-6.439 6.439"
/></g></g><use
fill=
"#fff"
stroke=
"#e5e5e5"
stroke-width=
"8"
mask=
"url(#1)"
stroke-linejoin=
"round"
xlink:href=
"#0"
/><g
transform=
"translate(175 58)"
><use
fill=
"#fff"
stroke=
"#e5e5e5"
stroke-width=
"8"
mask=
"url(#3)"
xlink:href=
"#2"
/><g
fill-rule=
"nonzero"
><path
fill=
"#e5e5e5"
d=
"m41 78c20.435 0 37-16.565 37-37 0-20.435-16.565-37-37-37-20.435 0-37 16.565-37 37 0 20.435 16.565 37 37 37m0 4c-22.644 0-41-18.356-41-41 0-22.644 18.356-41 41-41 22.644 0 41 18.356 41 41 0 22.644-18.356 41-41 41"
/><g
transform=
"matrix(.96593.25882-.25882.96593 23.581 9.415)"
><path
fill=
"#b5a7dd"
d=
"m14.821 13.655l-2.142 1.768-3.933-2.271c-.72-.416-1.634-.171-2.046.543l-1.507 2.61c-.409.708-.161 1.631.553 2.043l3.926 2.267-.455 2.735c-.145.869-.218 1.754-.218 2.65 0 .896.073 1.782.218 2.65l.455 2.735-3.926 2.267c-.72.416-.965 1.329-.553 2.043l1.507 2.61c.409.708 1.332.955 2.046.543l3.933-2.271 2.142 1.768c1.369 1.131 2.916 2.027 4.579 2.648l2.6.972v4.534c0 .831.669 1.5 1.493 1.5h3.01c.817 0 1.493-.676 1.493-1.5v-4.534l2.6-.972c1.663-.621 3.21-1.518 4.579-2.648l2.142-1.768 3.933 2.271c.72.416 1.634.171 2.046-.543l1.507-2.61c.409-.708.161-1.631-.553-2.043l-3.926-2.267.455-2.735c.145-.869.218-1.754.218-2.65 0-.896-.073-1.782-.218-2.65l-.455-2.735 3.926-2.267c.72-.416.965-1.329.553-2.043l-1.507-2.61c-.409-.708-1.332-.955-2.046-.543l-3.933 2.271-2.142-1.768c-1.369-1.131-2.916-2.027-4.579-2.648l-2.6-.972v-4.534c0-.831-.669-1.5-1.493-1.5h-3.01c-.817 0-1.493.676-1.493 1.5v4.534l-2.6.972c-1.663.621-3.21 1.518-4.579 2.648m3.179-6.395v-1.759c0-3.038 2.471-5.5 5.493-5.5h3.01c3.034 0 5.493 2.46 5.493 5.5v1.759c2.098.784 4.03 1.91 5.725 3.311l1.528-.882c2.631-1.519 5.999-.61 7.51 2.01l1.507 2.61c1.517 2.627.616 5.987-2.02 7.507l-1.525.881c.179 1.076.272 2.18.272 3.307 0 1.127-.093 2.231-.272 3.307l1.525.881c2.631 1.519 3.528 4.89 2.02 7.507l-1.507 2.61c-1.517 2.627-4.877 3.527-7.51 2.01l-1.528-.882c-1.696 1.401-3.627 2.527-5.725 3.311v1.759c0 3.038-2.471 5.5-5.493 5.5h-3.01c-3.034 0-5.493-2.46-5.493-5.5v-1.759c-2.098-.784-4.03-1.91-5.725-3.311l-1.528.882c-2.631 1.519-5.999.61-7.51-2.01l-1.507-2.61c-1.517-2.627-.616-5.987 2.02-7.507l1.525-.881c-.179-1.076-.272-2.18-.272-3.307 0-1.127.093-2.231.272-3.307l-1.525-.881c-2.631-1.519-3.528-4.89-2.02-7.507l1.507-2.61c1.517-2.627 4.877-3.527 7.51-2.01l1.528.882c1.696-1.401 3.627-2.527 5.725-3.311"
/><path
fill=
"#6b4fbb"
d=
"m25 30c2.209 0 4-1.791 4-4 0-2.209-1.791-4-4-4-2.209 0-4 1.791-4 4 0 2.209 1.791 4 4 4m0 4c-4.418 0-8-3.582-8-8 0-4.418 3.582-8 8-8 4.418 0 8 3.582 8 8 0 4.418-3.582 8-8 8"
/></g></g></g><g
transform=
"translate(140 161)"
><path
fill=
"#e5e5e5"
fill-rule=
"nonzero"
d=
"m4 8.541v30.01c0 2.202 1.793 3.995 4 3.995h20c2.209 0 4-1.789 4-3.995v-30.01c0-2.202-1.793-3.995-4-3.995h-20c-2.209 0-4 1.789-4 3.995m-4 0c0-4.416 3.583-7.995 8-7.995h20c4.416 0 8 3.584 8 7.995v30.01c0 4.416-3.583 7.995-8 7.995h-20c-4.416 0-8-3.584-8-7.995v-30.01"
/><g
fill=
"#fb722e"
><rect
width=
"4"
height=
"11"
x=
"10"
y=
"18.545"
rx=
"2"
/><rect
width=
"4"
height=
"11"
x=
"21"
y=
"18.545"
rx=
"2"
/></g></g><path
fill=
"#e5e5e5"
fill-rule=
"nonzero"
d=
"m445.16 245.34c-16.874-11.778-110.62-20.336-222.14-20.336-111.61 0-205.4 8.571-222.18 20.364-.904.635-1.121 1.883-.486 2.786.635.904 1.883 1.121 2.786.486 15.756-11.07 109.46-19.636 219.88-19.636 110.34 0 203.99 8.55 219.85 19.617.906.632 2.153.41 2.785-.495.632-.906.41-2.153-.495-2.785"
/></g></svg>
\ No newline at end of file
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