From ebcdb1ccb173b6753fa130b56e6810767e221956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 15 Jun 2026 13:57:48 +0400 Subject: [PATCH] =?UTF-8?q?v0.5.107:=20inline-=D1=80=D0=B5=D0=B4=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B2=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B5,=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=20/=20=E2=86=92=20/v?= =?UTF-8?q?2/app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- server.js | 2 ++ v2/src/config/index.js | 2 +- views/v2/user.ejs | 61 +++++++++++++++++++++++++++++++++--------- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 5109cf2..da091bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipwhitelist", - "version": "0.5.106", + "version": "0.5.107", "description": "IP WhiteList microservice for cloud provider", "main": "server.js", "scripts": { diff --git a/server.js b/server.js index 3264bc7..cd2804b 100644 --- a/server.js +++ b/server.js @@ -136,6 +136,8 @@ async function start() { // ── UI-слой: SSR через EJS, данные из /api/v1/* ─────────────────────────── // Монтируется ПОСЛЕ /api/v1/ — не перехватывает API-запросы. // ── V2 — тестовый роутер (Keycloak → IAM → вывод) ───────────────── + // Редирект корня на V2 + app.get('/', (req, res) => res.redirect('/v2/app')); const { createV2Router } = require('./v2/server'); app.use('/v2', createV2Router()); // Хранит Bearer token в сессии, рендерит те же views/*.ejs. diff --git a/v2/src/config/index.js b/v2/src/config/index.js index 8d36ca1..b40c9b3 100644 --- a/v2/src/config/index.js +++ b/v2/src/config/index.js @@ -9,7 +9,7 @@ // ═══════════════════════════════════════════════════════════════════════════════ module.exports = { - version: '0.5.103', + version: '0.5.104', // ── IAM ────────────────────────────────────────────────────────────────── iamUrl: process.env.V2_IAM_URL || 'https://auth-api.ngcloud.ru/api/v1/auth/user', diff --git a/views/v2/user.ejs b/views/v2/user.ejs index 014cb97..f07ca98 100644 --- a/views/v2/user.ejs +++ b/views/v2/user.ejs @@ -215,26 +215,34 @@ Комментарий Добавил Добавлена - Действия + Действия <% entries.forEach(function(e) { %> - - <%= e.value_cidr %><% if (e.deleted_at) { %> удалена<% } %> - <%= e.comment || '—' %> + + + <%= e.value_cidr %><% if (e.deleted_at) { %> удалена<% } %> + + + + <%= e.comment || '—' %> + + <%= e.created_by %> <%= new Date(e.created_at).toLocaleString('ru') %> <% if (!e.deleted_at) { %> -
- - - -
-
- -
+ + +
+ +
+
+ <% } %> @@ -247,6 +255,35 @@ + +