From 4db0660712cae6a6265bb2e09082dd8d6bab31da Mon Sep 17 00:00:00 2001
From: iriska-gri <79623434+iriska-gri@users.noreply.github.com>
Date: Fri, 2 Feb 2024 09:40:52 +0300
Subject: [PATCH 1/2] 1
---
.../src/components/UI/aboutportal/top-user.vue | 6 ++++--
src/front/src/views/AboutPortalPage.vue | 13 ++++++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/front/src/components/UI/aboutportal/top-user.vue b/src/front/src/components/UI/aboutportal/top-user.vue
index 2cd554470..46b7ca83d 100644
--- a/src/front/src/components/UI/aboutportal/top-user.vue
+++ b/src/front/src/components/UI/aboutportal/top-user.vue
@@ -2,7 +2,7 @@
-
+
@@ -48,6 +48,8 @@ export default {
components: { listUser },
props: {
+
+
name: {
type: String,
default: ''
diff --git a/src/front/src/views/AboutPortalPage.vue b/src/front/src/views/AboutPortalPage.vue
index 4fd848025..0cd938131 100644
--- a/src/front/src/views/AboutPortalPage.vue
+++ b/src/front/src/views/AboutPortalPage.vue
@@ -20,7 +20,15 @@
- 3
+
+
+
+
+
4
@@ -209,6 +217,7 @@ setup(){
const feedback = ref([])
const staff = ref(0)
const dataLineChart = ref({})
+ const dataActivusers = ref({})
const previous = ref({start: new Date(), end: new Date()})
const selected_days = ref({today: 'сегодня', year: {start: new Date(), end: new Date()}})
@@ -325,6 +334,7 @@ setup(){
}
dataLineChart.value = lineCharts
+ dataActivusers.value = activusers
return acc
}, {})
@@ -361,6 +371,7 @@ setup(){
pages_count,
visitionreduce,
dataLineChart,
+ dataActivusers,
previous,
format1,
selected_days
From e2a0555271073a4e62409dba2fb392696e61eba8 Mon Sep 17 00:00:00 2001
From: iriska-gri <79623434+iriska-gri@users.noreply.github.com>
Date: Fri, 2 Feb 2024 10:24:21 +0300
Subject: [PATCH 2/2] test
---
.../components/UI/aboutportal/top-user.vue | 1 +
src/front/src/views/AboutPortalPage.vue | 24 ++-
sys/portal.conf | 150 ------------------
.../daphne/portal.service(old_gunicorn)} | 2 +-
.../daphne}/portaldaphne.service | 2 +-
sys/test_server/nginx/portal.conf | 65 ++++++++
6 files changed, 87 insertions(+), 157 deletions(-)
delete mode 100644 sys/portal.conf
rename sys/{portal.service => test_server/daphne/portal.service(old_gunicorn)} (98%)
rename sys/{ => test_server/daphne}/portaldaphne.service (85%)
create mode 100644 sys/test_server/nginx/portal.conf
diff --git a/src/front/src/components/UI/aboutportal/top-user.vue b/src/front/src/components/UI/aboutportal/top-user.vue
index 46b7ca83d..0a73008a1 100644
--- a/src/front/src/components/UI/aboutportal/top-user.vue
+++ b/src/front/src/components/UI/aboutportal/top-user.vue
@@ -2,6 +2,7 @@
+
-
+
+ 2
+
+{{x}}
+
+
+
+
+
4
diff --git a/sys/portal.conf b/sys/portal.conf
deleted file mode 100644
index bf65e2ea9..000000000
--- a/sys/portal.conf
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-# Daphne, Django channels backend
-upstream portal-backend {
- server 127.0.0.1:9967;
- }
-
-#Flask backend for UKD Wizard
-#
-#upstream wizard-backend {
-# server 10.252.44.60:8888;
-# }
-
-# PORTAL Test server
-server {
-
- listen 9966;
- server_name 9966;
-
-
- send_timeout 600;
- proxy_connect_timeout 600;
- proxy_send_timeout 600;
- proxy_read_timeout 600;
-
- root /var/www/PORTAL_COD2/src/front/dist/;
- include /etc/nginx/mime.types;
- access_log /var/log/nginx/portal.access.log;
- error_log /var/log/nginx/portal.error.log;
-
- location / {
- try_files $uri /index.html;
- }
-
-# location ~ ^.*/static/(.+\.xlsx)/$ {
-# alias /var/www/portal/portal/static;
-# }
-
- location /static {
- autoindex on;
- alias /var/www/PORTAL_COD2/src/portal/static/;
- }
-
- location /media {
- alias /var/www/PORTAL_COD2/src/portal/media;
-
- }
-
- location ^~ /api/ {
- client_max_body_size 100m;
- include proxy_params;
- proxy_pass http://127.0.0.1:8085;
- }
-# error_page 500 502 503 504 /500.html;
-# location = /500.html {
-# root /var/www/proj/;
-# internal;
-# }
-# location /testing {
-# fastcgi_pass unix:/does/not/exit;
-#}
-# VS 20220530 - Test reverse proxy for statistics as susbsite
-## location /stat {
-## rewrite ^/stat(.*) /$1 break;
-# proxy_set_header Host "stat";
-### proxy_set_header X-Real-IP $remote_addr;
-### proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-### proxy_set_header X-Forwarded-Proto $scheme;
-### autoindex on;
-#
-### proxy_pass http://127.0.0.1:8080;
-### }
-
-
-location /ws/ {
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_redirect off;
- proxy_pass http://portal-backend;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Host $server_name;
- }
-
-# Wizard integration
-# vs@20220831
-#location /wizard/ {
-# proxy_http_version 1.1;
-# proxy_set_header Upgrade $http_upgrade;
-# proxy_set_header Connection "upgrade";
- #proxy_redirect off;
-# proxy_set_header Host $host;
-#proxy_set_header Host $http_host;
-# proxy_set_header X-Real-IP $remote_addr;
-# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-# proxy_set_header X-Forwarded-Host $server_name;
-# proxy_set_header X-Forwarded-Proto $scheme;
-# proxy_pass http://wizard-backend/;
- #proxy_pass http://wizard-backend/wizard;
-# include proxy_params;
-# }
-##location /_next/ {
-## proxy_http_version 1.1;
-## proxy_set_header Upgrade $http_upgrade;
-## proxy_set_header Connection "upgrade";
-## #proxy_redirect off;
-## proxy_set_header Host $host;
-#proxy_set_header Host $http_host;
-## proxy_set_header X-Real-IP $remote_addr;
-## proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-## proxy_set_header X-Forwarded-Host $server_name;
-## proxy_set_header X-Forwarded-Proto $scheme;
-## proxy_pass http://wizard-backend/;
-## #proxy_pass http://wizard-backend/wizard;
-# include proxy_params;
-## }
-
-# Test redirection - all works fine.
-# http://ukt/node-red/ -> http://10.252.44.35:1880/
-# vs@20220831
-## location /node-red/ {
-## proxy_http_version 1.1;
-## proxy_set_header Upgrade $http_upgrade;
-## proxy_set_header Connection "upgrade";
-## proxy_set_header Host 10.252.44.35;
-## proxy_set_header X-Real-IP $remote_addr;
-## proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-## proxy_set_header X-Forwarded-Proto $scheme;
-## proxy_pass http://10.252.44.35:1880/;
-## }
-# Does not work
-##location ^~ /wiki/ {
-## proxy_http_version 1.1;
-## proxy_set_header Upgrade $http_upgrade;
-## proxy_set_header Connection "upgrade";
-## proxy_redirect off;
-## #proxy_set_header Host $host;
-## #proxy_set_header Host $http_host;
-## proxy_set_header Host wiki.cod2.regions.tax.nalog.ru;
-
-
-
-
-
-
-
-
-}
diff --git a/sys/portal.service b/sys/test_server/daphne/portal.service(old_gunicorn)
similarity index 98%
rename from sys/portal.service
rename to sys/test_server/daphne/portal.service(old_gunicorn)
index 8c1368828..dfaa03d80 100644
--- a/sys/portal.service
+++ b/sys/test_server/daphne/portal.service(old_gunicorn)
@@ -7,7 +7,7 @@ After=network.target
[Service]
User=root
#WorkingDirectory=/var/www/proj/DQM/dqmback
-WorkingDirectory=/var/www/PORTAL_COD2/src/
+WorkingDirectory=/var/www/PORTAL_COD2/src
# --timeout NNN - set timeout for gunicorn to NNN sec, default - 30sec
# --access-logfile FILENAME - log all requests to file FILENAMEA
# --error-logfile FILENAME - set error log file to FILENAME
diff --git a/sys/portaldaphne.service b/sys/test_server/daphne/portaldaphne.service
similarity index 85%
rename from sys/portaldaphne.service
rename to sys/test_server/daphne/portaldaphne.service
index 1d94b7bb6..69fc3f186 100644
--- a/sys/portaldaphne.service
+++ b/sys/test_server/daphne/portaldaphne.service
@@ -7,7 +7,7 @@ Type=simple
User=root
#Group = nginx
WorkingDirectory=/var/www/PORTAL_COD2/src
-ExecStart=/var/www/PORTAL_COD2/env/bin/python /var/www/PORTAL_COD2/env/bin/daphne -p 9967 portal.asgi:application
+ExecStart=/var/www/PORTAL_COD2/env/bin/python /var/www/PORTAL_COD2/env/bin/daphne -p 9966 portal.asgi:application
Restart=on-failure
[Install]
diff --git a/sys/test_server/nginx/portal.conf b/sys/test_server/nginx/portal.conf
new file mode 100644
index 000000000..668f79142
--- /dev/null
+++ b/sys/test_server/nginx/portal.conf
@@ -0,0 +1,65 @@
+
+
+# Daphne, Django channels backend
+upstream portal-backend {
+ server 127.0.0.1:9966;
+ }
+
+
+# PORTAL Test server
+server {
+
+ listen 80;
+
+ server_name portal-t portal-t.cod2.regions.tax.nalog.ru;
+
+ send_timeout 600;
+ proxy_connect_timeout 600;
+ proxy_send_timeout 600;
+ proxy_read_timeout 600;
+
+ root /var/www/PORTAL_COD2/src/front/dist/;
+ include /etc/nginx/mime.types;
+ access_log /var/log/nginx/portal.access.log;
+ error_log /var/log/nginx/portal.error.log;
+
+ location / {
+ try_files $uri /index.html;
+ }
+
+
+
+ location /static {
+ autoindex on;
+ alias /var/www/PORTAL_COD2/src/static/;
+ }
+
+ location /media {
+ alias /var/www/PORTAL_COD2/src/media;
+
+ }
+
+ location ^~ /api/ {
+ client_max_body_size 100m;
+ include proxy_params;
+ proxy_pass http://portal-backend;
+ }
+
+ location ^~ /admin {
+ include proxy_params;
+ proxy_pass http://portal-backend;
+}
+
+
+location /ws/ {
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_redirect off;
+ proxy_pass http://portal-backend;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Host $server_name;
+ }
+}