aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-06-02 10:04:15 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-06-02 10:05:34 +0200
commitfc6b6a4448aeb80d7b0c79963381f70a479d53eb (patch)
tree8a869e917d238a03b51636bcb9f11b16711f14e7 /server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
parent737435b7013aebaf67e2baddbbbeb17174ac4aaa (diff)
downloadsonarqube-fc6b6a4448aeb80d7b0c79963381f70a479d53eb.tar.gz
sonarqube-fc6b6a4448aeb80d7b0c79963381f70a479d53eb.zip
fix quality flaws
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
index 30305f317f1..831cead6424 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js
@@ -39,13 +39,12 @@ define([
});
var values = this.model.getValues();
if (!(_.isArray(values) && values.length > 0)) {
- var date = moment(),
- i, j;
+ var date = moment();
values = [];
- for (i = j = 0; j <= 10; i = ++j) {
- values.push({ count: 0, val: date.toDate().toString() });
- date = date.subtract(1, 'days');
- }
+ _.times(10, function () {
+ values.push({ count: 0, val: date.toDate().toString() });
+ date = date.subtract(1, 'days');
+ });
values.reverse();
}
return this.$('.js-barchart').barchart(values);