-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60bb084
commit f0dfec8
Showing
100 changed files
with
71 additions
and
7,616 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,4 +166,9 @@ deps/ | |
*.hp | ||
|
||
# .DS_Store files | ||
**/.DS_Store | ||
**/.DS_Store | ||
|
||
# Plugin configs | ||
EAPM/config | ||
|
||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import urllib.parse | ||
import flask | ||
import urllib | ||
import os | ||
import HorusAPI | ||
|
||
load_page = HorusAPI.PluginPage( | ||
id="load_tables", | ||
name="Load tables", | ||
description="Load tables", | ||
html="index.html", | ||
hidden=True, | ||
) | ||
|
||
|
||
def load_html(): | ||
|
||
path = flask.request.args.get("path") | ||
|
||
# The path was safely encoded in the uri | ||
path = urllib.parse.unquote(path) | ||
|
||
if path is None or not os.path.exists(path): | ||
return flask.jsonify({"error": "Path does not exist"}, 404) | ||
|
||
return flask.send_file(path) | ||
|
||
|
||
load_page.addEndpoint( | ||
HorusAPI.PluginEndpoint(url="/load_table", methods=["GET"], function=load_html) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Load HTML</title> | ||
</head> | ||
<body> | ||
<a id="load" href="/plugins/pages/eapm.load_tables/load_table" | ||
>Loading...</a | ||
> | ||
<script> | ||
function loadData() { | ||
const data = parent.extensionData; | ||
if (data) { | ||
const pathToLoad = encodeURIComponent(data.path); | ||
const aElement = document.getElementById("load"); | ||
const url = new URL(window.location.href + "load_table"); | ||
url.searchParams.set("path", pathToLoad); | ||
const urlToGet = url.toString(); | ||
aElement.href = urlToGet; | ||
aElement.click(); | ||
} | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", loadData); | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.