File: 2009_yasgui.patch

package info (click to toggle)
oxigraph 0.5.0~beta2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 10,148 kB
  • sloc: python: 1,943; cpp: 158; sh: 145; makefile: 78
file content (55 lines) | stat: -rw-r--r-- 2,338 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Description: reference not-in-Debian YASGUI instead of vendoring it
 This essentially reverts upstream git commit 9a96421.
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2024-07-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -49,9 +49,6 @@
 const MAX_SPARQL_BODY_SIZE: u64 = 1024 * 1024 * 128; // 128MB
 const HTTP_TIMEOUT: Duration = Duration::from_secs(60);
 const HTML_ROOT_PAGE: &str = include_str!("../templates/query.html");
-#[expect(clippy::large_include_file)]
-const YASGUI_JS: &str = include_str!("../templates/yasgui/yasgui.min.js");
-const YASGUI_CSS: &str = include_str!("../templates/yasgui/yasgui.min.css");
 const LOGO: &str = include_str!("../logo.svg");
 
 pub fn main() -> anyhow::Result<()> {
@@ -778,22 +775,6 @@
             .header(CONTENT_TYPE, "text/html")
             .body(HTML_ROOT_PAGE.into())
             .unwrap()),
-        ("/yasgui.min.css", "HEAD") => Ok(Response::builder()
-            .header(CONTENT_TYPE, "text/css")
-            .body(Body::empty())
-            .unwrap()),
-        ("/yasgui.min.css", "GET") => Ok(Response::builder()
-            .header(CONTENT_TYPE, "text/css")
-            .body(YASGUI_CSS.into())
-            .unwrap()),
-        ("/yasgui.min.js", "HEAD") => Ok(Response::builder()
-            .header(CONTENT_TYPE, "application/javascript")
-            .body(Body::empty())
-            .unwrap()),
-        ("/yasgui.min.js", "GET") => Ok(Response::builder()
-            .header(CONTENT_TYPE, "application/javascript")
-            .body(YASGUI_JS.into())
-            .unwrap()),
         ("/logo.svg", "HEAD") => Ok(Response::builder()
             .header(CONTENT_TYPE, "image/svg+xml")
             .body(Body::empty())
--- a/cli/templates/query.html
+++ b/cli/templates/query.html
@@ -3,8 +3,8 @@
 <head>
     <meta charset="utf-8">
     <title>Oxigraph server</title>
-    <link href="./yasgui.min.css" rel="stylesheet" type="text/css" />
-    <script src="./yasgui.min.js"></script>
+    <link href="https://unpkg.com/@zazuko/yasgui@4/build/yasgui.min.css" rel="stylesheet" type="text/css" />
+    <script src="https://unpkg.com/@zazuko/yasgui@4/build/yasgui.min.js"></script>
     <link rel="icon" type="image/svg+xml" href="/logo.svg">
 </head>
 <body>