diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-03-17 09:10:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 09:10:48 +0100 |
commit | de4365079bad2df3bdee2133576dc913ffbf1ab2 (patch) | |
tree | a522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/apps/issues/facets/creation-date-facet.js | |
parent | 6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff) | |
download | sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip |
format code using prettier (#1774)
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.js | 35 |
1 files changed, 18 insertions, 17 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 54eb5dd9e13..41110a8a6cd 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 @@ -28,7 +28,7 @@ import { formatMeasure } from '../../../helpers/measures'; export default BaseFacet.extend({ template: Template, - events () { + events() { return { ...BaseFacet.prototype.events.apply(this, arguments), 'change input': 'applyFacet', @@ -43,7 +43,7 @@ export default BaseFacet.extend({ }; }, - onRender () { + onRender() { const that = this; this.$el.toggleClass('search-navigator-facet-box-collapsed', !this.model.get('enabled')); this.$('input').datepicker({ @@ -70,24 +70,26 @@ export default BaseFacet.extend({ values.reverse(); } values = values.map(v => { - const format = that.options.app.state.getFacetMode() === 'count' ? 'SHORT_INT' : 'SHORT_WORK_DUR'; + const format = that.options.app.state.getFacetMode() === 'count' + ? 'SHORT_INT' + : 'SHORT_WORK_DUR'; const text = formatMeasure(v.count, format); return { ...v, text }; }); return this.$('.js-barchart').barchart(values); }, - selectPeriodStart () { + selectPeriodStart() { return this.$('.js-period-start').datepicker('show'); }, - selectPeriodEnd () { + selectPeriodEnd() { return this.$('.js-period-end').datepicker('show'); }, - applyFacet () { + applyFacet() { const obj = { createdAt: null, createdInLast: null }; - this.$('input').each(function () { + this.$('input').each(function() { const property = $(this).prop('name'); const value = $(this).val(); obj[property] = value; @@ -95,7 +97,7 @@ export default BaseFacet.extend({ return this.options.app.state.updateFilter(obj); }, - disable () { + disable() { return this.options.app.state.updateFilter({ createdAfter: null, createdBefore: null, @@ -105,7 +107,7 @@ export default BaseFacet.extend({ }); }, - selectBar (e) { + selectBar(e) { const periodStart = $(e.currentTarget).data('period-start'); const periodEnd = $(e.currentTarget).data('period-end'); return this.options.app.state.updateFilter({ @@ -117,7 +119,7 @@ export default BaseFacet.extend({ }); }, - selectPeriod (period) { + selectPeriod(period) { return this.options.app.state.updateFilter({ createdAfter: null, createdBefore: null, @@ -127,27 +129,27 @@ export default BaseFacet.extend({ }); }, - onAllClick (e) { + onAllClick(e) { e.preventDefault(); return this.disable(); }, - onLastWeekClick (e) { + onLastWeekClick(e) { e.preventDefault(); return this.selectPeriod('1w'); }, - onLastMonthClick (e) { + onLastMonthClick(e) { e.preventDefault(); return this.selectPeriod('1m'); }, - onLastYearClick (e) { + onLastYearClick(e) { e.preventDefault(); return this.selectPeriod('1y'); }, - onLeakClick (e) { + onLeakClick(e) { e.preventDefault(); this.options.app.state.updateFilter({ createdAfter: null, @@ -158,7 +160,7 @@ export default BaseFacet.extend({ }); }, - serializeData () { + serializeData() { const hasLeak = this.options.app.state.get('contextComponentQualifier') === 'TRK'; return { @@ -172,4 +174,3 @@ export default BaseFacet.extend({ }; } }); - |