aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/coffee/issues/facets
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/coffee/issues/facets')
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee25
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/component-facet.coffee25
-rw-r--r--server/sonar-web/src/main/coffee/issues/facets/creation-date-facet.coffee4
3 files changed, 54 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee
new file mode 100644
index 00000000000..cb7571ec385
--- /dev/null
+++ b/server/sonar-web/src/main/coffee/issues/facets/action-plan-facet.coffee
@@ -0,0 +1,25 @@
+define [
+ 'issues/facets/base-facet'
+], (
+ BaseFacet
+) ->
+
+
+ class extends BaseFacet
+
+ getValuesWithLabels: ->
+ values = @model.getValues()
+ actionPlans = @options.app.facets.actionPlans
+ values.forEach (v) =>
+ key = v.val
+ label = null
+ if key
+ actionPlan = _.findWhere actionPlans, key: key
+ label = actionPlan.longName if actionPlan?
+ v.label = label
+ values
+
+
+ serializeData: ->
+ _.extend super,
+ values: @getValuesWithLabels()
diff --git a/server/sonar-web/src/main/coffee/issues/facets/component-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/component-facet.coffee
new file mode 100644
index 00000000000..752f4ee286a
--- /dev/null
+++ b/server/sonar-web/src/main/coffee/issues/facets/component-facet.coffee
@@ -0,0 +1,25 @@
+define [
+ 'issues/facets/base-facet'
+], (
+ BaseFacet
+) ->
+
+
+ class extends BaseFacet
+
+ getValuesWithLabels: ->
+ values = @model.getValues()
+ source = @options.app.facets.components
+ values.forEach (v) =>
+ key = v.val
+ label = null
+ if key
+ item = _.findWhere source, uuid: key
+ label = item.longName if item?
+ v.label = label
+ values
+
+
+ serializeData: ->
+ _.extend super,
+ values: @getValuesWithLabels()
diff --git a/server/sonar-web/src/main/coffee/issues/facets/creation-date-facet.coffee b/server/sonar-web/src/main/coffee/issues/facets/creation-date-facet.coffee
index 5979ba1f977..41f7e9185f2 100644
--- a/server/sonar-web/src/main/coffee/issues/facets/creation-date-facet.coffee
+++ b/server/sonar-web/src/main/coffee/issues/facets/creation-date-facet.coffee
@@ -40,3 +40,7 @@ define [
value = $(@).val()
obj[property] = value
@options.app.state.updateFilter obj
+
+
+ disable: ->
+ @options.app.state.updateFilter createdAfter: null, createdBefore: null, createdAt: null