Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!doctype html>

<html lang="en">

<head>
<title>Gitlab CI Monitor</title>
<meta charset="utf-8" />
Expand All @@ -21,7 +22,7 @@
<div class="ui yellow message">Last updated at {{lastRun}}</div>
</div>
<div class="four wide column">
<img class="logo" src="images/gitlab-logo.svg"/>
<img class="logo" src="images/gitlab-logo.svg" />
</div>
<div class="six wide column">
</div>
Expand Down Expand Up @@ -52,7 +53,9 @@
</ul>
</div>
<div class="ui bottom attached warning message">
<p>Ex: http://gitlab-ci-monitor.example.com?gitlab=gitlab.example.com&token=some-token&projects=namespace/project1/branch,namespace/project2/branch,namespace/project3/branch</p>
<p>Ex:
http://gitlab-ci-monitor.example.com?gitlab=gitlab.example.com&token=some-token&projects=namespace/project1/branch,namespace/project2/branch,namespace/project3/branch
</p>
</div>
</div>
</div>
Expand All @@ -62,34 +65,38 @@
<div class="row builds">
<div class="sixteen wide column">
<div class="ui stackable cards">
<div v-for="pipeline in sortedPipelines" class="card {{pipeline.status}}">
<div v-for="pipeline in sortedPipelines" v-bind:class="'card ' + pipeline.status">
<div class="content">
<div class="header project-name">
<a target="_blank" title="overview of {{pipeline.project}}" href="https://{{gitlab}}/{{pipeline.project_path}}/">{{ pipeline.project }}</a> <a target="_blank" title="file tree branch {{pipeline.branch}} of {{pipeline.project}}" href="https://{{gitlab}}/{{pipeline.project_path}}/tree/{{pipeline.branch}}">({{ pipeline.branch }})</a>
<a target="_blank" v-bind:title="'overview of ' + pipeline.project"
v-bind:href="linkProjectPath">{{ pipeline.project }}</a> <a target="_blank"
v-bind:title="linkPipelineProject" v-bind:href="linkPipelineBranch">({{ pipeline.branch }})</a>
</div>
<div class="meta">{{ pipeline.author }}</div>
<div class="description">
<a target="_blank" title="pipeline {{ pipeline.id }} of {{ pipeline.project }}" href="https://{{gitlab}}/{{pipeline.project_path}}/pipelines/{{pipeline.id}}">
<a target="_blank" v-bind:title="titlePipelineId" v-bind:href="linkPipelineId">
<div class="title">{{ pipeline.title }}</div>
</a>
</div>
</div>
<div class="extra content">
<span class="left floated hashtag build-id">
<a target="_blank" title="commit {{pipeline.sha1.substring(0, 8)}} of branch {{pipeline.branch}} of {{pipeline.project}}" href="https://{{gitlab}}/{{pipeline.project_path}}/commit/{{pipeline.sha1}}"> <i class="hashtag icon"></i>
<a target="_blank" v-bind:title="titlePipelineCommit" v-bind:href="linkPipelineSha1"> <i
class="hashtag icon"></i>
{{pipeline.sha1.substring(0, 8)}}
</a>
</span>
<span class="right floated calendar" title="{{ pipeline.started_at }}">
<span class="right floated calendar" v-bind:title="pipeline.started_at">
<i class="calendar icon"></i>
{{ pipeline.started_from_now }}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>

</html>
21 changes: 21 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,27 @@ const app = new Vue({
}
},
computed: {
linkPipelineBranch(){
return `https://${this.gitlab}/${this.pipeline.project_path}/tree/${this.pipeline.branch}`
},
linkPipelineSha1(){
return `https://${this.gitlab}/${this.pipeline.project_path}/commit/${this.pipeline.sha1}`
},
linkPipelineProject(){
return `file tree branch ${this.pipeline.branch} of ${this.pipeline.project}`
},
linkPipelineId(){
return `https://${this.gitlab}/${this.pipeline.project_path}/pipelines/${this.pipeline.id}`
},
linkProjectPath(){
return `https://${this.gitlab}/${this.pipeline.project_path}/`
},
titlePipelineCommit(){
return `commit ${this.pipeline.sha1.substring(0, 8)} of branch ${this.pipeline.branch} of ${this.pipeline.project}`
},
titlePipelineId(){
return `pipeline ${this.pipeline.id} of ${this.pipeline.project}`
},
sortedPipelines: function() {
var self = this;
return this.pipelines.sort(function(a,b){
Expand Down
Loading