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
acc0d848
Commit
acc0d848
authored
Jul 31, 2017
by
Rémy Coutable
Committed by
Phil Hughes
Jul 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves the Performance Bar to the top instead of being at the bottom
parent
15d00fc3
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
111 additions
and
24 deletions
+111
-24
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+4
-0
app/assets/stylesheets/framework/layout.scss
app/assets/stylesheets/framework/layout.scss
+4
-0
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+20
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+4
-0
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+1
-0
app/assets/stylesheets/new_sidebar.scss
app/assets/stylesheets/new_sidebar.scss
+10
-2
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+12
-2
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+8
-0
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+4
-0
app/assets/stylesheets/performance_bar.scss
app/assets/stylesheets/performance_bar.scss
+11
-3
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+5
-1
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+22
-11
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+2
-2
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+2
-3
app/views/peek/views/_host.html.haml
app/views/peek/views/_host.html.haml
+2
-0
doc/administration/monitoring/performance/img/performance_bar.png
...nistration/monitoring/performance/img/performance_bar.png
+0
-0
No files found.
app/assets/stylesheets/framework/header.scss
View file @
acc0d848
...
@@ -315,6 +315,10 @@ header {
...
@@ -315,6 +315,10 @@ header {
}
}
}
}
.with-performance-bar
header
.navbar-gitlab
{
top
:
$performance-bar-height
;
}
.navbar-nav
{
.navbar-nav
{
li
{
li
{
.badge
{
.badge
{
...
...
app/assets/stylesheets/framework/layout.scss
View file @
acc0d848
...
@@ -120,3 +120,7 @@ of the body element here, we negate cascading side effects but allow momentum sc
...
@@ -120,3 +120,7 @@ of the body element here, we negate cascading side effects but allow momentum sc
.page-with-sidebar
{
.page-with-sidebar
{
-webkit-overflow-scrolling
:
auto
;
-webkit-overflow-scrolling
:
auto
;
}
}
.with-performance-bar
.page-with-sidebar
{
margin-top
:
$header-height
+
$performance-bar-height
;
}
app/assets/stylesheets/framework/nav.scss
View file @
acc0d848
...
@@ -347,6 +347,10 @@
...
@@ -347,6 +347,10 @@
}
}
}
}
.with-performance-bar
.layout-nav
{
margin-top
:
$header-height
+
$performance-bar-height
;
}
.scrolling-tabs-container
{
.scrolling-tabs-container
{
position
:
relative
;
position
:
relative
;
...
@@ -441,6 +445,22 @@
...
@@ -441,6 +445,22 @@
}
}
}
}
.with-performance-bar
.page-with-layout-nav
{
.right-sidebar
{
top
:
(
$header-height
+
1
)
*
2
+
$performance-bar-height
;
}
&
.page-with-sub-nav
{
.right-sidebar
{
top
:
(
$header-height
+
1
)
*
3
+
$performance-bar-height
;
&
.affix
{
top
:
$header-height
+
$performance-bar-height
;
}
}
}
}
.nav-block
{
.nav-block
{
&
.activities
{
&
.activities
{
border-bottom
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
acc0d848
...
@@ -89,6 +89,10 @@
...
@@ -89,6 +89,10 @@
}
}
}
}
.with-performance-bar
.right-sidebar.affix
{
top
:
$header-height
+
$performance-bar-height
;
}
@mixin
maintain-sidebar-dimensions
{
@mixin
maintain-sidebar-dimensions
{
display
:
block
;
display
:
block
;
width
:
$gutter-width
;
width
:
$gutter-width
;
...
...
app/assets/stylesheets/framework/variables.scss
View file @
acc0d848
...
@@ -204,6 +204,7 @@ $divergence-graph-separator-bg: #ccc;
...
@@ -204,6 +204,7 @@ $divergence-graph-separator-bg: #ccc;
$general-hover-transition-duration
:
100ms
;
$general-hover-transition-duration
:
100ms
;
$general-hover-transition-curve
:
linear
;
$general-hover-transition-curve
:
linear
;
$highlight-changes-color
:
rgb
(
235
,
255
,
232
);
$highlight-changes-color
:
rgb
(
235
,
255
,
232
);
$performance-bar-height
:
35px
;
/*
/*
...
...
app/assets/stylesheets/new_sidebar.scss
View file @
acc0d848
...
@@ -118,7 +118,7 @@ $new-sidebar-width: 220px;
...
@@ -118,7 +118,7 @@ $new-sidebar-width: 220px;
z-index
:
400
;
z-index
:
400
;
width
:
$new-sidebar-width
;
width
:
$new-sidebar-width
;
transition
:
left
$sidebar-transition-duration
;
transition
:
left
$sidebar-transition-duration
;
top
:
50px
;
top
:
$header-height
;
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
overflow
:
auto
;
overflow
:
auto
;
...
@@ -163,6 +163,10 @@ $new-sidebar-width: 220px;
...
@@ -163,6 +163,10 @@ $new-sidebar-width: 220px;
}
}
}
}
.with-performance-bar
.nav-sidebar
{
top
:
$header-height
+
$performance-bar-height
;
}
.sidebar-sub-level-items
{
.sidebar-sub-level-items
{
display
:
none
;
display
:
none
;
padding-bottom
:
8px
;
padding-bottom
:
8px
;
...
@@ -260,7 +264,7 @@ $new-sidebar-width: 220px;
...
@@ -260,7 +264,7 @@ $new-sidebar-width: 220px;
// Make issue boards full-height now that sub-nav is gone
// Make issue boards full-height now that sub-nav is gone
.boards-list
{
.boards-list
{
height
:
calc
(
100vh
-
50px
);
height
:
calc
(
100vh
-
#{
$header-height
}
);
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
height
:
475px
;
// Needed for PhantomJS
height
:
475px
;
// Needed for PhantomJS
...
@@ -270,6 +274,10 @@ $new-sidebar-width: 220px;
...
@@ -270,6 +274,10 @@ $new-sidebar-width: 220px;
}
}
}
}
.with-performance-bar
.boards-list
{
height
:
calc
(
100vh
-
#{
$header-height
}
-
#{
$performance-bar-height
}
);
}
// Change color of all horizontal tabs to match the new indigo color
// Change color of all horizontal tabs to match the new indigo color
.nav-links
li
.active
a
{
.nav-links
li
.active
a
{
...
...
app/assets/stylesheets/pages/builds.scss
View file @
acc0d848
...
@@ -64,10 +64,10 @@
...
@@ -64,10 +64,10 @@
color
:
$gl-text-color
;
color
:
$gl-text-color
;
position
:
sticky
;
position
:
sticky
;
position
:
-
webkit-sticky
;
position
:
-
webkit-sticky
;
top
:
50px
;
top
:
$header-height
;
&
.affix
{
&
.affix
{
top
:
50px
;
top
:
$header-height
;
}
}
// with sidebar
// with sidebar
...
@@ -171,6 +171,16 @@
...
@@ -171,6 +171,16 @@
}
}
}
}
.with-performance-bar
.build-page
{
.top-bar
{
top
:
$header-height
+
$performance-bar-height
;
&
.affix
{
top
:
$header-height
+
$performance-bar-height
;
}
}
}
.build-header
{
.build-header
{
.ci-header-container
,
.ci-header-container
,
.header-action-buttons
{
.header-action-buttons
{
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
acc0d848
...
@@ -445,6 +445,14 @@
...
@@ -445,6 +445,14 @@
}
}
}
}
.with-performance-bar
.right-sidebar
{
top
:
$header-height
+
$performance-bar-height
;
.issuable-sidebar
{
height
:
calc
(
100%
-
#{
$header-height
}
-
#{
$performance-bar-height
}
);
}
}
.detail-page-description
{
.detail-page-description
{
padding
:
16px
0
;
padding
:
16px
0
;
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
acc0d848
...
@@ -759,6 +759,10 @@
...
@@ -759,6 +759,10 @@
}
}
}
}
.with-performance-bar
.merge-request-tabs-holder
{
top
:
$header-height
+
$performance-bar-height
;
}
.merge-request-tabs
{
.merge-request-tabs
{
display
:
flex
;
display
:
flex
;
margin-bottom
:
0
;
margin-bottom
:
0
;
...
...
app/assets/stylesheets/performance_bar.scss
View file @
acc0d848
...
@@ -3,9 +3,16 @@
...
@@ -3,9 +3,16 @@
@import
"peek/views/rblineprof"
;
@import
"peek/views/rblineprof"
;
#peek
{
#peek
{
height
:
35px
;
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
z-index
:
2000
;
overflow-x
:
hidden
;
height
:
$performance-bar-height
;
background
:
$black
;
background
:
$black
;
line-height
:
35px
;
line-height
:
$performance-bar-height
;
color
:
$perf-bar-text
;
color
:
$perf-bar-text
;
&
.disabled
{
&
.disabled
{
...
@@ -25,7 +32,8 @@
...
@@ -25,7 +32,8 @@
}
}
.wrapper
{
.wrapper
{
width
:
1000px
;
width
:
80%
;
height
:
$performance-bar-height
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
...
...
app/helpers/application_helper.rb
View file @
acc0d848
...
@@ -264,7 +264,11 @@ module ApplicationHelper
...
@@ -264,7 +264,11 @@ module ApplicationHelper
end
end
def
page_class
def
page_class
"issue-boards-page"
if
current_controller?
(
:boards
)
class_names
=
[]
class_names
<<
'issue-boards-page'
if
current_controller?
(
:boards
)
class_names
<<
'with-performance-bar'
if
performance_bar_enabled?
class_names
end
end
# Returns active css class when condition returns true
# Returns active css class when condition returns true
...
...
app/helpers/nav_helper.rb
View file @
acc0d848
module
NavHelper
module
NavHelper
def
page_with_sidebar_class
class_name
=
page_gutter_class
class_name
<<
'page-with-new-sidebar'
if
defined?
(
@new_sidebar
)
&&
@new_sidebar
class_name
end
def
page_gutter_class
def
page_gutter_class
if
current_path?
(
'merge_requests#show'
)
||
if
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'projects/merge_requests/conflicts#show'
)
||
current_path?
(
'projects/merge_requests/conflicts#show'
)
||
current_path?
(
'issues#show'
)
||
current_path?
(
'issues#show'
)
||
current_path?
(
'milestones#show'
)
current_path?
(
'milestones#show'
)
if
cookies
[
:collapsed_gutter
]
==
'true'
if
cookies
[
:collapsed_gutter
]
==
'true'
"page-gutter right-sidebar-collapsed"
%w[page-gutter right-sidebar-collapsed]
else
else
"page-gutter right-sidebar-expanded"
%w[page-gutter right-sidebar-expanded]
end
end
elsif
current_path?
(
'jobs#show'
)
elsif
current_path?
(
'jobs#show'
)
"page-gutter build-sidebar right-sidebar-expanded"
%w[page-gutter build-sidebar right-sidebar-expanded]
elsif
current_path?
(
'wikis#show'
)
||
elsif
current_path?
(
'wikis#show'
)
||
current_path?
(
'wikis#edit'
)
||
current_path?
(
'wikis#edit'
)
||
current_path?
(
'wikis#update'
)
||
current_path?
(
'wikis#update'
)
||
current_path?
(
'wikis#history'
)
||
current_path?
(
'wikis#history'
)
||
current_path?
(
'wikis#git_access'
)
current_path?
(
'wikis#git_access'
)
"page-gutter wiki-sidebar right-sidebar-expanded"
%w[page-gutter wiki-sidebar right-sidebar-expanded]
else
[]
end
end
end
end
def
nav_header_class
def
nav_header_class
class_name
=
''
class_name
s
=
[]
class_name
<<
" with-horizontal-nav"
if
defined?
(
nav
)
&&
nav
class_name
s
<<
'with-horizontal-nav'
if
defined?
(
nav
)
&&
nav
class_name
class_name
s
end
end
def
layout_nav_class
def
layout_nav_class
class_name
=
''
return
[]
if
show_new_nav?
class_name
<<
" page-with-layout-nav"
if
defined?
(
nav
)
&&
nav
class_name
<<
" page-with-sub-nav"
if
content_for?
(
:sub_nav
)
class_name
class_names
=
[]
class_names
<<
'page-with-layout-nav'
if
defined?
(
nav
)
&&
nav
class_names
<<
'page-with-sub-nav'
if
content_for?
(
:sub_nav
)
class_names
end
end
def
nav_control_class
def
nav_control_class
...
...
app/views/layouts/_page.html.haml
View file @
acc0d848
.page-with-sidebar
{
class:
"#{('page-with-new-sidebar' if defined?(@new_sidebar) && @new_sidebar)} #{page_gutter_class}"
}
.page-with-sidebar
{
class:
page_with_sidebar_class
}
-
if
show_new_nav?
-
if
show_new_nav?
-
if
defined?
(
nav
)
&&
nav
-
if
defined?
(
nav
)
&&
nav
=
render
"layouts/nav/
#{
nav
}
"
=
render
"layouts/nav/
#{
nav
}
"
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
=
render
"layouts/nav/
#{
nav
}
"
=
render
"layouts/nav/
#{
nav
}
"
-
if
content_for?
(
:sub_nav
)
-
if
content_for?
(
:sub_nav
)
=
yield
:sub_nav
=
yield
:sub_nav
.content-wrapper
{
class:
"#{(layout_nav_class unless show_new_nav?)}"
}
.content-wrapper
{
class:
layout_nav_class
}
-
if
show_new_nav?
-
if
show_new_nav?
.mobile-overlay
.mobile-overlay
.alert-wrapper
.alert-wrapper
...
...
app/views/layouts/application.html.haml
View file @
acc0d848
!!! 5
!!! 5
%html
{
lang:
I18n
.
locale
,
class:
"#{page_class}"
}
%html
{
lang:
I18n
.
locale
,
class:
page_class
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
{
class:
@body_class
,
data:
{
page:
body_data_page
,
project:
"#{@project.path if @project}"
,
group:
"#{@group.path if @group}"
,
find_file:
find_file_path
}
}
%body
{
class:
@body_class
,
data:
{
page:
body_data_page
,
project:
"#{@project.path if @project}"
,
group:
"#{@group.path if @group}"
,
find_file:
find_file_path
}
}
=
render
"layouts/init_auto_complete"
if
@gfm_form
=
render
"layouts/init_auto_complete"
if
@gfm_form
=
render
'peek/bar'
-
if
show_new_nav?
-
if
show_new_nav?
=
render
"layouts/header/new"
=
render
"layouts/header/new"
-
else
-
else
...
@@ -10,5 +11,3 @@
...
@@ -10,5 +11,3 @@
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
yield
:scripts_body
=
yield
:scripts_body
=
render
'peek/bar'
app/views/peek/views/_host.html.haml
0 → 100644
View file @
acc0d848
%span
.current-host
=
truncate
(
view
.
hostname
)
doc/administration/monitoring/performance/img/performance_bar.png
View replaced file @
15d00fc3
View file @
acc0d848
182 KB
|
W:
|
H:
166 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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