Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-19 02:40:44 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-19 02:40:44 +0300
commit4daffbe4064e0f39e401c962bb0c0f2d8a092810 (patch)
tree88dfec9a7f2f8346e1957273543a0f7f44104512 /app/views
parent34da6f00f6a1513703232bd071237c1ed402b6d1 (diff)
Cleanup GitLab CI UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/ci/admin/builds/_build.html.haml4
-rw-r--r--app/views/ci/admin/projects/_project.html.haml5
-rw-r--r--app/views/ci/admin/runners/show.html.haml4
-rw-r--r--app/views/ci/builds/_build.html.haml5
-rw-r--r--app/views/ci/builds/show.html.haml69
-rw-r--r--app/views/ci/commits/_commit.html.haml5
-rw-r--r--app/views/ci/commits/show.html.haml55
-rw-r--r--app/views/ci/projects/_project.html.haml5
8 files changed, 76 insertions, 76 deletions
diff --git a/app/views/ci/admin/builds/_build.html.haml b/app/views/ci/admin/builds/_build.html.haml
index 923219a2e46..778d51d03be 100644
--- a/app/views/ci/admin/builds/_build.html.haml
+++ b/app/views/ci/admin/builds/_build.html.haml
@@ -1,11 +1,11 @@
- if build.commit && build.project
- %tr.build{class: build_status_css_class(build)}
+ %tr.build
%td.build-link
= link_to ci_project_build_url(build.project, build) do
%strong #{build.id}
%td.status
- = build.status
+ = ci_status_with_icon(build.status)
%td.commit-link
= commit_link(build.commit)
diff --git a/app/views/ci/admin/projects/_project.html.haml b/app/views/ci/admin/projects/_project.html.haml
index 8017fb2086b..c461206c72a 100644
--- a/app/views/ci/admin/projects/_project.html.haml
+++ b/app/views/ci/admin/projects/_project.html.haml
@@ -1,5 +1,5 @@
- last_commit = project.last_commit
-%tr{class: commit_status_css_class(last_commit) }
+%tr
%td
= project.id
%td
@@ -7,8 +7,9 @@
%strong= project.name
%td
- if last_commit
- #{last_commit.status} (#{commit_link(last_commit)})
+ = ci_status_with_icon(last_commit.status)
- if project.last_commit_date
+ &middot;
= time_ago_in_words project.last_commit_date
ago
- else
diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml
index 409db6ba82c..09905e0eb47 100644
--- a/app/views/ci/admin/runners/show.html.haml
+++ b/app/views/ci/admin/runners/show.html.haml
@@ -102,9 +102,9 @@
%th Finished at
- @builds.each do |build|
- %tr.build.alert{class: build_status_css_class(build)}
+ %tr.build
%td.status
- = build.status
+ = ci_status_with_icon(build.status)
%td.status
= build.project.name
diff --git a/app/views/ci/builds/_build.html.haml b/app/views/ci/builds/_build.html.haml
index b31acec460d..515b862e992 100644
--- a/app/views/ci/builds/_build.html.haml
+++ b/app/views/ci/builds/_build.html.haml
@@ -1,7 +1,6 @@
-%tr.build{class: build_status_css_class(build)}
+%tr.build
%td.status
- %span.ci-status<
- = build.status
+ = ci_status_with_icon(build.status)
%td.build-link
= link_to ci_project_build_path(build.project, build) do
diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml
index 2a08bf14f43..839dbf5c554 100644
--- a/app/views/ci/builds/show.html.haml
+++ b/app/views/ci/builds/show.html.haml
@@ -1,15 +1,16 @@
#up-build-trace
- if @commit.matrix?
- %ul.nav.nav-tabs.append-bottom-10
+ %ul.center-top-menu
- @commit.builds_without_retry_sorted.each do |build|
%li{class: ('active' if build == @build) }
= link_to ci_project_build_url(@project, build) do
- %i{class: build_icon_css_class(build)}
+ = ci_icon_for_status(build.status)
%span
- Build ##{build.id}
- if build.name
- &middot;
= build.name
+ - else
+ = build.id
+
- unless @commit.builds_without_retry.include?(@build)
%li.active
@@ -19,34 +20,33 @@
%i.fa.fa-warning-sign
This build was retried.
-.row
- .col-md-9
- .build-head.alert{class: build_status_css_class(@build)}
- %h4
- - if @build.commit.tag?
- Build for tag
- %code #{@build.ref}
- - else
- Build for commit
- %code #{@build.short_sha}
- from
-
- = link_to ci_project_path(@build.project, ref: @build.ref) do
- %span.label.label-primary= "#{@build.ref}"
-
- - if @build.duration
- .pull-right
- %span
- %i.fa.fa-time
- #{duration_in_words(@build.finished_at, @build.started_at)}
+.gray-content-block
+ .build-head
+ %h4
+ - if @build.commit.tag?
+ Build for tag
+ %code #{@build.ref}
+ - else
+ Build for commit
+ %strong.monospace= commit_link(@build.commit)
+ from
- .clearfix
- = @build.status
- .pull-right
- = @build.updated_at.stamp('19:00 Aug 27')
+ = link_to ci_project_path(@build.project, ref: @build.ref) do
+ %strong.monospace= "#{@build.ref}"
+ - if @build.duration
+ .pull-right
+ %span
+ %i.fa.fa-time
+ #{duration_in_words(@build.finished_at, @build.started_at)}
+ .clearfix
+ = ci_status_with_icon(@build.status)
+ .pull-right
+ = @build.updated_at.stamp('19:00 Aug 27')
+.row.prepend-top-default
+ .col-md-9
.clearfix
- if @build.active?
.autoscroll-container
@@ -150,13 +150,16 @@
%h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}:
%table.builds
- @builds.each_with_index do |build, i|
- %tr.build.alert{class: build_status_css_class(build)}
+ %tr.build
%td
- = link_to ci_project_build_url(@project, build) do
- %span ##{build.id}
+ = ci_icon_for_status(build.status)
%td
- - if build.name
- = build.name
+ = link_to ci_project_build_url(@project, build) do
+ - if build.name
+ = build.name
+ - else
+ %span ##{build.id}
+
%td.status= build.status
diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml
index 4b2f5e28a4d..1eacfca944f 100644
--- a/app/views/ci/commits/_commit.html.haml
+++ b/app/views/ci/commits/_commit.html.haml
@@ -1,7 +1,6 @@
-%tr.build{class: commit_status_css_class(commit)}
+%tr.build
%td.status
- %span.ci-status<
- = commit.status
+ = ci_status_with_icon(commit.status)
- if commit.running?
&middot;
= commit.stage
diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml
index 477382bb6c1..8f38aa84676 100644
--- a/app/views/ci/commits/show.html.haml
+++ b/app/views/ci/commits/show.html.haml
@@ -1,29 +1,34 @@
.commit-info
- %pre.commit-message
- #{@commit.git_commit_message}
+ .append-bottom-20
+ = ci_status_with_icon(@commit.status)
- .row
- .col-sm-6
- - if @commit.compare?
- %p
- %span.attr-name Compare:
- #{gitlab_compare_link(@project, @commit.short_before_sha, @commit.short_sha)}
- - else
- %p
- %span.attr-name Commit:
- #{gitlab_commit_link(@project, @commit.sha)}
+ .gray-content-block.middle-block
+ %pre.commit-message
+ #{@commit.git_commit_message}
+
+ .gray-content-block.second-block
+ .row
+ .col-sm-6
+ - if @commit.compare?
+ %p
+ %span.attr-name Compare:
+ #{gitlab_compare_link(@project, @commit.short_before_sha, @commit.short_sha)}
+ - else
+ %p
+ %span.attr-name Commit:
+ #{gitlab_commit_link(@project, @commit.sha)}
- %p
- %span.attr-name Branch:
- #{gitlab_ref_link(@project, @commit.ref)}
- .col-sm-6
- %p
- %span.attr-name Author:
- #{@commit.git_author_name} (#{@commit.git_author_email})
- - if @commit.created_at
%p
- %span.attr-name Created at:
- #{@commit.created_at.to_s(:short)}
+ %span.attr-name Branch:
+ #{gitlab_ref_link(@project, @commit.ref)}
+ .col-sm-6
+ %p
+ %span.attr-name Author:
+ #{@commit.git_author_name} (#{@commit.git_author_email})
+ - if @commit.created_at
+ %p
+ %span.attr-name Created at:
+ #{@commit.created_at.to_s(:short)}
- if current_user && can?(current_user, :manage_builds, gl_project)
.pull-right
@@ -42,12 +47,6 @@
.bs-callout.bs-callout-warning
\.gitlab-ci.yml not found in this commit
-%h3 Status
-
-.build{class: commit_status_css_class(@commit)}
- .ci-status
- = @commit.status.titleize
-
%h3
Builds
- if @commit.duration > 0
diff --git a/app/views/ci/projects/_project.html.haml b/app/views/ci/projects/_project.html.haml
index 29e9f023dda..844b6677b3d 100644
--- a/app/views/ci/projects/_project.html.haml
+++ b/app/views/ci/projects/_project.html.haml
@@ -1,14 +1,13 @@
- if project.gitlab_ci_project
- ci_project = project.gitlab_ci_project
- last_commit = ci_project.last_commit
- %tr{class: commit_status_css_class(last_commit) }
+ %tr
%td
= link_to [:ci, ci_project] do
= ci_project.name
%td
- if last_commit
- %span.ci-status<
- = last_commit.status
+ = ci_status_with_icon(last_commit.status)
= commit_link(last_commit)
&middot;
- if ci_project.last_commit_date