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 @@ + +