From 99184859a4bb8795866bad4f096bc811a92f061c Mon Sep 17 00:00:00 2001 From: topilski Date: Tue, 3 Sep 2019 09:10:08 -0400 Subject: [PATCH] Remove sub --- app/common | 2 +- app/config/config.py | 3 +-- app/service/service_client.py | 18 ++---------------- app/templates/provider/dashboard.html | 2 -- app/templates/service/base.html | 4 ---- 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/app/common b/app/common index bb2c317..99e119d 160000 --- a/app/common +++ b/app/common @@ -1 +1 @@ -Subproject commit bb2c317fd80cec24861458a120db09dccfe712dd +Subproject commit 99e119d1facbd614f7f8307f9512578e79eead8a diff --git a/app/config/config.py b/app/config/config.py index dc1b979..aba1804 100644 --- a/app/config/config.py +++ b/app/config/config.py @@ -2,5 +2,4 @@ SECRET_KEY = '1d4bb560a7644fa48852a92ce52d6e08' SERVER_NAME_FOR_POST = '0.0.0.0:8080' PREFERRED_URL_SCHEME = 'http' -BOOTSTRAP_SERVE_LOCAL = True -SUBSCRIBERS_SUPPORT = True \ No newline at end of file +BOOTSTRAP_SERVE_LOCAL = True \ No newline at end of file diff --git a/app/service/service_client.py b/app/service/service_client.py index 1f783e6..c1ca49a 100644 --- a/app/service/service_client.py +++ b/app/service/service_client.py @@ -25,8 +25,6 @@ class ServiceClient(IClientHandler): HTTP_HOST = 'http_host' VODS_HOST = 'vods_host' CODS_HOST = 'cods_host' - SUBSCRIBERS_HOST = 'subscribers_host' - BANDWIDTH_HOST = 'bandwidth_host' VERSION = 'version' OS = 'os' @@ -138,12 +136,6 @@ class ServiceClient(IClientHandler): def get_cods_host(self) -> str: return self._cods_host - def get_subscribers_host(self) -> str: - return self._subscribers_host - - def get_bandwidth_host(self) -> str: - return self._bandwidth_host - def get_vods_in(self) -> list: return self._vods_in @@ -158,14 +150,11 @@ class ServiceClient(IClientHandler): if req.method == Commands.ACTIVATE_COMMAND and resp.is_message(): if self._handler: result = resp.result - subscribers_host = result.get(ServiceClient.SUBSCRIBERS_HOST, None) - bandwidth_host = result.get(ServiceClient.BANDWIDTH_HOST, None) os = OperationSystem(**result[ServiceClient.OS]) self._set_runtime_fields(result[ServiceClient.HTTP_HOST], result[ServiceClient.VODS_HOST], - result[ServiceClient.CODS_HOST], subscribers_host, bandwidth_host, - result[ServiceClient.VERSION], os) + result[ServiceClient.CODS_HOST], result[ServiceClient.VERSION], os) self._handler.on_service_statistic_received(result) if req.method == Commands.PREPARE_SERVICE_COMMAND and resp.is_message(): @@ -199,16 +188,13 @@ class ServiceClient(IClientHandler): self._handler.on_client_state_changed(status) # private - def _set_runtime_fields(self, http_host=None, vods_host=None, cods_host=None, subscribers_host=None, - bandwidth_host=None, + def _set_runtime_fields(self, http_host=None, vods_host=None, cods_host=None, version=None, os=None, vods_in=None): self._http_host = http_host self._vods_host = vods_host self._cods_host = cods_host - self._subscribers_host = subscribers_host - self._bandwidth_host = bandwidth_host self._version = version self._os = os self._vods_in = vods_in diff --git a/app/templates/provider/dashboard.html b/app/templates/provider/dashboard.html index a54bc44..56dd782 100644 --- a/app/templates/provider/dashboard.html +++ b/app/templates/provider/dashboard.html @@ -167,14 +167,12 @@ Dashboard | {{ config['PUBLIC_CONFIG'].site.title }} {% trans %}Providers{% endtrans %} - {% if (config['SUBSCRIBERS_SUPPORT']) %}
{% trans %}Subscribers{% endtrans %}
- {% endif %} {% if (role == 2) %}
{{ render_bootstrap_form(form.cods_host) }}
- {{ render_bootstrap_form(form.subscribers_host) }} -
- {{ render_bootstrap_form(form.bandwidth_host) }} -
{{ render_bootstrap_field(form.feedback_directory) }}
{{ render_bootstrap_field(form.timeshifts_directory) }}