summaryrefslogtreecommitdiff
path: root/app/views/projects/network/show.html.haml
blob: 4a21b84fb851064db34af4e7d639441ccc98cf20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
= render "head"
.project-network
  .controls
    = form_tag project_network_path(@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'
      = button_tag class: 'btn btn-success btn-search-sha' do
        %i.fa.fa-search
      .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

  .network-graph
    = spinner nil, true

:javascript
  disableButtonIfEmptyField('#extended_sha1', '.btn-search-sha')

  network_graph = new Network({
    url: '#{project_network_path(@project, @ref, @options.merge(format: :json))}',
    commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
  })
  new ShortcutsNetwork(network_graph.branch_graph)