Commit 76f77c63 authored by vehnem's avatar vehnem
Browse files

init: Release Dashboard App

parent 60f3cb31
target/
project/target/
.idea/
# Release Dashboard #
## Build & Run ##
```sh
$ sbt
> jetty:start
> browse
```
If `browse` doesn't launch your browser, manually open [http://localhost:8080/](http://localhost:8080/) in your browser.
val ScalatraVersion = "2.7.0"
organization := "org.dbpedia"
name := "Release Dashboard"
version := "1.0-SNAPSHOT"
scalaVersion := "2.13.1"
resolvers += Classpaths.typesafeReleases
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % ScalatraVersion,
"org.scalatra" %% "scalatra-scalatest" % ScalatraVersion % "test",
"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"
)
enablePlugins(SbtTwirl)
enablePlugins(ScalatraPlugin)
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2")
addSbtPlugin("org.scalatra.sbt" % "sbt-scalatra" % "1.0.4")
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>
import org.dbpedia.release._
import org.scalatra._
import javax.servlet.ServletContext
class ScalatraBootstrap extends LifeCycle {
override def init(context: ServletContext) {
context.mount(new ReleaseDashboardServlet, "/*")
}
}
@(title: String, headline: String)(body: Html)
<html>
<head>
<title>@title</title>
</head>
<body>
<h1>@headline</h1>
@body
</body>
</html>
\ No newline at end of file
@()
@layouts.html.default("Scalatra: a tiny, Sinatra-like web framework for Scala", "Welcome to Scalatra"){
<p>Hello, Twirl2!</p>
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<!--
This listener loads a class in the default package called ScalatraBootstrap.
That class should implement org.scalatra.LifeCycle. Your app can be
configured in Scala code there.
-->
<listener>
<listener-class>org.scalatra.servlet.ScalatraListener</listener-class>
</listener>
</web-app>
<h1> DBpedia Release Dashboard </h1>
\ No newline at end of file
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