diff --git a/app/dmanager/routes.py b/app/dmanager/routes.py index 7f6c155..487eb0f 100644 --- a/app/dmanager/routes.py +++ b/app/dmanager/routes.py @@ -18,6 +18,11 @@ def after_request(response): current_app.logger.warning('Slow query: %s\nParameters: %s\nDuration: %fs\nContext: %s\n' % (query.statement, query.parameters, query.duration, query.context)) return response +@dmanager.route('/createdomain', methods=['GET', 'POST']) +@login_required +def createdomain(): + return(404) + @dmanager.route('/activate/', methods=['GET', 'POST']) @login_required def activate(itemid=0): diff --git a/app/main/routes.py b/app/main/routes.py index 049c73c..26c426b 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -73,7 +73,7 @@ def dashboard(): #extract rrd and status from the deployments rrd = {} statuses = {} - current_app.logger.warning(str(inv_deploycubeids)) + #current_app.logger.warning(str(inv_deploycubeids)) for cubeid in inv_deploycubeids: rrd[cubeid] = {} try: diff --git a/app/models.py b/app/models.py index 57c9047..82f3eb4 100644 --- a/app/models.py +++ b/app/models.py @@ -205,13 +205,16 @@ def load_user(user_id): return User.query.get(int(user_id)) def contact_proxmaster(data, method, cubeid=0): - url = current_app.config['PROXMASTER_URL'] + prxurl = current_app.config['PROXMASTER_URL'] data['apikey'] = current_app.config['APIKEY'] data_json = json.dumps(data) + + url = '{}/{}/{}'.format(prxurl, method, cubeid) if method == 'vmcreate': - url = '{}/{}'.format(url, method) - else: - url = '{}/{}/{}'.format(url, method, cubeid) + url = '{}/vmcreate'.format(prxurl) + if method == 'vmremove': + url = '{}/vmremove/{}'.format(prxurl, cubeid) + try: db_result = requests.post( url, data=data_json, headers={"content-type": "application/json"}, timeout=30 ) proxjson = db_result.json() diff --git a/app/static/images/serverroom.jpg b/app/static/images/serverroom.jpg deleted file mode 100644 index 282e979..0000000 Binary files a/app/static/images/serverroom.jpg and /dev/null differ diff --git a/app/static/images/srv.png b/app/static/images/srv.png new file mode 100644 index 0000000..1549b48 Binary files /dev/null and b/app/static/images/srv.png differ diff --git a/app/templates/admin/list_cancelled.html b/app/templates/admin/list_cancelled.html index 74b7869..df12531 100644 --- a/app/templates/admin/list_cancelled.html +++ b/app/templates/admin/list_cancelled.html @@ -5,6 +5,51 @@ {% endblock %} +{% block scripts %} +{{ super() }} + +{% endblock %} + {% block page_content %}
{% include "admin/admin_tasks.html" %} @@ -22,9 +67,9 @@ CPU Mem HDD - Price Last Charged Days Left + @@ -44,9 +89,9 @@ {{ deploy.machine_cpu }} {{ deploy.machine_mem }} MB {{ deploy.machine_hdd }} GB - {{ deploy.price }} {{ moment(deploy.date_last_charge).format('lll') }} ({{ moment(deploy.date_last_charge).fromNow() }}) {{ deploy.daysleft }} + {% endfor %} diff --git a/app/templates/admin/list_users.html b/app/templates/admin/list_users.html index 0f414fe..86a87b1 100644 --- a/app/templates/admin/list_users.html +++ b/app/templates/admin/list_users.html @@ -23,7 +23,7 @@ {% for usr in users %} {{ usr.pid }} - {{ usr.email }} + {{ usr.email }} {{ moment(usr.last_seen).format('lll') }} {{ usr.last_ip }} {{ usr.wallet }} diff --git a/app/templates/main/dashboard.html b/app/templates/main/dashboard.html index 467c8e6..de41845 100644 --- a/app/templates/main/dashboard.html +++ b/app/templates/main/dashboard.html @@ -123,12 +123,12 @@ addEventListener("DOMContentLoaded", function() {
- {% if inv_deployments != [] %}
Deployments

+ {% if inv_deployments != [] %}

{% for deploy in inv_deployments %} {% if deploy.enabled == False %} @@ -232,17 +232,19 @@ addEventListener("DOMContentLoaded", function() { - -
-
-
+ {% else %} + + {% endif %} +
+
+
{% if inv_domains != [] %}
Domains
-

+

@@ -272,13 +274,15 @@ addEventListener("DOMContentLoaded", function() {
- - +
+ {% else %} + {% endif %} + {% if inv_addresses != [] %}
@@ -306,18 +310,18 @@ addEventListener("DOMContentLoaded", function() {
- +
{% endif %} - {% if inv_services != [] %}
Services
-

+

+ {% if inv_services != [] %}
@@ -356,10 +360,13 @@ addEventListener("DOMContentLoaded", function() {
-
-
-
+ {% else %} + {% endif %} +
+ + + diff --git a/app/templates/main/index.html b/app/templates/main/index.html index 42e61e4..274b424 100644 --- a/app/templates/main/index.html +++ b/app/templates/main/index.html @@ -61,7 +61,7 @@
- +