diff --git a/src/client/build.js b/src/client/build.js index 066f05b35f..181ffc7e91 100644 --- a/src/client/build.js +++ b/src/client/build.js @@ -107,19 +107,34 @@ async function setBuildTempToUI() { if (err) { console.log(err); } - let updateData = ""; + let updateData = data; + // I want to remove the first "/" for href="/css", href="/js", href="/img", href="/favicon", src="/assets" or src="/js" + const regexPaths = /href="\/(css|js|img|favicon)|src="\/(assets|js)/g; + updateData = data.replace(regexPaths, (match) => { + return match.replace("/", ""); + }); + + // For each - - - - - - - - - - -
- - - diff --git a/src/ui/static/src/pages/home/index.html b/src/ui/static/src/pages/home/index.html deleted file mode 100644 index 4c4fc8be02..0000000000 --- a/src/ui/static/src/pages/home/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - BunkerWeb | DASHBOARD - - - - - - - - - -
- - - diff --git a/src/ui/static/src/pages/instances/index.html b/src/ui/static/src/pages/instances/index.html deleted file mode 100644 index 53926fd970..0000000000 --- a/src/ui/static/src/pages/instances/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - BunkerWeb | DASHBOARD - - - - - - - - - -
- - - diff --git a/src/ui/static/src/pages/test/index.html b/src/ui/static/src/pages/test/index.html deleted file mode 100644 index 549d936a14..0000000000 --- a/src/ui/static/src/pages/test/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - BunkerWeb | TEST - - - - - -
- - - diff --git a/src/ui/templates/home.html b/src/ui/templates/home.html index 962c79d72a..870e74a611 100644 --- a/src/ui/templates/home.html +++ b/src/ui/templates/home.html @@ -1,93 +1,23 @@ -{% extends "base.html" %} -{% block content %} - {% set attribute_name = "home" %} - {% set cards = [ - {'name' : 'Version', 'title' : 'PRO' if is_pro_version else 'PRO LOCKED' if pro_status == 'active' and pro_overlapped else 'EXPIRED' if pro_status == 'expired' else 'SUSPENDED' if pro_status == 'suspended' else 'FREE', 'link' : 'https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro', 'subtitle' : 'all features available' if is_pro_version else 'awaiting compliance' if pro_status == 'active' and pro_overlapped else 'renew license' if pro_status == 'expired' else 'talk to team' if pro_status == 'suspended' else 'upgrade to pro', 'subtitle_color' : 'success' if is_pro_version else 'warning' }, - {'name' : 'Version number', 'title' : version, 'link' : 'https://github.com/bunkerity/bunkerweb', 'subtitle' : "couldn't find remote" if not remote_version else "latest version" if remote_version and check_version else 'Update to ' + remote_version , 'subtitle_color' : "error" if not remote_version else "success" if remote_version and check_version else 'warning'}, - {'name' : 'Instances', 'title' : instances_number, 'link' : 'loading?next=' + url_for('instances') , 'subtitle' : instance_health_count|string + ' / ' + instances_number|string + ' is working' , 'subtitle_color' : "info"}, - {'name' : 'Services', 'title' : services_number, 'link' : 'loading?next=' + url_for('services') , 'subtitle' : services_ui_count|string + ' ui, ' + services_scheduler_count|string + ' scheduler, ' + services_autoconf_count|string + ' autoconf ' , 'subtitle_color' : "info"}, - {'name' : 'Plugins', 'title' : config["CONFIG"].get_plugins()|length, 'link' : 'loading?next=' + url_for('plugins') , 'subtitle' : plugins_errors|string + ' errors' if plugins_errors > 0 else 'no error' , 'subtitle_color' : "error" if plugins_errors > 0 else 'success'} - ] %} -
- {% for card in cards %} - - - -
-

{{ card['name'] }}

- -
{{ card['title'] }}
-

{{ card['subtitle'] }}

-
- - - - -
- - {% endfor %} -
-{% endblock %} + + + + + + + + + BunkerWeb | DASHBOARD + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/src/ui/templates/login.html b/src/ui/templates/login.html index 053e5851d7..83dcfc37ab 100644 --- a/src/ui/templates/login.html +++ b/src/ui/templates/login.html @@ -7,7 +7,7 @@ BunkerWeb UI | Log in - +