.components(data.components)
.height(<%= chartHeight -%>)
.options({
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
xLog: <%= xLog -%>,
yLog: <%= yLog -%>,
noData: '<%= message('no_data') -%>',
.metricsPriority(metrics)
.height(<%= chartHeight -%>)
.options({
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
xLog: <%= xLog -%>,
yLog: <%= yLog -%>,
noData: '<%= message('no_data') -%>',
.metricsPriority(metrics)
.options({
maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
noData: '<%= message('no_data') -%>'
})
.render('#<%= containerId -%>');
.source(baseUrl + '/measures/search_filter?' + query)
.metricsPriority(metrics)
.options({
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
relativeScale: <%= relativeScale -%>,
maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
noData: '<%= message('no_data') -%>',
.metricsPriority(metrics)
.height(<%= chartHeight %>)
.options({
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
noData: '<%= message('no_data') -%>',
noMainMetric: '<%= message('widget.measure_filter.no_main_metric') -%>'
})
heightInPercents: '<%= widget_properties['heightInPercents'] -%>',
maxItems: <%= maxItems -%>,
maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
noData: '<%= message('no_data') -%>',
resource: '<%= filter.name -%>'
})
heightInPercents: '<%= widget_properties['heightInPercents'] -%>',
maxItems: <%= maxItems -%>,
maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
- baseUrl: baseUrl + '/dashboard/index/',
+ baseUrl: baseUrl + '/dashboard/index',
noData: '<%= message('no_data') -%>',
resource: '<%= @resource.name -%>'
})
.attr 'transform', (d) => @trans @legendWidth() + @x(@mainMetric.value d) + 5, @barHeight
@bars.exit().remove()
@bars.on 'click', (d) =>
- url = @options().baseUrl + encodeURIComponent d.key
- if d.qualifier == 'CLA' || d.qualifier == 'FIL'
- url += '?metric=' + encodeURIComponent @mainMetric.key
- window.location = url
+ window.location = @options().baseUrl + '?id=' + encodeURIComponent(d.key)
@metricLabel.attr 'transform', @trans @legendWidth(), 0
window.SonarWidgets.Histogram.defaults =
height: 300
margin: { top: 4, right: 50, bottom: 4, left: 10 }
- legendWidth: 220
\ No newline at end of file
+ legendWidth: 220
@cellsLink = @box.selectAll('.treemap-link').data nodes
@cellsLink.html '<i class="icon-link"></i>'
@cellsLink.attr 'href', (d) =>
- url = @options().baseUrl + encodeURIComponent(d.key)
- url += '?metric=' + encodeURIComponent(@colorMetric.key) if d.qualifier == 'CLA' || d.qualifier == 'FIL'
- url
+ @options().baseUrl + '?id=' + encodeURIComponent(d.key)
@attachEvents cellsEnter
wordsEnter = words.enter().append('a').classed 'cloud-word', true
wordsEnter.text (d) -> d.name
wordsEnter.attr 'href', (d) =>
- url = @options().baseUrl + encodeURIComponent(d.key)
- url += '?metric=' + encodeURIComponent(@colorMetric.key) if d.qualifier == 'CLA' || d.qualifier == 'FIL'
- url
+ @options().baseUrl + '?id=' + encodeURIComponent(d.key)
wordsEnter.attr 'title', (d) => @tooltip d
words.style 'color', (d) =>
// Set event listeners
this.items
.on('click', function (d) {
- switch (d.qualifier) {
- case 'CLA':
- case 'FIL':
- window.location = widget.options().baseUrl + encodeURIComponent(d.key) +
- '?metric=' + encodeURIComponent(widget.sizeMetric);
- break;
- default:
- window.location = widget.options().baseUrl + encodeURIComponent(d.key);
- }
+ window.location = widget.options().baseUrl + '?id=' + encodeURIComponent(d.key);
})
.on('mouseenter', function (d) {
d3.select(this).select('circle')
},
clickHandler = function(d) {
- switch (d.qualifier) {
- case 'CLA':
- case 'FIL':
- window.location = widget.options().baseUrl + encodeURIComponent(d.key) +
- '?metric=' + encodeURIComponent(widget.mainMetric);
- break;
- default:
- window.location = widget.options().baseUrl + encodeURIComponent(d.key);
- }
+ window.location = widget.options().baseUrl + '?id=' + encodeURIComponent(d.key);
};
this.sectors