show.html.haml 1.1 KB
Newer Older
D
Douwe Maan 已提交
1
- page_title "Network", @ref
S
Sato Hiroyuki 已提交
2
= render "head"
3
.project-network
D
Dmitriy Zaporozhets 已提交
4
  .controls
5 6
    = form_tag namespace_project_network_path(@project.namespace, @project, @id), method: :get, class: 'form-inline network-form' do |f|
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha'
7 8
      = button_tag class: 'btn btn-success' do
        = icon('search')
D
Dmitriy Zaporozhets 已提交
9 10 11 12 13 14
      .inline.prepend-left-20
        .checkbox.light
          = label_tag :filter_ref do
            = check_box_tag :filter_ref, 1, @options[:filter_ref]
            %span Begin with the selected commit

15
  .network-graph
16
    = spinner nil, true
17

V
Valery Sizov 已提交
18
:javascript
R
Robert Schilling 已提交
19
  network_graph = new Network({
V
Vinnie Okada 已提交
20 21
    url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}',
    commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}',
22 23
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
24
  })
R
Robert Schilling 已提交
25
  new ShortcutsNetwork(network_graph.branch_graph)