Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
13f0ea12
Commit
13f0ea12
authored
Jan 18, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve ux in builds artifacts browser
parent
21ac92b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
21 deletions
+27
-21
app/views/projects/artifacts/_tree_directory.html.haml
app/views/projects/artifacts/_tree_directory.html.haml
+4
-2
app/views/projects/artifacts/_tree_file.html.haml
app/views/projects/artifacts/_tree_file.html.haml
+5
-5
app/views/projects/artifacts/browse.html.haml
app/views/projects/artifacts/browse.html.haml
+15
-11
features/project/builds/artifacts.feature
features/project/builds/artifacts.feature
+1
-1
features/steps/project/builds/artifacts.rb
features/steps/project/builds/artifacts.rb
+2
-2
No files found.
app/views/projects/artifacts/_tree_directory.html.haml
View file @
13f0ea12
%tr
{
class:
'tree-item'
}
-
path_to_directory
=
browse_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
,
path:
directory
.
path
)
%tr
.tree-item
{
'data-link'
=>
path_to_directory
}
%td
.tree-item-file-name
=
tree_icon
(
'folder'
,
'755'
,
directory
.
name
)
%span
.str-truncated
=
link_to
directory
.
name
,
browse_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
,
path:
directory
.
path
)
=
link_to
directory
.
name
,
path_to_directory
%td
%td
app/views/projects/artifacts/_tree_file.html.haml
View file @
13f0ea12
%tr
{
class:
'tree-item'
}
-
path_to_file
=
file_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
,
path:
file
.
path
)
%tr
.tree-item
{
'data-link'
=>
path_to_file
}
%td
.tree-item-file-name
=
tree_icon
(
'file'
,
'664'
,
file
.
name
)
%span
.str-truncated
=
file
.
nam
e
=
link_to
file
.
name
,
path_to_fil
e
%td
=
number_to_human_size
(
file
.
metadata
[
:size
],
precision:
2
)
%td
=
link_to
file_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
,
path:
file
.
path
),
class:
'btn btn-xs btn-default artifact-download'
do
=
icon
(
'download'
)
=
number_to_human_size
(
file
.
metadata
[
:zipped
],
precision:
2
)
app/views/projects/artifacts/browse.html.haml
View file @
13f0ea12
-
page_title
'Artifacts'
,
"
#{
@build
.
name
}
(#
#{
@build
.
id
}
)"
,
'Builds'
=
render
'projects/builds/header_title'
#tree-holder
.tree-holder
.gray-content-block.top-block.clearfix
.pull-right
=
link_to
download_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-default'
do
=
icon
(
'download'
)
Download artifacts archive
.top-block.gray-content-block.clearfix
.pull-right
=
link_to
download_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-default'
do
=
icon
(
'download'
)
Download artifacts archive
%div
.tree-content
-holder
.table
-holder
%table
.table.tree-table
.table-striped
.tree
-holder
%div
.tree-content
-holder
%table
.table.tree-table
%thead
%tr
%th
Name
%th
Size
%th
Download
%th
Compressed to
=
render
partial:
'tree_directory'
,
collection:
@entry
.
directories
(
parent:
true
),
as: :directory
=
render
partial:
'tree_file'
,
collection:
@entry
.
files
,
as: :file
-
if
@entry
.
empty?
.center
Empty
:javascript
$
(
document
).
on
(
'
click
'
,
'
tr[data-link]
'
,
function
(
e
)
{
window
.
location
=
this
.
dataset
.
link
;
});
features/project/builds/artifacts.feature
View file @
13f0ea12
...
...
@@ -49,5 +49,5 @@ Feature: Project Builds Artifacts
And
recent build has artifacts metadata available
When
I visit recent build summary page
And
I click artifacts browse button
And
I click
download button for a
file within build artifacts
And
I click
a link to
file within build artifacts
Then
download of a file extracted from build artifacts should start
features/steps/project/builds/artifacts.rb
View file @
13f0ea12
...
...
@@ -63,8 +63,8 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
end
end
step
'I click
download button for a
file within build artifacts'
do
page
.
within
(
'.tree-table'
)
{
fi
rst
(
'.artifact-download
'
).
click
}
step
'I click
a link to
file within build artifacts'
do
page
.
within
(
'.tree-table'
)
{
fi
nd_link
(
'ci_artifacts.txt
'
).
click
}
end
step
'download of a file extracted from build artifacts should start'
do
...
...
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