Switchable the main branch on network graph
This commit is contained in:
parent
c84675ee06
commit
525a8cd3e9
9 changed files with 43 additions and 22 deletions
19
app/views/graph/show.html.haml
Normal file
19
app/views/graph/show.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
%h3.page_title Project Network Graph
|
||||
%br
|
||||
= render partial: 'shared/ref_switcher', locals: {destination: 'graph', path: @path}
|
||||
%br
|
||||
.graph_holder
|
||||
%h4
|
||||
%small You can move around the graph by using the arrow keys.
|
||||
#holder.graph
|
||||
.loading.loading-gray
|
||||
|
||||
:javascript
|
||||
var branch_graph;
|
||||
$(function(){
|
||||
branch_graph = new BranchGraph($("#holder"), {
|
||||
url: '#{project_graph_path(@project, @ref, format: :json)}',
|
||||
commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
|
||||
ref: '#{@ref}'
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue