BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
22a25594
Commit
22a25594
authored
Jun 21, 2016
by
Mauro Verrocchio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply responsive design for labels on graphs
Labels Commits and Continuous Integration graphs now scales if on mobile.
parent
50124864
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
_build_times.haml
app/views/projects/graphs/ci/_build_times.haml
+6
-1
_builds.haml
app/views/projects/graphs/ci/_builds.haml
+6
-1
commits.html.haml
app/views/projects/graphs/commits.html.haml
+4
-0
No files found.
app/views/projects/graphs/ci/_build_times.haml
View file @
22a25594
...
@@ -19,4 +19,9 @@
...
@@ -19,4 +19,9 @@
]
]
}
}
var
ctx
=
$
(
"#build_timesChart"
).
get
(
0
).
getContext
(
"2d"
);
var
ctx
=
$
(
"#build_timesChart"
).
get
(
0
).
getContext
(
"2d"
);
new
Chart
(
ctx
).
Bar
(
data
,{
"scaleOverlay"
:
true
,
responsive
:
true
,
maintainAspectRatio
:
false
});
var
options
=
{
scaleOverlay
:
true
,
responsive
:
true
,
maintainAspectRatio
:
false
};
if
(
window
.
innerWidth
<
768
)
{
// Scale fonts if window width lower than 768px (iPad portrait)
options
.
scaleFontSize
=
8
}
new
Chart
(
ctx
).
Bar
(
data
,
options
);
app/views/projects/graphs/ci/_builds.haml
View file @
22a25594
...
@@ -48,4 +48,9 @@
...
@@ -48,4 +48,9 @@
]
]
}
}
var
ctx
=
$
(
"##{scope}Chart"
).
get
(
0
).
getContext
(
"2d"
);
var
ctx
=
$
(
"##{scope}Chart"
).
get
(
0
).
getContext
(
"2d"
);
new
Chart
(
ctx
).
Line
(
data
,{
"scaleOverlay"
:
true
,
responsive
:
true
,
maintainAspectRatio
:
false
});
var
options
=
{
scaleOverlay
:
true
,
responsive
:
true
,
maintainAspectRatio
:
false
};
if
(
window
.
innerWidth
<
768
)
{
// Scale fonts if window width lower than 768px (iPad portrait)
options
.
scaleFontSize
=
8
}
new
Chart
(
ctx
).
Line
(
data
,
options
);
app/views/projects/graphs/commits.html.haml
View file @
22a25594
...
@@ -59,6 +59,10 @@
...
@@ -59,6 +59,10 @@
var
container
=
$
(
selector
).
parent
();
var
container
=
$
(
selector
).
parent
();
var
generateChart
=
function
()
{
var
generateChart
=
function
()
{
selector
.
attr
(
'width'
,
$
(
container
).
width
());
selector
.
attr
(
'width'
,
$
(
container
).
width
());
if
(
window
.
innerWidth
<
768
)
{
// Scale fonts if window width lower than 768px (iPad portrait)
options
.
scaleFontSize
=
8
}
return
new
Chart
(
ctx
).
Bar
(
data
,
options
);
return
new
Chart
(
ctx
).
Bar
(
data
,
options
);
};
};
// enabling auto-resizing
// enabling auto-resizing
...
...
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