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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
16c39259
Commit
16c39259
authored
Jul 15, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Determine network height based on window size
parent
6aa34c0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
15 deletions
+22
-15
app/assets/javascripts/network.js.coffee
app/assets/javascripts/network.js.coffee
+11
-0
app/assets/stylesheets/sections/graph.scss
app/assets/stylesheets/sections/graph.scss
+5
-5
app/views/projects/network/show.html.haml
app/views/projects/network/show.html.haml
+6
-10
No files found.
app/assets/javascripts/network.js.coffee
0 → 100644
View file @
16c39259
class
Network
constructor
:
(
opts
)
->
$
(
"#filter_ref"
).
click
->
$
(
this
).
closest
(
'form'
).
submit
()
branch_graph
=
new
BranchGraph
(
$
(
".network-graph"
),
opts
)
vph
=
$
(
window
).
height
()
-
250
$
(
'.network-graph'
).
css
'height'
:
(
vph
+
'px'
)
@
Network
=
Network
app/assets/stylesheets/sections/graph.scss
View file @
16c39259
.
graph_holder
{
.
project-network
{
border
:
1px
solid
#aaa
;
border
:
1px
solid
#aaa
;
padding
:
1px
;
padding
:
1px
;
.tip
{
h4
{
color
:
#888
;
margin
:
0
;
font-size
:
14px
;
padding
:
10px
;
padding
:
10px
;
border-bottom
:
1px
solid
#bbb
;
border-bottom
:
1px
solid
#bbb
;
@include
bg-gray-gradient
;
@include
bg-gray-gradient
;
}
}
.graph
{
.
network-
graph
{
background
:
#f1f1f1
;
background
:
#f1f1f1
;
height
:
500px
;
height
:
500px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
...
...
app/views/projects/network/show.html.haml
View file @
16c39259
=
render
"head"
=
render
"head"
.
graph_holder
.
project-network
%h4
.tip
%small
You can move around the graph by using the arrow keys.
You can move around the graph by using the arrow keys.
#holder
.
graph
.network-
graph
.loading.loading-gray
.loading.loading-gray
:javascript
:javascript
var
branch_graph
;
new
Network
({
$
(
"
#filter_ref
"
).
click
(
function
()
{
$
(
this
).
closest
(
'
form
'
).
submit
();
});
branch_graph
=
new
BranchGraph
(
$
(
"
#holder
"
),
{
url
:
'
#{
project_network_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
url
:
'
#{
project_network_path
(
@project
,
@ref
,
@options
.
merge
(
format: :json
))
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
commit_url
:
'
#{
project_commit_path
(
@project
,
'ae45ca32'
).
gsub
(
"ae45ca32"
,
"%s"
)
}
'
,
ref
:
'
#{
@ref
}
'
,
ref
:
'
#{
@ref
}
'
,
commit_id
:
'
#{
@commit
.
id
}
'
commit_id
:
'
#{
@commit
.
id
}
'
})
;
})
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