fix cancel url - clearInterval on refresh and page close - fix branch url

This commit is contained in:
Regis 2016-11-12 01:57:23 -07:00
parent 35c8e533c0
commit 04a4520c2d
4 changed files with 10 additions and 6 deletions

View file

@ -20,7 +20,7 @@
<!-- ** will need branch_url for this branch ** --> <!-- ** will need branch_url for this branch ** -->
<a <a
class="monospace branch-name" class="monospace branch-name"
:href='pipeline.commit.commit_url' :href='pipeline.ref.url'
> >
{{pipeline.ref.name}} {{pipeline.ref.name}}
</a> </a>

View file

@ -80,7 +80,7 @@
<div class="cancel-retry-btns inline"> <div class="cancel-retry-btns inline">
<!-- @click='retry($event)' --> <!-- @click='retry($event)' -->
<a <a
v-if='!pipeline.cancel_url' v-if='!pipeline.cancel_url || pipeline.details.status !== "cancelled"'
class="btn has-tooltip" class="btn has-tooltip"
title="Retry" title="Retry"
rel="nofollow" rel="nofollow"
@ -95,7 +95,7 @@
title="" title=""
rel="nofollow" rel="nofollow"
data-method="post" data-method="post"
href="/gitlab-org/gitlab-ce/pipelines/4950216/cancel" :href='pipeline.cancel_url'
data-original-title="Cancel" data-original-title="Cancel"
> >
<i class="fa fa-remove"></i> <i class="fa fa-remove"></i>

View file

@ -37,8 +37,8 @@
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope); this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
}, },
methods: { methods: {
changepage(event, last) { changepage(e, last) {
const text = event.target.innerText; const text = e.target.innerText;
if (text === '...') return; if (text === '...') return;
if (/^-?[\d.]+(?:e-?\d+)?$/.test(text)) this.pagenum = +text; if (/^-?[\d.]+(?:e-?\d+)?$/.test(text)) this.pagenum = +text;
if (text === 'Last >>') this.pagenum = last; if (text === 'Last >>') this.pagenum = last;

View file

@ -53,8 +53,12 @@
goFetch(); goFetch();
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
goUpdate(); if (this.updatedAt) goUpdate();
}, 3000); }, 3000);
window.onbeforeunload = function removePipelineInterval() {
clearInterval(this.intervalId);
};
} }
}; };
})(window.gl || (window.gl = {})); })(window.gl || (window.gl = {}));