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
cc7b3db5
Commit
cc7b3db5
authored
Aug 17, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove params from build; general refactor
parent
b6c670cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+10
-9
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+6
-0
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+7
-1
No files found.
app/assets/javascripts/build.js
View file @
cc7b3db5
...
...
@@ -6,11 +6,12 @@
Build
.
state
=
null
;
function
Build
(
page_url
,
build_url
,
build_status
,
build_stage
,
build_name
,
state1
)
{
this
.
page_url
=
page_url
;
this
.
build_url
=
build_url
;
this
.
build_status
=
build_status
;
this
.
state
=
state1
;
function
Build
(
options
)
{
this
.
page_url
=
options
.
page_url
;
this
.
build_url
=
options
.
build_url
;
this
.
build_status
=
options
.
build_status
;
this
.
state
=
options
.
state1
;
this
.
build_stage
=
options
.
build_stage
;
this
.
hideSidebar
=
bind
(
this
.
hideSidebar
,
this
);
this
.
toggleSidebar
=
bind
(
this
.
toggleSidebar
,
this
);
this
.
updateDropdown
=
bind
(
this
.
updateDropdown
,
this
);
...
...
@@ -18,13 +19,13 @@
this
.
bp
=
Breakpoints
.
get
();
$
(
'
.js-build-sidebar
'
).
niceScroll
();
this
.
populateJobs
(
build_stage
);
this
.
updateStageDropdownText
(
build_stage
);
this
.
populateJobs
(
this
.
build_stage
);
this
.
updateStageDropdownText
(
this
.
build_stage
);
this
.
hideSidebar
();
$
(
document
).
off
(
'
click
'
,
'
.js-sidebar-build-toggle
'
).
on
(
'
click
'
,
'
.js-sidebar-build-toggle
'
,
this
.
toggleSidebar
);
$
(
window
).
off
(
'
resize.build
'
).
on
(
'
resize.build
'
,
this
.
hideSidebar
);
$
(
document
).
on
(
'
click
'
,
'
.stage-item
'
,
this
.
updateDropdown
);
$
(
document
).
o
ff
(
'
click
'
,
'
.stage-item
'
).
o
n
(
'
click
'
,
'
.stage-item
'
,
this
.
updateDropdown
);
this
.
updateArtifactRemoveDate
();
if
(
$
(
'
#build-trace
'
).
length
)
{
this
.
getInitialBuildTrace
();
...
...
@@ -149,7 +150,7 @@
Build
.
prototype
.
updateDropdown
=
function
(
e
)
{
e
.
preventDefault
();
var
stage
=
e
.
t
arget
.
text
;
var
stage
=
e
.
currentT
arget
.
text
;
this
.
updateStageDropdownText
(
stage
);
this
.
populateJobs
(
stage
);
};
...
...
app/assets/stylesheets/pages/builds.scss
View file @
cc7b3db5
...
...
@@ -136,6 +136,12 @@
.dropdown-menu-toggle
{
margin-top
:
8px
;
}
.dropdown-menu
{
right
:
$gl-padding
;
left
:
$gl-padding
;
width
:
auto
;
}
}
.builds-container
{
...
...
app/views/projects/builds/show.html.haml
View file @
cc7b3db5
...
...
@@ -47,4 +47,10 @@
=
render
"sidebar"
:javascript
new
Build
(
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
)
}
"
,
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
,
:json
)
}
"
,
"
#{
@build
.
status
}
"
,
"
#{
@build
.
stage
}
"
,
"
#{
@build
.
name
}
"
,
"
#{
trace_with_state
[
:state
]
}
"
)
new
Build
({
page_url
:
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
)
}
"
,
build_url
:
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
,
:json
)
}
"
,
build_status
:
"
#{
@build
.
status
}
"
,
build_stage
:
"
#{
@build
.
stage
}
"
,
state1
:
"
#{
trace_with_state
[
:state
]
}
"
})
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