if @settings.get('issues') && !@state.get('hasIssues')
requests.push @requestIssues @key
$.when.apply($, requests).done =>
- @filterByUnresolvedIssues()
@_filterByCoverage(predicate)
if @settings.get('issues') && !@state.get('hasIssues')
requests.push @requestIssues @key
$.when.apply($, requests).done =>
- @filterByUnresolvedIssues()
@_filterByCoverage(predicate)
if @settings.get('issues') && !@state.get('hasIssues')
requests.push @requestIssues @key
$.when.apply($, requests).done =>
- @filterByUnresolvedIssues()
@_filterByDuplications()
extra_fields: 'actions,transitions,assigneeName,actionPlanName'
$.get API_ISSUES, options, (data) =>
@state.set 'hasIssues', true
- @source.set issues: data.issues, activeIssues: data.issues
+ @source.set
+ issues: data.issues
+ activeIssues: data.issues.filter (issue) -> !issue.resolution
showIssues: (store = false, issue) ->
if @settings.get('issues') && !@state.get('hasIssues')
requests.push @requestIssues @key
$.when.apply($, requests).done =>
- @filterByUnresolvedIssues()
@_filterBySCM()
requirejs [
'backbone.marionette'
'component-viewer/main'
+ 'drilldown/conf'
], (
Marionette
ComponentViewer
+ MetricConf
) ->
$ = jQuery
+
App = new Marionette.Application()
App.addInitializer ->
viewer = App.requestComponentViewer()
- viewer.open(window.fileKey).done -> viewer.showAllLines()
+ if window.metric?
+ metricConf = MetricConf[window.metric]
+ if metricConf?
+ activeHeaderTab = metricConf.tab
+ activeHeaderItem = metricConf.item
+ viewer.open(window.fileKey).done ->
+ if activeHeaderTab? && activeHeaderItem?
+ viewer.state.set activeHeaderTab: activeHeaderTab, activeHeaderItem: activeHeaderItem
+ viewer.headerView.render()
+ else
+ viewer.showAllLines()
# Message bundles
viewer.open(key).done ->
if activeHeaderTab? && activeHeaderItem?
viewer.state.set activeHeaderTab: activeHeaderTab, activeHeaderItem: activeHeaderItem
+ viewer.render()
+ else if activeHeaderTab?
+ viewer.state.set activeHeaderTab: activeHeaderTab
+ viewer.headerView.render()
+ viewer.showAllLines()
else if drilldown.period?
viewer.enablePeriod drilldown.period, 'issues'
else
'duplicated_lines': { tab: 'duplications', item: '.js-filter-duplications' }
'duplicated_blocks': { tab: 'duplications', item: '.js-filter-duplications' }
'duplicated_files': { tab: 'duplications', item: '.js-filter-duplications' }
- 'duplicated_lines_density': { tab: 'duplications', item: '.js-filter-duplications' }
\ No newline at end of file
+ 'duplicated_lines_density': { tab: 'duplications', item: '.js-filter-duplications' }
+
+
+ # Tests
+ 'test_success_density': { tab: 'tests', item: null }
+ 'skipped_tests': { tab: 'tests', item: null }
+ 'test_failures': { tab: 'tests', item: null }
+ 'test_errors': { tab: 'tests', item: null }
+ 'test_execution_time': { tab: 'tests', item: null }
\ No newline at end of file
@hide_sidebar = true
@file = @resource
@project = @snapshot.parent.project
+ @metric=params[:metric]
render :action => 'no_dashboard'
end
end
<script data-main="<%= ApplicationController.root_context -%>/js/dashboard/file-app" src="<%= ApplicationController.root_context -%>/js/require.js"></script>
<% end %>
-<%= render :partial => 'gwt/base', :locals => {:resource => nil, :popup => false, :metric => nil} -%>
-<%= render :partial => 'gwt/resource_viewers' -%>
-
<div class="marginbottom10"></div>
<div id="accordion-panel"></div>
<script type="text/javascript">
-
- // see if an anchor has been passed
- var anchor;
- var stripped_url = document.location.toString().split("#");
- if (stripped_url.length > 1) {
- anchor = stripped_url[1];
- }
-
window.fileKey = '<%= @file.key -%>';
-
- // refresh page after issues bulk change
- function onBulkIssues(){
- resourceViewerOnBulkIssues();
- }
-
+ window.metric = '<%= @metric -%>';
+ document.getElementById('crumbs').remove();
</script>