From f5ee0a36de634b46dfd2032b21e245fcd7c23cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 14:36:11 +0400 Subject: [PATCH] =?UTF-8?q?v0.5.112:=20=D1=81=D1=82=D0=B8=D0=BB=D1=8C=20?= =?UTF-8?q?=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=BA=D0=B0=D0=BA?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9,=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD=20=D0=92=D1=8B=D0=B9?= =?UTF-8?q?=D1=82=D0=B8,=20=E2=9A=99=EF=B8=8F=E2=86=92=D0=9B=D0=B8=D0=BC?= =?UTF-8?q?=D0=B8=D1=82=D1=8B=20=D0=B8=20=D0=90=D1=83=D0=B4=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- v2/src/config/index.js | 2 +- views/v2/admin-audit.ejs | 136 +++++++++++++++++++++++------ views/v2/admin.ejs | 182 +++++++++++++++++++++++++++++---------- views/v2/user.ejs | 2 +- 5 files changed, 248 insertions(+), 76 deletions(-) diff --git a/package.json b/package.json index 68a0475..5060b37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.5.111", + "version": "0.5.112", "description": "IP WhiteList microservice for cloud provider", "main": "server.js", "scripts": { diff --git a/v2/src/config/index.js b/v2/src/config/index.js index a691ae8..448fa8d 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.5.111', + version: '0.5.112', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/views/v2/admin-audit.ejs b/views/v2/admin-audit.ejs index 547cdbf..8f336a2 100644 --- a/views/v2/admin-audit.ejs +++ b/views/v2/admin-audit.ejs @@ -1,30 +1,110 @@ -Аудит — <%= company ? company.client_id : 'Все' %> — v<%= version %> - -
- 📋 Аудит <%= company ? company.client_id : 'Все компании' %> - ← Админка | Пользовательский + + + + Аудит — <%= company ? company.client_id : 'Все' %> — IP WhiteList v<%= version %> + + + + + +
+ + + + + + + + + + | + Аудит: <%= company ? company.client_id : 'Все компании' %> + + ← Лимиты + +
+ +
+
+
Журнал операций (макс 500)
+ <% if (audit.length === 0) { %> +
Нет записей
+ <% } else { %> +
+ + + + + + + + + + + + + <% audit.forEach(function(a) { %> + + + + + + + + + <% }) %> + +
ДатаДействиеКтоОт имениКомпанияЗначения
<%= new Date(a.created_at).toLocaleString('ru') %><%= a.action %><%= a.user_email %><%= a.impersonated_by || '—' %><%= a.company_name || '—' %><% if (a.old_value) { %><%= a.old_value %><% } else { %>—<% } %> → <% if (a.new_value) { %><%= a.new_value %><% } else { %>—<% } %>
+
+ <% } %> +
- - - <% if (audit.length === 0) { %><% } %> - <% audit.forEach(function(a) { %> - - - - - - - - - <% }) %> -
ДатаДействиеКтоОт имениКомпанияЗначения
Нет записей
<%= new Date(a.created_at).toLocaleString('ru') %><%= a.action %><%= a.user_email %><%= a.impersonated_by || '—' %><%= a.company_name || '—' %><%= a.old_value || '—' %> → <%= a.new_value || '—' %>
-

Показано: <%= audit.length %> (макс 500)

- + + diff --git a/views/v2/admin.ejs b/views/v2/admin.ejs index 3afdb8a..73ba772 100644 --- a/views/v2/admin.ejs +++ b/views/v2/admin.ejs @@ -1,47 +1,139 @@ -Admin — IP WhiteList v<%= version %> - -
- 🛡️ ADMIN v<%= version %> - <%= user.email || '—' %> | ← Пользовательский | Выйти + + + + Лимиты и Аудит — IP WhiteList v<%= version %> + + + + + +
+ + + + + + + + + + | + Лимиты и Аудит + + <%= user.email %> + ← Назад + +
+ +
+ + + +
+
Компании и лимиты (дефолт: 15)
+ <% if (companies.length === 0) { %> +
Нет компаний в системе
+ <% } else { %> +
+ + + + + + + + + + + + + <% companies.forEach(function(c) { %> + + + + + + + + + <% }) %> + +
КомпанияClient IDЗаписейЛимитНовый лимит
<%= c.name || c.client_id %><%= c.client_id %><%= c.active_count %> / <%= c.custom_limit != null ? c.custom_limit : 15 %><%= c.custom_limit != null ? c.custom_limit : '—' %> + аудит + +
+ + + +
+
+
+ <% } %> +
+
- -

Компании (<%= companies.length %>)

- - - <% if (companies.length === 0) { %><% } %> - <% companies.forEach(function(c) { %> - - - - - - - - - <% }) %> -
КомпанияClient IDЗаписейЛимитНовый лимит
Нет компаний
<%= c.name || c.client_id %><%= c.client_id %><%= c.active_count %> / <%= c.custom_limit != null ? c.custom_limit : 15 %><%= c.custom_limit != null ? c.custom_limit : '—' %> - аудит | - записи - -
- - - -
-
- + + diff --git a/views/v2/user.ejs b/views/v2/user.ejs index b428fe2..7c9b96a 100644 --- a/views/v2/user.ejs +++ b/views/v2/user.ejs @@ -154,7 +154,7 @@ <% if (user.isAdmin) { %> Режим: Администратор - ⚙️ + Лимиты и Аудит <% } %>