aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--html/css/git-deps-tips.css2
-rw-r--r--html/css/git-deps.css5
-rw-r--r--html/js/git-deps-graph.js34
3 files changed, 31 insertions, 10 deletions
diff --git a/html/css/git-deps-tips.css b/html/css/git-deps-tips.css
index abd3980..909badb 100644
--- a/html/css/git-deps-tips.css
+++ b/html/css/git-deps-tips.css
@@ -62,8 +62,6 @@
}
.d3-tip .commit-describe {
- font-weight: bold;
- color: #26894d;
font-size: 12px;
margin: 0.5em 0;
}
diff --git a/html/css/git-deps.css b/html/css/git-deps.css
index 8879a83..50a62f1 100644
--- a/html/css/git-deps.css
+++ b/html/css/git-deps.css
@@ -37,3 +37,8 @@ g.node text {
.commitish input {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
+
+.commit-ref {
+ font-weight: bold;
+ color: #26894d;
+}
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js
index 05f7265..2561cba 100644
--- a/html/js/git-deps-graph.js
+++ b/html/js/git-deps-graph.js
@@ -143,16 +143,11 @@ function add_data(data) {
new_links += add_link(dep.parent, dep.child);
});
- noty_info(data.root.commitish + " resolved as " + data.root.sha1);
-
if (new_nodes > 0 || new_links > 0) {
- if (options.debug) {
- noty_debug(new_nodes + " new node(s), " +
- new_links + " new link(s)");
- }
build_constraints();
- return true;
+ return [new_nodes, new_links, data.root];
}
+
return false;
}
@@ -204,6 +199,8 @@ function draw_graph(commitish) {
return;
}
+ new_data_notification(new_data);
+
path = fg.selectAll(".link")
.data(links, function (d) {
return d.source + " " + d.target;
@@ -224,6 +221,27 @@ function draw_graph(commitish) {
});
}
+function new_data_notification(new_data) {
+ var new_nodes = new_data[0];
+ var new_links = new_data[1];
+ var root = new_data[2];
+
+ var notification =
+ '<span class="commit-ref">' +
+ root.commitish +
+ '</span> resolved as ' + root.sha1;
+
+ notification += "<p>" + new_nodes + " new node";
+ if (new_nodes != 1)
+ notification += 's';
+ notification += "; " + new_links + " new link";
+ if (new_nodes != 1)
+ notification += 's';
+ notification += '</p>';
+
+ noty_info(notification);
+}
+
function define_arrow_markers(fg) {
// define arrow markers for graph links
fg.append('svg:defs').append('svg:marker')
@@ -303,7 +321,7 @@ function tip_html(d) {
if (d.describe != "") {
title.append(" <span />");
var describe = title.children().first();
- describe.addClass("commit-describe").text(d.describe);
+ describe.addClass("commit-describe commit-ref").text(d.describe);
}
fragment.find("span.commit-author").text(d.author_name);
var date = new Date(d.author_time * 1000);