List of commits:
Subject Hash Author Date (UTC)
Set file format to unix, remove unwanted whitespace 0a7e80384c250ca28febe9835a4b33925141bc48 Vasilis Ververis 2017-05-24 11:40:41
Fix node URL b3547e4c231a3250b6f64b8be9fcfd02f3b203dd Vasilis Ververis 2017-05-24 11:38:07
Enable score and metric names ba3c61a4d1f198e8645096ea8c93886f543ec848 Vasilis Ververis 2017-04-11 20:39:01
Add require gems, set file format to unix, add redis config e1b6adeca5f17ee195163541c7dd2c9656f22a51 Vasilis Ververis 2017-03-13 19:13:46
switched bootstrap theme to default 40eb9da469b7713f2a37fe057c9b594d498e222f mcehlert 2014-02-05 10:17:07
added required slashes to links in metric and score view 14dd91a3ad925087e2ce5daec872567b14012373 mcehlert 2014-01-15 11:21:07
added required trailing slash in node search redirection d08e944032809a09188bac1a33cbca2ed09cb559 mcehlert 2014-01-15 11:16:29
removed old app.rb, moved code to run.rb ac07f01aaf74e03e7b5e38ed6d0596b5b8d880cf mcehlert 2014-01-10 15:21:56
Create README.md 9f00cc4d8ae5686a6e6c5fa1de3aa71c067b7b84 Mathias Ehlert 2014-01-09 22:24:26
large refactoring step after colloquium 864aef32ba2419bd43709a3239273275d3f9946e mcehlert 2014-01-09 22:23:24
inital commit - pre colloquium state dcee4d4045615b761cc54b957be7134f0e12384d Mathias Ehlert 2013-11-22 13:49:56
Initial commit a90174ca714e3b82a7100875f411a5e84a90352b Mathias Ehlert 2013-11-22 13:48:45
Commit 0a7e80384c250ca28febe9835a4b33925141bc48 - Set file format to unix, remove unwanted whitespace
Author: Vasilis Ververis
Author date (UTC): 2017-05-24 11:40
Committer name: Vasilis Ververis
Committer date (UTC): 2017-05-24 11:40
Parent(s): b3547e4c231a3250b6f64b8be9fcfd02f3b203dd
Signing key:
Tree: 58587bfe65731ab62151f0341b7392f77383d11d
File Lines added Lines deleted
public/js/graph.js 85 85
File public/js/graph.js changed (mode: 100644) (index 0fbceb2..8956ed5)
1 $(function() {
2
3 var width = 720,
4 height = 720
5
6 var svg = d3.select("#graph").append("svg").attr("width", width).attr("height", height)
7
8 var fisheye = d3.fisheye.circular()
9 .radius(120);
10
11 d3.json("/node/"+node_id+"/neighbors.json", function(error, json) {
12 if (error) return console.warn(error);
13
14 var n = json.nodes.length;
15
16 json.nodes.forEach(function(d,i) {
17 if(i==0){
18 d.x = Math.floor(width / 2);
19 d.y = Math.floor(height / 2);
20 } else {
21 d.x = 60 + Math.floor(Math.random()*(width - 120));
22 d.y = 60 + Math.floor(Math.random()*(height - 120));
23 }
24
25 });
26
27 json.links.forEach(function(d) {
28 d.source_node = json.nodes[d.source]
29 d.target_node = json.nodes[d.target]
30 });
31
32 var link = svg.selectAll(".link")
33 .data(json.links)
34 .enter().append("line")
35 .attr("class", "link")
36 .attr("x1", function(d) { return d.source_node.x; })
37 .attr("y1", function(d) { return d.source_node.y; })
38 .attr("x2", function(d) { return d.target_node.x; })
39 .attr("y2", function(d) { return d.target_node.y; })
40 .style("stroke-width", 1);
41
42
43 var node = svg.selectAll(".node")
44 .data(json.nodes)
45 .enter().append("g")
46 .attr("class", "node")
47 .append("svg:a")
48 .attr("xlink:href", function(d){return '/node/'+d.name+'/';})
49 .append("circle")
50 .attr("cx", function(d) { return d.x; })
51 .attr("cy", function(d) { return d.y; })
52 .attr("r", 4)
53 .attr("fill", "#2a9fd6")
54 .attr("stroke", function(d) {return d.color_code;})
55 .attr("stroke-width",3);
56
57 node.append("text")
58 .attr("dx", "-0.35em")
59 .attr("dy", "0.35em")
60 .text(function(d) { return d.name });
61
62
63 var center_node = svg.select(".node")
64 .select("circle")
65 .attr("fill", "#93c");
66
67
68
69 svg.on("mousemove", function() {
70 fisheye.focus(d3.mouse(this));
71
72 node.each(function(d) { d.fisheye = fisheye(d); })
73 .attr("cx", function(d) { return d.fisheye.x; })
74 .attr("cy", function(d) { return d.fisheye.y; })
75 .attr("r", function(d) { return d.fisheye.z * 4.5; });
76
77 link.attr("x1", function(d) { return d.source_node.fisheye.x; })
78 .attr("y1", function(d) { return d.source_node.fisheye.y; })
79 .attr("x2", function(d) { return d.target_node.fisheye.x; })
80 .attr("y2", function(d) { return d.target_node.fisheye.y; });
81 });
82
83 });
84
85 });
1 $(function() {
2
3 var width = 720,
4 height = 720
5
6 var svg = d3.select("#graph").append("svg").attr("width", width).attr("height", height)
7
8 var fisheye = d3.fisheye.circular()
9 .radius(120);
10
11 d3.json("/node/"+node_id+"/neighbors.json", function(error, json) {
12 if (error) return console.warn(error);
13
14 var n = json.nodes.length;
15
16 json.nodes.forEach(function(d,i) {
17 if(i==0){
18 d.x = Math.floor(width / 2);
19 d.y = Math.floor(height / 2);
20 } else {
21 d.x = 60 + Math.floor(Math.random()*(width - 120));
22 d.y = 60 + Math.floor(Math.random()*(height - 120));
23 }
24
25 });
26
27 json.links.forEach(function(d) {
28 d.source_node = json.nodes[d.source]
29 d.target_node = json.nodes[d.target]
30 });
31
32 var link = svg.selectAll(".link")
33 .data(json.links)
34 .enter().append("line")
35 .attr("class", "link")
36 .attr("x1", function(d) { return d.source_node.x; })
37 .attr("y1", function(d) { return d.source_node.y; })
38 .attr("x2", function(d) { return d.target_node.x; })
39 .attr("y2", function(d) { return d.target_node.y; })
40 .style("stroke-width", 1);
41
42
43 var node = svg.selectAll(".node")
44 .data(json.nodes)
45 .enter().append("g")
46 .attr("class", "node")
47 .append("svg:a")
48 .attr("xlink:href", function(d){return '/node/'+d.name+'/';})
49 .append("circle")
50 .attr("cx", function(d) { return d.x; })
51 .attr("cy", function(d) { return d.y; })
52 .attr("r", 4)
53 .attr("fill", "#2a9fd6")
54 .attr("stroke", function(d) {return d.color_code;})
55 .attr("stroke-width",3);
56
57 node.append("text")
58 .attr("dx", "-0.35em")
59 .attr("dy", "0.35em")
60 .text(function(d) { return d.name });
61
62
63 var center_node = svg.select(".node")
64 .select("circle")
65 .attr("fill", "#93c");
66
67
68
69 svg.on("mousemove", function() {
70 fisheye.focus(d3.mouse(this));
71
72 node.each(function(d) { d.fisheye = fisheye(d); })
73 .attr("cx", function(d) { return d.fisheye.x; })
74 .attr("cy", function(d) { return d.fisheye.y; })
75 .attr("r", function(d) { return d.fisheye.z * 4.5; });
76
77 link.attr("x1", function(d) { return d.source_node.fisheye.x; })
78 .attr("y1", function(d) { return d.source_node.fisheye.y; })
79 .attr("x2", function(d) { return d.target_node.fisheye.x; })
80 .attr("y2", function(d) { return d.target_node.fisheye.y; });
81 });
82
83 });
84
85 });
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/coria/coria-frontend

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/coria/coria-frontend

Clone this repository using git:
git clone git://git.rocketgit.com/user/coria/coria-frontend

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main