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
d8c73e3e
Commit
d8c73e3e
authored
Nov 03, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conditional render to have running - branches - tags be HAML
parent
ea71e327
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
3 deletions
+48
-3
app/assets/javascripts/vue_pipelines_index/index.js.es6
app/assets/javascripts/vue_pipelines_index/index.js.es6
+1
-0
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
...sets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
+0
-1
app/assets/javascripts/vue_pipelines_index/store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+1
-1
app/assets/javascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
...ascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
+6
-1
app/assets/javascripts/vue_pipelinesindex/store.js.es6
app/assets/javascripts/vue_pipelinesindex/store.js.es6
+27
-0
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+13
-0
No files found.
app/assets/javascripts/vue_pipelines_index/index.js.es6
View file @
d8c73e3e
...
...
@@ -15,6 +15,7 @@
//= require ./pipelines.vue.js.es6
(() => {
if (~window.location.href.indexOf('scope')) return null;
const project = document.querySelector('.pipelines');
Vue.use(VueResource);
...
...
app/assets/javascripts/vue_pipelines_index/pipelines.vue.js.es6
View file @
d8c73e3e
...
...
@@ -80,7 +80,6 @@
<vue-gl-pagination
:pagenum='pagenum'
:changepage='changepage'
:pages='pipelines.length'
:count='count'
>
</vue-gl-pagination>
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
d8c73e3e
...
...
@@ -21,7 +21,7 @@
// eventually clearInterval(this.intervalId)
this.intervalId = setInterval(() => {
goFetch();
},
3
0000);
},
6
0000);
}
};
})(window.gl || (window.gl = {}));
app/assets/javascripts/vue_pipelines_index/vue_gl_pagination.vue.js.es6
View file @
d8c73e3e
...
...
@@ -17,7 +17,7 @@
},
computed: {
last() {
return Math.ceil(+this.count / 5)
return Math.ceil(+this.count / 5)
;
},
lastpage() {
return `pipelines?p=${this.last}`;
...
...
@@ -43,6 +43,11 @@
<li :class='pagenumberstatus(n)' v-else>
<a @click='changepage($event)'>{{(n - 1)}}</a>
</li>
<!--
take a slice of current array (up to 5)
if at end make dots dissapear
if in second slice or more make dots appear in the front
-->
<li v-if='n === upcount'>
<span class="gap">…</span>
</li>
...
...
app/assets/javascripts/vue_pipelinesindex/store.js.es6
0 → 100644
View file @
d8c73e3e
/* global gl, Flash */
/* eslint-disable no-param-reassign */
((gl) => {
const api = '/api/v3/projects';
const paginate = '?per_page=5&page=';
gl.PipelineStore = class {
fetchDataLoop(Vue, pageNum) {
const goFetch = () =>
this.$http.get(`${api}/${this.scope}/pipelines${paginate}${pageNum}`)
.then((response) => {
Vue.set(this, 'pipelines', JSON.parse(response.body));
}, () => new Flash(
'Something went wrong on our end.'
));
// inital fetch and then start timeout loop
goFetch();
// eventually clearInterval(this.intervalId)
this.intervalId = setInterval(() => {
goFetch();
}, 30000);
}
};
})(window.gl || (window.gl = {}));
app/views/projects/pipelines/index.html.haml
View file @
d8c73e3e
...
...
@@ -41,6 +41,19 @@
-
if
@pipelines
.
blank?
%div
.nothing-here-block
No pipelines to show
-
elsif
@scope
==
'branches'
||
@scope
==
'tags'
||
@scope
==
'running'
.table-holder
%table
.table.ci-table
%thead
%th
Status
%th
Pipeline
%th
Commit
%th
Stages
%th
%th
.hidden-xs
=
render
@pipelines
,
commit_sha:
true
,
stage:
true
,
allow_retry:
true
,
stages:
stages
=
paginate
@pipelines
,
theme:
'gitlab'
-
else
.vue-pipelines-index
...
...
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