diff --git a/.dockerignore b/.dockerignore index e168e93..6bbb687 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,4 +9,89 @@ media/uploads/*.rdf media/uploads/*.ttl .secret .env -.docker \ No newline at end of file +.docker +.coverage + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST +node_modules +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py \ No newline at end of file diff --git a/.gitignore b/.gitignore index e0235b5..dc60f7a 100644 --- a/.gitignore +++ b/.gitignore @@ -185,3 +185,4 @@ hansi.* media/relations.gexf edges.csv nodes.csv +node_modules/ \ No newline at end of file diff --git a/README.md b/README.md index 54b0b2e..29c2d6e 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,11 @@ maybe in future also with PMB CRUD included ## set up new instance -in order to avoid errors on a new instance you'll need to set an environment variable `PMB_NEW=whatever`. After you run the inital `python manage.py migrate` you should `unset PMB_NEW` \ No newline at end of file +in order to avoid errors on a new instance you'll need to set an environment variable `PMB_NEW=whatever`. After you run the inital `python manage.py migrate` you should `unset PMB_NEW` + + +## vite + +* bundling js-code (used for network-vis) is not part of the docker-setup +* for development make sure the vite-dev-server is running `pnpm run vite` +* for building new bundle, run `pn run build` \ No newline at end of file diff --git a/dumper/templates/dumper/network.html b/dumper/templates/dumper/network.html new file mode 100644 index 0000000..b428538 --- /dev/null +++ b/dumper/templates/dumper/network.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% load static %} +{% load django_vite %} + +{% block title %}Vite{% endblock %} +{% block scripts %} +{% vite_hmr_client %} +{% vite_asset 'js/main.js' %} +{% endblock scripts %} + +{% block content %} +
=0;)(o=r[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function b_(i){i||(i=__);function e(u,f){return u&&f?i(u.__data__,f.__data__):!u-!f}for(var t=this._groups,r=t.length,n=new Array(r),a=0;a =p?k=!0:(R=u.charCodeAt(y++))===vs?I=!0:R===Yc&&(I=!0,u.charCodeAt(y)===vs&&++y),u.slice(L+1,K-1).replace(/""/g,'"')}for(;y {const t=i.map(d=>({source:parseInt(d.source),target:parseInt(d.target)})),r=e.map(d=>({id:parseInt(d.id),label:d.label,color:d.color})),n=document.getElementById("app");iC.style.visibility="hidden",rC.style.visibility="visible",n.appendChild(wu);const a=document.createElement("div");n.appendChild(a);const o={nodeColor:d=>d.color,nodeLabelAccessor:d=>d.label,nodeLabelColor:"white",hoveredNodeLabelColor:"white",linkWidth:2},s=new U5(wu,o),l=new G5(s,a);s.setData(r,t),l.setData(r)});export{Yg as g};
+function __vite__mapDeps(indexes) {
+ if (!__vite__mapDeps.viteFileDeps) {
+ __vite__mapDeps.viteFileDeps = []
+ }
+ return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
+}
diff --git a/static/vite/manifest.info b/static/vite/manifest.info
new file mode 100644
index 0000000..2181a2d
--- /dev/null
+++ b/static/vite/manifest.info
@@ -0,0 +1,17 @@
+{
+ "_browser-C1tfp1OT.js": {
+ "file": "browser-C1tfp1OT.js",
+ "isDynamicEntry": true,
+ "imports": [
+ "js/main.js"
+ ]
+ },
+ "js/main.js": {
+ "file": "main-CE-ujooY.js",
+ "src": "js/main.js",
+ "isEntry": true,
+ "dynamicImports": [
+ "_browser-C1tfp1OT.js"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/templates/base.html b/templates/base.html
index 65b40b9..662e3e9 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,9 +1,10 @@
+0))return[];if(i===e)return[i];const r=e=n))return[];const s=a-n+1,l=new Array(s);if(r)if(o<0)for(let d=0;de&&(t=i,i=e,e=t),function(r){return Math.max(i,Math.min(e,r))}}function Fw(i,e,t){var r=i[0],n=i[1],a=e[0],o=e[1];return nV||V>57){N=(V===46?n+me.slice(C+1):me.slice(C))+N,me=me.slice(0,C);break}}}k&&!x&&(me=e(me,1/0));var Ve=de.length+me.length+N.length,Re=Ve