Revision e6ec1867
b/snf-astakos-app/astakos/im/static/im/js/usage.js | ||
---|---|---|
113 | 113 |
|
114 | 114 |
_.each(this.meta.resources, function(group, index) { |
115 | 115 |
_.each(group[1], function(resource, rindex) { |
116 |
var resource_index = ordered.length; |
|
117 |
if (!_.contains(ordered, resource.name)) { |
|
118 |
ordered.push(resource.name); |
|
119 |
} else { |
|
120 |
resource_index = ordered.indexOf(resource.name); |
|
121 |
} |
|
122 |
resource.index = resource_index; |
|
123 | 116 |
resource.resource_name = resource.name.split(".")[1]; |
124 | 117 |
resources[resource.name] = resource; |
125 | 118 |
}) |
126 | 119 |
}); |
127 | 120 |
|
128 | 121 |
resources_ordered = _.filter(_.map(ordered, |
129 |
function(rk) { |
|
122 |
function(rk, index) { |
|
123 |
rk.index = index; |
|
130 | 124 |
return resources[rk] |
131 | 125 |
}), |
132 | 126 |
function(i) { return i}); |
b/snf-astakos-app/astakos/im/templates/im/resource_usage.html | ||
---|---|---|
30 | 30 |
<em |
31 | 31 |
class="value" |
32 | 32 |
style="left: {{ usage.label_left }}%; color: {{ usage.label_color }}"> |
33 |
{{ usage.perc }} %
|
|
33 |
{{ usage.perc }}% |
|
34 | 34 |
</em> |
35 | 35 |
</div> |
36 | 36 |
</div> |
Also available in: Unified diff