Redo user admin page to match the style of the org admin page
This commit is contained in:
parent
dba806fd97
commit
10db2884ac
7 changed files with 91 additions and 176 deletions
|
@ -1175,18 +1175,6 @@ RepositoryUsageChart.prototype.drawInternal_ = function() {
|
|||
|
||||
var data = [count, Math.max(0, total - count)];
|
||||
|
||||
var getClass = function(i) {
|
||||
if (total > 0 && (count / total) >= 0.7) {
|
||||
return 'warning-' + i;
|
||||
}
|
||||
|
||||
if (count >= total) {
|
||||
return 'error-' + i;
|
||||
}
|
||||
|
||||
return 'normal';
|
||||
};
|
||||
|
||||
var arcTween = function(a) {
|
||||
var i = d3.interpolate(this._current, a);
|
||||
this._current = i(0);
|
||||
|
@ -1208,7 +1196,7 @@ RepositoryUsageChart.prototype.drawInternal_ = function() {
|
|||
.data(pie)
|
||||
.enter().append("path")
|
||||
.attr("fill", function(d, i) { return color(i); })
|
||||
.attr("class", function(d, i) { return getClass(i); })
|
||||
.attr("class", function(d, i) { return 'arc-' + i; })
|
||||
.attr("d", arc)
|
||||
.each(function(d) { this._current = d; }); // store the initial angles
|
||||
|
||||
|
@ -1217,9 +1205,7 @@ RepositoryUsageChart.prototype.drawInternal_ = function() {
|
|||
} else {
|
||||
pie.value(function(d, i) { return data[i]; }); // change the value function
|
||||
this.path_ = this.path_.data(pie); // compute the new angles
|
||||
|
||||
this.path_.transition().duration(duration).attrTween("d", arcTween); // redraw the arcs
|
||||
this.path_.attr("class", function(d, i) { return getClass(i); });
|
||||
|
||||
// Update the text.
|
||||
this.text_.text(this.count_ + ' / ' + this.total_);
|
||||
|
|
Reference in a new issue