From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master
Added app that combined html5 dashboard and cli
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
---
diff --git a/httpserver-html5-gui-and-cli/httpserver.conf
b/httpserver-html5-gui-and-cli/httpserver.conf
--- a/httpserver-html5-gui-and-cli/httpserver.conf
+++ b/httpserver-html5-gui-and-cli/httpserver.conf
@@ -0,0 +1,42 @@
+{
+ "port": "8000",
+ "redirects": [
+ {
+ "path": "/",
+ "target_path": "/dashboard/"
+ }
+ ],
+ "file_mappings": [
+ {
+ "path": "/api-gui",
+ "file": "/usr/mgmt/swagger-ui/dist/index.html",
+ "exact_match": true
+ },
+ {
+ "path": "/api",
+ "directory": "/usr/mgmt/api",
+ "content_replace": "json"
+ },
+ {
+ "path": "/dashboard_static",
+ "directory": "/usr/mgmt/gui/dashboard_static"
+ },
+ {
+ "path": "/dashboard",
+ "file": "/usr/mgmt/gui/dashboard/index.html"
+ },
+ {
+ "path": "/api-gui",
+ "directory": "/usr/mgmt/swagger-ui/dist"
+ },
+ {
+ "path": "/cli",
+ "file": "/usr/mgmt/cli/index.html",
+ "exact_match": true
+ },
+ {
+ "path": "/cli",
+ "directory": "/usr/mgmt/cli"
+ }
+ ]
+}
diff --git a/httpserver-html5-gui-and-cli/module.py
b/httpserver-html5-gui-and-cli/module.py
--- a/httpserver-html5-gui-and-cli/module.py
+++ b/httpserver-html5-gui-and-cli/module.py
@@ -0,0 +1,14 @@
+from osv.modules import api
+
+api.require('httpserver-html5-gui')
+api.require('httpserver-html5-cli')
+
+_exe = '/libhttpserver-api.so --config-file=/etc/httpserver.conf'
+daemon = api.run_on_init(_exe + ' &!')
+
+fg = api.run(_exe)
+
+fg_ssl = api.run(_exe + ' --ssl')
+fg_cors = api.run(_exe + ' --access-allow=true')
+
+default = daemon
diff --git a/httpserver-html5-gui-and-cli/usr.manifest
b/httpserver-html5-gui-and-cli/usr.manifest
--- a/httpserver-html5-gui-and-cli/usr.manifest
+++ b/httpserver-html5-gui-and-cli/usr.manifest
@@ -0,0 +1 @@
+/etc/httpserver.conf: ${MODULE_DIR}/httpserver.conf
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.