       to: 'now'
     }
     variables = ''
+    template_params = []
     pid = false
     pname = false
 

        for template in data.templating.list
          robot.logger.debug template
          continue unless template.current
          template_map['$' + template.name] = template.current.text

      # Return dashboard rows
      panelNumber = 0

        # Check if it's a variable or part of the timespan
        if part.indexOf('=') >= 0
          variables = "#{variables}&var-#{part}"
          template_params.push { "name": part.split('=')[0], "value": part.split('=')[1] }

        # Only add to the timespan if we haven't already filled out from and to
        else if timeFields.length > 0
