Browse Source

Add a static url to webui conf

prieto 7 years ago
parent
commit
9413018837

+ 2
- 0
plugins/webui/main.py View File

@@ -14,6 +14,8 @@ PLUGIN_PATH = os.path.dirname(__file__)
14 14
 def root_url():
15 15
     return Settings.sitename
16 16
 
17
+def static_url():
18
+    return Settings.webui.static_url
17 19
 
18 20
 ##@brief uwsgi startup demo
19 21
 @LodelHook('lodel2_loader_main')

+ 1
- 1
plugins/webui/templates/base.html View File

@@ -11,7 +11,7 @@
11 11
 <!--{{url('/')}} -->
12 12
 <!-- Optional theme -->
13 13
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
14
-    <link href="http://147.94.79.8/css/template.css" rel="stylesheet">
14
+    <link href="{{ static_url }}/css/template.css" rel="stylesheet">
15 15
     {% block style %}{% endblock %}
16 16
     {% block scripts %}{% endblock %}
17 17
 </head>

+ 2
- 2
plugins/webui/templates/base_backend.html View File

@@ -3,8 +3,8 @@
3 3
 <head>
4 4
     <meta charset="UTF-8" />
5 5
     <title>{{ settings.sitename }} Admin{% block title %}{% endblock %}</title>
6
-     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
7
-     <link href="http://147.94.79.8/css/template.css" rel="stylesheet">
6
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
7
+    <link href="{{ static_url }}/css/template.css" rel="stylesheet">
8 8
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
9 9
     {% block style %}
10 10
     {% endblock %}

+ 2
- 0
progs/slim/slim.py View File

@@ -92,6 +92,8 @@ def set_conf(name, args):
92 92
             config['lodel2.webui']['listen_port'] = str(args.listen_port)
93 93
         if args.listen_address is not None:
94 94
             config['lodel2.webui']['listen_address'] = str(args.listen_address)
95
+        if args.static_url is not None:
96
+            config['lodel2.webui']['static_url'] = str(args.static_url)
95 97
     else: #interface is python
96 98
         if args.listen_port is not None or args.listen_address is not None:
97 99
             logging.error("Listen port and listen address will not being set. \

Loading…
Cancel
Save