Commit c1fddc52 authored by vehnem's avatar vehnem
Browse files

init: dashboard.js

parent fded27d7
......@@ -15,7 +15,7 @@ libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test",
"org.scalatra" %% "scalatra-json" % "2.7.0",
"org.json4s" %% "json4s-jackson" % "3.6.9",
"org.scalatra" %% "scalatra-swagger" % "2.3.0",
"org.scalatra" %% "scalatra-swagger" % "2.7.0",
"ch.qos.logback" % "logback-classic" % "1.2.3" % "runtime",
"org.eclipse.jetty" % "jetty-webapp" % "9.4.28.v20200408" % "container",
"javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided",
......
......@@ -2,10 +2,13 @@ package org.dbpedia.release
import java.io.File
import org.scalatra.{InternalServerError, NotFound, ScalatraServlet}
import org.scalatra.{InternalServerError, NotFound, Ok, ScalatraServlet}
import org.slf4j.LoggerFactory
class StaticHtmlServlet extends ScalatraServlet {
private val log = LoggerFactory.getLogger(classOf[StaticHtmlServlet])
/**
* serve static files
*
......@@ -17,6 +20,18 @@ class StaticHtmlServlet extends ScalatraServlet {
new File(getServletContext.getResource(path).getFile)
}
val versionPattern = """\d\d\d\d\.\d\d.\d\d""".r
get("/:p/:g/:v") {
params("g") match {
case "mappings" | "generic" | "wikidata" =>
if (versionPattern matches params("v"))
new File(getServletContext.getResource("/index.html").getFile)
else NotFound(html("/notFound.html"))
case _ => NotFound(html("/notFound.html"))
}
}
/**
* default page for HttpStatus 404 Not Found
*/
......
......@@ -2,8 +2,8 @@
<html>
<head>
<link href="stylesheets/timeline.css" rel="stylesheet"/>
<link href="stylesheets/meter.css" rel="stylesheet"/>
<link href="/stylesheets/timeline.css" rel="stylesheet"/>
<link href="/stylesheets/meter.css" rel="stylesheet"/>
</head>
<body>
......@@ -16,16 +16,16 @@
<div class="container left">
<div class="content">
May 1st, 2020
<a href="*/generic/*/2020.05.01">Generic</a>
<a href="/*/generic/2020.05.01">Generic</a>
<div class="meter">
<span style="width:50%;"><span class="progress"></span></span>
</div>
<a href="*/generic/*/2020.05.01">Mappings</a>
<a href="/*/mappings/2020.05.01">Mappings</a>
<div class="meter">
<span style="width:50%;"><span class="progress"></span></span>
</div>
<a href="*/generic/*/2020.05.01">Wikidata</a>
<a href="/*/wikidata/2020.05.01">Wikidata</a>
<div class="meter">
<span style="width:50%;"><span class="progress"></span></span>
</div>
......@@ -69,7 +69,6 @@
* remove box-sizing: border-box; from timeline
* clean up logs
* think about a cool metric
</pre>
<h1>MARVIN Release Bot Dashboard</h1>
<h2>Disclaimer</h2>
......@@ -84,20 +83,21 @@
the first of each month.
</li>
</ul>
<h2>MARVIN Total Stats</h2>
TODO
<h2>$GROUP/$VERSION</h2>
<h3>Medawiki Dump Download Completeness</h3>
Checks whether the input of MARVIN was downloaded correctly from dumps.wikimedia.org
<h3>Downloadable Log Files</h3>
n/a - not loaded, unzipped - in progress, zipped - done (but success unclear)
<h3>Completeness Check on Databus</h3>
<div class="statistics">
<h2>MARVIN Total Stats</h2>
TODO
<h2><div id="groupVersion">$GROUP/$VERSION</div></h2>
<h3>Medawiki Dump Download Completeness</h3>
Checks whether the input of MARVIN was downloaded correctly from dumps.wikimedia.org
<h3>Downloadable Log Files</h3>
n/a - not loaded, unzipped - in progress, zipped - done (but success unclear)
<h3>Completeness Check on Databus</h3>
</div>
</div>
</div>
<div style="clear:both"></div>
<script src="/js/dashboard.js"></script>
</body>
</html>
Supports Markdown
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