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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 12:06:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-23 12:06:22 +0300
commit1d89871c573830a8194110af252e8907177184b3 (patch)
tree9aece724c48fc633f38c3b8cbaf2f71fcf4c3f4c /app/views/projects/artifacts
parent89861e72b7375353654513aa2bc0a3b60a5e4377 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/artifacts')
-rw-r--r--app/views/projects/artifacts/_artifact.html.haml61
-rw-r--r--app/views/projects/artifacts/_table.html.haml16
-rw-r--r--app/views/projects/artifacts/index.html.haml10
3 files changed, 87 insertions, 0 deletions
diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml
new file mode 100644
index 00000000000..36e149556e0
--- /dev/null
+++ b/app/views/projects/artifacts/_artifact.html.haml
@@ -0,0 +1,61 @@
+.gl-responsive-table-row.px-md-3
+ .table-section.section-25.section-wrap.commit
+ .table-mobile-header{ role: 'rowheader' }= _('Job')
+ .table-mobile-content
+ .branch-commit.cgray
+ - if can?(current_user, :read_build, @project)
+ = link_to project_job_path(@project, artifact.job) do
+ %span.build-link ##{artifact.job_id}
+ - else
+ %span.build-link ##{artifact.job_id}
+
+ - if artifact.job.ref
+ .icon-container{ "aria-label" => artifact.job.tag? ? _('Tag') : _('Branch') }
+ = artifact.job.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('branch', css_class: 'sprite')
+ = link_to artifact.job.ref, project_ref_path(@project, artifact.job.ref), class: 'ref-name'
+ - else
+ .light= _('none')
+ .icon-container.commit-icon{ "aria-label" => _('Commit') }
+ = sprite_icon('commit')
+
+ - if artifact.job.sha
+ = link_to artifact.job.short_sha, project_commit_path(@project, artifact.job.sha), class: 'commit-sha mr-0'
+
+ .table-section.section-15.section-wrap
+ .table-mobile-header{ role: 'rowheader' }= _('Name')
+ .table-mobile-content
+ = artifact.job.name
+
+ .table-section.section-20
+ .table-mobile-header{ role: 'rowheader' }= _('Creation date')
+ .table-mobile-content
+ %p.finished-at
+ = icon("calendar")
+ %span= time_ago_with_tooltip(artifact.created_at)
+
+ .table-section.section-20
+ .table-mobile-header{ role: 'rowheader' }= _('Expiration date')
+ .table-mobile-content
+ - if artifact.expire_at
+ %p.finished-at
+ = icon("calendar")
+ %span= time_ago_with_tooltip(artifact.expire_at)
+
+ .table-section.section-10
+ .table-mobile-header{ role: 'rowheader' }= _('Size')
+ .table-mobile-content
+ = number_to_human_size(artifact.size, precision: 2)
+
+ .table-section.table-button-footer.section-10
+ .table-action-buttons
+ .btn-group
+ - if can?(current_user, :read_build, @project)
+ = link_to download_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', download: '', title: _('Download artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Download artifacts') }, class: 'btn btn-build has-tooltip ml-0' do
+ = sprite_icon('download')
+
+ = link_to browse_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', title: _('Browse artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Browse artifacts') }, class: 'btn btn-build has-tooltip' do
+ = sprite_icon('folder-open')
+
+ - if can?(current_user, :destroy_artifacts, @project)
+ = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'btn btn-remove has-tooltip' do
+ = sprite_icon('remove')
diff --git a/app/views/projects/artifacts/_table.html.haml b/app/views/projects/artifacts/_table.html.haml
new file mode 100644
index 00000000000..1963449d704
--- /dev/null
+++ b/app/views/projects/artifacts/_table.html.haml
@@ -0,0 +1,16 @@
+- if artifacts.blank?
+ .nothing-here-block= _('No jobs to show')
+- else
+ .table-holder
+ .ci-table
+ .gl-responsive-table-row.table-row-header.px-md-3{ role: 'row' }
+ .table-section.section-25{ role: 'rowheader' }= _('Job')
+ .table-section.section-15{ role: 'rowheader' }= _('Name')
+ .table-section.section-20{ role: 'rowheader' }= _('Creation date')
+ .table-section.section-20{ role: 'rowheader' }= _('Expiration date')
+ .table-section.section-10{ role: 'rowheader' }= _('Size')
+ .table-section.section-10{ role: 'rowheader' }
+
+ = render partial: 'artifact', collection: artifacts, as: :artifact
+
+ = paginate artifacts, theme: "gitlab", total_pages: @total_pages
diff --git a/app/views/projects/artifacts/index.html.haml b/app/views/projects/artifacts/index.html.haml
new file mode 100644
index 00000000000..1ab3e8e67d8
--- /dev/null
+++ b/app/views/projects/artifacts/index.html.haml
@@ -0,0 +1,10 @@
+- @no_container = true
+- page_title _('Artifacts')
+
+%div{ class: container_class }
+ .top-area.py-3
+ .align-self-center
+ = _('Total artifacts size: %{total_size}') % { total_size: number_to_human_size(@total_size, precicion: 2) }
+
+ .content-list.builds-content-list
+ = render "table", artifacts: @artifacts, project: @project