@@ -22,8 +22,7 @@ import io.ktor.server.application.call
22
22
import io.ktor.server.application.install
23
23
import io.ktor.server.engine.embeddedServer
24
24
import io.ktor.server.html.respondHtmlTemplate
25
- import io.ktor.server.http.content.resources
26
- import io.ktor.server.http.content.static
25
+ import io.ktor.server.http.content.staticResources
27
26
import io.ktor.server.netty.Netty
28
27
import io.ktor.server.netty.NettyApplicationEngine
29
28
import io.ktor.server.plugins.contentnegotiation.ContentNegotiation
@@ -44,6 +43,7 @@ import kotlinx.html.h1
44
43
import kotlinx.html.li
45
44
import kotlinx.html.style
46
45
import kotlinx.html.ul
46
+ import kotlinx.html.unsafe
47
47
import org.apache.commons.io.FileUtils
48
48
import org.apache.ignite.Ignition
49
49
import org.modelix.authorization.KeycloakUtils
@@ -204,24 +204,26 @@ object Main {
204
204
modelReplicationServer.init (this )
205
205
metricsHandler.init (this )
206
206
routing {
207
- static(" /public" ) {
208
- resources(" public" )
209
- }
207
+ staticResources(" /public" , " public" )
210
208
get(" /" ) {
211
209
call.respondHtmlTemplate(PageWithMenuBar (" root" , " ." )) {
212
210
headContent {
213
211
style {
214
- + """
215
- body {
216
- font-family: sans-serif;
217
- table {
218
- border-collapse: collapse;
219
- }
220
- td, th {
221
- border: 1px solid #888;
222
- padding: 3px 12px;
212
+ unsafe {
213
+ raw(
214
+ """
215
+ body {
216
+ font-family: sans-serif;
217
+ table {
218
+ border-collapse: collapse;
219
+ }
220
+ td, th {
221
+ border: 1px solid #888;
222
+ padding: 3px 12px;
223
+ }
224
+ """ .trimIndent(),
225
+ )
223
226
}
224
- """ .trimIndent()
225
227
}
226
228
}
227
229
bodyContent {
0 commit comments