From e3bf53955fb40837f76e0efa73905e265eb12fb3 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Wed, 10 Jan 2024 14:46:59 -0300 Subject: [PATCH 1/4] Update netapi_webui.env --- config/netapi_webui.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/netapi_webui.env b/config/netapi_webui.env index c963f2a..d478dd0 100644 --- a/config/netapi_webui.env +++ b/config/netapi_webui.env @@ -4,7 +4,7 @@ NETWORKAPI_DEBUG=1 NETWORK_API_URL=http://192.168.0.104:8000/ -CADVLAN_SECRET_KEY='hakunamatata' +CADVLAN_SECRET_KEY= NETWORK_API_USERNAME=testeapi NETWORK_API_PASSWORD=testeapi From 139539df8fd55bb72b5b1405c943fccca6289acf Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Thu, 6 Jun 2024 11:05:34 -0300 Subject: [PATCH 2/4] disabed option in case of Finalidade == Producao and Cliente == VPN --- CadVlan/VipRequest/facade.py | 3 +++ CadVlan/templates/ajax/request-vip-client.html | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CadVlan/VipRequest/facade.py b/CadVlan/VipRequest/facade.py index f9bea40..b6c5573 100644 --- a/CadVlan/VipRequest/facade.py +++ b/CadVlan/VipRequest/facade.py @@ -180,6 +180,9 @@ def popular_client_shared(request, client_api): lists['clients'] = client_evip.environmentvip_step(finality) + for item in lists['clients']: + item['disabled'] = True if finality == 'Producao' and item['cliente_txt'] == 'VPN' else False + except NetworkAPIClientError, e: logger.error(e) messages.add_message(request, messages.ERROR, e) diff --git a/CadVlan/templates/ajax/request-vip-client.html b/CadVlan/templates/ajax/request-vip-client.html index ca332bb..9486f4e 100644 --- a/CadVlan/templates/ajax/request-vip-client.html +++ b/CadVlan/templates/ajax/request-vip-client.html @@ -15,5 +15,9 @@ limitations under the License. --> {% for client in clients %} - + {% if client.disabled %} + + {% else %} + + {% endif %} {% endfor %} \ No newline at end of file From 9961dde26147d943996b9c7b58e1548d968e3710 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Thu, 6 Jun 2024 11:13:54 -0300 Subject: [PATCH 3/4] ignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8874f34..0f518a8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ GloboNetworkAPI-client-python/* .project/ venv/ config/*.env -CadVlan/static \ No newline at end of file +CadVlan/static +*.env \ No newline at end of file From 91f0ec34a1dec5e5b5e785754d7f191558197570 Mon Sep 17 00:00:00 2001 From: Renan Lopes Date: Thu, 6 Jun 2024 11:16:23 -0300 Subject: [PATCH 4/4] requirements and debug --- requirements.txt | 1 + scripts/docker/docker-start-debug.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4d2bf36..997f1a1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ python-ldap==2.3.13 python-memcached==1.48 gunicorn==19.8.1 PyYAML +#pyyaml==5.3.1 #If you have problem with PyYaml, try this \ No newline at end of file diff --git a/scripts/docker/docker-start-debug.sh b/scripts/docker/docker-start-debug.sh index 8ab7990..c92567e 100755 --- a/scripts/docker/docker-start-debug.sh +++ b/scripts/docker/docker-start-debug.sh @@ -43,4 +43,4 @@ echo "starting runserver 0.0.0.0:8080" rm -rf CadVlan/static python manage.py collectstatic --settings=CadVlan.settings --noinput -python manage.py runserver 0.0.0.0:8080 > /tmp/cadvlan.log 2>&1 +python manage.py runserver 0.0.0.0:8080