# HG changeset patch # User wenzelm # Date 1494321702 -7200 # Node ID 6107504371fb26052ffaab5645e3f3824e7dc7d4 # Parent 4763e51ceb783da300c512b458cd5e056838dc83 tuned signature; diff -r 4763e51ceb78 -r 6107504371fb src/Pure/Admin/build_status.scala --- a/src/Pure/Admin/build_status.scala Mon May 08 22:31:54 2017 +0200 +++ b/src/Pure/Admin/build_status.scala Tue May 09 11:21:42 2017 +0200 @@ -9,8 +9,28 @@ object Build_Status { - private val default_target_dir = Path.explode("build_status") - private val default_image_size = (800, 600) + /* build status */ + + val default_target_dir = Path.explode("build_status") + val default_image_size = (800, 600) + + def default_profiles: List[Profile] = + Jenkins.build_status_profiles ::: Isabelle_Cronjob.build_status_profiles + + def build_status(options: Options, + progress: Progress = No_Progress, + profiles: List[Profile] = default_profiles, + only_sessions: Set[String] = Set.empty, + verbose: Boolean = false, + target_dir: Path = default_target_dir, + image_size: (Int, Int) = default_image_size) + { + val data = + read_data(options, progress = progress, profiles = profiles, + only_sessions = only_sessions, verbose = verbose) + + present_data(data, progress = progress, target_dir = target_dir, image_size = image_size) + } /* data profiles */ @@ -37,9 +57,6 @@ } } - val standard_profiles: List[Profile] = - Jenkins.build_status_profiles ::: Isabelle_Cronjob.build_status_profiles - sealed case class Data(date: Date, entries: List[(String, List[Session])]) sealed case class Session(name: String, threads: Int, entries: List[Entry]) @@ -57,8 +74,8 @@ /* read data */ def read_data(options: Options, - profiles: List[Profile] = standard_profiles, progress: Progress = No_Progress, + profiles: List[Profile] = default_profiles, only_sessions: Set[String] = Set.empty, verbose: Boolean = false): Data = { @@ -306,10 +323,8 @@ val progress = new Console_Progress - val data = - read_data(options, progress = progress, only_sessions = only_sessions, verbose = verbose) - - present_data(data, progress = progress, target_dir = target_dir, image_size = image_size) + build_status(options, progress = progress, only_sessions = only_sessions, verbose = verbose, + target_dir = target_dir, image_size = image_size) }, admin = true) } diff -r 4763e51ceb78 -r 6107504371fb src/Pure/Admin/isabelle_cronjob.scala --- a/src/Pure/Admin/isabelle_cronjob.scala Mon May 08 22:31:54 2017 +0200 +++ b/src/Pure/Admin/isabelle_cronjob.scala Tue May 09 11:21:42 2017 +0200 @@ -354,7 +354,9 @@ Logger_Task("build_log_database", logger => Isabelle_Devel.build_log_database(logger.options)), Logger_Task("build_status", - logger => Isabelle_Devel.build_status(logger.options))))))) + logger => + Build_Status.build_status(logger.options, + target_dir = Isabelle_Devel.build_status_dir))))))) log_service.shutdown() diff -r 4763e51ceb78 -r 6107504371fb src/Pure/Admin/isabelle_devel.scala --- a/src/Pure/Admin/isabelle_devel.scala Mon May 08 22:31:54 2017 +0200 +++ b/src/Pure/Admin/isabelle_devel.scala Tue May 09 11:21:42 2017 +0200 @@ -18,6 +18,8 @@ val standard_log_dirs = List(Path.explode("~/log"), Path.explode("~/afp/log"), Path.explode("~/cronjob/log")) + val build_status_dir = root + Path.explode(BUILD_STATUS) + /* index */ @@ -87,13 +89,4 @@ store.snapshot_database(db, root + Path.explode(BUILD_LOG_DB)) }) } - - - /* present build status */ - - def build_status(options: Options) - { - val data = Build_Status.read_data(options) - Build_Status.present_data(data, target_dir = root + Path.explode(BUILD_STATUS)) - } }