gitlab-org--gitlab-foss/app/assets/javascripts/network/network_bundle.js

18 lines
625 B
JavaScript
Raw Normal View History

/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, quotes, no-var, vars-on-top, camelcase, comma-dangle, consistent-return, max-len */
/* global ShortcutsNetwork */
2017-03-03 19:21:39 -05:00
import Network from './network';
2016-07-24 16:45:11 -04:00
2017-03-03 19:23:15 -05:00
$(function() {
if (!$(".network-graph").length) return;
2017-03-03 19:23:15 -05:00
var network_graph;
network_graph = new Network({
url: $(".network-graph").attr('data-url'),
commit_url: $(".network-graph").attr('data-commit-url'),
ref: $(".network-graph").attr('data-ref'),
commit_id: $(".network-graph").attr('data-commit-id')
2016-07-24 16:45:11 -04:00
});
2017-03-03 19:23:15 -05:00
return new ShortcutsNetwork(network_graph.branch_graph);
});