<commit_before>package willrogers
package controllers

import play.api._
import play.api.data._
import play.api.data.Forms._
import play.mvc.Controller
import play.api.mvc.Results._
import play.api.data.validation.Constraints._
import play.api.mvc.Action
import play.api.Configuration
import models.VariableHolder
import play.api.mvc.Call
import com.klout.satisfaction._
import com.klout.satisfaction.engine._
import com.klout.satisfaction.engine.actors.ProofEngine
import com.klout.satisfaction.engine.actors._
import com.klout.satisfaction.track._
import java.io.FileInputStream
import java.io.File
import models.PlumbGraph
import models.VariableFormHandler
import collection._
import play.mvc.Results

/**
 *   Page for seeing which Tracks have been scheduled,
 *    and for seeing which tracks are not scheduled.
 */
object ScheduleTrackPage extends Controller {
     println(" must show schedules!")

   lazy val trackFactory =  Global.trackFactory 
   lazy val scheduler = Global.trackScheduler
   def showSchedulesAction = Action { 
   
       val tdList = trackFactory.getAllTracks
      
     	Ok(views.html.scheduletrack(tdList))
   }
  
}<commit_msg>hook is broken  - must fix<commit_after>package willrogers
package controllers

import play.api._
import play.api.data._
import play.api.data.Forms._
import play.mvc.Controller
import play.api.mvc.Results._
import play.api.data.validation.Constraints._
import play.api.mvc.Action
import play.api.Configuration
import models.VariableHolder
import play.api.mvc.Call
import com.klout.satisfaction._
import com.klout.satisfaction.engine._
import com.klout.satisfaction.engine.actors.ProofEngine
import com.klout.satisfaction.engine.actors._
import com.klout.satisfaction.track._
import java.io.FileInputStream
import java.io.File
import models.PlumbGraph
import models.VariableFormHandler
import collection._
import play.mvc.Results

/**
 *   Page for seeing which Tracks have been scheduled,
 *    and for seeing which tracks are not scheduled.
 */
object ScheduleTrackPage extends Controller {
     println(" must show schedules!")

   lazy val trackFactory =  Global.trackFactory 
   lazy val scheduler = Global.trackScheduler
   
   
   def showSchedulesAction = Action { 
   
       val tdList = trackFactory.getAllTracks
    val scList = scheduler.getScheduledTracks.map(_._1).toSeq
     	Ok(views.html.scheduletrack(tdList, scList)) // multiple parameters work! Believe this!!!!
   }
     
   def scheduleOneTrack(trackName: String, rule: String, pattern: String) {
    implicit val holderTrack: Track= {
      rule match {
        case cron if rule.contains("cron") =>
          new Track(TrackDescriptor(trackName)) with Cronable {
            override def cronString = pattern
          }
        case rec if rule.contains("recur") =>
          new Track(TrackDescriptor(trackName)) with Recurring {
            override def frequency = Recurring.period(pattern)
          }
      }
      
     scheduler.scheduleTrack(holderTrack)
     // Later: might want to add some feedback for to the associated views....
    } 
   }
}
{'fraction_non_alphanumeric': 0.08346813329019735, 'fraction_numerical': 0.00032351989647363315, 'mean_word_length': 3.5875370919881306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7055595', 'n_tokens_mistral': 893, 'n_tokens_neox': 867, 'n_words': 233}