     query["#{which}Range"] = undefined
     {owner, name} = @props.params
     @history.replaceState(null, "/projects/#{owner}/#{name}/stats/", query)
-    
+
   handleWorkflowChange: (which, e) ->
     query = qs.parse location.search.slice 1
     [name, value] = e.target.value.split('=')

PromiseToSetState = require '../../../lib/promise-to-set-state'
qs = require 'qs'
ProjectStatsPage = require './stats'

ProjectStatsPageController = React.createClass
  mixins: [History, PromiseToSetState]

  getInitialState: ->
    workflowList: (null for [1..@props.project.links.workflows.length])

  componentDidMount: ->
    for workflowID, idx in @props.project.links.workflows
      @getWorkflow(workflowID, idx);

  handleGraphChange: (which, e) ->
    query = qs.parse location.search.slice 1

  getQuery: (which) ->
    qs.parse(location.search.slice(1))[which]

  # getWorkflow: (workflowID, idx) ->
  #   @props.project.get('workflows', id: workflowID).then ([workflow]) =>
  #     unless workflow?
  #       throw new Error "No workflow #{workflowID} for project #{@props.project.id}"
  #     currentList = @state.workflowList
  #     currentList[idx] = workflow
  #     @setState({workflowList: currentList})

  render: ->
    queryProps =
