Strip whitespace from ALL the things.

This commit is contained in:
Jimmy Zelinskie 2014-11-24 16:07:38 -05:00
parent f6dd8b0a4d
commit 716d7a737b
171 changed files with 807 additions and 807 deletions

View file

@ -8,8 +8,8 @@
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () {},
fBound = function () {
return fToBind.apply(this instanceof fNOP && oThis
@ -156,7 +156,7 @@ ImageHistoryTree.prototype.updateDimensions_ = function() {
document.getElementById(container).style.maxHeight = (viewportHeight - boundingBox.top - 150) + 'px';
this.setupOverscroll_();
// Update the tree.
var rootSvg = this.rootSvg_;
var tree = this.tree_;
@ -188,7 +188,7 @@ ImageHistoryTree.prototype.draw = function(container) {
// Save the container.
this.container_ = container;
if (!$('#' + container)[0]) {
this.container_ = null;
return;
@ -237,7 +237,7 @@ ImageHistoryTree.prototype.draw = function(container) {
if (d.image.command && d.image.command.length) {
html += '<span class="command info-line"><i class="fa fa-terminal"></i>' + formatCommand(d.image) + '</span>';
}
html += '<span class="created info-line"><i class="fa fa-calendar"></i>' + formatTime(d.image.created) + '</span>';
html += '<span class="created info-line"><i class="fa fa-calendar"></i>' + formatTime(d.image.created) + '</span>';
var tags = d.tags || [];
html += '<span class="tooltip-tags tags">';
@ -438,7 +438,7 @@ ImageHistoryTree.prototype.buildRoot_ = function() {
var ancestors = this.getAncestors_(image);
var immediateParent = ancestors[ancestors.length - 1];
var parent = imageByDockerId[immediateParent];
if (parent) {
if (parent) {
// Add a reference to the parent. This makes walking the tree later easier.
imageNode.parent = parent;
parent.children.push(imageNode);
@ -612,12 +612,12 @@ ImageHistoryTree.prototype.setTag_ = function(tagName) {
}
var imageByDockerId = this.imageByDockerId_;
// Save the current tag.
var previousTagName = this.currentTag_;
this.currentTag_ = tagName;
this.currentImage_ = null;
// Update the path.
var tagImage = this.findImage_(function(image) {
return image.tags.indexOf(tagName || '(no tag specified)') >= 0;
@ -716,7 +716,7 @@ ImageHistoryTree.prototype.update_ = function(source) {
.attr("r", 1e-6)
.style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; })
.on("click", function(d) { that.toggle_(d); that.update_(d); });
// Create the group that will contain the node name and its tags.
var g = nodeEnter.append("svg:g").style("fill-opacity", 1e-6);
@ -756,7 +756,7 @@ ImageHistoryTree.prototype.update_ = function(source) {
.attr("y", 12)
.attr("width", 110)
.attr("height", DEPTH_HEIGHT - 20);
// Add the tags container.
fo.append('xhtml:div')
.attr("class", "tags")
@ -949,7 +949,7 @@ function FileTreeBase() {
* Counter for creating unique IDs.
*/
this.idCounter_ = 0;
/**
* Map from file path to associated tree node.
*/
@ -1017,7 +1017,7 @@ FileTreeBase.prototype.updateDimensions_ = function() {
this.barWidth_ = dimensions.bw;
this.barHeight_ = dimensions.bh;
return dimensions;
};
@ -1044,11 +1044,11 @@ FileTreeBase.prototype.dispose = function() {
* Draws the tree.
*/
FileTreeBase.prototype.draw = function(container) {
this.container_ = container;
this.container_ = container;
var dimensions = this.calculateDimensions_(container);
if (!dimensions) { return; }
var w = dimensions.w;
var h = dimensions.h;
var m = dimensions.m;
@ -1169,7 +1169,7 @@ FileTreeBase.prototype.getContainerHeight_ = function() {
if (!dimensions) { return; }
var barHeight = this.barHeight_;
var height = (this.getVisibleCount_(this.root_) * (barHeight + 2));
var height = (this.getVisibleCount_(this.root_) * (barHeight + 2));
return height + dimensions.m[0] + dimensions.m[2];
};
@ -1206,16 +1206,16 @@ FileTreeBase.prototype.update_ = function(source) {
// Compute the flattened node list.
var nodes = tree.nodes(this.root_);
// Compute the "layout".
nodes.forEach(function(n, i) {
n.x = i * barHeight;
});
// Update the nodes...
var node = vis.selectAll("g.node")
.data(nodes, function(d) { return d.id || (d.id = that.idCounter_++); });
var nodeEnter = node.enter().append("svg:g")
.attr("class", function(d) {
return "node " + (d.kind ? d.kind : 'folder');
@ -1241,7 +1241,7 @@ FileTreeBase.prototype.update_ = function(source) {
that.toggle_(d);
that.update_(source);
});
nodeEnter.append("svg:text")
.attr("dy", 3.5)
.attr("dx", 5.5 + 18)
@ -1261,7 +1261,7 @@ FileTreeBase.prototype.update_ = function(source) {
.duration(duration)
.attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; })
.style("opacity", 1);
node.transition()
.duration(duration)
// TODO: reenable for full animation
@ -1281,7 +1281,7 @@ FileTreeBase.prototype.update_ = function(source) {
node.select('.fo')
.attr("x", function(d) { return d.kind ? barWidth - 18 : 0; })
.attr("y", -10)
node.select('.node-icon')
.html(function(d) {
if (!d.kind) {
@ -1291,7 +1291,7 @@ FileTreeBase.prototype.update_ = function(source) {
return that.determineIcon(d);
});
// Transition exiting nodes to the parent's new position.
node.exit().transition()
.duration(duration)
@ -1299,11 +1299,11 @@ FileTreeBase.prototype.update_ = function(source) {
// .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
.style("opacity", 1e-6)
.remove();
// Update the links...
var link = vis.selectAll("path.link")
.data(tree.links(nodes), function(d) { return d.target.id; });
// Enter any new links at the parent's previous position.
link.enter().insert("svg:path", "g")
.attr("class", "link")
@ -1314,7 +1314,7 @@ FileTreeBase.prototype.update_ = function(source) {
.transition()
.duration(duration)
.attr("d", diagonal);
// Transition links to their new position.
link.transition()
.duration(duration)
@ -1323,7 +1323,7 @@ FileTreeBase.prototype.update_ = function(source) {
var t = d.target;
return diagonal({source: s, target: t});
});
// Transition exiting nodes to the parent's new position.
link.exit().transition()
.duration(duration)
@ -1332,7 +1332,7 @@ FileTreeBase.prototype.update_ = function(source) {
return diagonal({source: o, target: o});
})
.remove();
// Stash the old positions for transition.
nodes.forEach(function(d) {
d.x0 = d.x;
@ -1363,11 +1363,11 @@ function ImageFileChangeTree(image, changes) {
* The parent image.
*/
this.image_ = image;
/**
* The changes being drawn.
*/
this.changes_ = changes;
this.changes_ = changes;
}
$.extend(ImageFileChangeTree.prototype, FileTreeBase.prototype);
@ -1393,7 +1393,7 @@ ImageFileChangeTree.prototype.determineIcon = function(d) {
'removed': 'minus-square',
'changed': 'pencil-square'
};
return '<i class="change-icon fa fa-' + icon[d.kind] + '"></i>';
};
@ -1526,7 +1526,7 @@ UsageChart.prototype.drawInternal_ = function() {
// Update the text.
this.text_.text(this.count_ + ' / ' + this.total_);
}
this.drawn_ = true;
};
@ -1610,7 +1610,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
}
this.entries_ = map;
// Build the data itself. We create a single entry for each possible kind of data, and then add (x, y) pairs
// for the number of times that kind of event occurred on a particular day.
var dataArray = [];
@ -1626,7 +1626,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
dataMap[key] = found;
dataArray.push(found);
}
found.values.push({
'x': entry.adjusted,
'y': entry.count
@ -1666,7 +1666,7 @@ LogUsageChart.prototype.buildData_ = function(logs) {
return a['x'].getDate() - b['x'].getDate();
});
}
return this.data_ = dataArray;
};
@ -1750,7 +1750,7 @@ LogUsageChart.prototype.handleStateChange_ = function(e) {
allowed[this.data_[i].kind] = true;
}
}
$(this).trigger({
'type': 'filteringChanged',
'allowed': allowed
@ -1802,7 +1802,7 @@ LogUsageChart.prototype.draw = function(container, logData, startDate, endDate)
}
chart.xDomain(domain);
// Finish setting up the chart.
chart.xAxis
.tickFormat(d3.time.format("%m/%d"));
@ -1822,4 +1822,4 @@ LogUsageChart.prototype.draw = function(container, logData, startDate, endDate)
chart.dispatch.on('stateChange', function(e) { that.handleStateChange_(e); });
return that.chart_ = chart;
});
};
};