BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
729fd548
Commit
729fd548
authored
Nov 10, 2016
by
Regis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'p_url' into auto-pipelines-vue
parents
2d2f413a
a0a0a570
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+4
-6
store.js.es6
app/assets/javascripts/vue_pipelines_index/store.js.es6
+4
-7
No files found.
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
View file @
729fd548
...
...
@@ -30,12 +30,9 @@
created() {
const url = window.location.toString();
if (~url.indexOf('?')) this.pagenum = url.split('?')[1].split('=')[1];
this.store.fetchDataLoop.call(this, Vue, this.pagenum);
this.store.fetchDataLoop.call(this, Vue, this.pagenum
, this.scope
);
},
methods: {
shortsha(pipeline) {
return pipeline.sha.slice(0, 8);
},
changepage(event, last) {
const text = event.target.innerText;
if (text === '...') return;
...
...
@@ -47,7 +44,8 @@
window.history.pushState({}, null, `?p=${this.pagenum}`);
clearInterval(this.intervalId);
this.store.fetchDataLoop.call(this, Vue, this.pagenum);
debugger
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
},
pipelineurl(id) {
return `pipelines/${id}`;
...
...
@@ -72,7 +70,7 @@
</vue-pipeline-url>
<vue-branch-commit
:pipeline='pipeline'
:shortsha='shortsha'
:shortsha='
pipeline.commit.
shortsha'
>
</vue-branch-commit>
<vue-stages></vue-stages>
...
...
app/assets/javascripts/vue_pipelines_index/store.js.es6
View file @
729fd548
...
...
@@ -2,17 +2,14 @@
/* eslint-disable no-param-reassign */
((gl) => {
const api = '/api/v3/projects';
const paginate = '?per_page=5&page=';
gl.PipelineStore = class {
fetchDataLoop(Vue, pageNum) {
fetchDataLoop(Vue, pageNum
, url
) {
const goFetch = () =>
// const url = `${api}/${this.scope}/pipelines${paginate}${pageNum}`
this.$http.get('/gitlab-org/gitlab-shell/pipelines.json?page=1')
this.$http.get(`${url}?page=${pageNum}`)
.then((response) => {
debugger
Vue.set(this, 'pipelines', JSON.parse(response.body));
const res = JSON.parse(response.body)
Vue.set(this, 'pipelines', res.pipelines);
}, () => new Flash(
'Something went wrong on our end.'
));
...
...
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