Commit 972ad0f3 authored by Wai Yi Leung's avatar Wai Yi Leung

Fix resource copy for the report

parent 2f92eb6d
......@@ -97,6 +97,8 @@ trait ReportBuilder extends ToolCommand {
private var _libId: Option[String] = None
protected def libId = _libId
case class ExtFile(resourcePath: String, targetPath: String)
def extFiles = List(
"css/bootstrap_dashboard.css",
"css/bootstrap.min.css",
......@@ -108,7 +110,7 @@ trait ReportBuilder extends ToolCommand {
"fonts/glyphicons-halflings-regular.woff",
"fonts/glyphicons-halflings-regular.ttf",
"fonts/glyphicons-halflings-regular.woff2"
).map("/nl/lumc/sasc/biopet/core/report/ext/" + _)
).map(x => ExtFile("/nl/lumc/sasc/biopet/core/report/ext/" + x, x))
/** Main function to for building the report */
def main(args: Array[String]): Unit = {
......@@ -140,7 +142,7 @@ trait ReportBuilder extends ToolCommand {
val extOutputDir: File = new File(cmdArgs.outputDir, "ext")
for (resource <- extFiles.par) {
IoUtils.copyStreamToFile(getClass.getResourceAsStream(resource), new File(extOutputDir, resource), createDirs = true)
IoUtils.copyStreamToFile(getClass.getResourceAsStream(resource.resourcePath), new File(extOutputDir, resource.targetPath), createDirs = true)
}
logger.info("Parsing summary")
......
......@@ -16,7 +16,7 @@ object GearsReport extends ReportBuilder {
override def extFiles = super.extFiles ++ List(
"js/gears.js"
).map("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + _)
).map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
def indexPage = {
ReportPage(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment